diff --git a/configure b/configure index bc723443e..34374d7e1 100755 --- a/configure +++ b/configure @@ -150,7 +150,7 @@ case "$1" in --sysconfdir=*) echo "ignored option: --sysconfdir" | tee -a configure.log; shift ;; --localstatedir=*) echo "ignored option: --localstatedir" | tee -a configure.log; shift ;; -c* | --const) zconst=1; shift ;; - -w* | --warn) warn=$((warn + 1)); shift ;; + -w* | --warn) warn=`expr $warn + 1`; shift ;; -d* | --debug) debug=1; shift ;; --sanitize) address=1; shift ;; --address) address=1; shift ;; diff --git a/gzguts.h b/gzguts.h index 266305deb..2a1c243fc 100644 --- a/gzguts.h +++ b/gzguts.h @@ -37,8 +37,14 @@ # include #endif -#ifndef _POSIX_C_SOURCE -# define _POSIX_C_SOURCE 200112L +#ifdef __sun + #ifndef _POSIX_SOURCE + #define _POSIX_SOURCE + #endif +#else + #ifndef _POSIX_C_SOURCE + # define _POSIX_C_SOURCE 200112L + #endif #endif #include diff --git a/test/minigzip.c b/test/minigzip.c index 40da8736f..339cd966b 100644 --- a/test/minigzip.c +++ b/test/minigzip.c @@ -15,8 +15,14 @@ /* @(#) $Id$ */ -#ifndef _POSIX_C_SOURCE -# define _POSIX_C_SOURCE 200112L +#ifdef __sun + #ifndef _POSIX_SOURCE + #define _POSIX_SOURCE + #endif +#else + #ifndef _POSIX_C_SOURCE + # define _POSIX_C_SOURCE 200112L + #endif #endif #if defined(_WIN32) && !defined(_CRT_SECURE_NO_WARNINGS)