Catch up with changes in the main tree.
-# $Id: Makefile,v 1.1 2001/06/28 14:15:04 simonmar Exp $
+# $Id: Makefile,v 1.2 2001/07/31 11:51:09 simonmar Exp $
TOP = ../../..
include $(TOP)/mk/boilerplate.mk
-HSLIB = core
+PACKAGE = core
IS_CBITS_LIB = YES
SRC_CC_OPTS += -Wall -DCOMPILING_STDLIB -I../include -I../../../ghc/includes -I../../../ghc/rts
-ifeq "$(DLLized)" "YES"
-SRC_CC_OPTS += -dynamic
+ifeq "$(ILXized)" "YES"
+DLLized = YES
+C_SRCS += $(FPTOOLS_TOP)/ghc/rts/StgPrimFloat.c
+else
+C_SRCS := $(filter-out ilxstubs.c,$(C_SRCS))
endif
# -----------------------------------------------------------------------------
/*
* (c) The University of Glasgow, 2000-2001
*
- * $Id: errno.c,v 1.1 2001/06/28 14:15:04 simonmar Exp $
+ * $Id: errno.c,v 1.2 2001/07/31 11:51:09 simonmar Exp $
*
* GHC Error Number Conversion
*/
#include "HsCore.h"
/* Raw errno */
+/* Covers up the fact that on Windows this is a function */
int *ghcErrno(void) {
return &errno;
/*
* (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
*
- * $Id: inputReady.c,v 1.1 2001/06/28 14:15:04 simonmar Exp $
+ * $Id: inputReady.c,v 1.2 2001/07/31 11:51:09 simonmar Exp $
*
* hReady Runtime Support
*/
int
inputReady(int fd, int msecs)
{
- int maxfd, ready;
#ifndef mingw32_TARGET_OS
+ int maxfd, ready;
fd_set rfd;
struct timeval tv;
#endif
/*
* (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
*
- * $Id: system.c,v 1.1 2001/06/28 14:15:04 simonmar Exp $
+ * $Id: system.c,v 1.2 2001/07/31 11:51:09 simonmar Exp $
*
* system Runtime Support
*/
HsInt
systemCmd(HsAddr cmd)
{
+ /* -------------------- WINDOWS VERSION --------------------- */
#if defined(mingw32_TARGET_OS)
STARTUPINFO sInfo;
PROCESS_INFORMATION pInfo;
sInfo.lpTitle = NULL;
sInfo.dwFlags = 0;
- if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &sInfo, &pInfo))
+ if (!CreateProcess(NULL, cmd, NULL, NULL, TRUE, 0, NULL, NULL, &sInfo, &pInfo))
+ /* The 'TRUE' says that the created process should share
+ handles with the current process. This is vital to ensure
+ that error messages sent to stderr actually appear on the screen.
+ Since we are going to wait for the process to terminate anyway,
+ there is no problem with such sharing. */
+
return -1;
WaitForSingleObject(pInfo.hProcess, INFINITE);
if (GetExitCodeProcess(pInfo.hProcess, &retCode) == 0) return -1;
CloseHandle(pInfo.hProcess);
CloseHandle(pInfo.hThread);
return retCode;
+
#else
+ /* -------------------- UNIX VERSION --------------------- */
int pid;
int wstat;
/*
* (c) The GRASP/AQUA Project, Glasgow University, 1998
*
- * $Id: writeError.c,v 1.1 2001/06/28 14:15:04 simonmar Exp $
+ * $Id: writeError.c,v 1.2 2001/07/31 11:51:09 simonmar Exp $
*
* hPutStr Runtime Support
*/
#include "RtsUtils.h"
#include "HsCore.h"
-HsAddr
-addrOf_ErrorHdrHook(void)
-{
- return &ErrorHdrHook;
-}
-
void
writeErrString__ (HsAddr msg_hdr, HsAddr msg, HsInt len)
{
char* p = (char*)msg;
char nl = '\n';
+#ifndef DLLized
resetNonBlockingFd(2);
+#endif
/* Print error msg header */
if (msg_hdr) {