PATCH: intl.h & system.h ordering

Nathan Sidwell nathan@acm.org
Tue Feb 9 09:42:00 GMT 1999


Hi,
Attached is a patch which fixes a build problem with the i18n support. system.h
was left unconditionally defining _ and N_ as dummy i18n macros. If intl.h was
included after system.h, it would not attempt to redefine these macros. So
AFAICT no i18n support would work. I have deleted these two macros from
system.h.

protoize.c included intl.h and then system.h, this gave a redefinition error on
_ and N_, as intl.h defined them properly and system.h did not. (This is what
alerted me to the problem.) Even though removing them from system.h fixes this,
I think it good to reorder the inclusion of intl.h to after system.h, and have
done so.

The removal of _ and N_ from system.h, left cexp.y broken. I have added an
inclusion of intl.h. Other files which need _ and N_ already include intl.h.

Enjoy

nathan

-- 
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
      You can up the bandwidth, but you can't up the speed of light      
nathan@acm.org  http://www.cs.bris.ac.uk/~nathan/  nathan@cs.bris.ac.uk
egcs/gcc/ChangeLog:
Tue Feb  9 17:27:29 GMT 1999  Nathan Sidwell  <nathan@acm.org>

	* system.h (_, N_): Remove dummy i18n macros.
	* protoize.c: Move inclusion of intl.h to after system.h.
	* cexp.y: Include intl.h.

Index: egcs/gcc/system.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/system.h,v
retrieving revision 1.30
diff -c -3 -p -r1.30 system.h
*** system.h	1999/02/06 17:20:33	1.30
--- system.h	1999/02/09 17:26:31
*************** extern void abort ();
*** 404,413 ****
  # endif
  #endif /* ! STRINGIFY */
  
- /* These macros are here in preparation for the use of gettext in egcs.  */
- #define _(String) String
- #define N_(String) String
- 
  #if HAVE_SYS_STAT_H
  # include <sys/stat.h>
  #endif
--- 404,409 ----
Index: egcs/gcc/protoize.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/protoize.c,v
retrieving revision 1.34
diff -c -3 -p -r1.34 protoize.c
*** protoize.c	1999/01/30 14:34:09	1.34
--- protoize.c	1999/02/09 17:26:36
*************** Boston, MA 02111-1307, USA.  */
*** 39,46 ****
  
  #include "config.h"
  
- #include "intl.h"
- 
  #if 0
  /* Users are not supposed to use _POSIX_SOURCE to say the
     system is a POSIX system.  That is not what _POSIX_SOURCE means! -- rms  */ 
--- 39,44 ----
*************** Boston, MA 02111-1307, USA.  */
*** 60,65 ****
--- 58,65 ----
  #endif
  
  #include "system.h"
+ #include "intl.h"
+ 
  #if ! defined (_WIN32) || defined (__CYGWIN__)
  #if defined(POSIX) || defined(CONCURRENT)
  #include <dirent.h>
Index: egcs/gcc/cexp.y
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cexp.y,v
retrieving revision 1.11
diff -c -3 -p -r1.11 cexp.y
*** cexp.y	1999/01/27 01:41:54	1.11
--- cexp.y	1999/02/09 17:26:36
*************** Boston, MA 02111-1307, USA.
*** 28,33 ****
--- 28,34 ----
  #include "config.h"
  
  #include "system.h"
+ #include "intl.h"
  #include <setjmp.h>
  /* #define YYDEBUG 1 */
  


More information about the Gcc-patches mailing list