summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2014-07-12 13:01:18 +0300
committerEli Zaretskii <eliz@gnu.org>2014-07-12 13:01:18 +0300
commitfaeeb27166942f6841a408ef22192153ff0cb253 (patch)
tree01b40e161fa26f0627dc503481a56396f51543b4
parentcab353d1dd4dc98d322db4f698f3a20c2e6ffd5e (diff)
downloadgunmake-faeeb27166942f6841a408ef22192153ff0cb253.tar.gz
[SV 42695] Fix compilation error on MS-Windows.
* main.c [WINDOWS32]: Don't declare 'program' as 'const char *', since it is modified in 'main'.
-rw-r--r--main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.c b/main.c
index e5f7d38..0508ae1 100644
--- a/main.c
+++ b/main.c
@@ -480,7 +480,13 @@ static struct command_variable *command_variables;
/* The name we were invoked with. */
+#ifdef WINDOWS32
+/* On MS-Windows, we chop off the .exe suffix in 'main', so this
+ cannot be 'const'. */
+char *program;
+#else
const char *program;
+#endif
/* Our current directory before processing any -C options. */