OSDN Git Service

* inclhack.def (darwin_stdint_5, darwin_stdint_6,
[pf3gnuchains/gcc-fork.git] / fixincludes / README
index d597913..50f408f 100644 (file)
@@ -69,19 +69,40 @@ MAKING CHANGES TO INCLHACK.DEF
     for variable names and is unique without regard to alphabetic case.
     Please keep them alphabetical by this name.  :-)
 
-2.  If the problem is known to exist only in certain files,
-    then name each such file with a "files = " entry.
+2.  If the problem is known to exist only in certain files, then
+    identify the files with "files = " entries.  If you use fnmatch(3C)
+    wild card characters in a "files" entry, be certain that the first
+    "files" entry has no such character.  Otherwise, the "make check"
+    machinery will attempt to create files with those characters in the
+    name.  That is inconvenient.
 
 3.  It is relatively expensive to fire off a process to fix a source
     file, therefore write apply tests to avoid unnecessary fix
-    processes.  The preferred apply tests are "select", "bypass" and
-    "c_test" because they are performed internally.  "test" sends
-    a command to a server shell that actually fires off one or more
-    processes to do the testing.  Avoid it, if you can, but it is
-    still more efficient than a fix process.  Also available is
-    "mach".  If the target machine matches any of the named
-    globbing-style patterns, then the machine name test will pass.
-    It is desired, however, to limit the use of this test.
+    processes.  The preferred apply tests are "select", "bypass", "mach"
+    and "c-test" because they are performed internally:
+
+    * select - Run a regex on the contents of the file being considered.
+               All such regex-es must match.
+
+    * bypass - Run a regex on the contents of the file being considered.
+               No such regex may match.
+
+    * c-test - call a function in fixtests.c.  See that file.
+
+    * mach   - Match the output of config.conf against a series of fnmatch
+               patterns.  It must match at least one of the patterns, unless
+               "not-machine" has also been specified.  In that case, the
+               config.conf output must not match any of the patterns.
+
+    The next test is relatively slow because it must be handled in a
+    separate shell process.  Some platforms do not support server shells,
+    so the whole process is even slower and more cumbersome there.
+
+    * test   - These should be arguments to the program, "/bin/test".
+               You may perform multiple commands, if you enclose them
+               in backquotes and echo out valid test arguments.  For
+               example, you might echo out '0 -eq 1' if you want a false
+               result, or '0 -eq 0' for a true result.
 
     These tests are required to:
 
@@ -106,6 +127,10 @@ MAKING CHANGES TO INCLHACK.DEF
         rules, except that the backslash is processed before
         '\\', '\'' and '#' characters (using C character syntax).
 
+    Each test must pass or the fix is not applied.  For example,
+    all "select" expressions must be found and not one "bypass"
+    selection may be found.
+
     Examples of test specifications:
 
       hackname = broken_assert_stdio;
@@ -204,11 +229,12 @@ MAKING CHANGES TO INCLHACK.DEF
             c_fix_arg = "#ifndef %1\n%0\n#endif";
             c_fix_arg = "#define[ \t]+([A-Z][A-Z0-9a-z_]*).*";
 
-        This would wrap a traditional #define inside of a "#ifndef"/"#endif"
-        pair.  The second "c_fix_arg" may be omitted *IF* there is
-        a select clause and the first one matches the text you want
-        replaced.  You may delete text by supplying an empty string for
-        the format (the first "c_fix_arg").
+        This would wrap a one line #define inside of a "#ifndef"/"#endif"
+        pair.  The second "c_fix_arg" may be omitted *IF* there is at least
+        one select clause and the first one identifies the text you wish to
+        reformat.  It will then be used as the second "c_fix_arg".  You may
+        delete the selected text by supplying an empty string for the
+        replacement format (the first "c_fix_arg").
 
        Note: In general, a format c_fix may be used in place of one
        sed expression.  However, it will need to be rewritten by