[comp.unix.aux] Installing GCC on A/UX 2.0.1?

alexis@panix.uucp (Alexis Rosen) (06/07/91)

When installing the latest gcc binaries from wuarchive, I ran the
fixincludes script, which produced (among many other messages) the following:

Fixing sys/file.h, bad
"/usr/local/Gnu/lib/gcc-include/sys/file.h" 150 lines, 4789 characters
Substitute pattern match failed
Deleting /usr/local/Gnu/lib/gcc-include/sys/file.h; no fixes were needed.

Any ideas what this means? I took a look at file.h and didn't see anything
obviously wrong. (Although that doesn't mean much...)

Thanks,
---
Alexis Rosen
Owner/Sysadmin, PANIX Public Access Unix, NY
alexis@panix.com
{cmcl2,apple}!panix!alexis

rmtodd@servalan.uucp (Richard Todd) (06/09/91)

alexis@panix.uucp (Alexis Rosen) writes:

>When installing the latest gcc binaries from wuarchive, I ran the
>fixincludes script, which produced (among many other messages) the following:

>Fixing sys/file.h, bad
>"/usr/local/Gnu/lib/gcc-include/sys/file.h" 150 lines, 4789 characters
>Substitute pattern match failed
>Deleting /usr/local/Gnu/lib/gcc-include/sys/file.h; no fixes were needed.

>Any ideas what this means? I took a look at file.h and didn't see anything
>obviously wrong. (Although that doesn't mean much...)

What this means is that they changed sys/file.h between A/UX 2.0 and A/UX 
2.0.1, and the changed version is confusing fixincludes--fixincludes is
being made to think that there's something in there that might need fixing,
but there isn't.  You'll probably have to look thru sys/file.h and see if
there's anything there that's obviously ANSI-incompatible and fix it by 
hand.  Most of what fixincludes is trying to fix is the old-style "Reiserisms",
i.e. preprocessor tricks to do token pasting and the like that worked with
the old Reiser CPP, but must be done differently under ANSI C.  Example (from
sys/ioctl.h, the home of most of the nasty Reiserisms):
-------
#define	_IO(x,y)	(IOC_VOID|('x'<<8)|y)
...
#define	TIOCSETRDSIG	_IO(t, 106)		/* pty: set read signal */
-------
Note that the argument to the _IO macro appears inside the '' quotes, so the
_IO(t,106) is supposed to (under old CPP) expand to (IOC_VOID|('t'<<8)|106).
Sticking macro arguments inside '' like this is verboten under ANSI C; the 
ANSI equivalent looks like this:
-------
#define	_IO(x,y)	(IOC_VOID|(x<<8)|y)
...
#define	TIOCSETRDSIG	_IO('t', 106)		/* pty: set read signal */
-------
See the difference?  Now just look for things like that in sys/file.h and see
what you find.  Frankly, looking at the A/UX 2.0 sys/file.h, I don't see 
anything in there that needs fixing; I think fixincludes is just confused.
(Most all that fixincludes does is fix Reiserisms; the rest of fixincludes 
seems to be fixing some Sun-specific botches in include files that don't 
affect the rest of us....)
--
Richard Todd	rmtodd@uokmax.ecn.uoknor.edu  rmtodd@chinet.chi.il.us
	rmtodd@servalan.uucp
"We're thinking about upgrading from SunOS 4.1.1 to SunOS 3.5."--Henry Spencer