about summary refs log tree commit diff
path: root/intl/plural.y
diff options
context:
space:
mode:
Diffstat (limited to 'intl/plural.y')
-rw-r--r--intl/plural.y25
1 files changed, 14 insertions, 11 deletions
diff --git a/intl/plural.y b/intl/plural.y
index 3345d15eeb..1ce3fd9604 100644
--- a/intl/plural.y
+++ b/intl/plural.y
@@ -19,22 +19,25 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+/* The bison generated parser uses alloca.  AIX 3 forces us to put this
+   declaration at the beginning of the file.  The declaration in bison's
+   skeleton file comes too late.  This must come before <config.h>
+   because <config.h> may include arbitrary system headers.  */
+#if defined _AIX && !defined __GNUC__
+ #pragma alloca
+#endif
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
+#include <stddef.h>
 #include <stdlib.h>
-#include "gettextP.h"
-
-/* Names for the libintl functions are a problem.  They must not clash
-   with existing names and they should follow ANSI C.  But this source
-   code is also used in GNU C Library where the names have a __
-   prefix.  So we have to make a difference here.  */
-#ifdef _LIBC
-# define FREE_EXPRESSION __gettext_free_exp
-#else
-# define FREE_EXPRESSION gettext_free_exp__
-# define __gettextparse gettextparse__
+#include "plural-exp.h"
+
+/* The main function generated by the parser is called __gettextparse,
+   but we want it to be called PLURAL_PARSE.  */
+#ifndef _LIBC
+# define __gettextparse PLURAL_PARSE
 #endif
 
 #define YYLEX_PARAM	&((struct parse_args *) arg)->cp