diff options
author | Bruno Haible <bruno@clisp.org> | 2001-01-15 14:59:52 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2001-01-15 14:59:52 +0000 |
commit | e0560b43903ad644e19cff68c3b744a39d891613 (patch) | |
tree | 06626d434c05c2100b54330c3c6b6ff82926b803 /intl/dcigettext.c | |
parent | 4d48f86a3ab0114dce08c731553f90727f7dde03 (diff) | |
download | external_gettext-e0560b43903ad644e19cff68c3b744a39d891613.zip external_gettext-e0560b43903ad644e19cff68c3b744a39d891613.tar.gz external_gettext-e0560b43903ad644e19cff68c3b744a39d891613.tar.bz2 |
Portability fixes for K&R C compilers, SunOS "make" and others.
Diffstat (limited to 'intl/dcigettext.c')
-rw-r--r-- | intl/dcigettext.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/intl/dcigettext.c b/intl/dcigettext.c index fd50bd7..72bfbfc 100644 --- a/intl/dcigettext.c +++ b/intl/dcigettext.c @@ -28,11 +28,11 @@ #include <sys/types.h> -#if defined __GNUC__ && !defined C_ALLOCA +#ifdef __GNUC__ # define alloca __builtin_alloca # define HAVE_ALLOCA 1 #else -# if (defined HAVE_ALLOCA_H || defined _LIBC) && !defined C_ALLOCA +# if defined HAVE_ALLOCA_H || defined _LIBC # include <alloca.h> # else # ifdef _AIX @@ -130,6 +130,11 @@ void free (); # define _nl_domain_bindings _nl_domain_bindings__ #endif +/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */ +#ifndef offsetof +# define offsetof(type,ident) ((size_t)&(((type*)0)->ident)) +#endif + /* @@ end of prolog @@ */ #ifdef _LIBC @@ -235,7 +240,9 @@ static void *root; /* Function to compare two entries in the table of known translations. */ static int -transcmp (const void *p1, const void *p2) +transcmp (p1, p2) + const void *p1; + const void *p2; { struct known_translation_t *s1 = (struct known_translation_t *) p1; struct known_translation_t *s2 = (struct known_translation_t *) p2; |