Re: libpq-win32 patches
От | Andreas Pflug |
---|---|
Тема | Re: libpq-win32 patches |
Дата | |
Msg-id | 3F584B53.70500@pse-consulting.de обсуждение исходный текст |
Ответ на | Re: libpq-win32 patches (Bruce Momjian <pgman@candle.pha.pa.us>) |
Список | pgsql-patches |
Hi Bruce, >> >>+ >>+/* getpwuid doesn't exist under win32 */ >>+#define getpwuid(uid) NULL >>+ >> #endif /* pg_config_h_win32__ */ >> >> > >Why was this needed? I realize we don't have getpwuid() on Win32, but >we do have GetUserName() for cases where we need the name but not the >directory. > >Because all the getpwuid() calls seem ifdef'ed out under Win32 anyway, I >don't understand why you needed it. > I believe it was the first thing I did to have libpq compile at all. Later, I went into the ssl code and made it work, effectively commenting out all calls to getpwuid() making that line unnecessary. >Can't we check the OS version via the compiler? Maybe not portabily >between the various compilers supported. > > If you're talking about the WIN32 macro, this should be supported by every compiler running for win32, because windows headers rely on this. Regards, Andreas
В списке pgsql-patches по дате отправления: