Re: src/tools/msvc usage instructions - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: src/tools/msvc usage instructions
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCEA0FC12@algol.sollentuna.se
Whole thread Raw
In response to Re: src/tools/msvc usage instructions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: src/tools/msvc usage instructions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> >> which looks like they figured out that they needed to check for
> >> MicroSoft C explicitly.  I have no idea why they do not define
> >> __STDC__ however.
>
> > Can we just define __STDC__ when compiling that file (or
> rather, when
> > compiling any bison-generated output file)? Or is that
> likely to cause
> > *other* issues?
>
> That seems pretty risky.  Better to use the /Za switch or
> whatever it was to get the compiler to assert it for itself.
> We have precedent for adding
> yes-we'd-like-a-standard-compiler-please switches where
> necessary, for instance adding -Ae to CFLAGS for HP's compiler.

Unfortunatly, that breaks things so bad it's not even funny. For a file
as simple as src/port/win32error.c I get hundreds of errors - many in
the win32 header files. Seems you ar eont allowed to pull in the win32
API headers without that flag - just the basic ANSI ones. So that' sjust
not going to fly.

//Magnus


pgsql-hackers by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: tsearch2 error msg
Next
From: Tom Lane
Date:
Subject: Re: PG qsort vs. Solaris