[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-3.1.1] awk.h patch for Solaris 8 without NLS
From: |
Ayamura KIKUCHI |
Subject: |
[gawk-3.1.1] awk.h patch for Solaris 8 without NLS |
Date: |
Fri, 10 May 2002 00:00:41 +0900 |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigory ōmae) APEL/10.3 Emacs/21.2 (mips-sgi-irix6.5) MULE/5.0 (SAKAKI) |
% 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.
- [gawk-3.1.1] awk.h patch for Solaris 8 without NLS,
Ayamura KIKUCHI <=