bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gawk-3.1.1] awk.h patch for Solaris 8 without NLS


From: Aharon Robbins
Subject: Re: [gawk-3.1.1] awk.h patch for Solaris 8 without NLS
Date: Tue, 14 May 2002 16:59:42 +0300

I'm catching up on email.  Thanks for this patch. I'll
ultimately use Bruno's fix, which is to move the locale.h
checking into gettext.h.

Thanks,

Arnold Robbins

> Date: Fri, 10 May 2002 00:00:41 +0900
> From: Ayamura KIKUCHI <address@hidden>
> To: address@hidden
> Subject: [gawk-3.1.1] awk.h patch for Solaris 8 without NLS
>
> % uname -a
> SunOS host 5.8 Generic_108528-14 sun4u sparc SUNW,Ultra
> % gcc --version
> 2.95.3
>
> % ./configure --disable-nls
> % gmake
> gcc -DHAVE_CONFIG_H -I. I./intl ... -c `test -f array.c || echo './'`array.c
> In file included from /usr/include/locale.h:51,
>                  from awk.h:63,
>                  from array.c:40:
> /usr/include/libintl.h:31: parse error before `char'
> /usr/include/libintl.h:32: parse error before `char'
> /usr/include/libintl.h:33: parse error before `char'
> /usr/include/libintl.h:34: parse error before `char'
> /usr/include/libintl.h:35: parse error before `char'
> gmake[2]: *** [array.o] Error 1
> ...
>
> Solaris 8's <locale.h> includes <libintl.h>.  We need to put #include
> <locale.h> in awk.h immediately before the gettext.h block.  This will
> declare the functions first; our defines will override them if
> appropriate.  Here is the patch.
>
> --- gawk-3.1.1/awk.h.orig     2002-04-16 20:40:18.000000000 +0900
> +++ gawk-3.1.1/awk.h  2002-05-09 23:37:35.254101000 +0900
> @@ -49,6 +49,9 @@
>  #include <ctype.h>
>  #include <setjmp.h>
>  
> +#ifdef HAVE_LOCALE_H
> +#include <locale.h>
> +#endif /* HAVE_LOCALE_H */
>  #include "gettext.h"
>  #define _(msgid)  gettext(msgid)
>  #define N_(msgid) msgid
> @@ -59,9 +62,6 @@
>  #endif /* LOCALEDIR */
>  #endif
>  
> -#ifdef HAVE_LOCALE_H
> -#include <locale.h>
> -#endif /* HAVE_LOCALE_H */
>  #if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__
>  #include <stdarg.h>
>  #else
>
> -- ayamura
> Ayamura KIKUCHI, M.D., Ph.D.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]