Re: [HACKERS] xlog.c.patch for cygwin port. - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] xlog.c.patch for cygwin port.
Date
Msg-id 200003080550.AAA15242@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] xlog.c.patch for cygwin port.  (The Hermit Hacker <scrappy@hub.org>)
Responses Re: [HACKERS] xlog.c.patch for cygwin port.  (The Hermit Hacker <scrappy@hub.org>)
List pgsql-hackers
> On Tue, 7 Mar 2000, Bruce Momjian wrote:
> 
> > > 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?
> 
> Okay, I'm lost ... if we "#define OPEN_FLAGS .." and not the open itself,
> why would we need some kind of wrapper?

No, the original person was refining open().  I�think defining the flags
is much better.

--  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,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] DROP TABLE inside a transaction block