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.
This commit is contained in:
parent
b9f58cdf77
commit
eaed6b1dda
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
/* Try to detect which features the target OS supports */
|
/* 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
|
#define HAVE_STRNDUP
|
||||||
#else
|
#else
|
||||||
#undef HAVE_STRNDUP
|
#undef HAVE_STRNDUP
|
||||||
|
@ -41,7 +41,7 @@ char *strcasestr(const char *haystack, const char *needle);
|
||||||
/* Although these platforms might have strftime or strptime they
|
/* Although these platforms might have strftime or strptime they
|
||||||
* appear not to support the time_t seconds format specifier.
|
* 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_STRPTIME
|
||||||
#undef HAVE_STRFTIME
|
#undef HAVE_STRFTIME
|
||||||
#else
|
#else
|
||||||
|
@ -52,7 +52,7 @@ char *strcasestr(const char *haystack, const char *needle);
|
||||||
/* For some reason, UnixLib defines this unconditionally. Assume we're using
|
/* For some reason, UnixLib defines this unconditionally. Assume we're using
|
||||||
* UnixLib if building for RISC OS.
|
* 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
|
#define HAVE_STRCHRNUL
|
||||||
#else
|
#else
|
||||||
#undef HAVE_STRCHRNUL
|
#undef HAVE_STRCHRNUL
|
||||||
|
@ -108,7 +108,7 @@ char *realpath(const char *path, char *resolved_path);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define HAVE_MMAP
|
#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
|
#undef HAVE_MMAP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#ifdef riscos
|
#ifdef __riscos__
|
||||||
#define TEMP_FILENAME_PREFIX "<Wimp$ScrapDir>/WWW/NetSurf/Misc"
|
#define TEMP_FILENAME_PREFIX "<Wimp$ScrapDir>/WWW/NetSurf/Misc"
|
||||||
#else
|
#else
|
||||||
#define TEMP_FILENAME_PREFIX "/tmp/WWW/NetSurf/Misc"
|
#define TEMP_FILENAME_PREFIX "/tmp/WWW/NetSurf/Misc"
|
||||||
|
|
Loading…
Reference in New Issue