* Add a few _INCLUDE_POSIX_SOURCE defines here and there so that we build
out of the box with HP-UX's c99 compiler.
This commit is contained in:
+2
-1
@@ -50,7 +50,8 @@ AC_CHECK_TYPES(socklen_t, [], [],
|
||||
#include <sys/socket.h>])
|
||||
|
||||
AC_MSG_CHECKING(for read() prototype)
|
||||
AC_TRY_COMPILE([#include <unistd.h>],
|
||||
AC_TRY_COMPILE([#define _INCLUDE_POSIX_SOURCE
|
||||
#include <unistd.h>],
|
||||
[ssize_t read(int fd, void *buf, size_t count);],
|
||||
[AC_MSG_RESULT(ssize_t read(... size_t);)
|
||||
AC_DEFINE(READ_USES_SSIZE_T, 1, [Define to 1 if read() uses ssize_t.])],
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#define _LARGEFILE64_SOURCE
|
||||
/* Use this to get proper prototypes on HP-UX systems */
|
||||
#define _XOPEN_SOURCE_EXTENDED
|
||||
#define _INCLUDE_POSIX_SOURCE
|
||||
|
||||
#if defined HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#define _BSD_SOURCE
|
||||
/* Use this to get mmap64() on glibc systems */
|
||||
#define _LARGEFILE64_SOURCE
|
||||
/* Use this to get ENOMEM on HP-UX */
|
||||
#define _INCLUDE_POSIX_SOURCE
|
||||
/* Use this to get posix_memalign */
|
||||
#if defined HAVE_POSIX_MEMALIGN
|
||||
# define _XOPEN_SOURCE 600
|
||||
|
||||
+3
-1
@@ -18,8 +18,10 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
/* needed for sighandler_t */
|
||||
/* Needed for sighandler_t on glibc systems */
|
||||
#define _GNU_SOURCE
|
||||
/* Needed for struct sigaction on HP-UX */
|
||||
#define _INCLUDE_POSIX_SOURCE
|
||||
|
||||
#if defined HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
/* Needed for STDERR_FILENO on HP-UX */
|
||||
#define _INCLUDE_POSIX_SOURCE
|
||||
|
||||
#if defined HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#elif defined HAVE_INTTYPES_H
|
||||
@@ -49,6 +52,9 @@
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#if defined HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
#if defined HAVE_SYS_WAIT_H
|
||||
# include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
+4
-1
@@ -14,7 +14,10 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define _LARGEFILE64_SOURCE /* for lseek64() */
|
||||
/* Needed for lseek64() */
|
||||
#define _LARGEFILE64_SOURCE
|
||||
/* Needed for O_RDONLY on HP-UX */
|
||||
#define _INCLUDE_POSIX_SOURCE
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
Reference in New Issue
Block a user