This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


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

Re: AIX atomicity.h support


	It's not just cdefs.h on AIX.  It's also a number of files with

#ifndef _POSIX_SOURCE
# define _POSIX_SOURCE
#endif

namely filedoalloc.c, fileops.c, wfiledoalloc.c .

	This construct assumes that if the _POSIX_SOURCE macro is going to
be defined, it will be defined on entry to the file, e.g. on the
commandline or by the compiler.  This is not portable.  libstdc++-v2/libio
at least moved repeated fragment to libioP.h, but does not seem to depend
on _POSIX_SOURCE=500 header definitions.  libstdc++-v3 depends on more
than _POSIX_SOURCE=1.

	libio seems to want to ensure that _POSIX_SOURCE is defined before
including the system headers, but does not allow for the headers
themselves to use magic to get the macro defined.  By defining the macro
itself, it interferes with the system header magic. 

	I think that this needs to be done in a target-specific way
instead of trying to provide a default catch for platforms that may not
define _POSIX_SOURCE.

David

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