Skip to content

Instantly share code, notes, and snippets.

@okumura
Created March 10, 2011 12:34
Show Gist options
  • Save okumura/864031 to your computer and use it in GitHub Desktop.
Save okumura/864031 to your computer and use it in GitHub Desktop.
NULL definition on Darwin
#ifdef __cplusplus
#ifdef __GNUG__
#define __DARWIN_NULL __null
#else /* ! __GNUG__ */
#ifdef __LP64__
#define __DARWIN_NULL (0L)
#else /* !__LP64__ */
#define __DARWIN_NULL 0
#endif /* __LP64__ */
#endif /* __GNUG__ */
#else /* ! __cplusplus */
#define __DARWIN_NULL ((void *)0)
#endif /* __cplusplus */
#ifndef NULL
#define NULL __DARWIN_NULL
#endif /* ! NULL */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment