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]

PATCH: fixincludes for wchar_t



Here's the fixincludes patch.  This seems to work on Linux; Solaris
bootstrap starting now.

I broke protocol and did not fully bootstrap/test on Linux because the
tree is already broken for lots of people.  I will, however, be doing
that in the background and will back out my change if anything goes
wrong.

Thanks,

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

2000-11-11  Mark Mitchell  <mark@codesourcery.com>

	* fixinc/inclhack.def (avoid_wchar_t_type): New fix.
	* fininc/fixincl.x: Regenerated.

Index: fixinc/inclhack.def
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fixinc/inclhack.def,v
retrieving revision 1.93
diff -c -p -r1.93 inclhack.def
*** inclhack.def	2000/10/29 19:34:53	1.93
--- inclhack.def	2000/11/11 21:36:46
*************** fix = {
*** 769,774 ****
--- 769,790 ----
      test_text = "typedef unsigned int\tbool \t; /* bool type */";
  };
  
+ /*
+  *  For C++, avoid any typedef definition of wchar_t,
+  *  and use the built in type instead.
+  */
+ 
+ fix = {
+     hackname = avoid_wchar_t_type;
+ 
+     select    = "^[ \t]*typedef[ \t].*[ \t]wchar_t[ \t]*;";
+ 
+     c_fix     = format;
+     c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
+     c_fix_arg = "^[ \t]*typedef[ \t].*[ \t]wchar_t[ \t]*;.*";
+ 
+     test_text = "typedef unsigned short\twchar_t \t; /* wchar_t type */";
+ };
  
  /*
   *  Fix #defines under Alpha OSF/1:

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