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]
Other format: [Raw text]

PATCH: fixinc/inclhack.def for UnixWare 2.1.3


UnixWare 2.1.3 needed stdio_va_list from inclhack.def.
A bootstrap of CVS 3.1 at 2001-11-29 gives unchanged testresults (and
warnings). A prior version without strict_ansi_not_ctd2 gave no problems
with a make stmp-fixinc on UnixWare 7.1.0 .
How do you escape parenthesis with a backslash successfully in the select string?
In testing I could only get 0 or two backslashes in the string in fixincl.x, so used
defined[(] .

20011211  Rodney Brown  <rbrown64@csc.com.au>

     * fixinc/inclhack.def (strict_ansi_not_ctd): Update for UnixWare 2.1.3.
     (strict_ansi_not_ctd2): Introduce for sys/signal.h for UW 2.1.3 .
     * fixinc/mkfixinc.sh: Use C fixincludes for UnixWare 2.1.3.

--- gcc/fixinc/inclhack.def.orig   Tue Dec 11 11:35:23 2001
+++ gcc/fixinc/inclhack.def   Mon Dec 10 13:18:03 2001
@@ -2278,17 +2278,44 @@
  */
 fix = {
     hackname = strict_ansi_not_ctd;
-    files    = math.h, limits.h, stdio.h, signal.h, stdlib.h, time.h;
-    select   = "^([ \t]*[|&][|&][ \t(]*)"
-               "(__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0"
-               ")(.*)";
+    files    = math.h, limits.h, stdio.h, signal.h, stdlib.h, sys/signal.h, time.h;
+    select   = "^([ \t]*[|&][|&][ \t\(]*)"
+           "(|!defined[(][A-Z_]*[)][ \t]*[|&][|&][ \t()]*)"
+               "__STDC__[ \t]*(|-[ \t]*0[ \t]*)==[ \t]*0"
+               "(.*)";
     c_test   = stdc_0_in_system_headers;

     c_fix     = format;
-    c_fix_arg = "%1 !defined(__STRICT_ANSI__)%3";
+    c_fix_arg = "%1%2 !defined(__STRICT_ANSI__)%4";

-    test_text = "#if 1\\\n"
-               "|| __STDC__ - 0 == 0 /* not std C */\nint foo;\n#endif";
+    test_text = "#if 1\\\\\n"
+               "|| __STDC__ - 0 == 0 /* not std C */\\\\\n"
+               "&& !defined(A) &&  __STDC__ - 0 == 0 \\\\\n"
+               "&& __STDC__ == 0 \\\\\n"
+               "|| !defined(A) ||  __STDC__ - 0 == 0 \\\\\n"
+               "|| __STDC__ == 0 \n"
+           "int foo;\n#endif";
+};
+
+/*
+ *  "__STDC__==0"
+ *  is "!defined( __STRICT_ANSI__ )" on continued #if-s
+ */
+fix = {
+    hackname = strict_ansi_not_ctd2;
+    files    = sys/signal.h;
+    mach     = 'i[34567]86-pc-sysv4.2uw2*';
+    select   = "^([ \t\(]*)__STDC__[ \t]*(|-[ \t]*0[ \t]*)==[ \t]*0"
+               "([ \t)].*)";
+    c_test   = stdc_0_in_system_headers;
+
+    c_fix     = format;
+    c_fix_arg = "%1!defined(__STRICT_ANSI__)%3";
+
+    test_text = "#if 1 ||\\\\\n"
+               " ( __STDC__ - 0 == 0 ) || /* not std C */\\\\\n"
+               " ( __STDC__ == 0) \n"
+           "int foo;\n#endif";
 };

 /*
--- gcc/fixinc/mkfixinc.sh.orig    Sat Feb 17 05:26:21 2001
+++ gcc/fixinc/mkfixinc.sh    Mon Dec  3 15:51:01 2001
@@ -35,6 +35,9 @@

 # Check for special fix rules for particular targets
 case $machine in
+    i?86-*-sysv4.2uw2.1.[3456789])
+         ;;
+
     *-*-sysv4* )
          fixincludes=fixinc.svr4
          ;;



The #machine changes from fixinc.svr4 give #machine(i386)
for #elif lines (syslimit.h). Is this a bug or a foolish consistency
problem?

UnixWare 2.1.3
$ fgrep '#machine' * | fgrep 386
prof.h:#if #machine(__i386__)
setjmp.h:#if #machine(__i386__)
syslimits.h:#elif #machine(i386) || #machine(sparc)
values.h:#if #machine(M32) || #machine(__i386__)
values.h:#if #machine(__i386__)
values.h:#endif /* #machine(i386) */
values.h:#endif /* #machine(M32) || #machine(i386) */
UnixWare 7.1.0
bash-2.04$ fgrep '#machine' * */* | fgrep 386
prof.h:#if #machine(__i386__)
setjmp.h:#if #machine(__i386__)
syslimits.h:#elif #machine(i386) || #machine(sparc)
syslimits.h:#if #machine(__i386__)
values.h:#if #machine(M32) || #machine(__i386__)
values.h:#if #machine(__i386__)
values.h:#endif /* #machine(i386) */
values.h:#endif /* #machine(M32) || #machine(i386) */


Fixing headers into /home2/rdb/src/gcc-3.1-experimental/gcc/include for i386-pc-sysv4.2uw2.1.3 target
Finding directories and links to directories
 Searching /usr/include/.
 Searching /usr/include/./sys/nfs
Making symbolic directory links
Fixing directory /usr/include into /home2/rdb/src/gcc-3.1-experimental/gcc/include
Applying uw7_byteorder_fix        to arpa/inet.h
Fixed:  arpa/inet.h
Applying ip_missing_semi          to netinet/ip.h
Applying sun_auth_proto           to rpc/auth.h
Fixed:  rpc/auth.h
Applying sun_auth_proto           to rpc/clnt.h
Fixed:  rpc/clnt.h
Applying sun_auth_proto           to rpc/svc.h
Fixed:  rpc/svc.h
Applying sun_auth_proto           to rpc/xdr.h
Fixed:  rpc/xdr.h
Applying AAB_svr4_replace_byteorder to sys/byteorder.h
Fixed:  sys/byteorder.h
Applying io_quotes_def            to sys/fd.h
Applying io_quotes_def            to sys/ioccom.h
Applying io_quotes_def            to sys/osocket.h
Applying strict_ansi_not          to sys/signal.h
Applying strict_ansi_not_ctd      to sys/signal.h
Applying strict_ansi_not_ctd2     to sys/signal.h
Fixed:  sys/signal.h
Applying avoid_wchar_t_type       to sys/types.h
Applying gnu_types                to sys/types.h
Fixed:  sys/types.h
Applying io_quotes_def            to sys/lsl.h
Applying io_quotes_use            to sys/lsl.h
Applying undefine_null            to sys/odi.h
Fixed:  sys/odi.h
Applying io_quotes_def            to sys/smpw.h
Applying io_quotes_use            to sys/smpw.h
Applying io_quotes_def            to sys/dlpi_token.h
Applying io_quotes_use            to sys/dlpi_token.h
Applying strict_ansi_not          to ctype.h
Fixed:  ctype.h
Applying avoid_bool_type          to curses.h
Applying avoid_wchar_t_type       to curses.h
Fixed:  curses.h
Applying machine_name             to float.h
Fixed:  float.h
Applying limits_ifndefs           to limits.h
Applying machine_name             to limits.h
Applying strict_ansi_not          to limits.h
Fixed:  limits.h
Applying sun_malloc               to malloc.h
Fixed:  malloc.h
Applying math_exception           to math.h
Applying math_huge_val_ifndef     to math.h
Applying strict_ansi_not          to math.h
Applying strict_ansi_not_ctd      to math.h
Fixed:  math.h
Applying gnu_types                to memory.h
Fixed:  memory.h
Applying machine_name             to prof.h
Fixed:  prof.h
Applying machine_name             to setjmp.h
Applying strict_ansi_not          to setjmp.h
Applying strict_ansi_only         to setjmp.h
Fixed:  setjmp.h
Applying strict_ansi_not          to signal.h
Fixed:  signal.h
Applying avoid_wchar_t_type       to stddef.h
Applying gnu_types                to stddef.h
Fixed:  stddef.h
Applying avoid_wchar_t_type       to stdio.h
Applying read_ret_type            to stdio.h
Applying stdio_stdarg_h           to stdio.h
Applying stdio_va_list            to stdio.h
Applying strict_ansi_not          to stdio.h
Fixed:  stdio.h
Applying avoid_wchar_t_type       to stdlib.h
Applying gnu_types                to stdlib.h
Applying strict_ansi_not          to stdlib.h
Applying sysz_stdlib_for_sun      to stdlib.h
Fixed:  stdlib.h
Applying strict_ansi_not          to string.h
Applying sysv68_string            to string.h
Fixed:  string.h
Applying strict_ansi_not          to time.h
Applying strict_ansi_not_ctd      to time.h
Fixed:  time.h
Applying svr4_profil              to unistd.h
Fixed:  unistd.h
Applying machine_name             to values.h
Fixed:  values.h
Applying avoid_wchar_t_type       to wchar.h
Applying strict_ansi_not          to wchar.h
Fixed:  wchar.h
Cleaning up unneeded directories:
fixincludes is done


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