From 3b57c56391ad6a2c3b0fbe7f68354b4a72f9bc15 Mon Sep 17 00:00:00 2001 From: Nathanael Nerode Date: Sat, 12 Jul 2003 19:39:44 +0000 Subject: [PATCH] inclhack.def (struct_sockaddr): Avoid "fixing" sockaddr_in (on OpenBSD). * fixinc/inclhack.def (struct_sockaddr): Avoid "fixing" sockaddr_in (on OpenBSD). From-SVN: r69270 --- gcc/ChangeLog | 3 +++ gcc/fixinc/fixincl.x | 13 ++++++++----- gcc/fixinc/inclhack.def | 6 +++++- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dc2000a8711..b0241dd7181 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2003-07-12 Nathanael Nerode + * fixinc/inclhack.def (struct_sockaddr): Avoid "fixing" sockaddr_in + (on OpenBSD). + * fixinc/inclhack.def (gnu_types): Improve comment. 2003-07-12 Andreas Jaeger diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x index 74f13bed9ff..b1b07041e7f 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 Wednesday July 9, 2003 at 05:06:05 PM EDT + * It has been AutoGen-ed Saturday July 12, 2003 at 03:37:51 PM EDT * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT CVS-MERGE THIS FILE, EITHER Wed Jul 9 17:06:05 EDT 2003 +/* DO NOT CVS-MERGE THIS FILE, EITHER Sat Jul 12 15:37:51 EDT 2003 * * You must regenerate it. Use the ./genfixes script. * @@ -4437,17 +4437,20 @@ tSCC zStruct_SockaddrList[] = * content selection pattern - do fix if pattern found */ tSCC zStruct_SockaddrSelect0[] = - "^.*authdes_create.*struct sockaddr"; + "^.*authdes_create.*struct sockaddr[^_]"; /* * content bypass pattern - skip fix if pattern found */ tSCC zStruct_SockaddrBypass0[] = ""; +tSCC zStruct_SockaddrBypass1[] = + "struct sockaddr;\n"; -#define STRUCT_SOCKADDR_TEST_CT 2 +#define STRUCT_SOCKADDR_TEST_CT 3 static tTestDesc aStruct_SockaddrTests[] = { { TT_NEGREP, zStruct_SockaddrBypass0, (regex_t*)NULL }, + { TT_NEGREP, zStruct_SockaddrBypass1, (regex_t*)NULL }, { TT_EGREP, zStruct_SockaddrSelect0, (regex_t*)NULL }, }; /* @@ -6106,7 +6109,7 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 172 +#define REGEX_COUNT 173 #define MACH_LIST_SIZE_LIMIT 261 #define FIX_COUNT 154 diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def index 52129bf9a5d..01b73abb367 100644 --- a/gcc/fixinc/inclhack.def +++ b/gcc/fixinc/inclhack.def @@ -2477,12 +2477,16 @@ fix = { /* * IRIX 4.0.5 uses struct sockaddr * in prototype without previous definition. + * + * Don't fix OpenBSD, which uses struct sockaddr_in prototyping the same + * function, and does define it. */ fix = { hackname = struct_sockaddr; files = rpc/auth.h; - select = "^.*authdes_create.*struct sockaddr"; + select = "^.*authdes_create.*struct sockaddr[^_]"; bypass = ""; + bypass = "struct sockaddr;\n"; c_fix = format; c_fix_arg = "struct sockaddr;\n%0"; test_text = "extern AUTH* authdes_create( struct sockaddr* );";