[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/4] Compilation cleanups
From: |
Daniel Colascione |
Subject: |
[PATCH 1/4] Compilation cleanups |
Date: |
Thu, 29 Dec 2011 06:03:20 -0800 |
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
Re: [PATCH 4/4] Fix emacsclient to work with cygw32, Eli Zaretskii, 2011/12/29