[PATCH, committed] AIX CPLUSPLUS_CPP_SPEC
David Edelsohn
dje@watson.ibm.com
Tue Jan 18 17:20:00 GMT 2005
Explicitly defining _XOPEN macros now is causing more problems
than it solves. This patch removes those definitions in both
CPLUSPLUS_CPP_SPEC and libstdc++-v3 os_defines.h retaining on
_ALL_SOURCE. Defining _ALL_SOURCE will define the other macros without
the breakage.
Bootstrapped on powerpc-ibm-aix5.1.0.0 and powerpc-ibm-aix5.2.0.0 with no
regressions.
By visual inspection, this should work on AIX 4.3 as well. I am sure
someone will let me know if it causes a problem. :).
David
libstdc++-v3/
* config/os/aix/os_defines.h (_XOPEN_SOURCE): Delete.
(_XOPEN_SOURCE_EXTENDED): Delete.
gcc/
* config/rs6000/aix43.h (CPLUSPLUS_CPP_SPEC): Delete
_XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED, _LARGE_FILE_API.
* config/rs6000/aix51.h (CPLUSPLUS_CPP_SPEC): Same.
* config/rs6000/aix52.h (CPLUSPLUS_CPP_SPEC): Same.
Index: os_defines.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/aix/os_defines.h,v
retrieving revision 1.4
diff -c -p -r1.4 os_defines.h
*** os_defines.h 15 Jan 2005 17:38:04 -0000 1.4
--- os_defines.h 18 Jan 2005 17:05:47 -0000
***************
*** 1,6 ****
// Specific definitions for AIX -*- C++ -*-
! // Copyright (C) 2000, 2002 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
--- 1,6 ----
// Specific definitions for AIX -*- C++ -*-
! // Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
***************
*** 33,44 ****
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
- #undef _XOPEN_SOURCE
- #define _XOPEN_SOURCE 500
-
- #undef _XOPEN_SOURCE_EXTENDED
- #define _XOPEN_SOURCE_EXTENDED 1
-
// off64_t
#ifndef _LARGE_FILE_API
#define _LARGE_FILE_API
--- 33,38 ----
Index: aix43.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/aix43.h,v
retrieving revision 1.33
diff -c -p -r1.33 aix43.h
*** aix43.h 16 Jan 2005 15:28:17 -0000 1.33
--- aix43.h 18 Jan 2005 17:09:18 -0000
***************
*** 1,6 ****
/* Definitions of target machine for GNU compiler,
for IBM RS/6000 POWER running AIX version 4.3.
! Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004
Free Software Foundation, Inc.
Contributed by David Edelsohn (edelsohn@gnu.org).
--- 1,6 ----
/* Definitions of target machine for GNU compiler,
for IBM RS/6000 POWER running AIX version 4.3.
! Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005
Free Software Foundation, Inc.
Contributed by David Edelsohn (edelsohn@gnu.org).
*************** do { \
*** 116,125 ****
defined. */
#undef CPLUSPLUS_CPP_SPEC
#define CPLUSPLUS_CPP_SPEC \
! "-D_XOPEN_SOURCE=500 \
! -D_XOPEN_SOURCE_EXTENDED=1 \
! -D_LARGE_FILE_API \
! -D_ALL_SOURCE \
%{maix64: -D__64BIT__} \
%{mpe: -I/usr/lpp/ppe.poe/include} \
%{pthread: -D_THREAD_SAFE}"
--- 116,122 ----
defined. */
#undef CPLUSPLUS_CPP_SPEC
#define CPLUSPLUS_CPP_SPEC \
! "-D_ALL_SOURCE \
%{maix64: -D__64BIT__} \
%{mpe: -I/usr/lpp/ppe.poe/include} \
%{pthread: -D_THREAD_SAFE}"
Index: aix51.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/aix51.h,v
retrieving revision 1.24
diff -c -p -r1.24 aix51.h
*** aix51.h 14 Nov 2004 03:32:11 -0000 1.24
--- aix51.h 18 Jan 2005 17:09:18 -0000
***************
*** 1,6 ****
/* Definitions of target machine for GNU compiler,
for IBM RS/6000 POWER running AIX V5.
! Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
Contributed by David Edelsohn (edelsohn@gnu.org).
This file is part of GCC.
--- 1,6 ----
/* Definitions of target machine for GNU compiler,
for IBM RS/6000 POWER running AIX V5.
! Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by David Edelsohn (edelsohn@gnu.org).
This file is part of GCC.
*************** do { \
*** 118,127 ****
defined. */
#undef CPLUSPLUS_CPP_SPEC
#define CPLUSPLUS_CPP_SPEC \
! "-D_XOPEN_SOURCE=500 \
! -D_XOPEN_SOURCE_EXTENDED=1 \
! -D_LARGE_FILE_API \
! -D_ALL_SOURCE \
%{maix64: -D__64BIT__} \
%{mpe: -I/usr/lpp/ppe.poe/include} \
%{pthread: -D_THREAD_SAFE}"
--- 118,124 ----
defined. */
#undef CPLUSPLUS_CPP_SPEC
#define CPLUSPLUS_CPP_SPEC \
! "-D_ALL_SOURCE \
%{maix64: -D__64BIT__} \
%{mpe: -I/usr/lpp/ppe.poe/include} \
%{pthread: -D_THREAD_SAFE}"
Index: aix52.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/aix52.h,v
retrieving revision 1.11
diff -c -p -r1.11 aix52.h
*** aix52.h 15 Jan 2005 17:40:00 -0000 1.11
--- aix52.h 18 Jan 2005 17:09:18 -0000
***************
*** 1,6 ****
/* Definitions of target machine for GNU compiler,
for IBM RS/6000 POWER running AIX V5.2.
! Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by David Edelsohn (edelsohn@gnu.org).
This file is part of GCC.
--- 1,6 ----
/* Definitions of target machine for GNU compiler,
for IBM RS/6000 POWER running AIX V5.2.
! Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by David Edelsohn (edelsohn@gnu.org).
This file is part of GCC.
*************** do { \
*** 106,115 ****
defined. Synchronize with libstdc++ os_defines.h. */
#undef CPLUSPLUS_CPP_SPEC
#define CPLUSPLUS_CPP_SPEC \
! "-D_XOPEN_SOURCE=500 \
! -D_XOPEN_SOURCE_EXTENDED=1 \
! -D_LARGE_FILE_API \
! -D_ALL_SOURCE \
%{maix64: -D__64BIT__} \
%{mpe: -I/usr/lpp/ppe.poe/include} \
%{pthread: -D_THREAD_SAFE}"
--- 106,112 ----
defined. Synchronize with libstdc++ os_defines.h. */
#undef CPLUSPLUS_CPP_SPEC
#define CPLUSPLUS_CPP_SPEC \
! "-D_ALL_SOURCE \
%{maix64: -D__64BIT__} \
%{mpe: -I/usr/lpp/ppe.poe/include} \
%{pthread: -D_THREAD_SAFE}"
More information about the Gcc-patches
mailing list