Re: libpq build problem with <io.h> on MS VC++

Bruce Momjian <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32,gmane.comp.db.postgresql.devel.patches
Message-ID <[email protected]>
Bruce Momjian wrote:
> Tom Lane wrote:
> > Bruce Momjian <[email protected]> writes:
> > > The only other option I can think of is to #undef those to defines,
> > > include io.h, then re-include port.h?  Is that better?
> > 
> > How about not #define'ing rename() etc in port.h in the first place?
> > 
> > We could put
> > 	#ifdef WIN32
> > 	#define rename(x) pgrename(x)
> > 	#endif
> > into those very few .c files that need it.  (I'm assuming that
> > forgetting to include this in a file that calls rename() will yield an
> > obvious build failure on Windows --- if not then the idea is no good.)
> 
> I think they have rename --- it just isn't reliable like ours is.

One other thing we could do is to do the out-of-order includes only for
MS VC. That is the only platform that needs it, and let the other
Win32's do the regular include.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [email protected]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [email protected])
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.