From: | Reini Urban <rurban(at)x-ray(dot)at> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: APR 1.0 released |
Date: | 2004-09-10 09:16:55 |
Message-ID: | 41417107.2080502@x-ray.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-hackers-win32 pgsql-patches |
Bruce Momjian schrieb:
> Andrew Dunstan wrote:
>>Reini Urban wrote:
>>>FYI: WIN32 is also defined because <windows.h> is included.
>>>(/usr/incluse/w32api/windef.h)
>>>If you want this or that, do proper nesting, and use #else.
>>>
>>>
>>
>>Ugh, yes. A little experimentation shows that __WIN32__ is defined for
>>MinGW only, but WIN32 is for both. I wonder how we missed that in
>>various places. Maybe we need a little audit of the use of WIN32.
>
> OK, fixed. We should not be using __WIN32__, just Win32. The proper
> test is #ifndef __CYGWIN__.
very good. just think of future MSVC versions.
Just one more glitch:
#undef rename
#undef unlink
has to be defined before #include <unistd.h> on CYGWIN, because
unistd.h has the declarations for rename and unlink, which are required
inside the pg versions.
without the #undef, the macros which rename rename to pgrename, ... are
still effective, which will lead to undeclared/falsely autodeclared
rename/unlink parts.
I don't know for mingw, if they need the pgrename/pgunlink declaration.
For my CYGWIN patch I moved those two lines before #include <unistd.h>.
> ------------------------------------------------------------------------
>
> Index: src/port/dirmod.c
> ===================================================================
> RCS file: /cvsroot/pgsql-server/src/port/dirmod.c,v
> retrieving revision 1.23
> diff -c -c -r1.23 dirmod.c
> *** src/port/dirmod.c 9 Sep 2004 00:59:49 -0000 1.23
> --- src/port/dirmod.c 10 Sep 2004 02:44:19 -0000
> ***************
> *** 36,45 ****
> #undef rename
> #undef unlink
>
> ! #ifdef __WIN32__
> #include <winioctl.h>
> #else
> - /* __CYGWIN__ */
> #include <windows.h>
> #include <w32api/winioctl.h>
> #endif
> --- 36,44 ----
> #undef rename
> #undef unlink
>
> ! #ifndef __CYGWIN__
> #include <winioctl.h>
> #else
> #include <windows.h>
> #include <w32api/winioctl.h>
> #endif
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-09-10 09:25:40 | Re: psql questions: SQL, progname, copyright dates |
Previous Message | Grant Finnemore | 2004-09-10 08:18:58 | Failed assertion, CVS head |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-09-10 09:47:17 | Re: VC++ psql build broken |
Previous Message | Dave Page | 2004-09-10 08:19:21 | Re: VC++ psql build broken |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-09-10 09:52:22 | Re: APR 1.0 released |
Previous Message | Koju Iijima | 2004-09-10 05:27:18 | contribution: namespace.sql |