#ifndef __HSBASE_H__
#define __HSBASE_H__
+#ifdef __NHC__
+# include "Nhc98BaseConfig.h"
+#else
#include "HsBaseConfig.h"
+#endif
/* ultra-evil... */
#undef PACKAGE_BUGREPORT
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
#elif defined(HAVE__CHSIZE)
return _chsize(fd,where);
#else
+// ToDo: we should use _chsize_s() on Windows which allows a 64-bit
+// offset, but it doesn't seem to be available from mingw at this time
+// --SDM (01/2008)
#error at least ftruncate or _chsize functions are required to build
#endif
}
INLINE stsize_t __hscore_st_size ( struct_stat* st ) { return st->st_size; }
#if !defined(_MSC_VER)
INLINE mode_t __hscore_st_mode ( struct_stat* st ) { return st->st_mode; }
-INLINE mode_t __hscore_st_dev ( struct_stat* st ) { return st->st_dev; }
-INLINE mode_t __hscore_st_ino ( struct_stat* st ) { return st->st_ino; }
+INLINE dev_t __hscore_st_dev ( struct_stat* st ) { return st->st_dev; }
+INLINE ino_t __hscore_st_ino ( struct_stat* st ) { return st->st_ino; }
#endif
#if HAVE_TERMIOS_H
#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); }
INLINE uintptr_t __hscore_to_uintptr (void *p) { return (uintptr_t)p; }
INLINE intptr_t __hscore_to_intptr (void *p) { return (intptr_t)p; }
+void errorBelch2(const char*s, char *t);
+void debugBelch2(const char*s, char *t);
+
#endif /* __HSBASE_H__ */