mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-24 03:14:08 +08:00
inclhack.def (rpc_xdr_lvalue_cast_a, [...]): New fixes.
* fixinc/inclhack.def (rpc_xdr_lvalue_cast_a, rpc_xdr_lvalue_cast_b): New fixes. * fixinc/fixincl.x: Regenerate. * fixinc/tests/base/rpc/xdr.h: Add new tests. From-SVN: r80490
This commit is contained in:
parent
fc091c8e64
commit
6ed6a1b910
@ -1,3 +1,10 @@
|
||||
2004-04-07 Joseph S. Myers <jsm@polyomino.org.uk>
|
||||
|
||||
* fixinc/inclhack.def (rpc_xdr_lvalue_cast_a,
|
||||
rpc_xdr_lvalue_cast_b): New fixes.
|
||||
* fixinc/fixincl.x: Regenerate.
|
||||
* fixinc/tests/base/rpc/xdr.h: Add new tests.
|
||||
|
||||
2004-04-07 David Edelsohn <edelsohn@gnu.org>
|
||||
|
||||
* config/rs6000/rs6000.c (processor_target_table): Add MASK_MFCRF
|
||||
|
@ -2,11 +2,11 @@
|
||||
*
|
||||
* DO NOT EDIT THIS FILE (fixincl.x)
|
||||
*
|
||||
* It has been AutoGen-ed Thursday January 22, 2004 at 08:36:55 PM MET
|
||||
* It has been AutoGen-ed Wednesday April 7, 2004 at 10:23:41 PM UTC
|
||||
* From the definitions inclhack.def
|
||||
* and the template file fixincl
|
||||
*/
|
||||
/* DO NOT CVS-MERGE THIS FILE, EITHER Thu Jan 22 20:36:56 MET 2004
|
||||
/* DO NOT CVS-MERGE THIS FILE, EITHER Wed Apr 7 22:23:41 UTC 2004
|
||||
*
|
||||
* 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 172 fixup descriptions.
|
||||
* This file contains 174 fixup descriptions.
|
||||
*
|
||||
* See README for more information.
|
||||
*
|
||||
@ -4017,6 +4017,78 @@ static const char* apzRead_Ret_TypePatch[] = {
|
||||
"(extern int\t.*), fread\\(\\), fwrite\\(\\)(.*)",
|
||||
(char*)NULL };
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Description of Rpc_Xdr_Lvalue_Cast_A fix
|
||||
*/
|
||||
tSCC zRpc_Xdr_Lvalue_Cast_AName[] =
|
||||
"rpc_xdr_lvalue_cast_a";
|
||||
|
||||
/*
|
||||
* File name selection pattern
|
||||
*/
|
||||
tSCC zRpc_Xdr_Lvalue_Cast_AList[] =
|
||||
"|rpc/xdr.h|";
|
||||
/*
|
||||
* Machine/OS name selection pattern
|
||||
*/
|
||||
#define apzRpc_Xdr_Lvalue_Cast_AMachs (const char**)NULL
|
||||
|
||||
/*
|
||||
* content selection pattern - do fix if pattern found
|
||||
*/
|
||||
tSCC zRpc_Xdr_Lvalue_Cast_ASelect0[] =
|
||||
"#define[ \t]*IXDR_GET_LONG.*\\\\\n\
|
||||
.*__extension__.*";
|
||||
|
||||
#define RPC_XDR_LVALUE_CAST_A_TEST_CT 1
|
||||
static tTestDesc aRpc_Xdr_Lvalue_Cast_ATests[] = {
|
||||
{ TT_EGREP, zRpc_Xdr_Lvalue_Cast_ASelect0, (regex_t*)NULL }, };
|
||||
|
||||
/*
|
||||
* Fix Command Arguments for Rpc_Xdr_Lvalue_Cast_A
|
||||
*/
|
||||
static const char* apzRpc_Xdr_Lvalue_Cast_APatch[] = {
|
||||
"format",
|
||||
"#define IXDR_GET_LONG(buf) ((long)IXDR_GET_U_INT32(buf))",
|
||||
(char*)NULL };
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Description of Rpc_Xdr_Lvalue_Cast_B fix
|
||||
*/
|
||||
tSCC zRpc_Xdr_Lvalue_Cast_BName[] =
|
||||
"rpc_xdr_lvalue_cast_b";
|
||||
|
||||
/*
|
||||
* File name selection pattern
|
||||
*/
|
||||
tSCC zRpc_Xdr_Lvalue_Cast_BList[] =
|
||||
"|rpc/xdr.h|";
|
||||
/*
|
||||
* Machine/OS name selection pattern
|
||||
*/
|
||||
#define apzRpc_Xdr_Lvalue_Cast_BMachs (const char**)NULL
|
||||
|
||||
/*
|
||||
* content selection pattern - do fix if pattern found
|
||||
*/
|
||||
tSCC zRpc_Xdr_Lvalue_Cast_BSelect0[] =
|
||||
"#define[ \t]*IXDR_PUT_LONG.*\\\\\n\
|
||||
.*__extension__.*";
|
||||
|
||||
#define RPC_XDR_LVALUE_CAST_B_TEST_CT 1
|
||||
static tTestDesc aRpc_Xdr_Lvalue_Cast_BTests[] = {
|
||||
{ TT_EGREP, zRpc_Xdr_Lvalue_Cast_BSelect0, (regex_t*)NULL }, };
|
||||
|
||||
/*
|
||||
* Fix Command Arguments for Rpc_Xdr_Lvalue_Cast_B
|
||||
*/
|
||||
static const char* apzRpc_Xdr_Lvalue_Cast_BPatch[] = {
|
||||
"format",
|
||||
"#define IXDR_PUT_LONG(buf, v) ((long)IXDR_PUT_INT32(buf, (long)(v)))",
|
||||
(char*)NULL };
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Description of Rs6000_Double fix
|
||||
@ -6822,9 +6894,9 @@ static const char* apzX11_SprintfPatch[] = {
|
||||
*
|
||||
* List of all fixes
|
||||
*/
|
||||
#define REGEX_COUNT 193
|
||||
#define REGEX_COUNT 195
|
||||
#define MACH_LIST_SIZE_LIMIT 261
|
||||
#define FIX_COUNT 172
|
||||
#define FIX_COUNT 174
|
||||
|
||||
/*
|
||||
* Enumerate the fixes
|
||||
@ -6929,6 +7001,8 @@ typedef enum {
|
||||
OSF_NAMESPACE_C_FIXIDX,
|
||||
PTHREAD_PAGE_SIZE_FIXIDX,
|
||||
READ_RET_TYPE_FIXIDX,
|
||||
RPC_XDR_LVALUE_CAST_A_FIXIDX,
|
||||
RPC_XDR_LVALUE_CAST_B_FIXIDX,
|
||||
RS6000_DOUBLE_FIXIDX,
|
||||
RS6000_FCHMOD_FIXIDX,
|
||||
RS6000_PARAM_FIXIDX,
|
||||
@ -7500,6 +7574,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
|
||||
READ_RET_TYPE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
aRead_Ret_TypeTests, apzRead_Ret_TypePatch, 0 },
|
||||
|
||||
{ zRpc_Xdr_Lvalue_Cast_AName, zRpc_Xdr_Lvalue_Cast_AList,
|
||||
apzRpc_Xdr_Lvalue_Cast_AMachs,
|
||||
RPC_XDR_LVALUE_CAST_A_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
aRpc_Xdr_Lvalue_Cast_ATests, apzRpc_Xdr_Lvalue_Cast_APatch, 0 },
|
||||
|
||||
{ zRpc_Xdr_Lvalue_Cast_BName, zRpc_Xdr_Lvalue_Cast_BList,
|
||||
apzRpc_Xdr_Lvalue_Cast_BMachs,
|
||||
RPC_XDR_LVALUE_CAST_B_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
aRpc_Xdr_Lvalue_Cast_BTests, apzRpc_Xdr_Lvalue_Cast_BPatch, 0 },
|
||||
|
||||
{ zRs6000_DoubleName, zRs6000_DoubleList,
|
||||
apzRs6000_DoubleMachs,
|
||||
RS6000_DOUBLE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
|
@ -2229,6 +2229,31 @@ fix = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Fix casts as lvalues in glibc's <rpc/xdr.h>.
|
||||
*/
|
||||
fix = {
|
||||
hackname = rpc_xdr_lvalue_cast_a;
|
||||
files = rpc/xdr.h;
|
||||
select = "#define[ \t]*IXDR_GET_LONG.*\\\\\n.*__extension__.*";
|
||||
c_fix = format;
|
||||
c_fix_arg = "#define IXDR_GET_LONG(buf) ((long)IXDR_GET_U_INT32(buf))";
|
||||
test_text = "#define IXDR_GET_LONG(buf) \\\\\n"
|
||||
"\t((long)ntohl((u_long)*__extension__((u_int32_t*)(buf))++))";
|
||||
};
|
||||
|
||||
|
||||
fix = {
|
||||
hackname = rpc_xdr_lvalue_cast_b;
|
||||
files = rpc/xdr.h;
|
||||
select = "#define[ \t]*IXDR_PUT_LONG.*\\\\\n.*__extension__.*";
|
||||
c_fix = format;
|
||||
c_fix_arg = "#define IXDR_PUT_LONG(buf, v) ((long)IXDR_PUT_INT32(buf, (long)(v)))";
|
||||
test_text = "#define IXDR_PUT_LONG(buf, v) \\\\\n"
|
||||
"\t(*__extension__((u_int32_t*)(buf))++ = (long)htonl((u_long)(v)))";
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* function class(double x) conflicts with C++ keyword on rs/6000
|
||||
*/
|
||||
|
@ -9,6 +9,16 @@
|
||||
|
||||
|
||||
|
||||
#if defined( RPC_XDR_LVALUE_CAST_A_CHECK )
|
||||
#define IXDR_GET_LONG(buf) ((long)IXDR_GET_U_INT32(buf))
|
||||
#endif /* RPC_XDR_LVALUE_CAST_A_CHECK */
|
||||
|
||||
|
||||
#if defined( RPC_XDR_LVALUE_CAST_B_CHECK )
|
||||
#define IXDR_PUT_LONG(buf, v) ((long)IXDR_PUT_INT32(buf, (long)(v)))
|
||||
#endif /* RPC_XDR_LVALUE_CAST_B_CHECK */
|
||||
|
||||
|
||||
#if defined( STRUCT_FILE_CHECK )
|
||||
struct __file_s;
|
||||
extern void xdrstdio_create( struct __file_s* );
|
||||
|
Loading…
Reference in New Issue
Block a user