summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-02-15 15:00:57 +0000
committerVincent Sanders <vince@kyllikki.org>2016-02-15 15:00:57 +0000
commiteaed6b1dda2bc617c0aa6b06df4a30db43d5e355 (patch)
tree85e3665f7d37252863d86af3bbeaf70102880ec0
parentb9f58cdf773e2a784dc616b78f54fed81f428d19 (diff)
downloadnetsurf-eaed6b1dda2bc617c0aa6b06df4a30db43d5e355.tar.gz
netsurf-eaed6b1dda2bc617c0aa6b06df4a30db43d5e355.tar.bz2
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.
-rw-r--r--utils/config.h8
-rw-r--r--utils/filename.h2
2 files changed, 5 insertions, 5 deletions
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 <stdbool.h>
-#ifdef riscos
+#ifdef __riscos__
#define TEMP_FILENAME_PREFIX "<Wimp$ScrapDir>/WWW/NetSurf/Misc"
#else
#define TEMP_FILENAME_PREFIX "/tmp/WWW/NetSurf/Misc"