2011-09-26 Tristan Gingold <gingold@adacore.com>
* inclhack.def (ms_define_can_use_extern_prefix): (vms_use_pragma_extern_model, vms_disable_decc_string_builtins): New fixes. * fixincl.x: Regenerate. * tests/base/rtldef/string.h: New test. * tests/base/rtldef/decc$types.h: Likewise. * tests/base/testing.h: Update From-SVN: r179192
This commit is contained in:
parent
8a6a05ce93
commit
750db0248d
@ -1,3 +1,13 @@
|
||||
2011-09-26 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* inclhack.def (ms_define_can_use_extern_prefix):
|
||||
(vms_use_pragma_extern_model, vms_disable_decc_string_builtins):
|
||||
New fixes.
|
||||
* fixincl.x: Regenerate.
|
||||
* tests/base/rtldef/string.h: New test.
|
||||
* tests/base/rtldef/decc$types.h: Likewise.
|
||||
* tests/base/testing.h: Update
|
||||
|
||||
2011-09-22 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* mkfixinc.sh (target): Remove alpha-vms from particular targets.
|
||||
|
@ -2,11 +2,11 @@
|
||||
*
|
||||
* DO NOT EDIT THIS FILE (fixincl.x)
|
||||
*
|
||||
* It has been AutoGen-ed Monday August 22, 2011 at 05:03:34 PM PDT
|
||||
* It has been AutoGen-ed September 22, 2011 at 04:28:52 PM by AutoGen 5.11.1
|
||||
* From the definitions inclhack.def
|
||||
* and the template file fixincl
|
||||
*/
|
||||
/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Aug 22 17:03:34 PDT 2011
|
||||
/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Sep 22 16:28:52 CEST 2011
|
||||
*
|
||||
* 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 217 fixup descriptions.
|
||||
* This file contains 220 fixup descriptions.
|
||||
*
|
||||
* See README for more information.
|
||||
*
|
||||
@ -8444,6 +8444,121 @@ static const char* apzVa_I960_MacroPatch[] = {
|
||||
"__vx%1",
|
||||
(char*)NULL };
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Description of Vms_Define_Can_Use_Extern_Prefix fix
|
||||
*/
|
||||
tSCC zVms_Define_Can_Use_Extern_PrefixName[] =
|
||||
"vms_define_can_use_extern_prefix";
|
||||
|
||||
/*
|
||||
* File name selection pattern
|
||||
*/
|
||||
tSCC zVms_Define_Can_Use_Extern_PrefixList[] =
|
||||
"rtldef/decc$types.h\0";
|
||||
/*
|
||||
* Machine/OS name selection pattern
|
||||
*/
|
||||
tSCC* apzVms_Define_Can_Use_Extern_PrefixMachs[] = {
|
||||
"*-*-*vms*",
|
||||
(const char*)NULL };
|
||||
|
||||
/*
|
||||
* content selection pattern - do fix if pattern found
|
||||
*/
|
||||
tSCC zVms_Define_Can_Use_Extern_PrefixSelect0[] =
|
||||
"#[ \t]*else\n\
|
||||
#[ \t]*if defined\\(__DECCXX\\)\n\
|
||||
#[ \t]*define __CAN_USE_EXTERN_PREFIX 1\n";
|
||||
|
||||
#define VMS_DEFINE_CAN_USE_EXTERN_PREFIX_TEST_CT 1
|
||||
static tTestDesc aVms_Define_Can_Use_Extern_PrefixTests[] = {
|
||||
{ TT_EGREP, zVms_Define_Can_Use_Extern_PrefixSelect0, (regex_t*)NULL }, };
|
||||
|
||||
/*
|
||||
* Fix Command Arguments for Vms_Define_Can_Use_Extern_Prefix
|
||||
*/
|
||||
static const char* apzVms_Define_Can_Use_Extern_PrefixPatch[] = {
|
||||
"format",
|
||||
"%0# elif defined (__GNUC__)\n\
|
||||
#\tdefine __CAN_USE_EXTERN_PREFIX 1\n",
|
||||
(char*)NULL };
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Description of Vms_Use_Pragma_Extern_Model fix
|
||||
*/
|
||||
tSCC zVms_Use_Pragma_Extern_ModelName[] =
|
||||
"vms_use_pragma_extern_model";
|
||||
|
||||
/*
|
||||
* File name selection pattern
|
||||
*/
|
||||
#define zVms_Use_Pragma_Extern_ModelList (char*)NULL
|
||||
/*
|
||||
* Machine/OS name selection pattern
|
||||
*/
|
||||
tSCC* apzVms_Use_Pragma_Extern_ModelMachs[] = {
|
||||
"*-*-*vms*",
|
||||
(const char*)NULL };
|
||||
|
||||
/*
|
||||
* content selection pattern - do fix if pattern found
|
||||
*/
|
||||
tSCC zVms_Use_Pragma_Extern_ModelSelect0[] =
|
||||
"#if defined\\(__DECC\\) \\|\\| defined\\(__DECCXX\\)\n\
|
||||
# pragma extern_model __save\n";
|
||||
|
||||
#define VMS_USE_PRAGMA_EXTERN_MODEL_TEST_CT 1
|
||||
static tTestDesc aVms_Use_Pragma_Extern_ModelTests[] = {
|
||||
{ TT_EGREP, zVms_Use_Pragma_Extern_ModelSelect0, (regex_t*)NULL }, };
|
||||
|
||||
/*
|
||||
* Fix Command Arguments for Vms_Use_Pragma_Extern_Model
|
||||
*/
|
||||
static const char* apzVms_Use_Pragma_Extern_ModelPatch[] = {
|
||||
"format",
|
||||
"#if defined(__DECC) || defined(__DECCXX) || defined(__GNUC__)\n\
|
||||
# pragma extern_model __save\n",
|
||||
(char*)NULL };
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Description of Vms_Disable_Decc_String_Builtins fix
|
||||
*/
|
||||
tSCC zVms_Disable_Decc_String_BuiltinsName[] =
|
||||
"vms_disable_decc_string_builtins";
|
||||
|
||||
/*
|
||||
* File name selection pattern
|
||||
*/
|
||||
tSCC zVms_Disable_Decc_String_BuiltinsList[] =
|
||||
"rtldef/string.h\0";
|
||||
/*
|
||||
* Machine/OS name selection pattern
|
||||
*/
|
||||
tSCC* apzVms_Disable_Decc_String_BuiltinsMachs[] = {
|
||||
"*-*-*vms*",
|
||||
(const char*)NULL };
|
||||
|
||||
/*
|
||||
* content selection pattern - do fix if pattern found
|
||||
*/
|
||||
tSCC zVms_Disable_Decc_String_BuiltinsSelect0[] =
|
||||
"#if !defined\\(__VAX\\)\n";
|
||||
|
||||
#define VMS_DISABLE_DECC_STRING_BUILTINS_TEST_CT 1
|
||||
static tTestDesc aVms_Disable_Decc_String_BuiltinsTests[] = {
|
||||
{ TT_EGREP, zVms_Disable_Decc_String_BuiltinsSelect0, (regex_t*)NULL }, };
|
||||
|
||||
/*
|
||||
* Fix Command Arguments for Vms_Disable_Decc_String_Builtins
|
||||
*/
|
||||
static const char* apzVms_Disable_Decc_String_BuiltinsPatch[] = {
|
||||
"format",
|
||||
"#if !defined(__VAX) && !defined(__GNUC__)\n",
|
||||
(char*)NULL };
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Description of Void_Null fix
|
||||
@ -8838,9 +8953,9 @@ static const char* apzX11_SprintfPatch[] = {
|
||||
*
|
||||
* List of all fixes
|
||||
*/
|
||||
#define REGEX_COUNT 258
|
||||
#define REGEX_COUNT 261
|
||||
#define MACH_LIST_SIZE_LIMIT 181
|
||||
#define FIX_COUNT 217
|
||||
#define FIX_COUNT 220
|
||||
|
||||
/*
|
||||
* Enumerate the fixes
|
||||
@ -9054,6 +9169,9 @@ typedef enum {
|
||||
ULTRIX_CONST_FIXIDX,
|
||||
ULTRIX_CONST2_FIXIDX,
|
||||
VA_I960_MACRO_FIXIDX,
|
||||
VMS_DEFINE_CAN_USE_EXTERN_PREFIX_FIXIDX,
|
||||
VMS_USE_PRAGMA_EXTERN_MODEL_FIXIDX,
|
||||
VMS_DISABLE_DECC_STRING_BUILTINS_FIXIDX,
|
||||
VOID_NULL_FIXIDX,
|
||||
VXWORKS_GCC_PROBLEM_FIXIDX,
|
||||
VXWORKS_NEEDS_VXTYPES_FIXIDX,
|
||||
@ -10106,6 +10224,21 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
|
||||
VA_I960_MACRO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
aVa_I960_MacroTests, apzVa_I960_MacroPatch, 0 },
|
||||
|
||||
{ zVms_Define_Can_Use_Extern_PrefixName, zVms_Define_Can_Use_Extern_PrefixList,
|
||||
apzVms_Define_Can_Use_Extern_PrefixMachs,
|
||||
VMS_DEFINE_CAN_USE_EXTERN_PREFIX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
aVms_Define_Can_Use_Extern_PrefixTests, apzVms_Define_Can_Use_Extern_PrefixPatch, 0 },
|
||||
|
||||
{ zVms_Use_Pragma_Extern_ModelName, zVms_Use_Pragma_Extern_ModelList,
|
||||
apzVms_Use_Pragma_Extern_ModelMachs,
|
||||
VMS_USE_PRAGMA_EXTERN_MODEL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
aVms_Use_Pragma_Extern_ModelTests, apzVms_Use_Pragma_Extern_ModelPatch, 0 },
|
||||
|
||||
{ zVms_Disable_Decc_String_BuiltinsName, zVms_Disable_Decc_String_BuiltinsList,
|
||||
apzVms_Disable_Decc_String_BuiltinsMachs,
|
||||
VMS_DISABLE_DECC_STRING_BUILTINS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
aVms_Disable_Decc_String_BuiltinsTests, apzVms_Disable_Decc_String_BuiltinsPatch, 0 },
|
||||
|
||||
{ zVoid_NullName, zVoid_NullList,
|
||||
apzVoid_NullMachs,
|
||||
VOID_NULL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
|
@ -4507,6 +4507,65 @@ fix = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Define __CAN_USE_EXTERN_PREFIX on vms.
|
||||
*/
|
||||
fix = {
|
||||
hackname = vms_define_can_use_extern_prefix;
|
||||
files = "rtldef/decc$types.h";
|
||||
select = "#[ \t]*else\n"
|
||||
"#[ \t]*if defined\\(__DECCXX\\)\n"
|
||||
"#[ \t]*define __CAN_USE_EXTERN_PREFIX 1\n";
|
||||
mach = "*-*-*vms*";
|
||||
c_fix = format;
|
||||
|
||||
c_fix_arg = "%0"
|
||||
"# elif defined (__GNUC__)\n"
|
||||
"#\tdefine __CAN_USE_EXTERN_PREFIX 1\n";
|
||||
|
||||
test_text = "# else\n"
|
||||
"# if defined(__DECCXX)\n"
|
||||
"#\tdefine __CAN_USE_EXTERN_PREFIX 1\n"
|
||||
"# endif\n"
|
||||
"# endif\n";
|
||||
};
|
||||
|
||||
/*
|
||||
* On VMS, use pragma extern_model instead of VAX-C keywords.
|
||||
*/
|
||||
fix = {
|
||||
hackname = vms_use_pragma_extern_model;
|
||||
select = "#if defined\\(__DECC\\) \\|\\| defined\\(__DECCXX\\)\n"
|
||||
"# pragma extern_model __save\n";
|
||||
mach = "*-*-*vms*";
|
||||
c_fix = format;
|
||||
|
||||
c_fix_arg = "#if defined(__DECC) || defined(__DECCXX) || defined(__GNUC__)\n"
|
||||
"# pragma extern_model __save\n";
|
||||
|
||||
test_text = "#if defined(__DECC) || defined(__DECCXX)\n"
|
||||
"# pragma extern_model __save\n"
|
||||
"# pragma extern_model strict_refdef\n"
|
||||
" extern struct x zz$yy;\n"
|
||||
"# pragma extern_model __restore\n"
|
||||
"#endif\n";
|
||||
};
|
||||
|
||||
/*
|
||||
* On VMS, disable the use of dec-c string builtins
|
||||
*/
|
||||
fix = {
|
||||
hackname = vms_disable_decc_string_builtins;
|
||||
select = "#if !defined\\(__VAX\\)\n";
|
||||
mach = "*-*-*vms*";
|
||||
files = "rtldef/string.h";
|
||||
c_fix = format;
|
||||
|
||||
c_fix_arg = "#if !defined(__VAX) && !defined(__GNUC__)\n";
|
||||
|
||||
test_text = "#if !defined(__VAX)\n";
|
||||
};
|
||||
|
||||
/*
|
||||
* AIX and Interix headers define NULL to be cast to a void pointer,
|
||||
* which is illegal in ANSI C++.
|
||||
|
21
fixincludes/tests/base/rtldef/decc$types.h
Normal file
21
fixincludes/tests/base/rtldef/decc$types.h
Normal file
@ -0,0 +1,21 @@
|
||||
/* DO NOT EDIT THIS FILE.
|
||||
|
||||
It has been auto-edited by fixincludes from:
|
||||
|
||||
"fixinc/tests/inc/rtldef/decc$types.h"
|
||||
|
||||
This had to be done to correct non-standard usages in the
|
||||
original, manufacturer supplied header file. */
|
||||
|
||||
|
||||
|
||||
#if defined( VMS_DEFINE_CAN_USE_EXTERN_PREFIX_CHECK )
|
||||
# else
|
||||
# if defined(__DECCXX)
|
||||
# define __CAN_USE_EXTERN_PREFIX 1
|
||||
# elif defined (__GNUC__)
|
||||
# define __CAN_USE_EXTERN_PREFIX 1
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif /* VMS_DEFINE_CAN_USE_EXTERN_PREFIX_CHECK */
|
15
fixincludes/tests/base/rtldef/string.h
Normal file
15
fixincludes/tests/base/rtldef/string.h
Normal file
@ -0,0 +1,15 @@
|
||||
/* DO NOT EDIT THIS FILE.
|
||||
|
||||
It has been auto-edited by fixincludes from:
|
||||
|
||||
"fixinc/tests/inc/rtldef/string.h"
|
||||
|
||||
This had to be done to correct non-standard usages in the
|
||||
original, manufacturer supplied header file. */
|
||||
|
||||
|
||||
|
||||
#if defined( VMS_DISABLE_DECC_STRING_BUILTINS_CHECK )
|
||||
#if !defined(__VAX) && !defined(__GNUC__)
|
||||
|
||||
#endif /* VMS_DISABLE_DECC_STRING_BUILTINS_CHECK */
|
@ -120,3 +120,14 @@ extern unsigned int
|
||||
extern size_t
|
||||
strlen(), strspn();
|
||||
#endif /* SYSV68_STRING_CHECK */
|
||||
|
||||
|
||||
#if defined( VMS_USE_PRAGMA_EXTERN_MODEL_CHECK )
|
||||
#if defined(__DECC) || defined(__DECCXX) || defined(__GNUC__)
|
||||
# pragma extern_model __save
|
||||
# pragma extern_model strict_refdef
|
||||
extern struct x zz;
|
||||
# pragma extern_model __restore
|
||||
#endif
|
||||
|
||||
#endif /* VMS_USE_PRAGMA_EXTERN_MODEL_CHECK */
|
||||
|
Loading…
Reference in New Issue
Block a user