Re: [HACKERS] xlog.c.patch for cygwin port.

Поиск
Список
Период
Сортировка
От D. Jay Newman
Тема Re: [HACKERS] xlog.c.patch for cygwin port.
Дата
Msg-id 200003080248.VAA29840@sprucegrove.com
обсуждение исходный текст
Ответ на Re: [HACKERS] xlog.c.patch for cygwin port.  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: [HACKERS] xlog.c.patch for cygwin port.
Список pgsql-hackers
>> Bruce Momjian <pgman@candle.pha.pa.us> writes:
>> > This looks interesting.  We could remove some of our ifwin cruft.
>> 
>> I have been thinking for quite some time that most of the CYGWIN32
>> ifdefs represent very poor programming.  Instead of zillions of
>> 
>> #ifndef __CYGWIN32__
>>     fd = open(filename, O_RDONLY, 0666);
>> #else
>>     fd = open(filename, O_RDONLY | O_BINARY, 0666);
>> #endif
>> 
>> we should have in one include file something like
>
>Do we ever assign a function pointer for open() anywhere.  If so, the
>define will not work without some kind of wrapper, right?

Since the only difference seems to be "O_RDONLY" vs "O_RDONLY | O_BINARY",
why not do the #define on that?

At least in this case it works.
-- 
D. Jay Newman                   ! For the pleasure and the profit it derives
jay@sprucegrove.com              ! I arrange things, like furniture, and
http://www.sprucegrove.com/~jay/   ! daffodils, and ...lives.  -- Hello Dolly


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] DROP TABLE inside a transaction block
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: [HACKERS] xlog.c.patch for cygwin port.