Fix compilation warnings and errors on OpenSolaris caused by a few of

our source feature macros.
This commit is contained in:
Sam Hocevar 2010-01-21 01:17:01 +00:00 committed by sam
parent 55339f7d8a
commit bc58be1c91
2 changed files with 3 additions and 1 deletions

View File

@ -36,7 +36,7 @@
/* Need this to include <libc.h> on OS X */
#define _DARWIN_C_SOURCE
/* Use this to get posix_memalign */
#if defined HAVE_POSIX_MEMALIGN
#if defined HAVE_POSIX_MEMALIGN && !defined __sun
# undef _XOPEN_SOURCE
# define _XOPEN_SOURCE 600
#endif

View File

@ -22,6 +22,8 @@
#define _INCLUDE_POSIX_SOURCE
/* Needed for fgets_unlocked() */
#define _GNU_SOURCE
/* Needed for getc_unlocked() on OpenSolaris */
#define __EXTENSIONS__
#if defined HAVE_STDINT_H
# include <stdint.h>