*
* Win32 Console API support
*/
-#include "ghcconfig.h"
-#if defined(mingw32_HOST_OS) || defined(cygwin32_HOST_OS) || defined(__MINGW32__) || defined(_MSC_VER)
+#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32) || defined(__CYGWIN__)
/* to the end */
#include "consUtils.h"
#include <windows.h>
#include <io.h>
-#if defined(cygwin32_HOST_OS)
+#if defined(__CYGWIN__)
#define _get_osfhandle get_osfhandle
#endif
return -1;
}
-#endif /* defined(mingw32_HOST_OS) || ... */
+#endif /* defined(__MINGW32__) || ... */
* Directory Runtime Support
*/
+/* needed only for solaris2_HOST_OS */
#include "ghcconfig.h"
// The following is required on Solaris to force the POSIX versions of
#include "HsBase.h"
-#if defined(mingw32_HOST_OS) || defined(__MINGW32__) || defined(_MSC_VER)
+#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)
#include <windows.h>
static
__hscore_renameFile( HsAddr src,
HsAddr dest)
{
-#if defined(mingw32_HOST_OS) || defined(__MINGW32__) || defined(_MSC_VER)
+#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)
static int forNT = -1;
/* ToDo: propagate error codes back */
* that have shell32's lacking that particular API.
*
*/
-#if defined(mingw32_HOST_OS) || defined(__MINGW32__) || defined(_MSC_VER)
+#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)
typedef HRESULT (*HSCORE_GETAPPFOLDERFUNTY)(HWND,int,HANDLE,DWORD,char*);
int
__hscore_getFolderPath(HWND hwndOwner,
-------------------------------------------------------------------------- */
#include "HsBase.h"
-#if !defined(mingw32_HOST_OS) /* to the end */
+#if !(defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)) /* to the end */
/* Evidently non-Posix. */
/* #include "PosixSource.h" */
inputReady(int fd, int msecs, int isSock)
{
if
-#ifndef mingw32_HOST_OS
- ( 1 ) {
-#else
+#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)
( isSock ) {
+#else
+ ( 1 ) {
#endif
int maxfd, ready;
fd_set rfd;
/* 1 => Input ready, 0 => not ready, -1 => error */
return (ready);
}
-#ifdef mingw32_HOST_OS
+#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)
else {
DWORD rc;
HANDLE hFile = (HANDLE)_get_osfhandle(fd);
* stdin/stout/stderr Runtime Support
*/
-#ifndef mingw32_HOST_OS
+#if !(defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32))
#include "HsBase.h"
#include "Rts.h"
#include "HsBase.h"
-#if defined(mingw32_HOST_OS)
+#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)
#include <windows.h>
#include <stdlib.h>
#endif
#include <signal.h>
#endif
-#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
+#if !(defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32))
/* ----------------------------------------------------------------------------
UNIX versions
------------------------------------------------------------------------- */
*/
#include "HsBase.h"
-#if defined(mingw32_HOST_OS) /* to the end */
+#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32) /* to the end */
HsAddr __hscore_timezone( void )
{ return (HsAddr)&_timezone; }
# do we have long longs?
AC_CHECK_TYPES([long long])
+dnl ** Working vfork?
+AC_FUNC_FORK
+
+dnl ** determine whether or not const works
+AC_C_CONST
+
+dnl ** check for full ANSI header (.h) files
+AC_HEADER_STDC
+
# check for specific header (.h) files that we are interested in
-AC_CHECK_HEADERS([ctype.h fcntl.h signal.h sys/resource.h termios.h time.h])
+AC_CHECK_HEADERS([ctype.h dirent.h errno.h fcntl.h limits.h signal.h sys/resource.h sys/select.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/utsname.h sys/wait.h termios.h time.h utime.h windows.h winsock.h])
# Enable large file support. Do this before testing the types ino_t, off_t, and
# rlim_t, because it will affect the result of that test.
AC_CHECK_HEADERS([wctype.h], [AC_CHECK_FUNCS(iswspace)])
AC_CHECK_FUNCS([ftime gmtime_r localtime_r lstat readdir_r])
-
+AC_CHECK_FUNCS([getclock getrusage gettimeofday setitimer times])
AC_CHECK_FUNCS([_chsize ftruncate])
dnl ** check if it is safe to include both <time.h> and <sys/time.h>
#ifndef __HSBASE_H__
#define __HSBASE_H__
-#include "ghcconfig.h"
-
#include "HsBaseConfig.h"
/* ultra-evil... */
-#include "ghcconfig.h"
-
name: PACKAGE
version: VERSION
license: BSD3
hs-libraries: "HSbase"
extra-libraries: "HSbase_cbits"
-#if defined(mingw32_HOST_OS) || defined(__MINGW32__) || defined(_MSC_VER)
+#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)
, "wsock32", "msvcrt", "kernel32", "user32", "shell32"
#endif