]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure: don't set HAVE_WRITABLE_ARGV on Windows
authorDaniel Stenberg <daniel@haxx.se>
Thu, 6 Apr 2023 07:58:13 +0000 (09:58 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 6 Apr 2023 21:52:26 +0000 (23:52 +0200)
Ref: #10888
Closes #10896

configure.ac

index c95b4aacea8043d94f69f0ae0c7320bab66489e3..d54d8b26457c99eca1083d9ffc15255c4a694846 100644 (file)
@@ -1794,9 +1794,17 @@ AC_MSG_CHECKING([if argv can be written to])
 CURL_RUN_IFELSE([[
 int main(int argc, char **argv)
 {
+#ifdef _WIN32
+  /* on Windows, writing to the argv does not hide the argument in
+     process lists so it can just be skipped */
+  (void)argc;
+  (void)argv;
+  return 1;
+#else
   (void)argc;
   argv[0][0] = ' ';
   return (argv[0][0] == ' ')?0:1;
+#endif
 }
 ]],[
   curl_cv_writable_argv=yes