Re: [pgsql-hackers-win32] libpq build problem with
| От | Andreas Pflug |
|---|---|
| Тема | Re: [pgsql-hackers-win32] libpq build problem with |
| Дата | |
| Msg-id | 4121E0BA.1080301@pse-consulting.de обсуждение исходный текст |
| Ответ на |
Re: [pgsql-hackers-win32] libpq build problem with |
| Ответы |
Re: [pgsql-hackers-win32] libpq build problem with |
| Список | pgsql-patches |
Bruce, I posted the attached patch 4 days ago, with the comment "The attached patch will redefine unlink and rename only if FRONTEND is not defined.". I still believe this a good way to fix it. Tom Lane wrote: > > > To put that in a more positive light: we like to think that our code is > Posix-compliant and runs in a Posix-compliant environment. We're not > thrilled about introducing non-Posix-isms for the convenience of one > platform ... especially if there's no easy way to enforce that the > nonstandard coding convention be used. > > Back on track: if rename() does exist under Windows then my idea is > unreliable. Any other thoughts? How about #including <io.h> in port.h > (for Windows only of course) before we #define these things? Probably won't work, because pgrename and rename do not have the same definition/linkage. Regards, Andreas Index: port.h =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/include/port.h,v retrieving revision 1.52 diff -u -r1.52 port.h --- port.h 12 Aug 2004 18:32:43 -0000 1.52 +++ port.h 13 Aug 2004 15:58:19 -0000 @@ -141,7 +141,7 @@ extern int pclose_check(FILE *stream); -#if defined(WIN32) || defined(__CYGWIN__) +#if (defined(WIN32) || defined(__CYGWIN__)) && !defined(FRONTEND) /* * Win32 doesn't have reliable rename/unlink during concurrent access, * and we need special code to do symlinks.
В списке pgsql-patches по дате отправления: