aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/_null.h
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2003-12-15 10:25:18 +0000
committerPeter Wemm <peter@FreeBSD.org>2003-12-15 10:25:18 +0000
commit61cf13a8cff6ac5a1569774bcb320d0e738c732b (patch)
treec0ef74cde7de35737636e0f17e2307bfc04392b5 /sys/sys/_null.h
parentad1c13f493a41c09d9a6f9f6bb9310933be590e1 (diff)
downloadsrc-61cf13a8cff6ac5a1569774bcb320d0e738c732b.tar.gz
src-61cf13a8cff6ac5a1569774bcb320d0e738c732b.zip
amd64 doesn't define __LP64__ in the compiler, but it definately needs
this definition. It fixes gnome for starters. I haven't tried *emacs yet. Like IA64, amd64 uses registers for the first few arguments and then the stack for the rest. This means the 64 bit promotion of the NULL (0) value is lost and its just pushed on as an 'int' in a varargs call. When the consumer walks the list and expects to pull off void * pointers via va_arg, then all hell breaks loose. Marcel: thanks a million for finding this!
Notes
Notes: svn path=/head/; revision=123544
Diffstat (limited to 'sys/sys/_null.h')
-rw-r--r--sys/sys/_null.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/_null.h b/sys/sys/_null.h
index 682fea4006ec..36552546e2b1 100644
--- a/sys/sys/_null.h
+++ b/sys/sys/_null.h
@@ -28,7 +28,7 @@
#ifndef NULL
-#ifdef __LP64__
+#if defined(__LP64__) || defined(__amd64__)
#define NULL 0L
#else
#define NULL 0