summaryrefslogtreecommitdiffstats
path: root/lib/libstand/stand.h
diff options
context:
space:
mode:
authoravatar <avatar@FreeBSD.org>2011-07-10 07:25:34 +0000
committeravatar <avatar@FreeBSD.org>2011-07-10 07:25:34 +0000
commitde81e76acbf0a83607cad211431cd0cc9538007a (patch)
tree88960d5ccb777573dddd5c69d68bad3af01c8997 /lib/libstand/stand.h
parentdb822870d75a60b6d4bff7a2f77202322076e66d (diff)
downloadFreeBSD-src-de81e76acbf0a83607cad211431cd0cc9538007a.zip
FreeBSD-src-de81e76acbf0a83607cad211431cd0cc9538007a.tar.gz
- Removing some unneeded definitions of NULL(cruft related to 1970's C).
In C90, NULL is guaranteed to be declared in <stddef.h> and also in <string.h>. Though the correct way to define NULL in FreeBSD is to include <sys/_null.h>, other parts of libstand still require <string.h> to build; therefore, we keep <string.h> in stand.h and add a note about this; - Removing no longer used 'Prototype' definition. Quote from bde@: 'Cruft related to getting incomplete struct declarations within prototypes forward-declared before the structs. It doesn't mean "prototype" but only part of a prototype-related hack. No longer used.' - Replacing iaddr_t with uintptr_t; - Removing use of long double to determine alignment. Use a fixed 16 byte alignment instead; Reviewed by: bde Obtained from: DragonFlyBSD (partially) MFC after: 1 month
Diffstat (limited to 'lib/libstand/stand.h')
-rw-r--r--lib/libstand/stand.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libstand/stand.h b/lib/libstand/stand.h
index eae1605..db0490f 100644
--- a/lib/libstand/stand.h
+++ b/lib/libstand/stand.h
@@ -65,15 +65,13 @@
#include <sys/cdefs.h>
#include <sys/stat.h>
#include <sys/dirent.h>
+
+/* this header intentionally exports NULL from <string.h> */
#include <string.h>
#define CHK(fmt, args...) printf("%s(%d): " fmt "\n", __func__, __LINE__ , ##args)
#define PCHK(fmt, args...) {printf("%s(%d): " fmt "\n", __func__, __LINE__ , ##args); getchar();}
-#ifndef NULL
-#define NULL 0
-#endif
-
/* Avoid unwanted userlandish components */
#define _KERNEL
#include <sys/errno.h>
OpenPOWER on IntegriCloud