Cleanup of more __STDC__/__STRICT_ANSI__ stuff

Bruce Korb bkorb@allegronetworks.com
Fri Feb 16 10:42:00 GMT 2001


2001-02-16  Bruce Korb  <bkorb@allegronetworks.com>

	* fixinc/inclhack.def(sco_strict_ansi): redundant
	(strict_ansi_not): should apply wherever it matches + fixed
test_text
	(strict_ansi_not_ctd): ditto
	(strict_ansi_only): ditto
	(strict_ansi): redundant
	
Index: inclhack.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fixinc/inclhack.def,v
retrieving revision 1.102
diff -c -r1.102 inclhack.def
*** inclhack.def        2001/02/16 18:26:21     1.102
--- inclhack.def        2001/02/16 18:36:28
***************
*** 1904,1932 ****
  
  
  /*
-  *  "!__STDC__" is "!defined( __STRICT_ANSI__ )"
-  */
- fix = {
-     hackname = sco_strict_ansi;
-     mach     = "i?86-*-sco3.2*";
-     select   = "^[ \t]*#[ \t]*if.*!__STDC__";
- 
-     c_fix     = format;
-     c_fix_arg = "%1defined(__STRICT_ANSI__)%2";
-     c_fix_arg = "^([ \t]*#[ \t]*if[ \t].*!)__STDC__(.*)";
- 
-     test_text = "#if !__STDC__ /* not standard C */\nint foo;\n#endif";
- };
- 
- /*
   *  "!__STDC__" or "__STDC__==0" or "__STDC__!=1" or "__STDC__-0==0"
   *  is "!defined( __STRICT_ANSI__ )"
   */
  fix = {
      hackname = strict_ansi_not;
-     mach="*-*-sysv4*";
-     mach="i[34567]86-*-sysv5*";
-     mach="i[34567]86-*-udk*";
      select   = "^([ \t]*#[ \t]*if.*)"
                 "(!__STDC__"
                 "|__STDC__[ \t]*==[ \t]*0"
--- 1904,1914 ----
***************
*** 1937,1944 ****
      c_fix     = format;
      c_fix_arg = "%1 !defined(__STRICT_ANSI__)%3";
  
!     test_text = "#if !__STDC__ || __STDC__ == 0 || __STDC__ != 1"
!                "|| __STDC__ - 0 == 0"
                 "/* not std C */\nint foo;\n#endif";
  };
  
--- 1919,1928 ----
      c_fix     = format;
      c_fix_arg = "%1 !defined(__STRICT_ANSI__)%3";
  
!     test_text = "#if !__STDC__ \n"
!                 "#if __STDC__ == 0\n"
!                 "#if __STDC__ != 1\n"
!                 "#if __STDC__ - 0 == 0"
                 "/* not std C */\nint foo;\n#endif";
  };
  
***************
*** 1954,1960 ****
      files="signal.h";
      files="stdlib.h";
      files="time.h";
-     mach="i[34567]86-*-sysv5*";
      select   = "^([ \t]*[|&][|&][ \t(]*)"
                 "(__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0"
                 ")(.*)";
--- 1938,1943 ----
***************
*** 1972,1980 ****
   */
  fix = {
      hackname = strict_ansi_only;
-     mach="*-*-sysv4*";
-     mach="i[34567]86-*-sysv5*";
-     mach="i[34567]86-*-udk";
      select   = "^([ \t]*#[ \t]*if.*)"
                 "(__STDC__[ \t]*!=[ \t]*0"
                 "|__STDC__[ \t]*==[ \t]*1"
--- 1955,1960 ----
***************
*** 2118,2138 ****
            "s@_Va_LIST@_VA_LIST@";
      test_text = "extern void mumble( va_list);";
  };
- 
- 
- /*
-  *  Check for strict ansi compliance
-  */
- #ifdef STRICT_ANSI
- fix = {
-     hackname = strict_ansi;
-     select   = "__STDC__[ \t]*[=!]=[ \t]*[01]";
-     sed      = "s/__STDC__[ \t]*==[ \t]*0/!defined (__STRICT_ANSI__)/g";
-     sed      = "s/__STDC__[ \t]*!=[ \t]*0/defined (__STRICT_ANSI__)/g";
-     sed      = "s/__STDC__[ \t]*==[ \t]*1/defined (__STRICT_ANSI__)/g";
-     sed      = "s/__STDC__[ \t]*!=[ \t]*1/!defined (__STRICT_ANSI__)/g";
- };
- #endif
  
  
  /*
--- 2098,2103 ----



More information about the Gcc-patches mailing list