Re: APR 1.0 released

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Reini Urban <rurban(at)x-ray(dot)at>
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:52:22
Message-ID: 200409100952.i8A9qNi14859@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches


OK, moved and comment documents its location.

---------------------------------------------------------------------------

Reini Urban wrote:
> 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/
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 758 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Grant Finnemore 2004-09-10 09:59:11 Re: Failed assertion, CVS head
Previous Message Bruce Momjian 2004-09-10 09:25:40 Re: psql questions: SQL, progname, copyright dates

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Reini Urban 2004-09-10 10:02:21 more dirmod CYGWIN (was: APR 1.0 released)
Previous Message Bruce Momjian 2004-09-10 09:47:37 Re: VC++ psql build broken

Browse pgsql-patches by date

  From Date Subject
Next Message Reini Urban 2004-09-10 10:02:21 more dirmod CYGWIN (was: APR 1.0 released)
Previous Message Reini Urban 2004-09-10 09:16:55 Re: APR 1.0 released