[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master a3a3ea0: Avoid another compiler warning on macOS
From: |
Philipp Stephani |
Subject: |
[Emacs-diffs] master a3a3ea0: Avoid another compiler warning on macOS |
Date: |
Sat, 27 May 2017 09:29:59 -0400 (EDT) |
branch: master
commit a3a3ea0762d0e5d3b2cb8259a515a468736050d1
Author: Philipp Stephani <address@hidden>
Commit: Philipp Stephani <address@hidden>
Avoid another compiler warning on macOS
When configured with --without-ns, HAVE_NS is not defined on macOS,
thus 'memory-limit' calls the deprecated sbrk(2) function. Avoid that
by using the pre-defined __APPLE__ preprocessor macro.
* src/alloc.c (Fmemory_limit): Never use sbrk(2) on macOS.
---
src/alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/alloc.c b/src/alloc.c
index b473ebd..a1a8594 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -7160,7 +7160,7 @@ We divide the value by 1024 to make sure it fits in a
Lisp integer. */)
{
Lisp_Object end;
-#if defined HAVE_NS || !HAVE_SBRK
+#if defined HAVE_NS || defined __APPLE__ || !HAVE_SBRK
/* Avoid warning. sbrk has no relation to memory allocated anyway. */
XSETINT (end, 0);
#else
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master a3a3ea0: Avoid another compiler warning on macOS,
Philipp Stephani <=