Re: [pgsql-hackers-win32] libpq build problem with on MS VC++ - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: [pgsql-hackers-win32] libpq build problem with on MS VC++
Date
Msg-id 200408170352.i7H3qjo21315@candle.pha.pa.us
Whole thread Raw
In response to Re: [pgsql-hackers-win32] libpq build problem with on MS VC++  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [pgsql-hackers-win32] libpq build problem with on MS VC++
List pgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > OK, I have improved your comment and applied the patch. I mentioned the
> > problem is only on MS C, but we might as well include io.h there on all
> > Win32 platforms.
>
> I am actually fairly uncomfortable with this solution.  We learned the
> hard way awhile back that we want to include postgres.h or siblings
> *before* any system header file, because the system header files may
> default to things we do not want otherwise.  (Typical examples have to
> do with 32-bit vs 64-bit file offsets.)  Perhaps it will be okay to
> violate that rule on this one specific file on this one specific
> platform, but I would not bet on it.

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?

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

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [pgsql-hackers-win32] libpq build problem with on MS VC++
Next
From: Tom Lane
Date:
Subject: Re: [pgsql-hackers-win32] libpq build problem with on MS VC++