INLINE int
__hscore_sigismember( sigset_t * set, int s )
{ return sigismember(set,s); }
+
+INLINE int
+__hscore_utime( const char *file, const struct utimbuf *timep )
+{ return utime(file,timep); }
#endif
// This is used by dph:Data.Array.Parallel.Arr.BUArr, and shouldn't be
extern void hsFD_ZERO(fd_set *fds);
#endif
+INLINE int __hscore_select(int nfds, fd_set *readfds, fd_set *writefds,
+ fd_set *exceptfds, struct timeval *timeout) {
+ return (select(nfds,readfds,writefds,exceptfds,timeout));
+}
+
// gettimeofday()-related
#if !defined(__MINGW32__)
}
#endif /* !defined(__MINGW32__) */
+#if darwin_HOST_OS
+// You should not access _environ directly on Darwin in a bundle/shared library.
+// See #2458 and http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man7/environ.7.html
+#include <crt_externs.h>
+INLINE char **__hscore_environ() { return *(_NSGetEnviron()); }
+#else
/* ToDo: write a feature test that doesn't assume 'environ' to
* be in scope at link-time. */
extern char** environ;
INLINE char **__hscore_environ() { return environ; }
+#endif
/* lossless conversions between pointers and integral types */
INLINE void * __hscore_from_uintptr(uintptr_t n) { return (void *)n; }