Changes for GCC 2.4.3, from 2.4.2. Changes in files you can rebuild with etags, makeinfo, TeX or Bison have been omitted. diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/ChangeLog gcc-2.4.3/ChangeLog *** gcc-2.4.2/ChangeLog Mon May 31 02:12:58 1993 --- gcc-2.4.3/ChangeLog Tue Jun 1 18:45:52 1993 *************** *** 1,3 **** --- 1,50 ---- + Tue Jun 1 12:46:48 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * Version 2.4.3 released. + + * just-fixinc: New file. + + * config/convex/convex.h [_IEEE_FLOAT_] (LINK_SPEC): + Use ___gcc_cleanup, not __gcc_cleanup. + + Tue Jun 1 07:41:26 1993 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * rs6000.md (ffs): Delete pattern containing nonexistant instruction. + + * alpha.md (extendsidi2): Correctly do operation when in FP + registers and, since expensive, don't have FP regs as a preference. + + Tue Jun 1 00:09:46 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * fixincludes (signal.h): Fix typo in last change. + + * configure: Add missing dash in patterns for mips-*-riscos... + In riscos 5 patterns, use fixinc.mips. + + * fixinc.mips: New file. + + * config.sub: Handle 386bsd. + + Mon May 31 23:47:00 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * config/vax/vax.md (untyped_call, blockage): New patterns, + basically copied from m68k.md. + + Mon May 31 21:46:08 1993 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * romp.c (output_epilog): Don't crash if TYPE_SIZE of an arg is + not set. + Mon May 31 00:15:20 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * config/mips/x-sony (OLDCC): Fix typo. + + * config/mips/bsd-4.h, bsd-5.h, svr3-4.h, svr3-5.h, svr4-4.h, svr4-5.h: + (STANDARD_INCLUDE_DIR): Renamed from SYSTEM_INCLUDE_DIR. + * config/mips/bsd-5.h, svr3-5.h, svr4-5.h (LINK_SPEC): + Delete excess close brace. + + * pa.md (decrement_and_branch_until_zero): + Reverse all conditions in reload cases. * Version 2.4.2 released. diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/README gcc-2.4.3/README *** gcc-2.4.2/README Mon May 31 02:23:54 1993 --- gcc-2.4.3/README Tue Jun 1 18:53:44 1993 *************** *** 1,3 **** ! This directory contains the version 2.4.2 release of the GNU C compiler. It includes all of the support for compiling C++ and Objective C, including a run-time library for Objective C. --- 1,3 ---- ! This directory contains the version 2.4.3 release of the GNU C compiler. It includes all of the support for compiling C++ and Objective C, including a run-time library for Objective C. *************** *** 19,24 **** See the Bugs chapter of the GCC Manual for how to report bugs ! usefully. **Please do read this chapter before sending a bug ! report.** An online readable version of the manual is in the files gcc.info*. --- 19,23 ---- See the Bugs chapter of the GCC Manual for how to report bugs ! usefully. An online readable version of the manual is in the files gcc.info*. diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/README.GDB gcc-2.4.3/README.GDB *** gcc-2.4.2/README.GDB --- gcc-2.4.3/README.GDB Tue Jun 1 19:26:05 1993 *************** *** 0 **** --- 1,22 ---- + With this fix installed (on gcc 2.4.1), things work much better on an + Indigo running IRIX 4.0.5: GDB 4.9 is able to demangle most of my classes + (this, of course, when I specify -ggdb3 to gcc when compiling my programs). + + + *** gcc/dbxout.c.orig Fri May 14 00:22:16 1993 + --- gcc/dbxout.c Thu May 20 10:05:53 1993 + *************** + *** 1108,1115 **** + --- 1108,1118 ---- + In April 93, mrs@cygnus.com said there is no such problem. + The type decls made automatically by struct specifiers + are marked with DECL_IGNORED_P in C++. */ + + #if 0 + + /* This creates output for anonymous classes which confuses GDB. */ + && ! (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL + && DECL_IGNORED_P (TYPE_NAME (type))) + + #endif + && !full) + || TYPE_SIZE (type) == 0 + /* No way in DBX fmt to describe a variable size. */ + diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/config/alpha/alpha.md gcc-2.4.3/config/alpha/alpha.md *** gcc-2.4.2/config/alpha/alpha.md Fri Apr 16 20:58:28 1993 --- gcc-2.4.3/config/alpha/alpha.md Tue Jun 1 18:48:11 1993 *************** *** 74,81 **** ;; However, the result must be in the same type of register as the input. ;; The register preferencing code can't handle this case very well, so, for ! ;; now, don't let the FP case show up here for preferencing. (define_insn "extendsidi2" ! [(set (match_operand:DI 0 "register_operand" "=r,r,f") ! (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" "r,m,f")))] "" "@ --- 74,82 ---- ;; However, the result must be in the same type of register as the input. ;; The register preferencing code can't handle this case very well, so, for ! ;; now, don't let the FP case show up here for preferencing. Also, ! ;; sign-extends in FP registers take two instructions. (define_insn "extendsidi2" ! [(set (match_operand:DI 0 "register_operand" "=r,r,*f") ! (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" "r,m,*f")))] "" "@ *************** *** 82,86 **** addl %1,$31,%0 ldl %0,%1 ! cvtlq %1,%0" [(set_attr "type" "iaddlog,ld,fpop")]) --- 83,87 ---- addl %1,$31,%0 ldl %0,%1 ! cvtql %1,%0\;cvtlq %0,%0" [(set_attr "type" "iaddlog,ld,fpop")]) diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/config/convex/convex.h gcc-2.4.3/config/convex/convex.h *** gcc-2.4.2/config/convex/convex.h Sat May 15 11:43:24 1993 --- gcc-2.4.3/config/convex/convex.h Tue Jun 1 12:47:42 1993 *************** *** 379,384 **** -A__iob=___ap$iob \ -A_use_libc_sema=___ap$use_libc_sema \ ! %{traditional:-A__gcc_cleanup=__cleanup} \ ! %{!traditional:-A__gcc_cleanup=___ap$do_registered_functions} \ -L/usr/lib" --- 379,384 ---- -A__iob=___ap$iob \ -A_use_libc_sema=___ap$use_libc_sema \ ! %{traditional:-A___gcc_cleanup=__cleanup} \ ! %{!traditional:-A___gcc_cleanup=___ap$do_registered_functions} \ -L/usr/lib" diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/config/i386/isccoff.h gcc-2.4.3/config/i386/isccoff.h *** gcc-2.4.2/config/i386/isccoff.h Tue Dec 29 21:12:02 1992 --- gcc-2.4.3/config/i386/isccoff.h Mon May 31 23:04:33 1993 *************** *** 1,5 **** /* Definitions for Intel 386 running Interactive Unix System V. Specifically, this is for recent versions that support POSIX; ! for version 2.0.2, use configuration option i386-sysv instead. */ /* Mostly it's like AT&T Unix System V. */ --- 1,7 ---- /* Definitions for Intel 386 running Interactive Unix System V. Specifically, this is for recent versions that support POSIX; ! for version 2.0.2, use configuration option i386-sysv instead. ! (But set TARGET_DEFAULT to 0201 if you do that, ! if you don't have a real 80387.) */ /* Mostly it's like AT&T Unix System V. */ diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/config/i386/iscdbx.h gcc-2.4.3/config/i386/iscdbx.h *** gcc-2.4.2/config/i386/iscdbx.h Sat Mar 6 03:13:58 1993 --- gcc-2.4.3/config/i386/iscdbx.h Mon May 31 23:03:26 1993 *************** *** 1,6 **** /* Definitions for Intel 386 running Interactive Unix System V, using dbx-in-coff encapsulation. ! Specifically, this is for recent versions that support POSIX; ! for version 2.0.2, use configuration option i386-sysv instead. Copyright (C) 1992 Free Software Foundation, Inc. --- 1,5 ---- /* Definitions for Intel 386 running Interactive Unix System V, using dbx-in-coff encapsulation. ! Specifically, this is for recent versions that support POSIX. Copyright (C) 1992 Free Software Foundation, Inc. diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/config/mips/bsd-4.h gcc-2.4.3/config/mips/bsd-4.h *** gcc-2.4.2/config/mips/bsd-4.h Tue Jan 5 15:08:23 1993 --- gcc-2.4.3/config/mips/bsd-4.h Mon May 31 18:13:45 1993 *************** *** 23,27 **** -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_BSD43" ! #define SYSTEM_INCLUDE_DIR "/bsd43/usr/include" #define CPP_SPEC "\ --- 23,27 ---- -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_BSD43" ! #define STANDARD_INCLUDE_DIR "/bsd43/usr/include" #define CPP_SPEC "\ diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/config/mips/bsd-5.h gcc-2.4.3/config/mips/bsd-5.h *** gcc-2.4.2/config/mips/bsd-5.h Tue Jan 5 15:08:24 1993 --- gcc-2.4.3/config/mips/bsd-5.h Mon May 31 18:13:47 1993 *************** *** 23,27 **** -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_BSD43" ! #define SYSTEM_INCLUDE_DIR "/bsd43/usr/include" #define CPP_SPEC "\ --- 23,27 ---- -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_BSD43" ! #define STANDARD_INCLUDE_DIR "/bsd43/usr/include" #define CPP_SPEC "\ *************** *** 40,44 **** %{mips1} %{mips2} %{mips3} %{bestGnum} \ %{shared} %{non_shared} %{call_shared} %{no_archive} %{exact_version} \ ! %{!shared: %{!non_shared: %{!call_shared: -non_shared}}}} \ -systype /bsd43/ }" --- 40,44 ---- %{mips1} %{mips2} %{mips3} %{bestGnum} \ %{shared} %{non_shared} %{call_shared} %{no_archive} %{exact_version} \ ! %{!shared: %{!non_shared: %{!call_shared: -non_shared}}} \ -systype /bsd43/ }" diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/config/mips/svr3-4.h gcc-2.4.3/config/mips/svr3-4.h *** gcc-2.4.2/config/mips/svr3-4.h Tue Jan 5 15:08:30 1993 --- gcc-2.4.3/config/mips/svr3-4.h Mon May 31 18:13:50 1993 *************** *** 23,27 **** -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SYSV" ! #define SYSTEM_INCLUDE_DIR "/sysv/usr/include" #define CPP_SPEC "\ --- 23,27 ---- -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SYSV" ! #define STANDARD_INCLUDE_DIR "/sysv/usr/include" #define CPP_SPEC "\ diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/config/mips/svr3-5.h gcc-2.4.3/config/mips/svr3-5.h *** gcc-2.4.2/config/mips/svr3-5.h Tue Jan 5 15:08:31 1993 --- gcc-2.4.3/config/mips/svr3-5.h Mon May 31 18:13:53 1993 *************** *** 23,27 **** -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SYSV" ! #define SYSTEM_INCLUDE_DIR "/sysv/usr/include" #define CPP_SPEC "\ --- 23,27 ---- -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SYSV" ! #define STANDARD_INCLUDE_DIR "/sysv/usr/include" #define CPP_SPEC "\ *************** *** 40,45 **** %{mips1} %{mips2} %{mips3} %{bestGnum} \ %{shared} %{non_shared} %{call_shared} %{no_archive} %{exact_version} \ ! %{!shared: %{!non_shared: %{!call_shared: -non_shared}}}} \ ! -systype /sysv/}" #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s" --- 40,45 ---- %{mips1} %{mips2} %{mips3} %{bestGnum} \ %{shared} %{non_shared} %{call_shared} %{no_archive} %{exact_version} \ ! %{!shared: %{!non_shared: %{!call_shared: -non_shared}}} \ ! -systype /sysv/ }" #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s" diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/config/mips/svr4-4.h gcc-2.4.3/config/mips/svr4-4.h *** gcc-2.4.2/config/mips/svr4-4.h Tue Jan 5 15:08:32 1993 --- gcc-2.4.3/config/mips/svr4-4.h Mon May 31 18:13:56 1993 *************** *** 23,27 **** -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SVR4" ! #define SYSTEM_INCLUDE_DIR "/svr4/usr/include" #define CPP_SPEC "\ --- 23,27 ---- -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SVR4" ! #define STANDARD_INCLUDE_DIR "/svr4/usr/include" #define CPP_SPEC "\ diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/config/mips/svr4-5.h gcc-2.4.3/config/mips/svr4-5.h *** gcc-2.4.2/config/mips/svr4-5.h Tue Jan 5 15:08:33 1993 --- gcc-2.4.3/config/mips/svr4-5.h Mon May 31 18:13:59 1993 *************** *** 23,27 **** -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SVR4" ! #define SYSTEM_INCLUDE_DIR "/svr4/usr/include" #define CPP_SPEC "\ --- 23,27 ---- -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SVR4" ! #define STANDARD_INCLUDE_DIR "/svr4/usr/include" #define CPP_SPEC "\ *************** *** 40,45 **** %{mips1} %{mips2} %{mips3} %{bestGnum} \ %{shared} %{non_shared} %{call_shared} %{no_archive} %{exact_version} \ ! %{!shared: %{!non_shared: %{!call_shared: -non_shared}}}} \ ! -systype /svr4/}" #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s" --- 40,45 ---- %{mips1} %{mips2} %{mips3} %{bestGnum} \ %{shared} %{non_shared} %{call_shared} %{no_archive} %{exact_version} \ ! %{!shared: %{!non_shared: %{!call_shared: -non_shared}}} \ ! -systype /svr4/ }" #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s" diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/config/mips/x-sony gcc-2.4.3/config/mips/x-sony *** gcc-2.4.2/config/mips/x-sony Tue May 18 14:23:09 1993 --- gcc-2.4.3/config/mips/x-sony Mon May 31 20:52:02 1993 *************** *** 1,4 **** # Make internal tables bigger. ! OLDCC= -Wf,-XNg1500,-XNh1500 -Olimit 3000 $(OPT) # Define CC and OLDCC as the same, so that the tests: --- 1,4 ---- # Make internal tables bigger. ! OLDCC=cc -Wf,-XNg1500,-XNh1500 -Olimit 3000 $(OPT) # Define CC and OLDCC as the same, so that the tests: diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/config/pa/pa.md gcc-2.4.3/config/pa/pa.md *** gcc-2.4.2/config/pa/pa.md Mon May 31 00:36:38 1993 --- gcc-2.4.3/config/pa/pa.md Mon May 31 17:35:48 1993 *************** *** 2909,2921 **** /* Short branch. Normal handling of nullification. */ if (get_attr_length (insn) == 4) ! return \"comb,%B2,n 0,%4,%3\"; /* Long Conditional branch forward with delay slot nullified if branch is taken. */ else if (get_attr_length (insn) == 5) ! return \"comclr,%S2 0,%4,0\;bl,n %3,0\"; else /* Long Conditional branch backwards with delay slot nullified if branch is not taken. */ ! return \"comb,%S2 0,%4,.+16\;nop\;bl %3,0\"; } } --- 2909,2921 ---- /* Short branch. Normal handling of nullification. */ if (get_attr_length (insn) == 4) ! return \"comb,%S2,n 0,%4,%3\"; /* Long Conditional branch forward with delay slot nullified if branch is taken. */ else if (get_attr_length (insn) == 5) ! return \"comclr,%B2 0,%4,0\;bl,n %3,0\"; else /* Long Conditional branch backwards with delay slot nullified if branch is not taken. */ ! return \"comb,%B2 0,%4,.+16\;nop\;bl %3,0\"; } } *************** *** 2936,2943 **** /* Short form. */ if (get_attr_length (insn) == 4) ! return \"comb,%B2 0,%4,%3%#\"; /* Long form. */ else ! return \"comclr,%S2 0,%4,0\;bl%* %3,0\"; } } --- 2936,2943 ---- /* Short form. */ if (get_attr_length (insn) == 4) ! return \"comb,%S2 0,%4,%3%#\"; /* Long form. */ else ! return \"comclr,%B2 0,%4,0\;bl%* %3,0\"; } } diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/config/romp/romp.c gcc-2.4.3/config/romp/romp.c *** gcc-2.4.2/config/romp/romp.c Thu Nov 26 08:31:32 1992 --- gcc-2.4.3/config/romp/romp.c Mon May 31 21:45:36 1993 *************** *** 1,4 **** /* Subroutines used for code generation on ROMP. ! Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@nyu.edu) --- 1,4 ---- /* Subroutines used for code generation on ROMP. ! Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@nyu.edu) *************** *** 1145,1152 **** tree argptr; for (argptr = DECL_ARGUMENTS (current_function_decl); argptr; argptr = TREE_CHAIN (argptr)) ! nargs += ((TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (argptr))) ! + BITS_PER_WORD - 1) / BITS_PER_WORD); /* If the last insn was a BARRIER, we don't have to write anything except --- 1145,1160 ---- tree argptr; + /* Compute the number of words of arguments. Since this is just for + the traceback table, we ignore arguments that don't have a size or + don't have a fixed size. */ + for (argptr = DECL_ARGUMENTS (current_function_decl); argptr; argptr = TREE_CHAIN (argptr)) ! { ! int this_size = int_size_in_bytes (TREE_TYPE (argptr)); ! ! if (this_size > 0) ! nargs += (this_size + UNITS_PER_WORD - 1) / UNITS_PER_WORD; ! } /* If the last insn was a BARRIER, we don't have to write anything except diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/config/rs6000/rs6000.md gcc-2.4.3/config/rs6000/rs6000.md *** gcc-2.4.2/config/rs6000/rs6000.md Wed May 19 18:10:23 1993 --- gcc-2.4.3/config/rs6000/rs6000.md Tue Jun 1 07:40:15 1993 *************** *** 436,453 **** "neg %0,%1\;and %0,%0,%1\;cntlz %0,%0\;sfi %0,%0,32") - ;; There is no need for (set (condition) (compare (ffs) 0)) because that - ;; can be simplified to an ordinary comparison. A parallel set and compare - ;; might be used, so include it. - - (define_insn "" - [(set (match_operand:CC 2 "cc_reg_operand" "=x") - (compare:CC (ffs:SI (match_operand:SI 1 "register_operand" "r")) - (const_int 0))) - (set (match_operand:SI 0 "register_operand" "=&r") - (ffs:SI (match_dup 1)))] - "" - "neg %0,%1\;and %0,%0,%1\;cntlz %0,%0\;sfi. %0,%0,32" - [(set_attr "type" "compare")]) - (define_insn "mulsi3" [(set (match_operand:SI 0 "gpc_reg_operand" "=r,r") --- 436,439 ---- *************** *** 4651,4655 **** "cror 0,0,0") ! ;; Define the subtract-one-and-jump insns. ;; We need to be able to do this for any operand, including MEM, or we ;; will cause reload to blow up since we don't allow output reloads on --- 4637,4652 ---- "cror 0,0,0") ! ;; Define the subtract-one-and-jump insns, starting with the template ! ;; so loop.c knows what to generate. ! ! (define_expand "decrement_and_branchsi" ! [(parallel [(set (pc) (if_then_else (ne (match_operand:SI 0 "register_operand" "c") ! (const_int 1)) ! (label_ref (match_operand 1 "" "")) ! (pc))) ! (set (match_dup 0) (plus:SI (match_dup 0) (const_int -1)))])] ! "" ! "") ! ;; We need to be able to do this for any operand, including MEM, or we ;; will cause reload to blow up since we don't allow output reloads on *************** *** 4671,4675 **** #") ! ;; Similar, but we can use GE since we have a REG_NOTES. (define_insn "" [(set (pc) --- 4668,4672 ---- #") ! ;; Similar, but we can use GE since we have a REG_NONNEG. (define_insn "" [(set (pc) diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/config/vax/vax.md gcc-2.4.3/config/vax/vax.md *** gcc-2.4.2/config/vax/vax.md Fri Mar 12 04:16:26 1993 --- gcc-2.4.3/config/vax/vax.md Mon May 31 23:51:39 1993 *************** *** 1855,1858 **** --- 1855,1895 ---- ") + ;; Call subroutine returning any type. + + (define_expand "untyped_call" + [(parallel [(call (match_operand 0 "" "") + (const_int 0)) + (match_operand 1 "" "") + (match_operand 2 "" "")])] + "" + " + { + int i; + + emit_call_insn (gen_call_pop (operands[0], const0_rtx, NULL, const0_rtx)); + + for (i = 0; i < XVECLEN (operands[2], 0); i++) + { + rtx set = XVECEXP (operands[2], 0, i); + emit_move_insn (SET_DEST (set), SET_SRC (set)); + } + + /* The optimizer does not know that the call sets the function value + registers we stored in the result block. We avoid problems by + claiming that all hard registers are used and clobbered at this + point. */ + emit_insn (gen_blockage ()); + + DONE; + }") + + ;; UNSPEC_VOLATILE is considered to use and clobber all hard registers and + ;; all of memory. This blocks insns from being moved across this point. + + (define_insn "blockage" + [(unspec_volatile [(const_int 0)] 0)] + "" + "") + (define_insn "return" [(return)] diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/config.sub gcc-2.4.3/config.sub *** gcc-2.4.2/config.sub Wed May 26 18:53:04 1993 --- gcc-2.4.3/config.sub Tue Jun 1 00:09:04 1993 *************** *** 499,503 **** | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \ | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \ ! | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* ) ;; -sunos5*) --- 499,504 ---- | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \ | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \ ! | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \ ! | -386bsd*) ;; -sunos5*) diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/configure gcc-2.4.3/configure *** gcc-2.4.2/configure Fri May 28 23:55:31 1993 --- gcc-2.4.3/configure Tue Jun 1 01:11:39 1993 *************** *** 1020,1024 **** fi ;; ! mips-*riscos[56789]bsd* | mips-*riscos[56789]-bsd*) if [ x$stabs = xyes ]; then # MIPS BSD 4.3, RISC-OS 5.0 tm_file=mips/bsd-5-gdb.h --- 1020,1024 ---- fi ;; ! mips-*-riscos[56789]bsd* | mips-*-riscos[56789]-bsd*) if [ x$stabs = xyes ]; then # MIPS BSD 4.3, RISC-OS 5.0 tm_file=mips/bsd-5-gdb.h *************** *** 1034,1040 **** use_collect2=yes fi ;; ! mips-*-bsd* | mips-*riscosbsd* | mips-*riscos[1234]bsd* \ ! | mips-*riscos-bsd* | mips-*riscos[1234]-bsd*) if [ x$stabs = xyes ]; then # MIPS BSD 4.3, RISC-OS 4.0 tm_file=mips/bsd-4-gdb.h --- 1034,1041 ---- use_collect2=yes fi + fixincludes=fixinc.mips ;; ! mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[1234]bsd* \ ! | mips-*-riscos-bsd* | mips-*-riscos[1234]-bsd*) if [ x$stabs = xyes ]; then # MIPS BSD 4.3, RISC-OS 4.0 tm_file=mips/bsd-4-gdb.h *************** *** 1051,1055 **** fi ;; ! mips-*riscos[56789]sysv4* | mips-*riscos[56789]-sysv4*) if [ x$stabs = xyes ]; then # MIPS System V.4., RISC-OS 5.0 tm_file=mips/svr4-5-gdb.h --- 1052,1056 ---- fi ;; ! mips-*-riscos[56789]sysv4* | mips-*-riscos[56789]-sysv4*) if [ x$stabs = xyes ]; then # MIPS System V.4., RISC-OS 5.0 tm_file=mips/svr4-5-gdb.h *************** *** 1067,1073 **** use_collect2=yes fi ;; ! mips-*-sysv4* | mips-*riscos[1234]sysv4* | mips-*riscossysv4* \ ! | mips-*riscos[1234]-sysv4* | mips-*riscos-sysv4*) if [ x$stabs = xyes ]; then # MIPS System V.4. RISC-OS 4.0 tm_file=mips/svr4-4-gdb.h --- 1068,1075 ---- use_collect2=yes fi + fixincludes=fixinc.mips ;; ! mips-*-sysv4* | mips-*-riscos[1234]sysv4* | mips-*-riscossysv4* \ ! | mips-*-riscos[1234]-sysv4* | mips-*-riscos-sysv4*) if [ x$stabs = xyes ]; then # MIPS System V.4. RISC-OS 4.0 tm_file=mips/svr4-4-gdb.h *************** *** 1086,1090 **** fi ;; ! mips-*riscos[56789]sysv* | mips-*-riscos[56788]-sysv*) if [ x$stabs = xyes ]; then # MIPS System V.3, RISC-OS 5.0 tm_file=mips/svr3-5-gdb.h --- 1088,1092 ---- fi ;; ! mips-*-riscos[56789]sysv* | mips-*-riscos[56788]-sysv*) if [ x$stabs = xyes ]; then # MIPS System V.3, RISC-OS 5.0 tm_file=mips/svr3-5-gdb.h *************** *** 1102,1105 **** --- 1104,1108 ---- use_collect2=yes fi + fixincludes=fixinc.mips ;; mips-*-sysv* | mips-*riscos*sysv*) *************** *** 1134,1137 **** --- 1137,1141 ---- use_collect2=yes fi + fixincludes=fixinc.mips ;; mips-*-*) # Default MIPS RISC-OS 4.0. diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/fixinc.mips gcc-2.4.3/fixinc.mips *** gcc-2.4.2/fixinc.mips --- gcc-2.4.3/fixinc.mips Tue Jun 1 01:07:01 1993 *************** *** 0 **** --- 1,1108 ---- + #! /bin/sh + # Install modified versions of certain ANSI-incompatible system header files + # which are fixed to work correctly with ANSI C + # and placed in a directory that GNU C will search. + + # See README-fixinc for more information. + + # Directory where gcc sources (and sometimes special include files) live. + # fixincludes doesn't use this, but fixinc.svr4 does, and I want to make + # sure somebody doesn't try to use arg3 for something incompatible. -- gumby + SRCDIR=${3-${SRCDIR-.}} + + # Directory containing the original header files. + # (This was named INCLUDES, but that conflicts with a name in Makefile.in.) + INPUT=${2-${INPUT-/usr/include}} + + # Directory in which to store the results. + LIB=${1?"fixincludes: output directory not specified"} + + # Define PWDCMD as a command to use to get the working dir + # in the form that we want. + PWDCMD=pwd + case "`pwd`" in + //*) + # On an Apollo, discard everything before `/usr'. + PWDCMD="eval pwd | sed -e 's,.*/usr/,/usr/,'" + ;; + esac + + # Original directory. + ORIGDIR=`${PWDCMD}` + + # Make sure it exists. + if [ ! -d $LIB ]; then + mkdir $LIB || exit 1 + fi + + # Make LIB absolute only if needed to avoid problems with the amd. + case $LIB in + /*) + ;; + *) + cd $LIB; LIB=`${PWDCMD}` + ;; + esac + + # Make SRCDIR absolute only if needed to avoid problems with the amd. + cd $ORIGDIR + case $SRCDIR in + /*) + ;; + *) + cd $SRCDIR; SRCDIR=`${PWDCMD}` + ;; + esac + + # Fail if no arg to specify a directory for the output. + if [ x$1 = x ] + then echo fixincludes: no output directory specified + exit 1 + fi + + echo Building fixed headers in ${LIB} + + # Determine whether this system has symbolic links. + if ln -s X $LIB/ShouldNotExist 2>/dev/null; then + rm -f $LIB/ShouldNotExist + LINKS=true + else + LINKS=false + fi + + echo Finding directories and links to directories + cd ${INPUT} + # Find all directories and all symlinks that point to directories. + # Put the list in $files. + # Each time we find a symlink, add it to newdirs + # so that we do another find within the dir the link points to. + # Note that $files may have duplicates in it; + # later parts of this file are supposed to ignore them. + dirs="." + levels=2 + while [ -n "$dirs" ] && [ $levels -gt 0 ] + do + levels=`expr $levels - 1` + newdirs= + for d in $dirs + do + echo " Searching $INPUT/$d" + if [ "$d" != . ] + then + d=$d/. + fi + + # Find all directories under $d, relative to $d, excluding $d itself. + files="$files `find $d -type d -print | \ + sed -e '/\/\.$/d' -e '/^\.$/d'`" + # Find all links to directories. + # Using `-exec test -d' in find fails on some systems, + # and trying to run test via sh fails on others, + # so this is the simplest alternative left. + # First find all the links, then test each one. + theselinks= + $LINKS && \ + theselinks=`find $d -type l -print` + for d1 in $theselinks --dummy-- + do + # If the link points to a directory, + # add that dir to $newdirs + if [ -d $d1 ] + then + newdirs="$newdirs $d1" + fi + done + done + + files="$files $newdirs" + dirs="$newdirs" + done + + dirs= + echo "All directories (including links to directories):" + echo $files + + for file in $files; do + rm -rf $LIB/$file + if [ ! -d $LIB/$file ] + then mkdir $LIB/$file + fi + done + mkdir $LIB/root + + # treetops gets an alternating list + # of old directories to copy + # and the new directories to copy to. + treetops="${INPUT} ${LIB}" + + if $LINKS; then + echo 'Making symbolic directory links' + for file in $files; do + dest=`ls -ld $file | sed -n 's/.*-> //p'` + if [ "$dest" ]; then + cwd=`${PWDCMD}` + # In case $dest is relative, get to $file's dir first. + cd ${INPUT} + cd `echo ./$file | sed -n 's&[^/]*$&&p'` + # Check that the target directory exists. + # Redirections changed to avoid bug in sh on Ultrix. + (cd $dest) > /dev/null 2>&1 + if [ $? = 0 ]; then + cd $dest + # X gets the dir that the link actually leads to. + x=`${PWDCMD}` + # If a link points to ., make a similar link to . + if [ $x = $INPUT ]; then + echo $file '->' . ': Making link' + rm -fr ${LIB}/$file > /dev/null 2>&1 + ln -s . ${LIB}/$file > /dev/null 2>&1 + # If link leads back into ${INPUT}, + # make a similar link here. + elif expr $x : "${INPUT}/.*" > /dev/null; then + # Y gets the actual target dir name, relative to ${INPUT}. + y=`echo $x | sed -n "s&${INPUT}/&&p"` + echo $file '->' $y ': Making link' + rm -fr ${LIB}/$file > /dev/null 2>&1 + ln -s ${LIB}/$y ${LIB}/$file > /dev/null 2>&1 + else + # If the link is to a dir $target outside ${INPUT}, + # repoint the link at ${INPUT}/root$target + # and process $target into ${INPUT}/root$target + # treat this directory as if it actually contained the files. + echo $file '->' root$x ': Making link' + if [ -d $LIB/root$x ] + then true + else + dirname=root$x/ + dirmade=. + cd $LIB + while [ x$dirname != x ]; do + component=`echo $dirname | sed -e 's|/.*$||'` + mkdir $component >/dev/null 2>&1 + cd $component + dirmade=$dirmade/$component + dirname=`echo $dirname | sed -e 's|[^/]*/||'` + done + fi + # Duplicate directory structure created in ${LIB}/$file in new + # root area. + for file2 in $files; do + case $file2 in + $file/./*) + dupdir=${LIB}/root$x/`echo $file2 | sed -n "s|^${file}/||p"` + echo "Duplicating ${file}'s ${dupdir}" + if [ -d ${dupdir} ] + then true + else + mkdir ${dupdir} + fi + ;; + *) + ;; + esac + done + rm -fr ${LIB}/$file > /dev/null 2>&1 + ln -s ${LIB}/root$x ${LIB}/$file > /dev/null 2>&1 + treetops="$treetops $x ${LIB}/root$x" + fi + fi + cd $cwd + fi + done + fi + + set x $treetops + shift + while [ $# != 0 ]; do + # $1 is an old directory to copy, and $2 is the new directory to copy to. + cd ${INPUT} + cd $1 + # The same dir can appear more than once in treetops. + # There's no need to scan it more than once. + if [ -f $2/DONE ] + then + files= + else + touch $2/DONE + echo Fixing directory $1 into $2 + # Check .h files which are symlinks as well as those which are files. + # A link to a header file will not be processed by anything but this. + if $LINKS; then + files=`find . -name '*.h' \( -type f -o -type l \) -print` + else + files=`find . -name '*.h' -type f -print` + fi + echo Checking header files + fi + # Note that BSD43_*,SYSTYPE_*,MIPSE[LB] are used on recent MIPS systems. + for file in $files; do + # This call to egrep is essential, since checking a file with egrep + # is much faster than actually trying to fix it. + # It is also essential that most files *not* match! + # Thus, matching every #endif is unacceptable. + # But the argument to egrep must be kept small, or many versions of egrep + # won't be able to handle it. + # + # We use the pattern [!-.0-~] instead of [^/ ] to match a noncomment + # following #else or #endif because some buggy egreps think [^/] matches + # newline, and they thus think `#else ' matches `#e[ndiflse]*[ ]+[^/ ]'. + # + # We use the pattern [^a-zA-Z0-9_][_a-ce-km-z][a-z0-9] to match an identifier + # following #if or #elif that is not surrounded by __. The `a-ce-km-z' + # in this pattern lacks `d' and `l'; this means we don't worry about + # identifiers starting with `d' or `l'. This is OK, since none of the + # identifiers below start with `d' or `l'. It also greatly improves + # performance, since many files contain lines of the form `#if ... defined ...' + # or `#if lint'. + if egrep '//|[ _]_IO|CTRL|SYSTYPE|MIPSE|^#define.NULL|^#e[nl][ds][ief]*[ ]+[!-.0-~]|^#[el]*if.*[^a-zA-Z0-9_][_a-ce-km-z][a-z0-9]' $file >/dev/null; then + if [ -r $file ]; then + cp $file $2/$file >/dev/null 2>&1 \ + || echo "Can't copy $file" + chmod +w $2/$file + chmod a+r $2/$file + # Here is how the sed commands in braces work. + # (It doesn't work to put the comments inside the sed commands.) + # Surround each word with spaces, to simplify matching below. + # ANSIfy each pre-ANSI machine-dependent symbol + # by surrounding it with __ __. + # Remove the spaces that we inserted around each word. + sed -e ' + :loop + /\\$/ N + /\\$/ b loop + s%^\([ ]*#[ ]*endif[ ]*\)\([^/ ].*\)$%\1/* \2 */% + s%^\([ ]*#[ ]*else[ ]*\)\([^/ ].*\)$%\1/* \2 */% + /\/\/[^*]/ s|//\(.*\)$|/*\1*/| + /[ ]_IO[A-Z]*[ ]*(/ s/\(_IO[A-Z]*[ ]*(\)\(.\),/\1'\''\2'\'',/ + /[ ]BSD43__IO[A-Z]*[ ]*(/ s/(\(.\),/('\''\1'\'',/ + /#define._IO/ s/'\''\([cgx]\)'\''/\1/g + /#define.BSD43__IO/ s/'\''\([cgx]\)'\''/\1/g + /[^A-Z0-9_]CTRL[ ]*(/ s/\([^'\'']\))/'\''\1'\'')/ + /[^A-Z0-9]_CTRL[ ]*(/ s/\([^'\'']\))/'\''\1'\'')/ + /#define.CTRL/ s/'\''\([cgx]\)'\''/\1/g + /#define._CTRL/ s/'\''\([cgx]\)'\''/\1/g + /#define.BSD43_CTRL/ s/'\''\([cgx]\)'\''/\1/g + /#[el]*if/{ + s/[a-zA-Z0-9_][a-zA-Z0-9_]*/ & /g + + s/ bsd4\([0-9]\) / __bsd4\1__ /g + s/ _*i386 / __i386__ /g + s/ is68k / __is68k__ /g + s/ m68k / __m68k__ /g + s/ mc680\([0-9]\)0 / __mc680\10__ /g + s/ news\([0-9]*\) / __news\1__ /g + s/ ns32000 / __ns32000__ /g + s/ pyr / __pyr__ /g + s/ sony_news / __sony_news__ /g + s/ sparc / __sparc__ /g + s/ sun\([a-z0-9]*\) / __sun\1__ /g + s/ unix / __unix__ /g + s/ vax / __vax__ /g + s/ _*\(MIPSE[LB]\) / __\1__ /g + s/ _*\(mips\) / __\1__ /g + s/ _*\(host_mips\) / __\1__ /g + s/ _*\(SYSTYPE_[A-Z0-9]*\) / __\1__ /g + + s/ \([a-zA-Z0-9_][a-zA-Z0-9_]*\) /\1/g + } + /^#define.NULL[ ]/ i\ + #undef NULL + ' $2/$file > $2/$file. + mv $2/$file. $2/$file + if cmp $file $2/$file >/dev/null 2>&1; then + rm $2/$file + else + echo Fixed $file + fi + fi + fi + done + shift; shift + done + + cd ${INPUT} + + # Install the proper definition of size_t in header files that it comes from. + for file in sys/types.h sys/stdtypes.h stddef.h memory.h stdlib.h unistd.h; + do + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file size_t typedef + # Extract the definition of SIZE_TYPE, if any. + # (This file must be called something.c). + echo "#include \"tm.h\" + gobblegobble SIZE_TYPE" > ${LIB}/types.c + foo=`cd ${LIB}; cc -E -I${ORIGDIR} -I${SRCDIR} -I${SRCDIR}/config types.c | grep gobblegobble | sed -e "s/gobblegobble[ ]*//"` + rm -f ${LIB}/types.c + # Default to our preferred type. + if [ "$foo" = SIZE_TYPE ]; then foo="unsigned long int"; else foo=`echo $foo | sed -e 's/^.*"\(.*\)".*$/\1/'`; fi + sed -e "s/typedef[ a-z_]*[ ]size_t/typedef $foo size_t/" \ + -e "s/typedef[ a-z_]*[ ]bsd43_(size_t)/typedef $foo bsd43_(size_t)/" \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + done + + # Fix one other error in this file: a mismatched quote not inside a C comment. + file=sundev/vuid_event.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/sundev 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file comment + sed -e "s/doesn't/does not/" ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Fix these Sun OS files to avoid an invalid identifier in an #ifdef. + file=sunwindow/win_cursor.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + # mkdir ${LIB}/sunwindow 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + fi + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e "s/ecd.cursor/ecd_cursor/" ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + file=sunwindow/win_lock.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + # mkdir ${LIB}/sunwindow 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + fi + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e "s/ecd.cursor/ecd_cursor/" ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Fix this Sun file to avoid interfering with stddef.h. + file=sys/stdtypes.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e '/size_t.*;/i\ + #ifndef _GCC_SIZE_T\ + #define _GCC_SIZE_T' \ + -e '/size_t.*;/a\ + #endif' \ + -e '/ptrdiff_t.*;/i\ + #ifndef _GCC_PTRDIFF_T\ + #define _GCC_PTRDIFF_T' \ + -e '/ptrdiff_t.*;/a\ + #endif' \ + -e '/wchar_t.*;/i\ + #ifndef _GCC_WCHAR_T\ + #define _GCC_WCHAR_T' \ + -e '/wchar_t.*;/a\ + #endif' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Fix this file to avoid interfering with stddef.h, but don't mistakenly + # match e.g. ssize_t present in AIX for the ps/2. + file=sys/types.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e '/[ ]size_t.*;/i\ + #ifndef _GCC_SIZE_T\ + #define _GCC_SIZE_T' \ + -e '/[ ]size_t.*;/a\ + #endif' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Fix an error in this file: the #if says _cplusplus, not the double + # underscore __cplusplus that it should be + file=tinfo.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/rpcsvc 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, __cplusplus macro + sed -e 's/[ ]_cplusplus/ __cplusplus/' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Fix an error in this file: a missing semi-colon at the end of the statsswtch + # structure definition. + file=rpcsvc/rstat.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/rpcsvc 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, definition of statsswtch + sed -e 's/boottime$/boottime;/' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Fix an error in this file: a missing semi-colon at the end of the nodeent + # structure definition. + file=netdnet/dnetdb.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/netdnet 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, definition of nodeent + sed -e 's/char.*na_addr *$/char *na_addr;/' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Check for bad #ifdef line (in Ultrix 4.1) + file=sys/file.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, bad \#ifdef line + sed -e 's/#ifdef KERNEL/#if defined(KERNEL)/' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Remove nested comments created by #endifs in a comment (Ultrix 4.1) + # Only needed if commenting out junk after #endif. + file=signal.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, nested comments + sed -e 's/^[ ]#endif.*/#endif/' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Check for superfluous `static' (in Ultrix 4.2) + file=machine/cpu.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/machine 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, superfluous static + sed -e 's/^static struct tlb_pid_state/struct tlb_pid_state/' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + else + # This file has an alternative name, mips/cpu.h. Fix that name, too. + if cmp machine/cpu.h mips/cpu.h > /dev/null 2>& 1; then + mkdir ${LIB}/mips 2>&- + ln ${LIB}/$file ${LIB}/mips/cpu.h + fi + fi + fi + + # Incorrect sprintf declaration in X11/Xmu.h + file=X11/Xmu.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/X11 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file sprintf declaration + sed -e 's,^extern char \* sprintf();$,#ifndef __STDC__\ + extern char * sprintf();\ + #endif /* !defined __STDC__ */,' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Incorrect sprintf declaration in X11/Xmu/Xmu.h + # (It's not clear whether the right file name is this or X11/Xmu.h.) + file=X11/Xmu/Xmu.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/X11/Xmu 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file sprintf declaration + sed -e 's,^extern char \* sprintf();$,#ifndef __STDC__\ + extern char * sprintf();\ + #endif /* !defined __STDC__ */,' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Check for missing ';' in struct + file=netinet/ip.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/netinet 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e '/^struct/,/^};/s/}$/};/' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Fix the CAT macro in SunOS memvar.h. + file=pixrect/memvar.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/pixrect 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e '/^#define.CAT(a,b)/ i\ + #ifdef __STDC__ \ + #define CAT(a,b) a##b\ + #else + /^#define.CAT(a,b)/ a\ + #endif + ' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Check for yet more missing ';' in struct (in SunOS 4.0.x) + file=rpcsvc/rusers.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/rpcsvc 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e '/^struct/,/^};/s/_cnt$/_cnt;/' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Fix return type of exit and abort in on SunOS 4.1. + file=stdlib.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e 's/int abort/void abort/g' \ + -e 's/int free/void free/g' \ + -e 's/char \* calloc/void \* calloc/g' \ + -e 's/char \* malloc/void \* malloc/g' \ + -e 's/char \* realloc/void \* realloc/g' \ + -e 's/int exit/void exit/g' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Fix return type of free and {c,m,re}alloc in on SunOS 4.1. + file=malloc.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e 's/typedef[ ]char \* malloc_t/typedef void \* malloc_t/g' \ + -e 's/int[ ][ ]*free/void free/g' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + + # Fix bogus comment in on SunOS 4.1. + file=locale.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e 's%#endif / \*%#endif /\* %g' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Fix bogus #ifdef in on SunOS 4.1. + file=hsfs/hsfs_spec.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/hsfs 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e 's/\#ifdef __i386__ || __vax__/\#if __i386__ || __vax__/g' \ + ${LIB}/$file > ${LIB}/${file}. + rm -f ${LIB}/$file; mv ${LIB}/${file}. ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Fix bogus #ifdef in on SunOS 4.1. + file=hsfs/hsnode.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/hsfs 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e 's/\#ifdef __i386__ || __sun4c__/\#if __i386__ || __sun4c__/g' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Fix bogus #ifdef in on SunOS 4.1. + file=hsfs/iso_spec.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/hsfs 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e 's/\#ifdef __i386__ || __vax__/\#if __i386__ || __vax__/g' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Incorrect #include in Sony News-OS 3.2. + file=machine/machparam.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/machine 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, incorrect \#include + sed -e 's@"../machine/endian.h"@@' \ + ${LIB}/$file > ${LIB}/${file}. + rm -f ${LIB}/$file; mv ${LIB}/${file}. ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Multiline comment after typedef on IRIX 4.0.1. + file=sys/types.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/sys 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, comment in the middle of \#ifdef + sed -e 's@type of the result@type of the result */@' \ + -e 's@of the sizeof@/* of the sizeof@' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Fix line in IRIX 4.0.1 header file. The sed script turns + # #define EM_CTRL (CUTIOC|0x1) + # into + # #define EM_CTRL (CUTIOC|0x'1') + file=sys/t3270reg.h + if [ -r ${LIB}/$file ]; then + echo Fixing $file, overeager sed script + sed -e "s/0x'1'/0x1/" ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Turning // comments into /* */ comments trashes this IRIX 4.0.1 + # header file, which embeds // comments inside multi-line /* */ + # comments. If this looks like the IRIX header file, we refix it by + # just throwing away the // comments. + file=fam.h + if [ -r ${LIB}/$file ]; then + if egrep indigo.esd ${LIB}/$file > /dev/null; then + echo Fixing $file, overeager sed script + rm ${LIB}/$file + sed -e 's|//.*$||g' $file > ${LIB}/$file + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + fi + + # Another IRIX 4.0.1 header file contains the string "//" + file=elf_abi.h + if [ -r ${LIB}/$file ]; then + echo Fixing $file, overeager sed script + sed -e 's|"/\*"\*/|"//"|' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Fix non-ANSI memcpy declaration that conflicts with gcc's builtin + # declaration on Sun OS 4.x. We must only fix this on Sun OS 4.x, because + # many other systems have similar text but correct versions of the file. + # To ensure only Sun's is fixed, we grep for a likely unique string. + file=memory.h + if [ -r $file ] && egrep '/\* @\(#\)memory\.h 1\.[2-4] 8./../.. SMI; from S5R2 1\.2 \*/' $file > /dev/null; then + if [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + if [ -r ${LIB}/$file ]; then + echo Replacing $file + cat > ${LIB}/$file << EOF + /* This file was generated by fixincludes */ + #ifndef __memory_h__ + #define __memory_h__ + + #ifdef __STDC__ + extern void *memccpy(); + extern void *memchr(); + extern void *memcpy(); + extern void *memset(); + #else + extern char *memccpy(); + extern char *memchr(); + extern char *memcpy(); + extern char *memset(); + #endif /* __STDC__ */ + + extern int memcmp(); + + #endif /* __memory_h__ */ + EOF + fi + fi + + # parameters not const on DECstation Ultrix V4.0. + file=stdio.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, non-const arg + sed -e 's@perror( char \*__s );@perror( const char *__s );@' \ + -e 's@fputs( char \*__s,@fputs( const char *__s,@' \ + -e 's@fopen( char \*__filename, char \*__type );@fopen( const char *__filename, const char *__type );@' \ + -e 's@fwrite( void \*__ptr,@fwrite( const void *__ptr,@' \ + -e 's@fscanf( FILE \*__stream, char \*__format,@fscanf( FILE *__stream, const char *__format,@' \ + -e 's@scanf( char \*__format,@scanf( const char *__format,@' \ + -e 's@sscanf( char \*__s, char \*__format,@sscanf( const char *__s, const char *__format,@' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # parameters conflict with C++ new on rs/6000 + file=stdio.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, parameter name conflicts + sed -e 's@rename(const char \*old, const char \*new)@rename(const char *_old, const char *_new)@' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Don't use or define the name va_list in stdio.h. + # This is for ANSI and also to interoperate properly with gvarargs.h. + file=stdio.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, use of va_list + # Arrange for stdio.h to use stdarg.h to define __gnuc_va_list + (echo "#define __need___va_list" + echo "#include ") > ${LIB}/${file}.sed + # Use __gnuc_va_list in arg types in place of va_list. + # On 386BSD use __gnuc_va_list instead of _VA_LIST_. We're hoping the + # trailing parentheses and semicolon save all other systems from this. + # Define __va_list__ (something harmless and unused) instead of va_list. + # Don't claim to have defined va_list. + sed -e 's@ va_list @ __gnuc_va_list @' \ + -e 's@ va_list)@ __gnuc_va_list)@' \ + -e 's@ _VA_LIST_));@ __gnuc_va_list));@' \ + -e 's@ va_list@ __va_list__@' \ + -e 's@\*va_list@*__va_list__@' \ + -e 's@VA_LIST@DUMMY_VA_LIST@' \ + ${LIB}/$file >> ${LIB}/${file}.sed + + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Cancel out ansi_compat.h on Ultrix. Replace it with empty file. + file=ansi_compat.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + if grep -s ULTRIX $file; then + echo "/* This file intentionally left blank. */" > $LIB/$file + fi + fi + + # parameter to atof not const on DECstation Ultrix V4.0. + # also get rid of bogus inline definitions in HP-UX 8.0 + file=math.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, non-const arg + sed -e 's@atof( char \*__nptr );@atof( const char *__nptr );@' \ + -e 's@inline int abs(int d) { return (d>0)?d:-d; }@@' \ + -e 's@inline double abs(double d) { return fabs(d); }@@' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # In limits.h, put #ifndefs around things that are supposed to be defined + # in float.h to avoid redefinition errors if float.h is included first. + # On HP/UX this patch does not work, because on HP/UX limits.h uses + # multi line comments and the inserted #endif winds up inside the + # comment. Fortunately, HP/UX already uses #ifndefs in limits.h; if + # we find a #ifndef FLT_MIN we assume that all the required #ifndefs + # are there, and we do not add them ourselves. + file=limits.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + if egrep 'ifndef[ ]+FLT_MIN' ${LIB}/$file >/dev/null; then + true + else + echo Fixing $file + sed -e '/[ ]FLT_MIN[ ]/i\ + #ifndef FLT_MIN'\ + -e '/[ ]FLT_MIN[ ]/a\ + #endif'\ + -e '/[ ]FLT_MAX[ ]/i\ + #ifndef FLT_MAX'\ + -e '/[ ]FLT_MAX[ ]/a\ + #endif'\ + -e '/[ ]FLT_DIG[ ]/i\ + #ifndef FLT_DIG'\ + -e '/[ ]FLT_DIG[ ]/a\ + #endif'\ + -e '/[ ]DBL_MIN[ ]/i\ + #ifndef DBL_MIN'\ + -e '/[ ]DBL_MIN[ ]/a\ + #endif'\ + -e '/[ ]DBL_MAX[ ]/i\ + #ifndef DBL_MAX'\ + -e '/[ ]DBL_MAX[ ]/a\ + #endif'\ + -e '/[ ]DBL_DIG[ ]/i\ + #ifndef DBL_DIG'\ + -e '/[ ]DBL_DIG[ ]/a\ + #endif'\ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + fi + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + echo Deleting ${LIB}/$file\; no fixes were needed. + rm -f ${LIB}/$file + fi + fi + + # These two files on SunOS 4 are included by other files + # in the same directory, using "...". So we must make sure they exist + # in the same directory as the other fixed files. + if [ -r ${INPUT}/multimedia/audio_errno.h ] + then + ln -s ${INPUT}/multimedia/audio_errno.h ${LIB}/multimedia 2>/dev/null + fi + if [ -r ${INPUT}/multimedia/audio_hdr.h ] + then + ln -s ${INPUT}/multimedia/audio_hdr.h ${LIB}/multimedia 2>/dev/null + fi + + # These files on Ultrix 4.2 put comments around instances of #endif + # __mips. When the sed expression turns that into #endif /* __mips */ + # the comment ends prematurely. + for file in sys/audit.h sys/signal.h; do + if [ -r ${LIB}/${file} ]; then + echo Fixing $file, early comment termination + sed -e 's|^#endif /\*.*\*/|#endif|g' ${LIB}/${file} > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + fi + done + + echo 'Removing unneeded directories:' + cd $LIB + files=`find . -type d -print | sort -r` + for file in $files; do + rmdir $LIB/$file > /dev/null 2>&1 + done + + if $LINKS; then + echo 'Making internal symbolic non-directory links' + cd ${INPUT} + files=`find . -type l -print` + for file in $files; do + dest=`ls -ld $file | sed -n 's/.*-> //p'` + if expr "$dest" : '[^/].*' > /dev/null; then + target=${LIB}/`echo file | sed "s|[^/]*\$|$dest|"` + if [ -f $target ]; then + ln -s $dest ${LIB}/$file >/dev/null 2>&1 + fi + fi + done + fi + + echo 'Cleaning up DONE files.' + cd $LIB + find . -name DONE -exec rm -f {} ';' + + exit 0 diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/fixincludes gcc-2.4.3/fixincludes *** gcc-2.4.2/fixincludes Sat May 29 15:34:39 1993 --- gcc-2.4.3/fixincludes Tue Jun 1 04:14:25 1993 *************** *** 532,536 **** if [ -r ${LIB}/$file ]; then echo Fixing $file, nested comments ! sed -e 's/^[ ]#endif.*/#endif/' ${LIB}/$file > ${LIB}/${file}.sed rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file if cmp $file ${LIB}/$file >/dev/null 2>&1; then --- 532,536 ---- if [ -r ${LIB}/$file ]; then echo Fixing $file, nested comments ! sed -e 's/^[ ]*#endif.*/#endif/' ${LIB}/$file > ${LIB}/${file}.sed rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file if cmp $file ${LIB}/$file >/dev/null 2>&1; then diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/gcc.texi gcc-2.4.3/gcc.texi *** gcc-2.4.2/gcc.texi Sun May 30 17:22:40 1993 --- gcc-2.4.3/gcc.texi Tue Jun 1 01:01:28 1993 *************** *** 1137,1140 **** --- 1137,1146 ---- @item + On Solaris 2, trying to use the linker and other tools in + @file{/usr/ucb} to install GNU CC has been observed to cause trouble. + For example, the linker may hang indefinitely. The fix is to remove + @file{/usr/ucb} from your @code{PATH}. + + @item If you use the 1.31 version of the MIPS assembler (such as was shipped with Ultrix 3.1), you will need to use the -fno-delayed-branch switch diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/install.texi gcc-2.4.3/install.texi *** gcc-2.4.2/install.texi Wed May 26 00:55:17 1993 --- gcc-2.4.3/install.texi Tue Jun 1 00:59:54 1993 *************** *** 949,952 **** --- 949,955 ---- @cindex installing GNU CC on the Sun + On Solaris (version 2.1), do not use the linker or other tools in + @file{/usr/ucb} to build GNU CC. Use @code{/usr/ccs/bin}. + Make sure the environment variable @code{FLOAT_OPTION} is not set when you compile @file{libgcc.a}. If this option were set to @code{f68881} diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/just-fixinc gcc-2.4.3/just-fixinc *** gcc-2.4.2/just-fixinc --- gcc-2.4.3/just-fixinc Tue Jun 1 18:11:58 1993 *************** *** 0 **** --- 1,20 ---- + #!/bin/sh + # This script exists for use after installing + # the Solaris binaries from the FSF CD-ROM. + # Use it *after* copying the directory of binaries + # to the proper installed location. + # It runs fixinc.svr4 to correct bugs in the Solaris header files. + + # The corrected header files go in the GCC installation directory + # so that only GCC sees them. + # This script does not modify the original header files in /usr/include. + # It only modifies copies in the GCC installation directory. + + installed=/opt/gnu/lib/gcc-lib/sparc-sun-solaris2/2.4.2 + cd $installed/include + rmdir tmpfoo > /dev/null 2>&1 + mkdir tmpfoo + mv va-sparc.h varargs.h stdarg.h stddef.h limits.h float.h proto.h tmpfoo + $installed/fixinc.svr4 $installed/include /usr/include $installed + mv tmpfoo/* . + rmdir tmpfoo diff -rc2P -x TAGS -x gcc.info* -x *-parse.c -x *.aux -x gcc.??s gcc-2.4.2/version.c gcc-2.4.3/version.c *** gcc-2.4.2/version.c Mon May 31 00:30:48 1993 --- gcc-2.4.3/version.c Tue Jun 1 18:50:09 1993 *************** *** 1 **** ! char *version_string = "2.4.2"; --- 1 ---- ! char *version_string = "2.4.3";