summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKen Brown <kbrown@cornell.edu>2014-09-27 16:58:05 -0400
committerKen Brown <kbrown@cornell.edu>2014-09-27 16:58:05 -0400
commit6c300919bc93033a6cad137e94bf6b1653428256 (patch)
treeeb514f9fb001a1da80597532b2eea58fe034ffbd /src
parent5551acd251f6ca0adea570a3b3781788fdae6a2a (diff)
downloademacs-6c300919bc93033a6cad137e94bf6b1653428256.tar.gz
Fix implementation of HYBRID_MALLOC on Cygwin.
* src/sheap.c (bss_sbrk_buffer_end): Cast to void *. (bss_sbrk_buffer_beg): New variable. Use it... * src/gmalloc.c (ALLOCATED_BEFORE_DUMPING) [CYGWIN]: ...here, to fix incorrect definition.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/gmalloc.c6
-rw-r--r--src/sheap.c4
3 files changed, 14 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 53353ffc096..2e1952a0983 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
+2014-09-27 Ken Brown <kbrown@cornell.edu>
+
+ Fix implementation of HYBRID_MALLOC on Cygwin.
+ * sheap.c (bss_sbrk_buffer_end): Cast to void *.
+ (bss_sbrk_buffer_beg): New variable. Use it...
+ * gmalloc.c (ALLOCATED_BEFORE_DUMPING) [CYGWIN]: ...here, to fix
+ incorrect definition.
+
2014-09-27 Stefan Monnier <monnier@iro.umontreal.ca>
* keyboard.c (track-mouse): Rename to internal--track-mouse.
diff --git a/src/gmalloc.c b/src/gmalloc.c
index 2682b07ee47..20ffe5f605f 100644
--- a/src/gmalloc.c
+++ b/src/gmalloc.c
@@ -75,11 +75,11 @@ extern void emacs_abort (void);
#ifdef CYGWIN
extern void *bss_sbrk (ptrdiff_t size);
extern int bss_sbrk_did_unexec;
-extern char *bss_sbrk_buffer;
-extern char *bss_sbrk_buffer_end;
+extern void *bss_sbrk_buffer_beg;
+extern void *bss_sbrk_buffer_end;
#define DUMPED bss_sbrk_did_unexec
#define ALLOCATED_BEFORE_DUMPING(P) \
- ((char *) (P) < bss_sbrk_buffer_end && (char *) (P) >= bss_sbrk_buffer)
+ ((P) < bss_sbrk_buffer_end && (P) >= bss_sbrk_buffer_beg)
#endif
#ifdef __cplusplus
diff --git a/src/sheap.c b/src/sheap.c
index dc34df59556..2c85dd43635 100644
--- a/src/sheap.c
+++ b/src/sheap.c
@@ -44,7 +44,9 @@ int debug_sheap = 0;
#define BLOCKSIZE 4096
char bss_sbrk_buffer[STATIC_HEAP_SIZE];
-char *bss_sbrk_buffer_end = bss_sbrk_buffer + STATIC_HEAP_SIZE;
+/* The following two variables are needed in gmalloc.c */
+void *bss_sbrk_buffer_beg = bss_sbrk_buffer;
+void *bss_sbrk_buffer_end = bss_sbrk_buffer + STATIC_HEAP_SIZE;
char *bss_sbrk_ptr;
char *max_bss_sbrk_ptr;
int bss_sbrk_did_unexec;