This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [fixincludes patches] More work to make OpenBSD normal


Nathanael Nerode wrote:
> 
> Bruce, here's a set of proposed fixincludes fixes.  Still working toward
> standardizing the OpenBSD fixincludes.
>
> Two of these avoid bogus fixes.

Please apply, thanks, and note comment below.
[[ I cannot access the gcc bug database, by the way. ]]

> The other one comments on an apparently correct fix, although I'm a little
> surprised by it (is this fix no longer needed or something?)
> 
>         * inclhack.def (alpha_sbrk): Note that OpenBSD needs this fix.
>         (avoid_wchar_t_type): Put __cplusplus bypass in (for OpenBSD).
>         (struct_sockaddr): Avoid "fixing" sockaddr_in (on OpenBSD).
> 
> Index: inclhack.def
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/fixinc/inclhack.def,v
> retrieving revision 1.161
> diff -u -6 -r1.161 inclhack.def
> --- inclhack.def        9 Jul 2003 21:08:20 -0000       1.161
> +++ inclhack.def        12 Jul 2003 01:54:17 -0000
> @@ -576,12 +576,13 @@
>      test_text = "#ifndef(__mips64) /* bogus */\nextern int foo;\n#endif";
>  };
> 
> 
>  /*
>   *  Fix return value of sbrk in unistd.h on Alpha OSF/1 V2.0
> + *  And OpenBSD.
>   */
>  fix = {
>      hackname = alpha_sbrk;
>      files    = unistd.h;
>      select   = "char[ \t]*\\*[\t ]*sbrk[ \t]*\\(";
>      c_fix     = format;
> @@ -641,12 +642,13 @@
> 
>  fix = {
>      hackname = avoid_wchar_t_type;
> 
>      select    = "^[ \t]*typedef[ \t].*[ \t]wchar_t[ \t]*;";
>      bypass    = "we must use the C\\+\\+ compiler's type";
> +    bypass    = "__cplusplus";
>      bypass    = "_LINUX_NLS_H";
>      bypass    = "XFree86: xc/lib/X11/Xlib\\.h";

Please check for redundancy of these bypass expressions.
I'd guess that "__cplusplus" is sufficient, but I don't
have all the relevant headers to know for sure.

>      c_fix     = format;
>      c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
> 
> @@ -2469,18 +2471,22 @@
>  };
> 
> 
>  /*
>   *  IRIX 4.0.5 <rpc/auth.h> 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    = "<sys/socket\.h>";
> +    bypass    = "struct sockaddr;\n";
>      c_fix     = format;
>      c_fix_arg = "struct sockaddr;\n%0";
>      test_text = "extern AUTH* authdes_create( struct sockaddr* );";
>  };


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]