unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Daniel Colascione <dancol@dancol.org>
To: emacs-devel@gnu.org
Subject: [PATCH 1/4] Compilation cleanups
Date: Thu, 29 Dec 2011 06:03:20 -0800	[thread overview]
Message-ID: <0c9938df7c6041c406017cec0d16691d46d017f8.1325166472.git.dancol@dancol.org> (raw)
In-Reply-To: <cover.1325166472.git.dancol@dancol.org>

These fixes are necessary for compiling Emacs cleanly and without warnings.
---
 lib-src/update-game-score.c |    2 ++
 src/gmalloc.c               |    4 ++--
 src/unexcw.c                |    2 ++
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c
index e335617..5367f11 100644
--- 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)
 
 static int usage (int err) NO_RETURN;
 
diff --git a/src/gmalloc.c b/src/gmalloc.c
index 7b5e6df..099a34b 100644
--- a/src/gmalloc.c
+++ b/src/gmalloc.c
@@ -1076,7 +1076,7 @@ _free_internal_nolock (ptr)
     return;
 
 #ifdef CYGWIN
-  if (ptr < _heapbase)
+  if ((char*)ptr < (char*)_heapbase)
     /* We're being asked to free something in the static heap. */
     return;
 #endif
@@ -1428,7 +1428,7 @@ _realloc_internal_nolock (ptr, size)
     return _malloc_internal_nolock (size);
 
 #ifdef CYGWIN
-  if (ptr < _heapbase)
+  if ((char*)ptr < (char*)_heapbase)
     /* ptr points into the static heap */
     return special_realloc (ptr, size);
 #endif
diff --git a/src/unexcw.c b/src/unexcw.c
index 62df82e..0629420 100644
--- a/src/unexcw.c
+++ b/src/unexcw.c
@@ -31,6 +31,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #define DOTEXE ".exe"
 
+extern void report_sheap_usage (int);
+
 extern int bss_sbrk_did_unexec;
 
 extern int __malloc_initialized;
-- 
1.7.5.1





  parent reply	other threads:[~2011-12-29 14:03 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-29 14:03 [PATCH 0/4] Support Win32 GUI in Cygwin Emacs Daniel Colascione
2011-12-29 14:03 ` [PATCH 2/4] Refactor window-system configuration Daniel Colascione
2011-12-29 22:21   ` Dan Nicolaescu
2011-12-29 22:29     ` Daniel Colascione
2011-12-29 22:43       ` Dan Nicolaescu
2011-12-29 22:48         ` Daniel Colascione
2011-12-29 23:05           ` Dan Nicolaescu
2011-12-29 23:08             ` Daniel Colascione
2011-12-30  8:54             ` Eli Zaretskii
2011-12-30  9:07               ` Daniel Colascione
2011-12-30  9:44                 ` Eli Zaretskii
2011-12-30  0:53       ` Stefan Monnier
2011-12-30  8:21       ` Eli Zaretskii
2011-12-30  8:26         ` Daniel Colascione
2011-12-30  9:38           ` Eli Zaretskii
2011-12-30  9:45             ` Daniel Colascione
2011-12-30 11:15             ` Stefan Monnier
2011-12-30  8:19     ` Eli Zaretskii
2011-12-29 14:03 ` [PATCH 3/4] Implement cygw32 Daniel Colascione
2011-12-29 17:29   ` Eli Zaretskii
2011-12-29 17:53     ` Daniel Colascione
2011-12-29 18:17       ` Eli Zaretskii
2011-12-29 21:50         ` Daniel Colascione
2011-12-30  0:56           ` Jason Rumney
2011-12-30  9:23           ` Eli Zaretskii
2011-12-30  9:36             ` Daniel Colascione
2011-12-30 11:16               ` Eli Zaretskii
2011-12-30  9:49   ` Andreas Schwab
2011-12-29 14:03 ` Daniel Colascione [this message]
2011-12-29 17:54   ` [PATCH 1/4] Compilation cleanups Paul Eggert
2011-12-31 14:50     ` Ken Brown
2011-12-31 20:29       ` Paul Eggert
2011-12-29 14:03 ` [PATCH 4/4] Fix emacsclient to work with cygw32 Daniel Colascione
2011-12-29 16:28   ` Juanma Barranquero
2011-12-29 16:36     ` Daniel Colascione
2011-12-29 16:43       ` Juanma Barranquero
2011-12-29 16:47         ` Daniel Colascione
2011-12-29 16:49           ` Juanma Barranquero
2011-12-29 17:39   ` Eli Zaretskii
2011-12-29 17:56     ` Daniel Colascione
2011-12-29 18:18       ` Eli Zaretskii
2011-12-29 18:53         ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0c9938df7c6041c406017cec0d16691d46d017f8.1325166472.git.dancol@dancol.org \
    --to=dancol@dancol.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).