This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: POSIX in g++


"Peng Yu" <pengyu.ut@gmail.com> writes:

> There is an options -ansi to make g++ ANSI compatible. I'm wondering
> if there is an option to make g++ POSIX compatible. Or g++ is already
> POSIX compatible without an option?

POSIX itself specifies features macros which you may define to compile
your source code in a strict POSIX environment.  These are
_POSIX_SOURCE and _POSIX_C_SOURCE.  These affect the header files
rather than the libraries.  To get a strict POSIX compiler, use those
in conjunction with -ansi or -std.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]