Rewrite of signal-handling (base patch; see also ghc and unix patches)
[ghc-base.git] / include / HsBase.h
index 1f1837b..862cf44 100644 (file)
@@ -9,7 +9,11 @@
 #ifndef __HSBASE_H__
 #define __HSBASE_H__
 
+#ifdef __NHC__
+# include "Nhc98BaseConfig.h"
+#else
 #include "HsBaseConfig.h"
+#endif
 
 /* ultra-evil... */
 #undef PACKAGE_BUGREPORT
@@ -229,7 +233,7 @@ INLINE int __hscore_s_isdir(mode_t m)  { return S_ISDIR(m);  }
 INLINE int __hscore_s_isfifo(mode_t m) { return S_ISFIFO(m); }
 INLINE int __hscore_s_isblk(mode_t m)  { return S_ISBLK(m);  }
 INLINE int __hscore_s_ischr(mode_t m)  { return S_ISCHR(m);  }
-#ifdef S_ISSOCK
+#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
 INLINE int __hscore_s_issock(mode_t m) { return S_ISSOCK(m); }
 #endif
 #endif
@@ -628,6 +632,13 @@ INLINE int __hscore_sig_setmask( void )
 #endif
 }
 
+#ifndef __MINGW32__
+INLINE size_t __hscore_sizeof_siginfo_t (void)
+{
+    return sizeof(siginfo_t);
+}
+#endif
+
 INLINE int
 __hscore_f_getfl( void )
 {
@@ -687,15 +698,10 @@ INLINE int __hscore_fstat(int fd, struct_stat *buf) {
        return (fstat(fd,buf));
 }
 
-INLINE int __hscore_mkstemp(char *filetemplate) {
-    return (mkstemp(filetemplate));
-}
-
 // select-related stuff
 
 #if !defined(__MINGW32__)
 INLINE int  hsFD_SETSIZE(void) { return FD_SETSIZE; }
-INLINE void hsFD_CLR(int fd, fd_set *fds) { FD_CLR(fd, fds); }
 INLINE int  hsFD_ISSET(int fd, fd_set *fds) { return FD_ISSET(fd, fds); }
 INLINE void hsFD_SET(int fd, fd_set *fds) { FD_SET(fd, fds); }
 INLINE HsInt sizeof_fd_set(void) { return sizeof(fd_set); }