summaryrefslogtreecommitdiffstats
path: root/gcc/fixinc
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-12 01:19:25 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-12 01:19:25 +0000
commitcc567216ceb88b9ad20314b69c131e0d7bd57d5b (patch)
tree6aab55979ba574900ae7a4a600672386e08788ff /gcc/fixinc
parent32e432bdf73122e8a5254b513b9e8ecda532a2c9 (diff)
downloadppe42-gcc-cc567216ceb88b9ad20314b69c131e0d7bd57d5b.tar.gz
ppe42-gcc-cc567216ceb88b9ad20314b69c131e0d7bd57d5b.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74558 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixinc')
-rw-r--r--gcc/fixinc/fixincl.x53
-rw-r--r--gcc/fixinc/inclhack.def17
-rw-r--r--gcc/fixinc/tests/base/wchar.h15
3 files changed, 80 insertions, 5 deletions
diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x
index 5795b7fccc6..dbf73a28092 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 1715fe2debf..654386932ec 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 00000000000..5c0b9dfe86a
--- /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 */
OpenPOWER on IntegriCloud