# define _XOPEN_SOURCE 500
#elif defined(__FreeBSD__)
# define _XOPEN_SOURCE 700
+#elif defined(__ibmxl__) && defined(__clang__) // Compiler xlclang
+# define _XOPEN_SOURCE 600
+# define _ALL_SOURCE 1
#elif !defined(__SunOS_5_11) && !defined(__APPLE__)
# define _XOPEN_SOURCE
#endif
// Define if you have the "PTHREAD_MUTEX_ROBUST" constant.
#cmakedefine HAVE_PTHREAD_MUTEX_ROBUST
+
+#if defined(__ibmxl__) && defined(__clang__) // Compiler xlclang
+# undef HAVE_VARARGS_H // varargs.h would hide macros of stdarg.h
+# undef HAVE_STRUCT_STAT_ST_CTIM
+# undef HAVE_STRUCT_STAT_ST_MTIM
+#endif
// function is available in libc.a. This extern define ensures that it is
// usable within the ccache code base.
#ifdef _AIX
-extern int usleep(useconds_t);
+extern "C" int usleep(useconds_t);
#endif
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
{
#ifdef _WIN32
const char error[] = "failed to rmdir .: Permission denied";
+#elif defined(_AIX)
+ const char error[] = "failed to rmdir .: Device busy";
#else
const char error[] = "failed to rmdir .: Invalid argument";
#endif