summaryrefslogtreecommitdiff
path: root/src/unexmacosx.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-09-16 18:01:39 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2016-09-16 18:02:06 -0700
commitb458ac205ebfdb532ee26ed4ea04000869bb37d0 (patch)
tree57e313520a2e67c75447732cd19a6e222b20cc5b /src/unexmacosx.c
parent33f856ba01d13f649cf5c848b322ecb0dbfc02fc (diff)
downloademacs-b458ac205ebfdb532ee26ed4ea04000869bb37d0.tar.gz
Define _GNU_SOURCE in unexmacosx.c
Problem reported by Bob Halley in: http://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00427.html * src/unexmacosx.c (_GNU_SOURCE): Define if not already defined.
Diffstat (limited to 'src/unexmacosx.c')
-rw-r--r--src/unexmacosx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index bdacc8b540b..2ba67df8bc9 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -85,6 +85,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
be changed accordingly.
*/
+/* Make symbols like LLONG_WIDTH visible when the Gnulib <limits.h>
+ is included before <config.h>. */
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#endif
+
/* config.h #define:s malloc/realloc/free and then includes stdlib.h.
We want the undefined versions, but if config.h includes stdlib.h
with the #define:s in place, the prototypes will be wrong and we get