This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

libintl vs. ISO (and non-gcc) C compilers


GCC has a pretty well tuned portability layer that is implemented 
via auto-host and libiberty.   Unfortunately, the newly added intl
directory will not compile with an ISO C compiler becuase it uses
things like 'inline' and tests configure variables that are never set.


The following kludge gets GCC to compile once again, but does not remove
all the compatibility stuff that slightly misses the target.  For
example, becuase it tests 'memcpy' which is never defined anywhere (even
though we're guaranteed to have one in libiberty) it implements it in
terms of bcopy. bcopy returns void.  But memcpy is used in an expression
so this simply won't work.

If there is a clear desire to push what seems to be the missing pieces
in, please ignore this patch.   If there is a desire insted to remove
all this stuff in gcc/intl and use the existing GCC mechanisms, I'll help
pull this stuff out and will provide better patches then.

But until then, this gets us back to compilesville.


Index: gettextP.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/intl/gettextP.h,v
retrieving revision 1.2
diff -u -p -r1.2 gettextP.h
--- gettextP.h	1999/09/04 15:08:49	1.2
+++ gettextP.h	2000/06/02 02:44:31
@@ -20,6 +20,7 @@
 #define _GETTEXTP_H
 
 #include "loadinfo.h"
+#include "auto-host.h"
 
 /* @@ end of prolog @@ */
 
Index: l10nflist.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/intl/l10nflist.c,v
retrieving revision 1.2
diff -u -p -r1.2 l10nflist.c
--- l10nflist.c	1999/09/04 15:08:49	1.2
+++ l10nflist.c	2000/06/02 02:44:31
@@ -18,8 +18,10 @@
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
+# include <auto-host.h>
 #endif
 
+#if 0
 
 #if defined HAVE_STRING_H || defined _LIBC
 # ifndef _GNU_SOURCE
@@ -36,6 +38,8 @@
 # ifndef strchr
 #  define strchr index
 # endif
+#endif
+
 #endif
 
 #if defined _LIBC || defined HAVE_ARGZ_H
Index: loadmsgcat.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/intl/loadmsgcat.c,v
retrieving revision 1.3
diff -u -p -r1.3 loadmsgcat.c
--- loadmsgcat.c	2000/04/17 17:25:57	1.3
+++ loadmsgcat.c	2000/06/02 02:44:32
@@ -22,6 +22,7 @@
 #include <fcntl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <auto-host.h>
 
 #if defined STDC_HEADERS || defined _LIBC
 # include <stdlib.h>
Index: localealias.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/intl/localealias.c,v
retrieving revision 1.2
diff -u -p -r1.2 localealias.c
--- localealias.c	1999/09/04 15:08:49	1.2
+++ localealias.c	2000/06/02 02:44:32
@@ -18,8 +18,9 @@
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
+# include <auto-host.h>
 #endif
-
+#if 0
 #include <ctype.h>
 #include <stdio.h>
 #include <sys/types.h>
@@ -67,6 +68,7 @@ void free ();
 # ifndef strchr
 #  define strchr index
 # endif
+#endif
 #endif
 
 #include "gettext.h"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]