]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - fixincludes/fixincl.tpl
PR c++/87554 - ICE with extern template and reference member.
[thirdparty/gcc.git] / fixincludes / fixincl.tpl
index b4818aaea1ceb71963c6ca8683c64e0b9cca18af..3d70cabc7fd6dd0e63033e6523fac1dca01b285a 100644 (file)
@@ -1,8 +1,14 @@
 [= AutoGen5 Template -*- Mode: C -*-
 x=fixincl.x =]
-[= (dne " * " "/* ")=]
+[=
+ (if (version-compare >= autogen-version "5.18.1")
+     (dne "-D" " * " "/* ")
+     (dne " * " "/* ") ) =]
  */
-/* DO NOT SVN-MERGE THIS FILE, EITHER [=`date`=]
+/* DO NOT SVN-MERGE THIS FILE, EITHER [=
+   (define re-ct 0) (define max-mach 0) (define ct 0)
+   (define HACK "") (define Hack "")    (define tmp "") 
+   (shell "date") =]
  *
  * You must regenerate it.  Use the ./genfixes script.
  *
@@ -15,13 +21,27 @@ x=fixincl.x =]
  *
  * See README for more information.
  *
- *  inclhack copyright (c) 1998, 1999, 2000, 2001
+ *  inclhack copyright (c) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ *                         2006, 2007, 2008
  *  The Free Software Foundation, Inc.
  *
- [=(define re-ct 0) (define max-mach 0) (define ct 0)
-   (define HACK "") (define Hack "")    (define tmp "")
-   (gpl "inclhack" " *  ")=]
+ *  inclhack is free software: you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the
+ *  Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  inclhack is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *  See the GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
+#ifndef SED_PROGRAM
+#define SED_PROGRAM "/usr/bin/sed"
+#endif
+static char const sed_cmd_z[] = SED_PROGRAM;
 [=
 
 FOR fix =]
@@ -46,32 +66,32 @@ tSCC z[=(. Hack)=]Name[] =
  *  File name selection pattern
  */[=
 
-  IF (exist? "files")=]
+  IF (exist? "files")   =]
 tSCC z[=(. Hack)=]List[] =
   "[=  (join "\\0" (stack "files")) =]\0";[=
 
-  ELSE =]
+  ELSE                  =]
 #define z[=(. Hack)=]List (char*)NULL[=
   ENDIF (exist? "files") =]
 /*
  *  Machine/OS name selection pattern
  */[=
 
-  IF (exist? "mach")=]
+  IF (exist? "mach")    =]
 tSCC* apz[=(. Hack)=]Machs[] = {[=
     (set! ct 0) =][=
 
-    FOR mach =]
+    FOR mach            =]
         [=
       (set! tmp (get "mach"))
       (set! ct (+ ct (string-length tmp) 5))
       (kr-string tmp)=],[=
-    ENDFOR=]
+    ENDFOR              =]
         (const char*)NULL };[=
 
     (if (> ct max-mach) (set! max-mach ct)) =][=
 
-  ELSE =]
+  ELSE                  =]
 #define apz[=(. Hack)=]Machs (const char**)NULL[=
   ENDIF (exist? "mach") =][=
 
@@ -80,43 +100,57 @@ tSCC* apz[=(. Hack)=]Machs[] = {[=
 /*
  *  content selection pattern - do fix if pattern found
  */[=
-    FOR select =]
+    FOR select          =]
 tSCC z[=(. Hack)=]Select[=(for-index)=][] =
        [=(kr-string (get "select"))=];[=
-    ENDFOR select =][=
-  ENDIF =][=
+    ENDFOR select       =][=
+  ENDIF                 =][=
 
-  IF (exist? "bypass")=]
+  IF (exist? "bypass")  =]
 
 /*
  *  content bypass pattern - skip fix if pattern found
  */[=
-    FOR bypass =]
+    FOR bypass          =]
 tSCC z[=(. Hack)=]Bypass[=(for-index)=][] =
        [=(kr-string (get "bypass"))=];[=
-    ENDFOR bypass =][=
-  ENDIF =][=
+    ENDFOR bypass       =][=
+  ENDIF                 =][=
+
+  IF (exist? "sum")=][=
+     (if (not (exist? "files"))
+         (error "specifying a 'sum' requires specifying 'files'"))
+     =]
 
-  IF (exist? "test")=]
+/*
+ *  file selection - do fix if checksum matches
+ */[=
+    FOR sum             =]
+tSCC z[=(. Hack)=]Sum[=(for-index)=][] =
+       [=(kr-string (get "sum"))=];[=
+    ENDFOR sum          =][=
+  ENDIF                 =][=
+
+  IF (exist? "test")    =]
 
 /*
  *  perform the 'test' shell command - do fix on success
  */[=
-    FOR test =]
+    FOR test            =]
 tSCC z[=(. Hack)=]Test[=(for-index)=][] =
        [=(kr-string (get "test"))=];[=
-    ENDFOR  =][=
-  ENDIF     =][=
+    ENDFOR              =][=
+  ENDIF                 =][=
 
-  IF (exist? "c_test")=]
+  IF (exist? "c_test")  =]
 
 /*
  *  perform the C function call test
  */[=
-    FOR c_test =]
+    FOR c_test          =]
 tSCC z[=(. Hack)=]FTst[=(for-index)=][] = "[=c_test=]";[=
-    ENDFOR c_test =][=
-  ENDIF =][=
+    ENDFOR c_test       =][=
+  ENDIF                 =][=
 
   IF (set! ct (+ (count "select") (count "bypass") 
               (count "test") (count "c_test")))
@@ -128,31 +162,35 @@ tSCC z[=(. Hack)=]FTst[=(for-index)=][] = "[=c_test=]";[=
   ELSE =]
 
 #define    [=(. HACK)=]_TEST_CT  [=(. ct)=][=
-       (set! re-ct (+ re-ct (count "select") (count "bypass"))) =]
+        (set! re-ct (+ re-ct (count "select") (count "bypass"))) =]
 static tTestDesc a[=(. Hack)=]Tests[] = {[=
 
-    FOR test =]
+    FOR test            =]
   { TT_TEST,     z[=(. Hack)=]Test[=(for-index)=],   0 /* unused */ },[=
-    ENDFOR test =][=
+    ENDFOR test         =][=
 
-    FOR c_test =]
+    FOR c_test          =]
   { TT_FUNCTION, z[=(. Hack)=]FTst[=(for-index)=],   0 /* unused */ },[=
-    ENDFOR c_test =][=
+    ENDFOR c_test       =][=
 
-    FOR bypass =]
+    FOR bypass          =]
   { TT_NEGREP,   z[=(. Hack)=]Bypass[=(for-index)=], (regex_t*)NULL },[=
-    ENDFOR bypass =][=
+    ENDFOR bypass       =][=
 
-    FOR select =]
+    FOR select          =]
   { TT_EGREP,    z[=(. Hack)=]Select[=(for-index)=], (regex_t*)NULL },[=
-    ENDFOR select =] };[=
+    ENDFOR select       =][=
+
+    FOR sum             =]
+  { TT_CKSUM,    z[=(. Hack)=]Sum[=(for-index)=], 0 /* unused */ },[=
+    ENDFOR sum          =] };[=
   ENDIF =]
 
 /*
  *  Fix Command Arguments for [=(. Hack)=]
  */
 static const char* apz[=(. Hack)=]Patch[] = {[=
-    IF   (exist? "sed")=] "sed"[=
+    IF   (exist? "sed")=] sed_cmd_z[=
       FOR sed=],
     "-e", [=(kr-string (get "sed"))=][=
       ENDFOR sed=],[=