From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.devel 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 Message-ID: <518bc279-ee83-356a-51af-fd348d32aa4f@cornell.edu> References: <20160901171604.9042.16589@vcs.savannah.gnu.org> <20160901171604.8DF4D22016A@vcs.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1472759878 27202 195.159.176.226 (1 Sep 2016 19:57:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Sep 2016 19:57:58 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 Cc: Angelo Graziosi To: emacs-devel@gnu.org, Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 01 21:57:54 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bfY7S-0006Jb-Q3 for ged-emacs-devel@m.gmane.org; Thu, 01 Sep 2016 21:57:50 +0200 Original-Received: from localhost ([::1]:38781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfY7Q-0007B0-ID for ged-emacs-devel@m.gmane.org; Thu, 01 Sep 2016 15:57:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfY7I-0007AO-2z for emacs-devel@gnu.org; Thu, 01 Sep 2016 15:57:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfY7H-0001O6-9V for emacs-devel@gnu.org; Thu, 01 Sep 2016 15:57:40 -0400 Original-Received: from limerock02.mail.cornell.edu ([128.84.13.242]:39030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfY7B-0001NO-No; Thu, 01 Sep 2016 15:57:33 -0400 X-CornellRouted: This message has been Routed already. Original-Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limerock02.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id u81Jv4SK004791; Thu, 1 Sep 2016 15:57:04 -0400 Original-Received: from [192.168.1.5] (mta-68-175-148-36.twcny.rr.com [68.175.148.36] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id u81Jv24Y032559 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 1 Sep 2016 15:57:03 -0400 In-Reply-To: <20160901171604.8DF4D22016A@vcs.savannah.gnu.org> X-PMX-Cornell-Gauge: Gauge=XXXXX X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 128.84.13.242 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:207098 Archived-At: 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) } #endif +#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 Ken