This is the mail archive of the gcc@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]

Re: How does one identify HP-UX with broken inline math funs?


  In message <391885EF.B7ADC410@sco.com>you write:
  > 
  > Here is the issue:  Apparently, HP-UX in some collection of versions
  > requires this fix to /usr/include/math.h:
  > 
  >   /*
  >    *  get rid of bogus inline definitions in HP-UX 8.0
  >    */
  >   fix = {
  >     hackname = hpux8_bogus_inlines;
  >     files    = math.h;
  >     select   = inline;
  >     bypass   = 'The Santa Cruz Operation';
  >     sed = "s@inline int abs(int [a-z][a-z]*) {.*}@extern \"C\" int abs(int)
  > ;@";
  >     sed = "s@inline double abs(double [a-z][a-z]*) {.*}@@";
  >     sed = "s@inline int sqr(int [a-z][a-z]*) {.*}@@";
  >     sed = "s@inline double sqr(double [a-z][a-z]*) {.*}@@";
  >   };
  > 
  > I have temporarily added the `bypass' clause.  Since the actual
  > text that gets deleted should normally work in a reasonable
  > environment:
  > 
  >   inline int abs(int i) {return (i > 0) ? i : -i;}
  >   inline double abs(double d) {return fabs(d); }
  > 
  > it seems clear that we do not want to delete this text.
  > Since SCO is dead when these inlines are removed, I added
  > the bypass.  My preferred solution is to constrain the
  > fix to just those systems that need it.  (viz., HP-UX 8.0)
  > 
  > How?  Robert Lipe suggests:
  > 
  > > $ uname -a
  > > HP-UX udihp B.10.10 B 9000/816 946328291 16-user license
  > > 
  > > There are no copyright strings.  Maybe '_INCLUDE_HPUX_SOURCE'
  > > is enough of a clue.  Dunno.
  > 
  > Comments?
If I remember correctly, it is a problem with C++.  Even HP recognizes that
their definitions of those inline fucntions are bogons -- in more recent
versions of hpux the inlines are disabled.

If a port is dying because those inlines are removed, then there's something
else more fundamentally wrong with that port as those inlines are broken.

Unfortunately, I can't find the discussion behind that code anymore (it was
circa 1992 after all!)

jeff


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