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

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: Randomly placed definition of S_ISDIR() in psql/copy.c
Дата
Msg-id 20090426003907.GB9166@fetter.org
обсуждение исходный текст
Ответ на Randomly placed definition of S_ISDIR() in psql/copy.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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 for such a thing is src/include/port/win32.h
> ... where indeed there already is a definition of S_ISDIR().  So I
> think this is dead code as well as poor style.  Any objection to
> seeing what happens if we remove it?

Nope :)

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Randomly placed definition of S_ISDIR() in psql/copy.c
Следующее
От: Brendan Jurd
Дата:
Сообщение: Re: WIP: to_char, support for EEEE format