OSDN Git Service

PR ada/60703
[pf3gnuchains/gcc-fork.git] / fixincludes / inclhack.def
index ad19ccd..2e9fee5 100644 (file)
@@ -369,6 +369,61 @@ fix = {
     test_text = "#define _Complex_I    __I\n";
 };
 
+/*
+ *  malloc.h on AIX6 uses XLC++ specific builtin syntax
+ */
+fix = {
+    hackname  = aix_malloc;
+    mach      = "*-*-aix*";
+    files     = "malloc.h";
+    select    = "#ifdef __cplusplus";
+    c_fix     = format;
+    c_fix_arg = "#if (defined(__cplusplus) && defined(__IBMCPP__))";
+    test_text = "#ifdef __cplusplus";
+};
+
+/*
+ * net/if_arp.h defines a variable fc_softc instead of adding a
+ * typedef for the struct on AIX 5.2, 5.3, 6.1 and 7.1
+ */
+fix = {
+    hackname  = aix_net_if_arp;
+    mach      = "*-*-aix*";
+    files     = "net/if_arp.h";
+    select    = "^struct  fc_softc \\{";
+    c_fix     = format;
+    c_fix_arg = "typedef struct _fc_softc {";
+    test_text = "struct  fc_softc {\n  int a;\n};";
+};
+
+/*
+ *  pthread.h on AIX defines PTHREAD_ONCE_INIT without enough braces.
+ */
+fix = {
+    hackname  = aix_once_init_1;
+    mach      = "*-*-aix*";
+    files     = "pthread.h";
+    select    = "#define[ \t]PTHREAD_ONCE_INIT \\\\\n"
+               "\\{ \\\\\n";
+    c_fix     = format;
+    c_fix_arg = "#define PTHREAD_ONCE_INIT \\\n"
+               "{{ \\\n";
+    test_text = "#define PTHREAD_ONCE_INIT \\\\\n"
+               "{ \\\\\n";
+};
+
+fix = {
+    hackname  = aix_once_init_2;
+    mach      = "*-*-aix*";
+    files     = "pthread.h";
+    select    = "[ \t]0 \\\\\n"
+               "\\}\n";
+    c_fix     = format;
+    c_fix_arg = "      0 \\\n"
+               "}}\n";
+    test_text = "      0 \\\\\n"
+               "}\n";
+};
 
 /*
  *  pthread.h on AIX 4.3.3 tries to define a macro without whitspace
@@ -607,7 +662,7 @@ fix = {
 fix = {
     hackname  = alpha_assert;
     files     = "assert.h";
-    select    = '(#define assert\(EX\).*)\(\(int\) \(EX\)\)';
+    select    = "(#[ \t]*" 'define assert\(EX\).*)\(\(int\) \(EX\)\)';
     c_fix     = format;
     c_fix_arg = "%1(EX)";
     test_text = '#define assert(EX) (((int) (EX)) ? (void)0 '
@@ -794,27 +849,6 @@ 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.
@@ -1007,6 +1041,21 @@ fix = {
     test_text = '#define  vfscanf      __svfscanf';
 };
 
+/*
+ * 'g++ -std=c++11' defines __cplusplus to 201103L, which suggests
+ * that it conforms to ISO/IEC 14882:2011.  It currently does
+ * not support the [[noreturn]] procedure attribute.
+ * When it does, this hack should be removed.
+ * SEE:  gcc.gnu.org/bugzilla/show_bug.cgi?id=51776
+ */
+fix = {
+    hackname  = cdef_cplusplus;
+    files     = sys/cdefs.h;
+    select    = '\[\[noreturn\]\]';
+    c_fix     = format;
+    c_fix_arg = '__attribute__((__noreturn__))';
+    test_text = "#define _Noreturn     [[noreturn]]";
+};
 
 /*
  *  Fix various macros used to define ioctl numbers.
@@ -1598,6 +1647,28 @@ fix = {
 };
 
 
+/* Some versions of glibc have a version of bits/string2.h that
+   produces "value computed is not used" warnings from strncpy; fix
+   this definition by using __builtin_strncpy instead as in newer
+   versions.  */
+fix = {
+    hackname  = glibc_strncpy;
+    files     = bits/string2.h;
+    bypass    = "__builtin_strncpy";
+    c_fix     = format;
+    c_fix_arg = "#  define strncpy(dest, src, n) __builtin_strncpy (dest, src, n)";
+    c_fix_arg = "#  define strncpy([^\n]*\\\\\n)*[^\n]*";
+    test_text = <<-EOT
+       #  define strncpy(dest, src, n) \
+         (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n)      \\
+                         ? (strlen (src) + 1 >= ((size_t) (n))                       \\
+                            ? (char *) memcpy (dest, src, n)                         \\
+                            : strncpy (dest, src, n))                                \\
+                         : strncpy (dest, src, n)))
+       EOT;
+
+};
+
 /* glibc's tgmath.h relies on an expression that is not an integer
    constant expression being treated as it was by GCC 4.4 and
    earlier.  */
@@ -1848,7 +1919,7 @@ fix = {
  */
 fix = {
     hackname  = hpux11_abs;
-    mach      = "ia64-hp-hpux11*";
+    mach      = "*-hp-hpux11*";
     files     = stdlib.h;
     select    = "ifndef _MATH_INCLUDED";
     c_fix     = format;
@@ -1984,7 +2055,7 @@ fix = {
 fix = {
     hackname = hpux_htonl;
     files    = netinet/in.h;
-    select   = "#ifndef _XOPEN_SOURCE_EXTENDED\n"
+    select   = "#ifndef _XOPEN_SOURCE_EXTENDED[ \t]*\n"
                "(/\\*\n"
                " \\* Macros for number representation conversion\\.\n"
                " \\*/\n"
@@ -2483,6 +2554,24 @@ fix = {
 
 
 /*
+ *  IRIX 6.5 PTHREAD_*_INITIALIZER need an additional level of braces in
+ *  <pthread.h>.
+ */
+fix = {
+    hackname    = irix_pthread_init;
+    files       = pthread.h;
+    select      = "^(#define[ \t]+PTHREAD_.*_INITIALIZER[ \t]+)(\\{ 0 \\})";
+
+    mach       = "mips-sgi-irix6.5";
+    c_fix       = format;
+    c_fix_arg   = "%1{ %2 }";
+    test_text   = "#define PTHREAD_MUTEX_INITIALIZER   { 0 }\n"
+                 "#define PTHREAD_COND_INITIALIZER     { 0 }\n"
+                 "#define PTHREAD_RWLOCK_INITIALIZER   { 0 }";
+};
+
+
+/*
  *  IRIX 6.5.1[78] <sys/socket.h> has a broken definition of socklen_t.
  *  Various socket function prototypes use different types instead,
  *  depending on the API in use (BSD, XPG4/5), but the socklen_t
@@ -3248,6 +3337,23 @@ fix = {
 
 
 /*
+ *  Solaris 10+ <sys/feature_tests.h> defines _RESTRICT_KYWD as restrict
+ *  for C99.  This is wrong for C++, which needs many C99 features, but
+ *  only supports __restrict.
+ */
+fix = {
+    hackname  = solaris___restrict;
+    files     = sys/feature_tests.h;
+    select    = "#define[ \t]*_RESTRICT_KYWD[ \t]*restrict";
+    mach      = "*-*-solaris2*";
+    c_fix     = format;
+    c_fix_arg = "#ifdef __cplusplus\n#define\t_RESTRICT_KYWD\t__restrict\n"
+               "#else\n%0\n#endif";
+    test_text = "#define       _RESTRICT_KYWD  restrict";
+};
+
+
+/*
  * Solaris 10+ complex.h defines _Complex_I and _Imaginary_I in terms of
  * themselves, which are Sun Studio compiler intrinsics.  Remove _Imaginary_I
  * and imaginary definitions which are not supported by GCC.
@@ -3272,6 +3378,96 @@ fix = {
 
 
 /*
+ * Solaris 10+ <complex.h> is wrapped in #ifndef __cplusplus.  Wrap in
+ * extern "C" instead so libstdc++ can use it.
+ */
+fix = {
+    hackname  = solaris_complex_cxx;
+    mach      = "*-*-solaris2.*";
+    files     = complex.h;
+    sed              = "/#if[ \t]*!defined(__cplusplus)/c\\\n"
+               "#ifdef\t__cplusplus\\\nextern \"C\" {\\\n#endif";
+    sed              = "/#endif[ \t]*\\/\\* !defined(__cplusplus) \\*\\//c\\\n"
+               "#ifdef\t__cplusplus\\\n}\\\n#endif";
+    test_text = "#if !defined(__cplusplus)\n"
+               "#endif /* !defined(__cplusplus) */";
+};
+
+
+/*
+ * Solaris 8 PTHREAD_COND_INITIALIZER lacks the __pthread_cond_magic field.
+ * COND_MAGIC is only defined in <synch.h> and pollutes the namespace, so
+ * use the value literally instead.
+ */
+fix = {
+    hackname = solaris_cond_init;
+    select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
+    files = pthread.h;
+    mach = '*-*-solaris2.8';
+    c_fix = format;
+    c_fix_arg = "%1, 0x4356%2";
+    c_fix_arg = "^(#define[ \t]+PTHREAD_COND_INITIALIZER[ \t]+"
+                "\\{.*0)(\\},[ \t]*0\\}.*)$";
+    test_text =
+    '#pragma ident     "@(#)pthread.h  1.29    01/07/07 SMI"'"\n"
+    '#define   PTHREAD_COND_INITIALIZER        {{{0}, 0}, 0}   /* = DEFAULTCV */';
+};
+
+
+/*
+ *  g++ rejects functions declared with both C and C++ linkage.
+ */
+fix = {
+    hackname  = solaris_cxx_linkage;
+    mach      = '*-*-solaris2*';
+    files     = "iso/stdlib_iso.h";
+    select    = "(#if __cplusplus >= 199711L)\n"
+               "(extern \"C\\+\\+\" \\{\n)"
+               "(.*(bsearch|qsort).*)";
+    c_fix     = format;
+    c_fix_arg = "%1 && !__GNUG__\n%2%3";
+
+    test_text =
+    "#if __cplusplus >= 199711L\n"
+    "extern \"C++\" {\n"
+    "  void *bsearch(const void *, const void *, size_t, size_t,";
+};
+
+
+/*
+ *  Solaris <iso/stdio_iso.h> doesn't declare getc for C++ with
+ *  _STRICT_STDC, but uses it.
+ */
+fix = {
+    hackname  = solaris_getc_strict_stdc;
+    mach      = "*-*-solaris2*";
+    files     = "iso/stdio_iso.h";
+    select    = "(.*&& )!defined\\(_STRICT_STDC\\)(.*)";
+    c_fix     = format;
+    c_fix_arg = "%1(!defined(_STRICT_STDC) || (__cplusplus >= 199711L))%2";
+
+    test_text =
+    "#if       !defined(_REENTRANT) && !defined(_LP64) && !defined(_STRICT_STDC)";
+};
+
+
+/*
+ *  Before Solaris 10, <iso/setjmp_iso.h> doesn't mark longjump noreturn.
+ */
+fix = {
+    hackname  = solaris_longjmp_noreturn;
+    mach      = "*-*-solaris2*";
+    files     = "iso/setjmp_iso.h";
+    bypass    = "__NORETURN";
+    select    = "(.*longjmp\\(jmp_buf.*[^)]+\\));";
+    c_fix     = format;
+    c_fix_arg = "%1 __attribute__ ((__noreturn__));";
+
+    test_text = "extern void longjmp(jmp_buf, int);";
+};
+
+
+/*
  * Sun Solaris 10 defines several C99 math macros in terms of
  * builtins specific to the Studio compiler, in particular not
  * compatible with the GNU compiler.
@@ -3339,7 +3535,7 @@ fix = {
 
 fix = {
     hackname = solaris_math_8;
-    select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
+    select = '@\(#\)math_c99\.h' "[ \t]+1\\.[0-9]+[ \t]+[0-9/]+ SMI";
     bypass = "__GNUC__";
     files = iso/math_c99.h;
     c_fix = format;
@@ -3349,10 +3545,11 @@ fix = {
                 "\t\t\t     ? __builtin_signbitl(x) \\\n"
                 "\t\t\t     : __builtin_signbit(x))";
     c_fix_arg = "^#define[ \t]+signbit\\(x\\)[ \t]+__builtin_signbit\\(x\\)";
-    test_text =
-    '#ident    "@(#)math_c99.h 1.9     04/11/01 SMI"'"\n"
-    "#undef    signbit\n"
-    "#define   signbit(x)      __builtin_signbit(x)";
+    test_text = <<- _EOText_
+       #ident  "@(#)math_c99.h 1.9     04/11/01 SMI"
+       #undef  signbit
+       #define signbit(x)      __builtin_signbit(x)
+       _EOText_;
 };
 
 fix = {
@@ -3443,6 +3640,24 @@ fix = {
 
 
 /*
+ *  The pow overloads with int were removed in C++ 2011.
+ */
+fix = {
+    hackname  = solaris_pow_int_overload;
+    mach      = '*-*-solaris2*';
+    files     = "iso/math_iso.h";
+    select    = "^[ \t]*inline [a-z ]* pow\\([^()]*, int [^()]*\\)"
+               " *\\{[^{}]*\n[^{}]*\\}";
+    c_fix     = format;
+    c_fix_arg = "#ifndef __GXX_EXPERIMENTAL_CXX0X__\n%0\n#endif";
+
+    test_text =
+    "  inline long double pow(long double __X, int __Y) { return\n"
+    "          __powl(__X, (long double) (__Y)); }";
+};
+
+
+/*
  * Sun Solaris defines PTHREAD_RWLOCK_INITIALIZER with a "0" for some
  *  fields of the pthread_rwlock_t structure, which are of type
  *  upad64_t, which itself is typedef'd to int64_t, but with __STDC__
@@ -3522,22 +3737,21 @@ fix = {
 
 
 /*
- * Sun Solaris 10 has a version of sys/int_const.h that defines
+ * Sun Solaris 2 has a version of sys/int_const.h that defines
  * UINT8_C and UINT16_C to unsigned constants.
  */
 fix = {
     hackname  = solaris_int_const;
-    select    = '@\(#\)int_const.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
     files     = sys/int_const.h;
+    mach      = '*-*-solaris2*';
     c_fix     = format;
     c_fix_arg = "#define\tUINT8_C(c)\t(c)\n"
                 "%1\n"
                 "#define\tUINT16_C(c)\t(c)";
-    c_fix_arg = "^#define[ \t]+UINT8_C\\(c\\)[ \t]+__CONCAT__.*\n"
+    select    = "^#define[ \t]+UINT8_C\\(c\\)[ \t]+__CONCAT__.*\n"
                 "(/\*.*\*/)\n"
                 "#define[ \t]+UINT16_C\\(c\\)[ \t]+__CONCAT__.*";
     test_text =
-    '#pragma ident     "@(#)int_const.h        1.5     04/09/28 SMI"'"\n"
     "#define   UINT8_C(c)      __CONCAT__(c,u)\n"
     "/* CSTYLED */\n"
     "#define   UINT16_C(c)     __CONCAT__(c,u)";
@@ -3545,38 +3759,36 @@ fix = {
 
 
 /*
- * Sun Solaris 10 has a version of sys/int_limits.h that defines
+ * Sun Solaris 2 has a version of sys/int_limits.h that defines
  * UINT8_MAX and UINT16_MAX to unsigned constants.
  */
 fix = {
     hackname  = solaris_int_limits_1;
-    select    = '@\(#\)int_limits.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
     files     = sys/int_limits.h;
+    mach      = '*-*-solaris2*';
     c_fix     = format;
     c_fix_arg = "#define\tUINT8_MAX\t(255)\n"
                 "#define\tUINT16_MAX\t(65535)";
-    c_fix_arg = "^#define[ \t]+UINT8_MAX[ \t]+\\(255U\\)\n"
+    select    = "^#define[ \t]+UINT8_MAX[ \t]+\\(255U\\)\n"
                 "#define[ \t]+UINT16_MAX[ \t]+\\(65535U\\)";
     test_text =
-    '#pragma ident     "@(#)int_limits.h       1.9     04/09/28 SMI"'"\n"
     "#define   UINT8_MAX       (255U)\n"
     "#define   UINT16_MAX      (65535U)";
 };
 
 
 /*
- * Sun Solaris 10 has a version of sys/int_limits.h that defines
+ * Sun Solaris 2 has a version of sys/int_limits.h that defines
  * INT_FAST16 limits to wrong values for sys/int_types.h.
  */
 fix = {
     hackname  = solaris_int_limits_2;
-    select    = '@\(#\)int_limits.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
     files     = sys/int_limits.h;
+    mach      = '*-*-solaris2*';
     c_fix     = format;
     c_fix_arg = "#define\t%1_FAST16_%2 %132_%2";
-    c_fix_arg = "^#define[ \t]+(INT|UINT)_FAST16_(MAX|MIN)[ \t](INT|UINT)16.*";
+    select    = "^#define[ \t]+(INT|UINT)_FAST16_(MAX|MIN)[ \t](INT|UINT)16.*";
     test_text =
-    '#pragma ident     "@(#)int_limits.h       1.9     04/09/28 SMI"'"\n"
     "#define   INT_FAST16_MAX INT16_MAX\n"
     "#define   UINT_FAST16_MAX UINT16_MAX\n"
     "#define   INT_FAST16_MIN  INT16_MIN";
@@ -3584,6 +3796,22 @@ fix = {
 
 
 /*
+ * Sun Solaris 2 has a version of sys/int_limits.h that defines
+ * SIZE_MAX as unsigned long.
+ */
+fix = {
+    hackname  = solaris_int_limits_3;
+    files     = sys/int_limits.h;
+    mach      = '*-*-solaris2*';
+    c_fix     = format;
+    c_fix_arg = "#define\tSIZE_MAX\t4294967295U";
+    select    = "^#define[ \t]+SIZE_MAX[ \t]+4294967295UL";
+    test_text =
+    "#define   SIZE_MAX        4294967295UL";
+};
+
+
+/*
  * Sun Solaris up to 9 has a version of sys/int_types.h that forbids use
  * of Standard C99 64-bit types in 32-bit mode.
  */
@@ -3606,6 +3834,44 @@ fix = {
 
 
 /*
+ * Solaris 10+ <spawn.h> uses char *const argv[_RESTRICT_KYWD] in the
+ * posix_spawn declarations, which doesn't work with C++.
+ */
+fix = {
+    hackname  = solaris_posix_spawn_restrict;
+    files     = spawn.h;
+    mach      = '*-*-solaris2*';
+    c_fix     = format;
+    c_fix_arg = "%1*_RESTRICT_KYWD %2%3";
+    select    = "(.*[ \t]+)([a-z]+)\\[_RESTRICT_KYWD\\](.*)";
+    test_text =
+    "char *const argv[_RESTRICT_KYWD],\n"
+    "char *const envp[_RESTRICT_KYWD]);";
+};
+
+
+/*
+ * Before Solaris 10, <stdio.h> lacks declarations of std::__filbuf and
+ * std::__flsbuf, but <iso/stdio_iso.h> uses them.
+ */
+fix = {
+    hackname  = solaris_std___filbuf;
+    files     = stdio.h;
+    mach      = '*-*-solaris2*';
+    bypass    = "using std::__filbuf";
+    select    = "(using std::perror;\n)(#endif)";
+    c_fix     = format;
+    c_fix_arg = "%1#ifndef _LP64\n"
+               "using std::__filbuf;\n"
+               "using std::__flsbuf;\n"
+               "#endif\n%2";
+
+    test_text = "using std::perror;\n"
+               "#endif";
+};
+
+
+/*
  * Sun Solaris 8 has what appears to be some gross workaround for
  * some old version of their c++ compiler.  G++ doesn't want it
  * either, but doesn't want to be tied to SunPRO version numbers.
@@ -3625,6 +3891,34 @@ fix = {
 
 
 /*
+ * On Solaris 8 and 9, __va_list needs to become a typedef for
+ * __builtin_va_list to make -Wmissing-format-attribute work.
+ */
+fix = {
+    hackname = solaris_sys_va_list;
+    files    = sys/va_list.h;
+    mach     = '*-*-solaris2.[89]';
+    select   = "#if.*__STDC__.*\n"
+              "typedef void \\*__va_list;\n"
+              "#else\n"
+              "typedef char \\*__va_list;\n"
+              "#endif";
+
+    c_fix    = format;
+    c_fix_arg = "#ifdef __GNUC__\n"
+               "typedef __builtin_va_list __va_list;\n"
+               "#else\n"
+               "%0\n"
+               "#endif";
+    test_text = "#if defined(__STDC__) && !defined(__ia64)\n"
+               "typedef void *__va_list;\n"
+               "#else\n"
+               "typedef char *__va_list;\n"
+               "#endif";
+};
+
+
+/*
  *  a missing semi-colon at the end of the statsswtch structure definition.
  */
 fix = {
@@ -4271,6 +4565,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++.
  */
@@ -4289,6 +4642,7 @@ fix = {
     files     = sys/types.h;
     /* avoid changing C++ friendly NULL */
     bypass    = __cplusplus;
+    bypass    = __null;
     select    = "^#[ \t]*define[ \t]+NULL[ \t]+\\(\\(void[ \t]*\\*\\)0\\)";
     c_fix     = format;
     c_fix_arg = "#define NULL 0";