> Date: Sun, 11 Dec 2011 13:37:29 +0100 > From: Pascal Stumpf <pascal.stu...@cubes.de> > > On Thu, 17 Nov 2011 19:06:24 +0100, Pascal Stumpf wrote: > > Hi, > > this diff was already suggested by matthew@ some time ago. It renders > > clang++ usable with gcc's C++ include files, see: > > > > http://marc.info/?l=openbsd-tech&m=130229126704450&w=2 > > > > I don't expect any fallout, but just to be sure, can this go through a > > bulk build on affected platforms (gcc4)? > > > > > > > > Index: os_defines.h > > =================================================================== > > RCS file: /cvs/src/gnu/gcc/libstdc++-v3/config/os/bsd/openbsd/os_defines.h,v > > retrieving revision 1.2 > > diff -u -p -r1.2 os_defines.h > > --- os_defines.h 26 May 2010 11:23:06 -0000 1.2 > > +++ os_defines.h 17 Nov 2011 18:04:55 -0000 > > @@ -35,12 +35,6 @@ > > // file will come before all others. > > > > #define _GLIBCXX_USE_C99 1 > > -#define _GLIBCXX_USE_C99_CHECK 1 > > -#define _GLIBCXX_USE_C99_DYNAMIC (!(__ISO_C_VISIBLE >= 1999)) > > -#define _GLIBCXX_USE_C99_LONG_LONG_CHECK 1 > > -#define _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC (_GLIBCXX_USE_C99_DYNAMIC || > > !def > > ined __LONG_LONG_SUPPORTED) > > -#define _GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_CHECK 1 > > -#define _GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC defined > > _XOPEN_SOURCE > > typedef __builtin_va_list __gnuc_va_list; > > > > #endif > > > > > > ping?
I still think this should be investigated deeper. Matthew did a bit of digging jusdging from: http://marc.info/?l=openbsd-ports&m=129783295016631&w=2 That raises the question what difference between the prototypes makes clang++ barf. If it is only thye missing restrict qualifiers, we should add those to our prototypes. As far as I can tell, the #defines that get removed by the diff do serve a purpose. Without them, compiling #include <cstdio> with g++ -D_POSIX_C_SOURCE=199309 will fail.