emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/4] Compilation cleanups


From: Ken Brown
Subject: Re: [PATCH 1/4] Compilation cleanups
Date: Sat, 31 Dec 2011 09:50:43 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0



On 12/29/2011 12:54 PM, Paul Eggert wrote:
On 12/29/11 06:03, Daniel Colascione wrote:

--- a/lib-src/update-game-score.c
+++ b/lib-src/update-game-score.c
@@ -48,8 +48,10 @@ along with GNU Emacs.  If not, 
see<http://www.gnu.org/licenses/>.  */
  #include<sys/stat.h>

  /* Needed for SunOS4, for instance.  */
+#if !defined(CYGWIN)
  extern char *optarg;
  extern int optind, opterr;
+#endif // !defined(CYGWIN)

I suggest replacing those lines with "#include<getopt.h>" instead;
that's what the other .c files do, and it's cleaner.


--- a/src/gmalloc.c
+++ b/src/gmalloc.c
...
-  if (ptr<  _heapbase)
+  if ((char*)ptr<  (char*)_heapbase)

No need to cast _heapbase as it's already a char *.
And please put a space after the ')', e.g.,
"(char*) ptr<  _heapbase", as that's the usual
Emacs style.

And as long as we're cleaning up, why don't we get rid of all those warnings about old-style function definitions in gmalloc.c. A revision of Daniel's patch that does this is attached.

Attachment: cleanup.patch
Description: Text document


reply via email to

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