delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/12/14/18:34:10

From: Andreas DOT Krueger AT mlc DOT de
Subject: #define DELETE causes GNU cvs to break.
14 Dec 1998 18:34:10 -0800 :
Message-ID: <412566DA.004DF583.00.cygnus.gnu-win32@mail.mlc.de>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

Hello,

I´ve been using Beta 20.1 with the included gcc,
to get GNU's cvs 1.10 up and running on WinNT 4.0 + ServicePack.

That worked fairly out of the box, with one exception:
One source code (file rcs.c) has an

   enum {ADD, DELETE}

that does not compile.

Why not? In file
cygwin-b20/H-i586-cygwin32/i586-cygwin32/include/Windows32/defines.h,
there is a

   #define DELETE

that breaks the code.

(I could fix this by renaming the "DELETE" in the rcs.c - file to something
different).


My suggestions:

As far as I know, the C/C++ standards both suggest that names
belonging to the compiler environment
either start with a single, or contain two "_" character(s).

Application programmers know to avoid such names.

If you have a Microsoft-ish reason that forces you to pollute the global
namespace
with other names, I suggest you warn your users that you do so,
through a note in the FAQ.

You might even consider adding a switch, to use standard-conforming names
only
(for people like myself, that want to compile software that knows little or
nothing
about Microsoft).


Unfortunately, I do not have the time to follow the discussion in this
mailing list.
I still hope these remarks have been helpfull.

andreas DOT krueger AT mlc DOT de


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019