osf.h (TARGET_OS_CPP_BUILTINS): Define __STDC_VERSION__ to ISO C94 for C++.

* config/alpha/osf.h (TARGET_OS_CPP_BUILTINS): Define
	__STDC_VERSION__ to ISO C94 for C++.

	* fixinc/inclhack.def (alpha_wchar): New fix.
	* fixinc/fixincl.x: Regenerate.
	* fixinc/tests/base/wchar.h: New file.

From-SVN: r74558
This commit is contained in:
Rainer Orth 2003-12-12 01:19:25 +00:00 committed by Rainer Orth
parent d8683476fe
commit f502cbff6d
5 changed files with 96 additions and 5 deletions

View File

@ -1,3 +1,12 @@
2003-12-12 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* config/alpha/osf.h (TARGET_OS_CPP_BUILTINS): Define
__STDC_VERSION__ to ISO C94 for C++.
* fixinc/inclhack.def (alpha_wchar): New fix.
* fixinc/fixincl.x: Regenerate.
* fixinc/tests/base/wchar.h: New file.
2003-12-11 David Mosberger <davidm@hpl.hp.com>
* unwind-libunwind.c (_Unwind_SetGR): Clear the NaT bit as

View File

@ -49,6 +49,13 @@ Boston, MA 02111-1307, USA. */
to be defined for <math.h>. */ \
if (LONG_DOUBLE_TYPE_SIZE == 128) \
builtin_define ("__X_FLOAT"); \
\
/* Tru64 UNIX V4/V5 provide several ISO C94 \
features protected by the corresponding \
__STDC_VERSION__ macro. libstdc++ v3 \
needs them as well. */ \
if (c_dialect_cxx ()) \
builtin_define ("__STDC_VERSION__=199409L"); \
} while (0)
/* Accept DEC C flags for multithreaded programs. We use _PTHREAD_USE_D4

View File

@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
* It has been AutoGen-ed Monday November 3, 2003 at 10:05:53 PM MET
* It has been AutoGen-ed Wednesday November 19, 2003 at 04:30:46 PM MET
* From the definitions inclhack.def
* and the template file fixincl
*/
/* DO NOT CVS-MERGE THIS FILE, EITHER Mon Nov 3 22:05:53 MET 2003
/* DO NOT CVS-MERGE THIS FILE, EITHER Wed Nov 19 16:30:46 MET 2003
*
* You must regenerate it. Use the ./genfixes script.
*
@ -15,7 +15,7 @@
* certain ANSI-incompatible system header files which are fixed to work
* correctly with ANSI C and placed in a directory that GNU C will search.
*
* This file contains 161 fixup descriptions.
* This file contains 162 fixup descriptions.
*
* See README for more information.
*
@ -973,6 +973,43 @@ static const char* apzAlpha_SbrkPatch[] = {
"void *sbrk(",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Alpha_Wchar fix
*/
tSCC zAlpha_WcharName[] =
"alpha_wchar";
/*
* File name selection pattern
*/
tSCC zAlpha_WcharList[] =
"|wchar.h|";
/*
* Machine/OS name selection pattern
*/
tSCC* apzAlpha_WcharMachs[] = {
"alpha*-dec-osf4*",
(const char*)NULL };
/*
* content selection pattern - do fix if pattern found
*/
tSCC zAlpha_WcharSelect0[] =
"#define wcstok wcstok_r";
#define ALPHA_WCHAR_TEST_CT 1
static tTestDesc aAlpha_WcharTests[] = {
{ TT_EGREP, zAlpha_WcharSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Alpha_Wchar
*/
static const char* apzAlpha_WcharPatch[] = { "sed",
"-e", "s@#define wcstok wcstok_r@extern wchar_t *wcstok __((wchar_t *, const wchar_t *, wchar_t **)) __asm__(\"wcstok_r\");@",
"-e", "s@#define wcsftime __wcsftime_isoc@extern size_t wcsftime __((wchar_t *, size_t, const wchar_t *, const struct tm *)) __asm__(\"__wcsftime_isoc\");@",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Avoid_Bool_Define fix
@ -6378,9 +6415,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
#define REGEX_COUNT 181
#define REGEX_COUNT 182
#define MACH_LIST_SIZE_LIMIT 261
#define FIX_COUNT 161
#define FIX_COUNT 162
/*
* Enumerate the fixes
@ -6407,6 +6444,7 @@ typedef enum {
ALPHA_PTHREAD_FIXIDX,
ALPHA_PTHREAD_GCC_FIXIDX,
ALPHA_SBRK_FIXIDX,
ALPHA_WCHAR_FIXIDX,
AVOID_BOOL_DEFINE_FIXIDX,
AVOID_BOOL_TYPE_FIXIDX,
AVOID_WCHAR_T_TYPE_FIXIDX,
@ -6655,6 +6693,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
ALPHA_SBRK_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aAlpha_SbrkTests, apzAlpha_SbrkPatch, 0 },
{ zAlpha_WcharName, zAlpha_WcharList,
apzAlpha_WcharMachs,
ALPHA_WCHAR_TEST_CT, FD_MACH_ONLY,
aAlpha_WcharTests, apzAlpha_WcharPatch, 0 },
{ zAvoid_Bool_DefineName, zAvoid_Bool_DefineList,
apzAvoid_Bool_DefineMachs,
AVOID_BOOL_DEFINE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,

View File

@ -633,6 +633,23 @@ fix = {
};
/*
* Change external names of wcstok/wcsftime via asm instead of macros on
* Tru64 UNIX V4.0.
*/
fix = {
hackname = alpha_wchar;
files = wchar.h;
mach = "alpha*-dec-osf4*";
select = "#define wcstok wcstok_r";
sed = "s@#define wcstok wcstok_r@extern wchar_t *wcstok __((wchar_t *, const wchar_t *, wchar_t **)) __asm__(\"wcstok_r\");@";
sed = "s@#define wcsftime __wcsftime_isoc@extern size_t wcsftime __((wchar_t *, size_t, const wchar_t *, const struct tm *)) __asm__(\"__wcsftime_isoc\");@";
test_text = "#define wcstok wcstok_r\n"
"#define wcsftime __wcsftime_isoc";
};
/*
* For C++, avoid any typedef or macro definition of bool,
* and use the built in type instead.

View File

@ -0,0 +1,15 @@
/* DO NOT EDIT THIS FILE.
It has been auto-edited by fixincludes from:
"fixinc/tests/inc/wchar.h"
This had to be done to correct non-standard usages in the
original, manufacturer supplied header file. */
#if defined( ALPHA_WCHAR_CHECK )
extern wchar_t *wcstok __((wchar_t *, const wchar_t *, wchar_t **)) __asm__("wcstok_r");
extern size_t wcsftime __((wchar_t *, size_t, const wchar_t *, const struct tm *)) __asm__("__wcsftime_isoc");
#endif /* ALPHA_WCHAR_CHECK */