Re: Minor patch to correct buffer overrun

Chris Sutcliffe <[email protected]>
Newsgroups gmane.comp.gnu.make.windows
Message-ID <[email protected]>
Hi Eli, Paul,

The issue around the PATH_SEPARATOR_CHAR has come to bite the
mingw-w64 folks as well.  To that end, I was thinking if this patch
would be appropriate:

--- make.h.orig 2010-07-20 09:12:06 -0400
+++ make.h      2010-08-26 11:00:05 -0400
@@ -306,13 +306,15 @@
 #define S_(msg1,msg2,num)   ngettext (msg1,msg2,num)

 /* Handle other OSs.  */
-#ifndef PATH_SEPARATOR_CHAR
-# if defined(HAVE_DOS_PATHS)
-#  define PATH_SEPARATOR_CHAR ';'
-# elif defined(VMS)
-#  define PATH_SEPARATOR_CHAR ','
-# else
-#  define PATH_SEPARATOR_CHAR ':'
+#if defined(HAVE_DOS_PATHS)
+# undef PATH_SEPARATOR_CHAR
+# define PATH_SEPARATOR_CHAR ';'
+#elif defined(VMS)
+# undef PATH_SEPARATOR_CHAR
+# define PATH_SEPARATOR_CHAR ','
+#else
+# ifndef PATH_SEPARATOR_CHAR
+#   define PATH_SEPARATOR_CHAR ':'
 # endif
 #endif

Given the assumption that the PATH_SEPARATOR_CHAR is ';' for
HAVE_DOS_PATHS and ',' for VMS, irregardless of what
PATH_SEPARATOR_CHAR was set to previously.

Thoughts?

Chris

-- 
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.