aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/alpha/osf.h7
-rw-r--r--gcc/fixinc/fixincl.x53
-rw-r--r--gcc/fixinc/inclhack.def17
-rw-r--r--gcc/fixinc/tests/base/wchar.h15
5 files changed, 96 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c4a5035..8fae82c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/alpha/osf.h b/gcc/config/alpha/osf.h
index 13e7626..fd72ba3 100644
--- a/gcc/config/alpha/osf.h
+++ b/gcc/config/alpha/osf.h
@@ -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
diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x
index 5795b7f..dbf73a2 100644
--- a/gcc/fixinc/fixincl.x
+++ b/gcc/fixinc/fixincl.x
@@ -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.
*
@@ -975,6 +975,43 @@ static const char* apzAlpha_SbrkPatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * 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
*/
tSCC zAvoid_Bool_DefineName[] =
@@ -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,
diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def
index 1715fe2..6543869 100644
--- a/gcc/fixinc/inclhack.def
+++ b/gcc/fixinc/inclhack.def
@@ -634,6 +634,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.
* HP/UX 10.20 also has it in curses_colr/curses.h.
diff --git a/gcc/fixinc/tests/base/wchar.h b/gcc/fixinc/tests/base/wchar.h
new file mode 100644
index 0000000..5c0b9df
--- /dev/null
+++ b/gcc/fixinc/tests/base/wchar.h
@@ -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 */