Re: [BUGS] 7.0beta1: bugs appearing on cygwin
От | Marko Kreen |
---|---|
Тема | Re: [BUGS] 7.0beta1: bugs appearing on cygwin |
Дата | |
Msg-id | 20000229162101.A32609@l-t.ee обсуждение исходный текст |
Ответ на | Re: [BUGS] 7.0beta1: bugs appearing on cygwin (Bruce Momjian <pgman@candle.pha.pa.us>) |
Список | pgsql-bugs |
On Mon, Feb 28, 2000 at 06:26:54PM -0500, Bruce Momjian wrote: > > >> 2) gcc warns about redefine of CURRENT_TIME. Nothing > > >> serious (I mean the compile does not fail..), I just thought I mention. > > >> defined in backend/parse.h & <sys/ipc.h> (cygwin32_ipc-1.03) > > > > > > Seems this is getting in our way. We could try undefining it before > > > defining it, I guess. I don't think it affects the compile. > > > > I wonder whether it is possible to avoid including <sys/ipc.h> in the > > files that need to include parse.h. Which files show the warning, > > anyway? > > Probably possible. Not sure. Perhaps the user can supply a patch. > Even: > > #ifndef CURRENT_TIME > #include <ipc.h> > #endif > > may work. Well. IMHO (after looking into it) the CURRENT_TIME has no business of being in ipc.h in the first place. Here follows a patch that moves it into a private header file of cygwin32_ipc. As the http://penguin.cz/~horak/cygwin32_ipc-1.03.tar.gz seems to be the "official" (only) place of cygwin32_ipc, it should be easy to push a next version or something. Or to include the patch with postgresql. If this is wrong, I can look what should be done to PostgreSQL about it. BTW, about doc/README.NT: There is a line: > 12. Initdb --username=jkr (do not run this command as administrator) but initdb does not have option --username ... Also there is a patch attached (for cygwin32_ipc, it seems), but nothing said what should be done about it. -- marko diff -ur cygwin32_ipc-1.03.orig/include/IpcNtExt.h cygwin32_ipc-1.03/include/IpcNtExt.h --- cygwin32_ipc-1.03.orig/include/IpcNtExt.h Wed Jun 17 15:08:04 1998 +++ cygwin32_ipc-1.03/include/IpcNtExt.h Tue Feb 29 12:08:50 2000 @@ -51,6 +51,8 @@ #include "IpcNtStr.h" #include <windows.h> +#define CURRENT_TIME time(0) + EXTERN HANDLE GSemSem, GSemShm, GSemMsg ; EXTERN CYGWIN32_IPCNT_SEMSTR *GStrSem ; diff -ur cygwin32_ipc-1.03.orig/include/sys/ipc.h cygwin32_ipc-1.03/include/sys/ipc.h --- cygwin32_ipc-1.03.orig/include/sys/ipc.h Wed May 13 23:26:28 1998 +++ cygwin32_ipc-1.03/include/sys/ipc.h Tue Feb 29 12:08:28 2000 @@ -35,7 +35,6 @@ #include <sys/types.h> -#define CURRENT_TIME time(0) #define IPC_PRIVATE ((key_t) 0) struct ipc_perm
В списке pgsql-bugs по дате отправления: