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

Bruce Momjian <pgman@candle.pha.pa.us>

From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: yutaka tanida <yutaka@marin.or.jp>, Alexei Zakharov <A.S.Zakharov@inp.nsk.su>, pgsql-hackers@postgreSQL.org
Date: 2000-03-08T01:50:07Z
Lists: 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?

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026