svn commit: r1929717 - apr/apr/trunk/threadproc/win32

[email protected] Thu, 13 Nov 2025 18:27:58 -0000
Newsgroups gmane.comp.apache.apr.cvs
Message-ID <176305847806.3608756.2234564884993031619@svn02-us-east.apache.org>
Author: ivan
Date: Thu Nov 13 18:27:57 2025
New Revision: 1929717

Log:
Follow-up to r1929716: Move variable declaration at the beginning of scope to
support C89.

Modified:
   apr/apr/trunk/threadproc/win32/proc.c

Modified: apr/apr/trunk/threadproc/win32/proc.c
==============================================================================
--- apr/apr/trunk/threadproc/win32/proc.c	Thu Nov 13 16:44:46 2025	(r1929716)
+++ apr/apr/trunk/threadproc/win32/proc.c	Thu Nov 13 18:27:57 2025	(r1929717)
@@ -603,6 +603,7 @@ APR_DECLARE(apr_status_t) apr_proc_creat
                     || strcasecmp(progname + i - 4, ".cmd") == 0))
         {
             const char *argv0;
+            char *shellcmd;
 
             if (has_space(progname)) {
                 argv0 = apr_pstrcat(pool, "\"", progname, "\"", NULL);
@@ -611,7 +612,7 @@ APR_DECLARE(apr_status_t) apr_proc_creat
                 argv0 = progname;
             }
 
-            char *shellcmd = getenv("COMSPEC");
+            shellcmd = getenv("COMSPEC");
             if (!shellcmd) {
                 if (attr->errfn) {
                     attr->errfn(pool, APR_EINVAL, "COMSPEC envar is not set");