]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Portability to AIX 3.
authorBruno Haible <bruno@clisp.org>
Thu, 20 Dec 2001 21:02:19 +0000 (21:02 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 21:52:48 +0000 (23:52 +0200)
src/ChangeLog
src/format-lisp.c
src/msgfilter.c
src/po-hash-gen.y
src/po-lex.c
src/write-mo.c
src/x-java.l
src/x-lisp.c

index bd570fe271b711e8cc0adbc05f6ed7330c3767af..b6e6a2fe53d4267a3187e5e088f660c4c57c6777 100644 (file)
@@ -1,6 +1,15 @@
 2001-12-20  Bruno Haible  <bruno@clisp.org>
 
        * format-java.c: Include system.h.
+       * format-lisp.c (parse_upto): Fix prototype. char promotes to int.
+       * po-lex.c (mb_iseq, mb_setascii): Likewise.
+       * po-hash-gen.y: alloca fix for AIX 3.
+       * write-mo.c: Likewise.
+       * x-lisp.c (syntax_code_of, read_char_syntax, attribute_of): Move
+       prototypes, to avoid compilation errors on AIX 3.
+       * x-java.l (TOKEN_TYPE): Remove trailing comma in enum.
+       (PARSER_STATE): Likewise.
+       * msgfilter.c: Include <sys/select.h> on AIX.
 
 2001-12-12  Bruno Haible  <bruno@clisp.org>
 
index 35e7510337e258f98038051c813e5bd6781fe274..e83829bd67d33f9dfc55a0d524d08226684368a5 100644 (file)
@@ -224,7 +224,8 @@ static bool parse_upto PARAMS ((const char **formatp, int *positionp,
                                struct format_arg_list **listp,
                                struct format_arg_list **escapep,
                                int *separatorp, struct spec *spec,
-                               char terminator, bool separator));
+                               /*promote: char*/ int terminator,
+                               bool separator));
 static void *format_parse PARAMS ((const char *format));
 static void format_free PARAMS ((void *descr));
 static int format_get_number_of_directives PARAMS ((void *descr));
index ea178e7df42b743cfcb46aa10ae6425076a2328a..58a4077c617843a5c851a496f4a476ceda25903d 100644 (file)
 # include <unistd.h>
 #endif
 
+/* Get fd_set.  */
+#ifdef _AIX
+# include <sys/select.h>
+#endif
+
 #include "dir-list.h"
 #include "error.h"
 #include "progname.h"
index 22947e1a89c8f7667b8a76178001226aa40b9639..7afac284dc3723881fe5629c31bcec8c5f1c32fe 100644 (file)
@@ -19,6 +19,14 @@ 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
index eee7d4d7c83dfca4f6f89124aafde6583711a9f0..c90e21a96f59dc89d16849f80f026755b1cea720 100644 (file)
@@ -216,14 +216,16 @@ static inline void memcpy_small PARAMS ((void *dst, const void *src, size_t n));
 static inline bool mb_iseof PARAMS ((const mbchar_t mbc));
 static inline const char *mb_ptr PARAMS ((const mbchar_t mbc));
 static inline size_t mb_len PARAMS ((const mbchar_t mbc));
-static inline bool mb_iseq PARAMS ((const mbchar_t mbc, char sc));
+static inline bool mb_iseq PARAMS ((const mbchar_t mbc,
+                                   /*promote: char*/ int sc));
 static inline bool mb_isnul PARAMS ((const mbchar_t mbc));
 static inline int mb_cmp PARAMS ((const mbchar_t mbc1, const mbchar_t mbc2));
 static inline bool mb_equal PARAMS ((const mbchar_t mbc1, const mbchar_t mbc2));
 static inline bool mb_isascii PARAMS ((const mbchar_t mbc));
 static int mb_width PARAMS ((const mbchar_t mbc));
 static inline void mb_putc PARAMS ((const mbchar_t mbc, FILE *stream));
-static inline void mb_setascii PARAMS ((mbchar_t mbc, char sc));
+static inline void mb_setascii PARAMS ((mbchar_t mbc,
+                                       /*promote: char*/ int sc));
 static inline void mb_copy PARAMS ((mbchar_t new, const mbchar_t old));
 
 /* A version of memcpy optimized for the case n <= 1.  */
index c234e24dcbfc6dbd1d4a903b32b1bfa91ee2caed..2cdcd9f3f932cde12b7e372b5b203835ffe0f4d3 100644 (file)
    along with this program; if not, write to the Free Software Foundation,
    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
+/* AIX 3 forces us to put this declaration at the beginning of the file.  */
+#if defined _AIX && !defined __GNUC__
+ #pragma alloca
+#endif
+
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
index a9ead92442ea1e4c48612a978674b78210502322..93be315f7ab0bececf8b1cf2e370fb0874fdbaf8 100644 (file)
@@ -38,7 +38,7 @@ typedef enum
   JAVA_STRING,
   JAVA_OPERATOR,
   JAVA_FLOW,
-  JAVA_COMMENT,
+  JAVA_COMMENT
 } TOKEN_TYPE;
 
 typedef struct
@@ -62,7 +62,7 @@ typedef enum
   STATE_WORD,
   STATE_APPEND,
   STATE_INVOCATION,
-  STATE_KEYWORD,
+  STATE_KEYWORD
 } PARSER_STATE;
 
 typedef struct
index a8671dc3bfd81c3bef03646132bf0bf32e20cd7a..3145786395787ac8a61cb7df20f32c7c7e7e83c9 100644 (file)
@@ -82,9 +82,6 @@ struct object;
 static void init_keywords PARAMS ((void));
 static int do_getc PARAMS ((void));
 static void do_ungetc PARAMS ((int c));
-static enum syntax_code syntax_code_of PARAMS ((unsigned char c));
-static void read_char_syntax PARAMS ((struct char_syntax *p));
-static enum attribute attribute_of PARAMS ((unsigned char c));
 static inline void init_token PARAMS ((struct token *tp));
 static inline void free_token PARAMS ((struct token *tp));
 static inline void grow_token PARAMS ((struct token *tp));
@@ -273,6 +270,11 @@ enum syntax_code
   syntax_nt_macro      /* '#' (non-terminating macro)          */
 };
 
+/* Prototypes for local functions.  Needed to ensure compiler checking of
+   function argument counts despite of K&R C function definition syntax.  */
+static enum syntax_code syntax_code_of PARAMS ((unsigned char c));
+static void read_char_syntax PARAMS ((struct char_syntax *p));
+
 /* Returns the syntax code of a character.  */
 static enum syntax_code
 syntax_code_of (c)
@@ -340,6 +342,10 @@ enum attribute
 #define is_letter_attribute(a) ((a) >= a_letter)
 #define is_number_attribute(a) ((a) >= a_ratio)
 
+/* Prototypes for local functions.  Needed to ensure compiler checking of
+   function argument counts despite of K&R C function definition syntax.  */
+static enum attribute attribute_of PARAMS ((unsigned char c));
+
 /* Returns the attribute of a character, assuming base 10.  */
 static enum attribute
 attribute_of (c)