From 9485354a5542f901dbca9f96930d036bdbdaaf8b Mon Sep 17 00:00:00 2001 From: Neil Mushell Date: Mon, 2 Nov 2015 21:12:24 +0100 Subject: [PATCH] Fix build on Solaris 10+ and AIX 7 --- ccache.h | 2 ++ m4/feature_macros.m4 | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ccache.h b/ccache.h index 0015c5019..1354423c4 100644 --- a/ccache.h +++ b/ccache.h @@ -276,6 +276,8 @@ void add_exe_ext_if_no_to_fullpath(char *full_path_win_ext, size_t max_size, # define PATH_DELIM ":" #endif +#ifndef MAX #define MAX(a, b) (((a) > (b)) ? (a) : (b)) +#endif #endif /* ifndef CCACHE_H */ diff --git a/m4/feature_macros.m4 b/m4/feature_macros.m4 index 324049439..0243e9f34 100644 --- a/m4/feature_macros.m4 +++ b/m4/feature_macros.m4 @@ -95,7 +95,7 @@ case $ac_sys_system/$ac_sys_release in # or has another value. By not (re)defining it, the defaults come in place. AIX/4) define_xopen_source=no;; - AIX/5) + AIX/5|AIX/7) if test `uname -r` -eq 1; then define_xopen_source=no fi @@ -132,7 +132,9 @@ then # except for Solaris 10, where it must not be defined, # as it implies XPG4.2 case $ac_sys_system/$ac_sys_release in - SunOS/5.10) + SunOS/5.10|SunOS/5.11) + AC_DEFINE(__EXTENSIONS__, 1, + Define to activate Unix95-and-earlier features) ;; *) AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, -- 2.47.2