[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Zlib-devel] Avoiding WIN* macros in GNU code [was Re: [Jim Meyering

From: Cosmin Truta
Subject: Re: [Zlib-devel] Avoiding WIN* macros in GNU code [was Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs]
Date: Thu, 12 Jun 2003 01:52:16 -0400

On Mon, 9 Jun 2003, Derek Robert Price wrote:

> Richard Stallman wrote:
> >    I haven't seen WINDOWSNT used before.
> >    Here are some of the window-related macros I have seen:
> >
> >      _WIN32 WIN32 __WIN32__ __MSDOS__ WINDOWS32
> >
> >WINDOWSNT is what Emacs uses.  It is a GNU convention that we do not
> >use the abbreviation "WIN" to refer to Windows.  Are those names
> >used in any GNU packages?

The abbreviation is not WIN, but it is WIN32. I think WINDOWSNT is a
misnomer, because Windows 95/98/ME is not at all NT, and the newer
versions are not named "NT" anymore (even if they are based on the NT
kernel). The term "Win32" is used consistently in all versions, and it
really means "32-bit Windows", whether NT or not.

> CVS was using it.  I just changed that, aside from a reference in
> lib/system.h to set WOE32 when it found WIN32 defined.

I cannot recall a particular piece of software, but I saw lots of
WIN32 and _WIN32 symbols, and I used to read plenty of GNU source code.
I admit this was some time ago.

> I did notice that gzip/zlib appears to be switching on WIN32
> extensively, at least as of 1.1.4.  I've cc'd the zlib-devel mailing list.

The Win32 support appeared before 1.1.4, but it doesn't affect the
functionality on other platforms. We try hard to keep it this way ;)

By the way, what is the problem with using WIN32? Is there any danger to
clash with something else? The point is that WIN32 is something easy to
rely on:

  #if !defined(WIN32) && (defined(_WIN32) || defined(__WIN32__))
  #define WIN32

Plenty of software use this or something related, and it's pretty much
failproof. Why add and maintain yet another nonstandard symbol?

Best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]