From: rrt Date: Fri, 26 Jan 2001 17:51:40 +0000 (+0000) Subject: [project @ 2001-01-26 17:51:40 by rrt] X-Git-Tag: Approximately_9120_patches~2799 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=fb54c85bdba70f811596d22c50be94699fcdcd7a;p=ghc-hetmet.git [project @ 2001-01-26 17:51:40 by rrt] Windows fixes. --- diff --git a/ghc/lib/std/cbits/errno.c b/ghc/lib/std/cbits/errno.c index 3364aaa..ad6c7fc 100644 --- a/ghc/lib/std/cbits/errno.c +++ b/ghc/lib/std/cbits/errno.c @@ -1,7 +1,7 @@ /* * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998 * - * $Id: errno.c,v 1.3 1998/12/02 13:27:20 simonm Exp $ + * $Id: errno.c,v 1.4 2001/01/26 17:51:40 rrt Exp $ * * GHC Error Number Conversion */ @@ -9,6 +9,16 @@ #include "Rts.h" #include "stgio.h" + +/* Raw errno */ + +int *ghcErrno(void) { + return &errno; +} + + +/* Fancy errno */ + int ghc_errno = 0; int ghc_errtype = 0; diff --git a/ghc/lib/std/cbits/errno.h b/ghc/lib/std/cbits/errno.h new file mode 100644 index 0000000..80cb78b --- /dev/null +++ b/ghc/lib/std/cbits/errno.h @@ -0,0 +1,15 @@ +/* ----------------------------------------------------------------------------- + * $Id: errno.h,v 1.1 2001/01/26 17:51:40 rrt Exp $ + * + * (c) The GHC Team 2001 + * + * Haskell-usable version of errno + * + * ---------------------------------------------------------------------------*/ + +#ifndef GHCERRNO_H +#define GHCERRNO_H + +int *ghcErrno(void); + +#endif diff --git a/ghc/lib/std/cbits/tcSetAttr.c b/ghc/lib/std/cbits/tcSetAttr.c index 02f9fdb..c6c82ba 100644 --- a/ghc/lib/std/cbits/tcSetAttr.c +++ b/ghc/lib/std/cbits/tcSetAttr.c @@ -1,7 +1,7 @@ /* * (c) The GHC Team 2001 * - * $Id: tcSetAttr.c,v 1.1 2001/01/16 14:06:14 simonmar Exp $ + * $Id: tcSetAttr.c,v 1.2 2001/01/26 17:51:40 rrt Exp $ * * A wrapper around tcsetattr() which works for a background process. */ @@ -21,6 +21,7 @@ #include #endif +#ifndef mingw32_TARGET_OS /* tcsetattr() when invoked by a background process causes the process * to be sent SIGTTOU regardless of whether the process has TOSTOP set * in its terminal flags (try it...). This function provides a @@ -40,3 +41,6 @@ tcSetAttr( int fd, int options, const struct termios *tp ) return res; } +#else +#define tcSetAttr(f,o,t) tcsetattr((f),(o),(t)) +#endif