From 2077918805c175ecefeb25dd38f78d2d5b3a3ca2 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 9 Sep 2010 21:45:59 +0000 Subject: Merge branches/vince/netsurf-file-fetcher to trunk r=jmb svn path=/trunk/netsurf/; revision=10750 --- utils/config.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'utils/config.h') diff --git a/utils/config.h b/utils/config.h index 4a4fa069c..f618102a2 100644 --- a/utils/config.h +++ b/utils/config.h @@ -20,6 +20,7 @@ #define _NETSURF_UTILS_CONFIG_H_ #include +#include /* Try to detect which features the target OS supports */ @@ -37,6 +38,21 @@ char *strndup(const char *s, size_t n); char *strcasestr(const char *haystack, const char *needle); #endif +/* fdopendir is actually present on most unix systems but unless + * _POSIX_C_SOURCE is set to 2008 it is not declared in the system + * headers. It is unavailable on RISC OS which requires fallback code + */ +#if (_POSIX_C_SOURCE - 0) >= 200809L +#define HAVE_FDOPENDIR +#else +#if defined(riscos) +#undef HAVE_FDOPENDIR +#else +#define HAVE_FDOPENDIR +DIR *fdopendir(int fd); +#endif +#endif + /* For some reason, UnixLib defines this unconditionally. * Assume we're using UnixLib if building for RISC OS. */ #if (defined(_GNU_SOURCE) || defined(riscos)) -- cgit v1.2.3