diff options
Diffstat (limited to 'src/os/unix')
| -rw-r--r-- | src/os/unix/ngx_freebsd_config.h | 5 | ||||
| -rw-r--r-- | src/os/unix/ngx_linux_config.h | 14 | ||||
| -rw-r--r-- | src/os/unix/ngx_solaris_config.h | 6 | ||||
| -rw-r--r-- | src/os/unix/ngx_types.h | 16 |
4 files changed, 17 insertions, 24 deletions
diff --git a/src/os/unix/ngx_freebsd_config.h b/src/os/unix/ngx_freebsd_config.h index 7c229a417..0a7eedd10 100644 --- a/src/os/unix/ngx_freebsd_config.h +++ b/src/os/unix/ngx_freebsd_config.h @@ -22,6 +22,11 @@ #include <osreldate.h> +#define QD_FMT "%qd" +#define QX_FMT "%qx" +#define OFF_FMT "%qd" + + #ifndef HAVE_SELECT #define HAVE_SELECT 1 #endif diff --git a/src/os/unix/ngx_linux_config.h b/src/os/unix/ngx_linux_config.h index b90792c96..96e1d8856 100644 --- a/src/os/unix/ngx_linux_config.h +++ b/src/os/unix/ngx_linux_config.h @@ -2,25 +2,20 @@ #define _NGX_LINUX_CONFIG_H_INCLUDED_ +#define _GNU_SOURCE /* pread, pwrite, gethostname, bzero */ + #define _FILE_OFFSET_BITS 64 #define _LARGEFILE_SOURCE -#define _XOPEN_SOURCE 500 /* pread, pwrite */ #include <unistd.h> -#undef _XOPEN_SOURCE 500 - #include <stddef.h> /* offsetof */ #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <signal.h> #include <time.h> - -#define __USE_BSD /* bzero */ #include <string.h> -#undef __USE_BSD - #include <sys/types.h> #include <sys/time.h> #include <sys/select.h> @@ -39,6 +34,11 @@ typedef unsigned short u_short; typedef unsigned char u_char; +#define QD_FMT "%qd" +#define QX_FMT "%qx" +#define OFF_FMT "%qd" + + #ifndef HAVE_SELECT #define HAVE_SELECT 1 #endif diff --git a/src/os/unix/ngx_solaris_config.h b/src/os/unix/ngx_solaris_config.h index 31e17e1c1..e7946449d 100644 --- a/src/os/unix/ngx_solaris_config.h +++ b/src/os/unix/ngx_solaris_config.h @@ -5,8 +5,8 @@ #define SOLARIS 1 #define _REENTRANT -#define _FILE_OFFSET_BITS 64 /* must be before sys/types.h */ +#define _FILE_OFFSET_BITS 64 /* must be before sys/types.h */ #include <unistd.h> #include <stddef.h> /* offsetof */ @@ -27,6 +27,10 @@ typedef uint32_t u_int32_t; +#define QD_FMT "%lld" +#define QX_FMT "%llx" +#define OFF_FMT "%lld" + #ifndef HAVE_SELECT #define HAVE_SELECT 1 diff --git a/src/os/unix/ngx_types.h b/src/os/unix/ngx_types.h index bf61ae2d9..8d6065027 100644 --- a/src/os/unix/ngx_types.h +++ b/src/os/unix/ngx_types.h @@ -12,20 +12,4 @@ typedef int ngx_fd_t; typedef struct stat ngx_file_info_t; - -#ifdef SOLARIS - -#define QD_FMT "%lld" -#define QX_FMT "%llx" -#define OFF_FMT "%lld" - -#else - -#define QD_FMT "%qd" -#define QX_FMT "%qx" -#define OFF_FMT "%qd" - -#endif - - #endif /* _NGX_TYPES_H_INCLUDED_ */ |
