[project @ 2005-09-19 23:24:31 by ross]
[haskell-directory.git] / include / HsBase.h
index 6471aa1..935da37 100644 (file)
@@ -210,10 +210,10 @@ StgWord64 stg_integerToWord64 (StgInt sa, StgByteArray /* Really: mp_limb_t* */
 #ifndef INLINE
 # if defined(_MSC_VER)
 #  define INLINE extern __inline
-# elif defined(__HUGS__)
-#  define INLINE INLINE_ONLY
-# else
+# elif defined(__GNUC__)
 #  define INLINE extern inline
+# else
+#  define INLINE inline
 # endif
 #endif
 
@@ -417,6 +417,8 @@ __hscore_setmode( HsInt fd, HsBool toBin )
 #endif
 }
 
+#if __GLASGOW_HASKELL__
+
 INLINE HsInt
 __hscore_PrelHandle_write( HsInt fd, HsAddr ptr, HsInt off, int sz )
 {
@@ -444,6 +446,8 @@ __hscore_PrelHandle_recv( HsInt fd, HsAddr ptr, HsInt off, int sz )
 }
 #endif
 
+#endif /* __GLASGOW_HASKELL__ */
+
 #if defined(mingw32_HOST_OS) || defined(_MSC_VER)
 INLINE long *
 __hscore_Time_ghcTimezone( void ) { return &_timezone; }
@@ -723,7 +727,7 @@ INLINE void setTimevalTicks(struct timeval *p, HsInt ticks)
     p->tv_sec  = ticks / TICK_FREQ;
     p->tv_usec = (ticks % TICK_FREQ) * (1000000 / TICK_FREQ);
 }
-#endif // !defined(mingw32_HOST_OS)
+#endif /* !defined(mingw32_HOST_OS) */
 
 // Directory-related
 
@@ -751,6 +755,10 @@ INLINE int __hscore_CSIDL_WINDOWS()  { return CSIDL_WINDOWS;  }
 INLINE int __hscore_CSIDL_PERSONAL() { return CSIDL_PERSONAL; }
 #endif
 
+#if defined(mingw32_HOST_OS)
+INLINE unsigned int __hscore_get_osver(void) { return _osver; }
+#endif
+
 /* ToDo: write a feature test that doesn't assume 'environ' to
  *    be in scope at link-time. */
 extern char** environ;