From eaed6b1dda2bc617c0aa6b06df4a30db43d5e355 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 15 Feb 2016 15:00:57 +0000 Subject: Use compiler environment to control riscos header usage Instead of relying on building the RISC OS frontend to determine correct include compatability use the compiler __riscos__ macro. --- utils/config.h | 8 ++++---- utils/filename.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'utils') diff --git a/utils/config.h b/utils/config.h index 2af38c0a3..6db2e0a3f 100644 --- a/utils/config.h +++ b/utils/config.h @@ -24,7 +24,7 @@ /* Try to detect which features the target OS supports */ -#if (defined(_GNU_SOURCE) && !defined(__APPLE__) || defined(__amigaos4__) || defined(__HAIKU__) || (defined(_POSIX_C_SOURCE) && ((_POSIX_C_SOURCE - 0) >= 200809L))) +#if (defined(_GNU_SOURCE) && !defined(__APPLE__) || defined(__amigaos4__) || defined(__HAIKU__) || (defined(_POSIX_C_SOURCE) && ((_POSIX_C_SOURCE - 0) >= 200809L)) && !defined(__riscos__)) #define HAVE_STRNDUP #else #undef HAVE_STRNDUP @@ -41,7 +41,7 @@ char *strcasestr(const char *haystack, const char *needle); /* Although these platforms might have strftime or strptime they * appear not to support the time_t seconds format specifier. */ -#if (defined(_WIN32) || defined(riscos) || defined(__HAIKU__) || defined(__BEOS__) || defined(__amigaos4__) || defined(__AMIGA__) || defined(__MINT__)) +#if (defined(_WIN32) || defined(__riscos__) || defined(__HAIKU__) || defined(__BEOS__) || defined(__amigaos4__) || defined(__AMIGA__) || defined(__MINT__)) #undef HAVE_STRPTIME #undef HAVE_STRFTIME #else @@ -52,7 +52,7 @@ char *strcasestr(const char *haystack, const char *needle); /* For some reason, UnixLib defines this unconditionally. Assume we're using * UnixLib if building for RISC OS. */ -#if ((defined(_GNU_SOURCE) && !defined(__APPLE__)) || defined(riscos)) +#if ((defined(_GNU_SOURCE) && !defined(__APPLE__)) || defined(__riscos__)) #define HAVE_STRCHRNUL #else #undef HAVE_STRCHRNUL @@ -108,7 +108,7 @@ char *realpath(const char *path, char *resolved_path); #endif #define HAVE_MMAP -#if (defined(_WIN32) || defined(riscos) || defined(__HAIKU__) || defined(__BEOS__) || defined(__amigaos4__) || defined(__AMIGA__) || defined(__MINT__)) +#if (defined(_WIN32) || defined(__riscos__) || defined(__HAIKU__) || defined(__BEOS__) || defined(__amigaos4__) || defined(__AMIGA__) || defined(__MINT__)) #undef HAVE_MMAP #endif diff --git a/utils/filename.h b/utils/filename.h index 709cb541a..bac0e6d43 100644 --- a/utils/filename.h +++ b/utils/filename.h @@ -21,7 +21,7 @@ #include -#ifdef riscos +#ifdef __riscos__ #define TEMP_FILENAME_PREFIX "/WWW/NetSurf/Misc" #else #define TEMP_FILENAME_PREFIX "/tmp/WWW/NetSurf/Misc" -- cgit v1.2.3