Re: [HACKERS] Randomly placed definition of S_ISDIR() in psql/copy.c

2009-04-25 Thread Magnus Hagander
Tom Lane wrote: > Why does psql/copy.c contain this? > > #if defined(WIN32) && !defined(S_ISDIR) > #define __S_ISTYPE(mode, mask)(((mode) & S_IFMT) == (mask)) > #define S_ISDIR(mode) __S_ISTYPE((mode), S_IFDIR) > #endif > > Surely a better place for such a thing is src/include/port/win32

Re: [HACKERS] Randomly placed definition of S_ISDIR() in psql/copy.c

2009-04-25 Thread David Fetter
On Sat, Apr 25, 2009 at 04:35:21PM -0400, Tom Lane wrote: > Why does psql/copy.c contain this? > > #if defined(WIN32) && !defined(S_ISDIR) > #define __S_ISTYPE(mode, mask)(((mode) & S_IFMT) == (mask)) > #define S_ISDIR(mode) __S_ISTYPE((mode), S_IFDIR) > #endif > > Surely a better place

[HACKERS] Randomly placed definition of S_ISDIR() in psql/copy.c

2009-04-25 Thread Tom Lane
Why does psql/copy.c contain this? #if defined(WIN32) && !defined(S_ISDIR) #define __S_ISTYPE(mode, mask) (((mode) & S_IFMT) == (mask)) #define S_ISDIR(mode)__S_ISTYPE((mode), S_IFDIR) #endif Surely a better place for such a thing is src/include/port/win32.h ... where indeed there already is