[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs does not compile anymore in win32 with msvc6
From: |
Sam Steingold |
Subject: |
Re: Emacs does not compile anymore in win32 with msvc6 |
Date: |
08 Oct 2001 15:57:03 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.107 |
> * In message <address@hidden>
> * On the subject of "Re: Emacs does not compile anymore in win32 with msvc6"
> * Sent on Mon, 08 Oct 2001 12:46:42 -0400
> * Honorable Eli Zaretskii <address@hidden> writes:
>
> > From: Sam Steingold <address@hidden>
> > Date: 08 Oct 2001 12:20:02 -0400
> >
> > fileio.c:94:
> >
> > #ifdef WINDOWSNT
> > #define NOMINMAX 1
> > #include <windows.h>
> > #include <stdlib.h>
> > #include <fcntl.h>
> > #endif /* not WINDOWSNT */
> >
>
> fileio.c defined min and max by itself, until a day or two ago, so
> Emacs didn't need to expect min and max to be defined by the system
> headers. Since lisp.h defines them now, I suspect that one of the 3
> headers mentioned in the above snippet (windows.h, stdlib.h, and
> fcntl.h) undefine min and max. Could you please look into those
> headers and see if I'm right?
no:
$ egrep 'undef.*min' c:/msvs/vc98/include/*.h
$
$ egrep 'undef.*min' d:/gnu/emacs/src/*.[ch]
../src/unexw32.c:#undef min
../src/w32gui.h:#undef min
../src/w32heap.h:#undef min
$
OTOH:
STDLIB.H:
/* Minimum and maximum macros */
#define __max(a,b) (((a) > (b)) ? (a) : (b))
#define __min(a,b) (((a) < (b)) ? (a) : (b))
.......
#if !__STDC__
#ifndef _POSIX_
/* Non-ANSI names for compatibility */
#ifndef __cplusplus
#define max(a,b) (((a) > (b)) ? (a) : (b))
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
--------------------------------
windows.h does mention NOMINMAX in the comments, but stdlib.h ignores
it.
--
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
It's not just a language, it's an adventure. Common Lisp.