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]

fixinc losing on hpux10.20 and likely other systems



I was looking over the differences between the output of fixincludes and
fixinc on hpux10.20 and came across a handful of important differences.  This
fixes the first batch.  Specifically we had fixes which when using fixincludes
were applied to all targets, but were made target specific in fixinc.

In each case by making the fix target specific in fixinc we lost valid and
important fixes to header files on some systems.

I'll repeat my *strong* objection to using the target triplet to enable/disable
fixes.  It's generally not the right thing to do since more often than not if
one vendor screws up their header files some other vendor has made the same
dumb mistake (or just copied the mistake from the original vendor as is the
case for the rpc fixes).

Bruce -- please try to avoid using the target triplet to enable/disable fixes.


There's still some important fixes that are not being applied by fixinc on
hpux10.20, but which are applied by fixincludes.  I'll be looking at those
shortly.  I encourage everyone to do the same for their platforms.  It's the
only way we'll ever actually track down these kinds of problems.


        * fixinc/inclhack.def (sun_auth_proto): Apply to all targets.
        (sysz_stdlib_for_sun): Similarly.
        * fixinc/fixincl.x, fixinc/inclhack.sh: Rebuilt.


Index: fixinc/inclhack.def
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/fixinc/inclhack.def,v
retrieving revision 1.12
diff -c -3 -p -r1.12 inclhack.def
*** inclhack.def	1999/05/10 07:25:55	1.12
--- inclhack.def	1999/05/11 07:40:46
*************** fix = {
*** 1483,1490 ****
  
  
  /*
!  *  On *some* SunOS-es, rpc/auth.h, rpc/clnt.h, rpc/svc.h, and
!  *  rpc/xdr.h need prototypes for its ops function pointers.
   */
  fix = {
      hackname = sun_auth_proto;
--- 1483,1491 ----
  
  
  /*
!  *  Apply fix this to all OSs since this problem seems to effect
!  *  more than just SunOS.  In general, fixes which are triggered
!  *  by a specific target are bad.
   */
  fix = {
      hackname = sun_auth_proto;
*************** fix = {
*** 1492,1498 ****
      files    = rpc/clnt.h;
      files    = rpc/svc.h;
      files    = rpc/xdr.h;
-     mach     = "*-sun-*";
      /*
       *  Select those files containing '(*name)()' but *not*
       *  containing '(*name)(junk)'.  The change would be innocuous
--- 1493,1498 ----
*************** fix = {
*** 1974,1986 ****
  
  
  /*
!  *  Fix return type of exit and abort in <stdlib.h> on SunOS 4.1.
!  *  Also wrap protection around size_t for m88k-sysv3 systems.
   */
  fix = {
      hackname = sysz_stdlib_for_sun;
-     mach     = "*-sun*";
-     mach     = "m88k-*sysv3*";
      files    = stdlib.h;
  
      sed   = "s/int\tabort/void\tabort/g";
--- 1974,1984 ----
  
  
  /*
!  *  Fix return type of exit and abort in <stdlib.h>
!  *  Also wrap protection around size_t.
   */
  fix = {
      hackname = sysz_stdlib_for_sun;
      files    = stdlib.h;
  
      sed   = "s/int\tabort/void\tabort/g";



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