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]

"wrap" style include fix added



In the quest to expunge the need for shell services,
this was added.  It inserts text before and after
the previous contents.  While doing this, it also
automatically adds the self-exclusionary defines as in:

   #ifndef FIXINC_<fix-name-in-caps>_CHECK
   #define FIXINC_<fix-name-in-caps>_CHECK 1
   <pre-pended text>
   <original text>
   <ap-pended text>
   #endif /* FIXINC_<fix-name-in-caps>_CHECK */
Index: check.diff
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fixinc/check.diff,v
retrieving revision 1.2
diff -u -r1.2 check.diff
--- check.diff	2000/05/12 21:59:25	1.2
+++ check.diff	2000/05/14 19:18:03
@@ -85,14 +85,30 @@
 --- res/assert.h
 ***************
 *** 1,3 ****
---- 1,7 ----
+--- 1,13 ----
++ #ifndef FIXINC_BROKEN_ASSERT_STDLIB_CHECK
++ #define FIXINC_BROKEN_ASSERT_STDLIB_CHECK 1
++ 
 + #ifdef __cplusplus
 + #include <stdlib.h>
-+ #endif /* BROKEN_ASSERT_STDLIB_CHECK fix stamp */
++ #endif
++ #ifndef FIXINC_BROKEN_ASSERT_STDIO_CHECK
++ #define FIXINC_BROKEN_ASSERT_STDIO_CHECK 1
++ 
 + #include <stdio.h>
   
   
   #ifndef BROKEN_ASSERT_STDIO_CHECK
+***************
+*** 8,10 ****
+--- 18,24 ----
+  #ifndef BROKEN_ASSERT_STDLIB_CHECK
+  extern void exit ( int );
+  #endif  /* BROKEN_ASSERT_STDLIB_CHECK */
++ 
++ #endif  /* FIXINC_BROKEN_ASSERT_STDIO_CHECK */
++ 
++ #endif  /* FIXINC_BROKEN_ASSERT_STDLIB_CHECK */
 *** inc/c_asm.h
 --- res/c_asm.h
 ***************
@@ -140,10 +156,28 @@
   #ifndef BAD_STRUCT_TERM_CHECK
 ! struct term;
   #endif  /* BAD_STRUCT_TERM_CHECK */
+*** inc/libgen.h
+--- res/libgen.h
+***************
+*** 2,7 ****
+  
+  #ifndef BAD_LVAL_CHECK
+  #pragma extern_prefix "_FOO"
+! #define something(x,y,z) _FOOsomething(x,y,z)
+  #define mumble _FOOmumble
+  #endif  /* BAD_LVAL_CHECK */
+--- 2,7 ----
+  
+  #ifndef BAD_LVAL_CHECK
+  #pragma extern_prefix "_FOO"
+! #define something _FOOsomething
+  #define mumble _FOOmumble
+  #endif  /* BAD_LVAL_CHECK */
 *** inc/math.h
 --- res/math.h
 ***************
-*** 2,9 ****
+*** 1,10 ****
+  
   
   #ifndef BROKEN_CABS_CHECK
   #ifdef __STDC__
@@ -152,7 +186,33 @@
 - extern double cabs();
   #endif
   #endif  /* BROKEN_CABS_CHECK */
---- 2,7 ----
+  
+--- 1,14 ----
++ #ifndef FIXINC_MATH_EXCEPTION_CHECK
++ #define FIXINC_MATH_EXCEPTION_CHECK 1
++ 
++ #ifdef __cplusplus
++ #define exception __math_exception
++ #endif
+  
+  
+  #ifndef BROKEN_CABS_CHECK
+  #ifdef __STDC__
+  #else
+  #endif
+  #endif  /* BROKEN_CABS_CHECK */
+  
+***************
+*** 12,14 ****
+--- 16,23 ----
+  #ifndef MATH_EXCEPTION_CHECK
+  typedef struct exception t_math_exception;
+  #endif  /* MATH_EXCEPTION_CHECK */
++ #ifdef __cplusplus
++ #undef exception
++ #endif
++ 
++ #endif  /* FIXINC_MATH_EXCEPTION_CHECK */
 *** inc/stdio.h
 --- res/stdio.h
 ***************
@@ -169,7 +229,10 @@
   int foo;
   #endif
   #endif  /* ISC_OMITS_WITH_STDC_CHECK */
---- 1,14 ----
+--- 1,17 ----
++ #ifndef FIXINC_STDIO_STDARG_H_CHECK
++ #define FIXINC_STDIO_STDARG_H_CHECK 1
++ 
 + #define __need___va_list
 + #include <stdarg.h>
   
@@ -184,6 +247,14 @@
   int foo;
   #endif
   #endif  /* ISC_OMITS_WITH_STDC_CHECK */
+***************
+*** 15,17 ****
+--- 20,24 ----
+  #ifndef STDIO_STDARG_H_CHECK
+  
+  #endif  /* STDIO_STDARG_H_CHECK */
++ 
++ #endif  /* FIXINC_STDIO_STDARG_H_CHECK */
 *** inc/stdlib.h
 --- res/stdlib.h
 ***************
@@ -275,11 +346,13 @@
 --- res/sys/mman.h
 ***************
 *** 1,5 ****
---- 1,12 ----
+--- 1,16 ----
++ #ifndef FIXINC_CXX_UNREADY_CHECK
++ #define FIXINC_CXX_UNREADY_CHECK 1
++ 
 + #ifdef __cplusplus
 + extern "C" {
-+ #endif /* CXX_UNREADY_CHECK */
-+ 
++ #endif
   
   
   #ifndef CXX_UNREADY_CHECK
@@ -287,7 +360,9 @@
   #endif  /* CXX_UNREADY_CHECK */
 + #ifdef __cplusplus
 + }
-+ #endif /* CXX_UNREADY_CHECK */
++ #endif
++ 
++ #endif  /* FIXINC_CXX_UNREADY_CHECK */
 *** inc/sys/param.h
 --- res/sys/param.h
 ***************
Index: fixfixes.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fixinc/fixfixes.c,v
retrieving revision 1.20
diff -u -r1.20 fixfixes.c
--- fixfixes.c	2000/05/12 21:59:25	1.20
+++ fixfixes.c	2000/05/14 19:18:03
@@ -19,7 +19,7 @@
 2.  Use the "FIX_PROC_HEAD()" macro _with_ the "_fix" suffix
     (I cannot use the ## magic from ANSI C) for defining your entry point.
 
-3.  Put your test name into the FIXUP_TABLE
+3.  Put your test name into the FIXUP_TABLE.
 
 4.  Do not read anything from stdin.  It is closed.
 
@@ -27,17 +27,16 @@
     In such an event, call "exit(1)".
 
 6.  You have access to the fixDescList entry for the fix in question.
-    This may be useful, for example, if there are pre-compiled
-    selection expressions stored there.
+    This may be useful, for example, if there are interesting strings
+    or pre-compiled regular expressions stored there.
 
-    For example, you may do this if you know that the first 
-    test contains a useful regex.  This is okay because, remember,
-    this code perforce works closely with the inclhack.def fixes!!
+    It is also possible to access fix descriptions by using the
+    index of a known fix, "my_fix_name" for example:
 
-    tFixDesc*  pMyDesc = fixDescList + MY_FIX_NAME_FIXIDX;
-    tTestDesc* pTestList = pMyDesc->p_test_desc;
+        tFixDesc*  p_desc  = fixDescList + MY_FIX_NAME_FIXIDX;
+        tTestDesc* p_tlist = p_desc->p_test_desc;
 
-    regexec (pTestList->p_test_regex, ...)
+        regexec (p_tlist->p_test_regex, ...)
 
 = = = = = = = = = = = = = = = = = = = = = = = = =
 
@@ -66,10 +65,11 @@
 } fix_entry_t;
 
 #define FIXUP_TABLE \
-  _FT_( "format",           format_fix ) \
-  _FT_( "char_macro_use",   char_macro_use_fix ) \
   _FT_( "char_macro_def",   char_macro_def_fix ) \
-  _FT_( "machine_name",     machine_name_fix )
+  _FT_( "char_macro_use",   char_macro_use_fix ) \
+  _FT_( "format",           format_fix )         \
+  _FT_( "machine_name",     machine_name_fix )   \
+  _FT_( "wrap",             wrap_fix )
 
 
 #define FIX_PROC_HEAD( fix ) \
@@ -234,6 +234,7 @@
     fputs (text, stdout);
 }
 
+
 /* Scan the input file for all occurrences of text like this:
 
    #define TIOCCONS _IO(T, 12)
@@ -332,7 +333,7 @@
    you provide in the STR argument.  */
 FIX_PROC_HEAD( char_macro_def_fix )
 {
-  /* This regexp looks for any traditional-syntax #define (# in column 1).  */
+  /* This regexp looks for any traditional-syntax #define (# in col 1). */
   static const char pat[] =
     "^#[ \t]*define[ \t]+";
   static regex_t re;
@@ -515,6 +516,57 @@
  done:
 #endif
   fputs (text, stdout);
+}
+
+
+FIX_PROC_HEAD( wrap_fix )
+{
+  char   z_fixname[ 64 ];
+  tCC*   pz_src  = p_fixd->fix_name;
+  tCC*   pz_name = z_fixname;
+  char*  pz_dst  = z_fixname;
+  size_t len     = 0;
+
+  for (;;) {
+    char ch = *(pz_src++);
+
+    if (islower(ch))
+      *(pz_dst++) = toupper( ch );
+
+    else if (isalnum( ch ))
+      *(pz_dst++) = ch;
+
+    else if (ch == NUL) {
+      *(pz_dst++) = ch;
+      break;
+    }
+    else
+      *(pz_dst++) = '_';
+
+    if (++len >= sizeof( z_fixname )) {
+      void* p = must_malloc( len + strlen( pz_src ) + 1 );
+      memcpy( p, (void*)z_fixname, len );
+      pz_name = (tCC*)p;
+      pz_dst  = (char*)pz_name + len;
+    }
+  }
+
+  printf( "#ifndef FIXINC_%s_CHECK\n", pz_name );
+  printf( "#define FIXINC_%s_CHECK 1\n\n", pz_name );
+
+  if (p_fixd->patch_args[1] == (tCC*)NULL)
+    fputs( text, stdout );
+
+  else {
+    fputs( p_fixd->patch_args[1], stdout );
+    fputs( text, stdout );
+    if (p_fixd->patch_args[2] != (tCC*)NULL)
+      fputs( p_fixd->patch_args[2], stdout );
+  }
+
+  printf( "\n#endif  /* FIXINC_%s_CHECK */\n", pz_name );
+  if (pz_name != z_fixname)
+    free( (void*)pz_name );
 }
 
 
Index: fixincl.x
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fixinc/fixincl.x,v
retrieving revision 1.62
diff -u -r1.62 fixincl.x
--- fixincl.x	2000/05/12 21:59:39	1.62
+++ fixincl.x	2000/05/14 19:18:04
@@ -1173,7 +1173,7 @@
  *  Fix Command Arguments for Bad_Lval
  */
 const char* apzBad_LvalPatch[] = { "sed",
-    "-e", "s/^[ \t]*#[ \t]*define[ \t]+\\([^(]*\\)\\(([^)]*)\\)[ \t]*\\(_.\\)\\1\\2[ \t]*$/#define \\1 \\3\\1/",
+    "-e", "s/^[ \t]*#[ \t]*define[ \t][ \t]*\\([^(]*\\)\\(([^)]*)\\)[ \t]*\\(_.*\\)\\1\\2[ \t]*$/#define \\1 \\3\\1/",
     (char*)NULL };
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -1214,9 +1214,9 @@
 /*
  *  Fix Command Arguments for Broken_Assert_Stdio
  */
-const char* apzBroken_Assert_StdioPatch[] = { "sed",
-    "-e", "1i\\\n\
-#include <stdio.h>\n",
+const char* apzBroken_Assert_StdioPatch[] = {
+    "wrap",
+    "#include <stdio.h>\n",
     (char*)NULL };
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -1257,11 +1257,11 @@
 /*
  *  Fix Command Arguments for Broken_Assert_Stdlib
  */
-const char* apzBroken_Assert_StdlibPatch[] = { "sed",
-    "-e", "1i\\\n\
-#ifdef __cplusplus\\\n\
-#include <stdlib.h>\\\n\
-#endif /* BROKEN_ASSERT_STDLIB_CHECK fix stamp */\n",
+const char* apzBroken_Assert_StdlibPatch[] = {
+    "wrap",
+    "#ifdef __cplusplus\n\
+#include <stdlib.h>\n\
+#endif\n",
     (char*)NULL };
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -1466,16 +1466,14 @@
 /*
  *  Fix Command Arguments for Cxx_Unready
  */
-const char* apzCxx_UnreadyPatch[] = { "sed",
-    "-e", "1i\\\n\
-#ifdef __cplusplus\\\n\
-extern \"C\" {\\\n\
-#endif /* CXX_UNREADY_CHECK */\\\n\
-\n",
-    "-e", "$a\\\n\
-#ifdef __cplusplus\\\n\
-}\\\n\
-#endif /* CXX_UNREADY_CHECK */\n",
+const char* apzCxx_UnreadyPatch[] = {
+    "wrap",
+    "#ifdef __cplusplus\n\
+extern \"C\" {\n\
+#endif\n",
+    "#ifdef __cplusplus\n\
+}\n\
+#endif\n",
     (char*)NULL };
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -2468,14 +2466,13 @@
 /*
  *  Fix Command Arguments for Math_Exception
  */
-const char* apzMath_ExceptionPatch[] = { "sed",
-    "-e", "1i\\\n\
-#ifdef __cplusplus\\\n\
-#define exception __math_exception\\\n\
+const char* apzMath_ExceptionPatch[] = {
+    "wrap",
+    "#ifdef __cplusplus\n\
+#define exception __math_exception\n\
 #endif\n",
-    "-e", "$a\\\n\
-#ifdef __cplusplus\\\n\
-#undef exception\\\n\
+    "#ifdef __cplusplus\n\
+#undef exception\n\
 #endif\n",
     (char*)NULL };
 
@@ -3292,9 +3289,9 @@
 /*
  *  Fix Command Arguments for Stdio_Stdarg_H
  */
-const char* apzStdio_Stdarg_HPatch[] = { "sed",
-    "-e", "1i\\\n\
-#define __need___va_list\\\n\
+const char* apzStdio_Stdarg_HPatch[] = {
+    "wrap",
+    "#define __need___va_list\n\
 #include <stdarg.h>\n",
     (char*)NULL };
 
@@ -4821,12 +4818,12 @@
 
   {  zBroken_Assert_StdioName,    zBroken_Assert_StdioList,
      apzBroken_Assert_StdioMachs,
-     BROKEN_ASSERT_STDIO_TEST_CT, FD_MACH_ONLY,
+     BROKEN_ASSERT_STDIO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aBroken_Assert_StdioTests,   apzBroken_Assert_StdioPatch },
 
   {  zBroken_Assert_StdlibName,    zBroken_Assert_StdlibList,
      apzBroken_Assert_StdlibMachs,
-     BROKEN_ASSERT_STDLIB_TEST_CT, FD_MACH_ONLY,
+     BROKEN_ASSERT_STDLIB_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aBroken_Assert_StdlibTests,   apzBroken_Assert_StdlibPatch },
 
   {  zBroken_CabsName,    zBroken_CabsList,
@@ -4856,7 +4853,7 @@
 
   {  zCxx_UnreadyName,    zCxx_UnreadyList,
      apzCxx_UnreadyMachs,
-     CXX_UNREADY_TEST_CT, FD_MACH_ONLY,
+     CXX_UNREADY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aCxx_UnreadyTests,   apzCxx_UnreadyPatch },
 
   {  zHpux_MaxintName,    zHpux_MaxintList,
@@ -4991,7 +4988,7 @@
 
   {  zMath_ExceptionName,    zMath_ExceptionList,
      apzMath_ExceptionMachs,
-     MATH_EXCEPTION_TEST_CT, FD_MACH_ONLY,
+     MATH_EXCEPTION_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aMath_ExceptionTests,   apzMath_ExceptionPatch },
 
   {  zMath_Huge_Val_From_Dbl_MaxName,    zMath_Huge_Val_From_Dbl_MaxList,
@@ -5101,7 +5098,7 @@
 
   {  zStdio_Stdarg_HName,    zStdio_Stdarg_HList,
      apzStdio_Stdarg_HMachs,
-     STDIO_STDARG_H_TEST_CT, FD_MACH_ONLY,
+     STDIO_STDARG_H_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aStdio_Stdarg_HTests,   apzStdio_Stdarg_HPatch },
 
   {  zStdio_Va_ListName,    zStdio_Va_ListList,
Index: fixlib.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fixinc/fixlib.c,v
retrieving revision 1.10
diff -u -r1.10 fixlib.c
--- fixlib.c	2000/02/27 00:10:15	1.10
+++ fixlib.c	2000/05/14 19:18:05
@@ -24,6 +24,20 @@
 
 #include "fixlib.h"
 
+void *
+must_malloc( siz )
+    size_t  siz;
+{
+  void*  res = malloc( siz );
+
+  if (res == (void*)NULL) {
+    fprintf( stderr, "fixincl failed to malloc %d bytes\n", siz );
+    exit( 3 );
+  }
+
+  return res;
+}
+
 /* * * * * * * * * * * * *
  
    load_file_data loads all the contents of a file into malloc-ed memory.
Index: fixlib.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fixinc/fixlib.h,v
retrieving revision 1.10
diff -u -r1.10 fixlib.h
--- fixlib.h	2000/05/11 13:41:12	1.10
+++ fixlib.h	2000/05/14 19:18:05
@@ -138,14 +138,14 @@
 typedef struct fix_desc tFixDesc;
 struct fix_desc
 {
-  const char*   fix_name;       /* Name of the fix */
-  const char*   file_list;      /* List of files it applies to */
-  const char**  papz_machs;     /* List of machine/os-es it applies to */
-  int           test_ct;
-  int           fd_flags;
-  tTestDesc*    p_test_desc;
-  const char**  patch_args;
-  long          unused;
+  tCC*        fix_name;       /* Name of the fix */
+  tCC*        file_list;      /* List of files it applies to */
+  tCC**       papz_machs;     /* List of machine/os-es it applies to */
+  int         test_ct;
+  int         fd_flags;
+  tTestDesc*  p_test_desc;
+  tCC**       patch_args;
+  long        unused;
 };
 
 /*
@@ -155,6 +155,7 @@
 t_bool is_cxx_header  _P_(( tCC* filename, tCC* filetext ));
 void   compile_re     _P_(( tCC* pat, regex_t* re, int match,
 			    tCC *e1, tCC *e2 ));
+void*  must_malloc    _P_(( size_t ));
 
 void apply_fix _P_(( tFixDesc* p_fixd, tCC* filname ));
 apply_fix_p_t run_test _P_((tCC* t_name, tCC* f_name, tCC* text ));
Index: inclhack.def
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fixinc/inclhack.def,v
retrieving revision 1.62
diff -u -r1.62 inclhack.def
--- inclhack.def	2000/05/12 21:59:25	1.62
+++ inclhack.def	2000/05/14 19:18:07
@@ -733,13 +733,13 @@
     files    = stropts.h;
     files    = time.h;
     files    = unistd.h;
+
     sed      =
-        "s/^[ \t]*#[ \t]*define[ \t]+\\([^(]*\\)\\(([^)]*)\\)[ \t]*"
-               "\\(_.\\)\\1\\2[ \t]*$/#define \\1 \\3\\1/";
+        "s/^[ \t]*#[ \t]*define[ \t][ \t]*\\([^(]*\\)\\(([^)]*)\\)[ \t]*"
+               "\\(_.*\\)\\1\\2[ \t]*$/#define \\1 \\3\\1/";
 
     test_text = '#pragma extern_prefix "_FOO"'"\n"
                 "#define something(x,y,z) _FOOsomething(x,y,z)\n"
-                "#define otherwise(x,y,z) BAR_Something(x,y,z)\n"
                 "#define mumble _FOOmumble";
 };
 
@@ -748,12 +748,12 @@
  *  check for broken assert.h that needs stdio.h
  */
 fix = {
-    hackname = broken_assert_stdio;
-    files    = assert.h;
-    select   = stderr;
-    bypass   = "include.*stdio\\.h";
-    sed      = "1i\\\n"
-               "#include <stdio.h>\n";
+    hackname  = broken_assert_stdio;
+    files     = assert.h;
+    select    = stderr;
+    bypass    = "include.*stdio\\.h";
+    c_fix     = wrap;
+    c_fix_arg = "#include <stdio.h>\n";
     test_text = "extern FILE* stderr;";
 };
 
@@ -762,14 +762,14 @@
  *  check for broken assert.h that needs stdlib.h
  */
 fix = {
-    hackname = broken_assert_stdlib;
-    files    = assert.h;
-    select   = 'exit *\(|abort *\(';
-    bypass   = "include.*stdlib\\.h";
-    sed      = "1i\\\n"
-               "#ifdef __cplusplus\\\n"
-               "#include <stdlib.h>\\\n"
-               "#endif /* BROKEN_ASSERT_STDLIB_CHECK fix stamp */\n";
+    hackname  = broken_assert_stdlib;
+    files     = assert.h;
+    select    = 'exit *\(|abort *\(';
+    bypass    = "include.*stdlib\\.h";
+    c_fix     = wrap;
+    c_fix_arg = "#ifdef __cplusplus\n"
+                "#include <stdlib.h>\n"
+                "#endif\n";
     test_text = "extern void exit ( int );";
 };
 
@@ -861,18 +861,17 @@
     hackname = cxx_unready;
     files    = sys/mman.h;
     files    = rpc/types.h;
-    select   = '[^#]+malloc.*;';  /* Should catch any form of a declaration
-				     but not mention within a macro.  */
+    select   = '[^#]+malloc.*;';  /* Catch any form of declaration
+				     not within a macro.  */
     bypass   = '"C"|__BEGIN_DECLS';
 
-    sed      = "1i\\\n"
-               "#ifdef __cplusplus\\\n"
-               "extern \"C\" {\\\n"
-               "#endif /* CXX_UNREADY_CHECK */\\\n\n";
-    sed      = "$a\\\n"
-               "#ifdef __cplusplus\\\n"
-               "}\\\n"
-               "#endif /* CXX_UNREADY_CHECK */\n";
+    c_fix     = wrap;
+    c_fix_arg = "#ifdef __cplusplus\n"
+                "extern \"C\" {\n"
+                "#endif\n";
+    c_fix_arg = "#ifdef __cplusplus\n"
+                "}\n"
+                "#endif\n";
     test_text = "extern void* malloc( size_t );";
 };
 
@@ -1310,18 +1309,21 @@
  *  additional references to struct exception.
  */
 fix = {
-    hackname = math_exception;
-    files    = math.h;
-    select   = "struct exception";
-    bypass   = "We have a problem when using C\\+\\+";
-    sed      = "1i\\\n"
-               "#ifdef __cplusplus\\\n"
-               "#define exception __math_exception\\\n"
-               "#endif\n";
-    sed      = "$a\\\n"
-               "#ifdef __cplusplus\\\n"
-               "#undef exception\\\n"
-               "#endif\n";
+    hackname  = math_exception;
+    files     = math.h;
+    select    = "struct exception";
+    bypass    = "We have a problem when using C\\+\\+";
+    c_fix     = wrap;
+
+    c_fix_arg = "#ifdef __cplusplus\n"
+                "#define exception __math_exception\n"
+                "#endif\n";
+
+    c_fix_arg = "#ifdef __cplusplus\n"
+                "#undef exception\n"
+                "#endif\n";
+
+    test_text = "typedef struct exception t_math_exception;";
 };
 
 fix = {
@@ -1687,11 +1689,11 @@
     files    = stdio.h;
     bypass   = "include.*(stdarg\.h|machine/ansi\.h)";
 
-    sed      = '1i\\
-\#define __need___va_list\\
-\#include <stdarg.h>
-';
+    c_fix     = wrap;
 
+    c_fix_arg = "#define __need___va_list\n#include <stdarg.h>\n";
+
+    test_text = "";
 };
 
 
@@ -2038,8 +2040,11 @@
     files    = sys/cmn_err.h;
     files    = sys/kdebugger.h;
     bypass   = '_KERNEL';
-    sed      = "1i\\\n#ifdef _KERNEL";
-    sed      = "$a\\\n#endif /* _KERNEL */";
+    c_fix     = wrap;
+
+    c_fix_arg = "#ifdef _KERNEL\n";
+    c_fix_arg = "#endif /* _KERNEL */\n";
+    test_text = "";
 };
 #endif
 

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