Path: utzoo!attcan!uunet!mcsun!hp4nl!phigate!philica!adrie From: adrie@philica.ica.philips.nl (Adrie Koolen) Newsgroups: comp.os.minix Subject: Re: GNU mods for MINIX-ST 1.5.10 library Keywords: GNU MINIX-ST 1.5 Message-ID: <668@philica.ica.philips.nl> Date: 19 Sep 90 14:13:12 GMT References: <1805@Terra.cc.brunel.ac.uk> Reply-To: adrie@beitel.ica.philips.nl (Adrie Koolen) Organization: Philips TDS, Innovation Centre Aachen Lines: 26 In article <1805@Terra.cc.brunel.ac.uk> eesrajm@cc.brunel.ac.uk (Andrew J Michael) writes: >There are also some kludges to get round gcc problems with varargs which I >don't seem to be able to sort out properly. In Minix for the SparcStation 1, I also used the GNU C compiler. Most changes I made in the library were because of the varargs problem. All exec(), printf() and scanf() functions suffer from this. You can't solve it in a nice way, because ANSI wants a varargs function declaration to end in ", ...". To allow this, the whole declaration must be of the ANSI type, i.e. parameter specifications on the same line as they are declared. So all varargs functions now look like: #if _ANSI void fprintf(FILE *file, _CONST char *fmt, ...) #else void fprintf(file, fmt __STDIO_VA__ ) FILE *file; _CONST char *fmt; #endif Not a nice hack, but the only solution I could think of. The library functions can still be compiled on a PC, ST, be it with an ANSI compiler or with a non-ANSI compiler. Adrie Koolen (adrie@ica.philips.nl) Philips Innovation Centre Aachen