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]

[PATCH, libcpp] Quote '#' in file names during dependency generation


The following patch makes dependency generation (-M) quote the character '#' in file names.

Patch made against gcc-4.2.0-20070316, but applies cleany to mkdeps.c even in 3.0.
--- libcpp/mkdeps.c.orig        2007-03-31 09:43:09.349996800 +0200
+++ libcpp/mkdeps.c     2007-03-31 09:44:23.927233600 +0200
@@ -79,6 +79,11 @@
          /* '$' is quoted by doubling it.  */
          len++;
          break;
+
+       case '#':
+         /* '#' is quoted with a '\'.  */
+         len++;
+         break;
        }
     }

@@ -100,6 +105,10 @@
          *dst++ = '$';
          break;

+       case '#':
+         *dst++ = '\\';
+         break;
+
        default:
          /* nothing */;
        }


      Markus Milleder



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