[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master 0c94b84: * nt/inc/ms-w32.h (execve) [MINGW_W64]

From: Ken Brown
Subject: Re: [Emacs-diffs] master 0c94b84: * nt/inc/ms-w32.h (execve) [MINGW_W64]: Make commentary more accurate.
Date: Thu, 1 Sep 2016 15:57:00 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 9/1/2016 1:16 PM, Eli Zaretskii wrote:
+   However, using the prototype with intptr_t causes GCC to emit
+   warnings.  Fortunately, execve is not used in the MinGW build, but
+   the code that references it is still compiled.  */

Wouldn't it be easier to prevent that code from being compiled? Then you could just remove the prototype. It seems confusing to include a prototype and several lines of commentary for a function that's not used.

I think the following would suffice:

--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -146,6 +146,7 @@ disable_address_randomization (void)

+#ifndef WINDOWSNT
 /* Execute the program in FILE, with argument vector ARGV and environ
    ENVP.  Return an error number if unsuccessful.  This is like execve
    except it reenables ASLR in the executed program if necessary, and
@@ -170,6 +171,7 @@ emacs_exec_file (char const *file, char *const *argv, char *const *envp)

   return err;
+#endif /* not WINDOWSNT */

 /* If FD is not already open, arrange for it to be open with FLAGS.  */
 static void


reply via email to

[Prev in Thread] Current Thread [Next in Thread]