egcs-1.1 windows headers cause compilation failure in cygwin b20

Robert Pluim
Mon Dec 14 12:10:00 GMT 1998


I'm not quite sure whether this falls under cygwin or egcs, so I'm
sending to both lists. Feel free to redirect me to a more appropriate

The following program fails to compile under egcs-1.1 in cygwin b20,
because Windows32/Defines.h #defines DELETE already. (it's actually a
chopped down piece of code from cvs-1.10.4)

#include <direct.h>

main ()
    enum {ADD, DELETE} type;

Here's the error:

delete.c: In function `main':
delete.c:6: parse error before `('

gcc -v says:
Reading specs from e:\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)

Two questions arise:

1. Why is this windows stuff getting included when I'm not asking for
2. Isn't this namespace pollution? I must admit I'm not au-fait with
   all the various standards, and I realise it might all be
   Microsoft's fault, but couldn't this stuff at least be #ifdef'd



Robert Pluim                                 Tel:  +33 4 92 96 17 43
Systems Development Engineer                 Fax:  +33 4 92 96 15 32
<URL: >
Bay Networks EMEA,  25 Allee Pierre Ziller,  06560 Valbonne,  France

For help on using this list (especially unsubscribing), send a message to
"" with one line of text: "help".

More information about the Cygwin mailing list