X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=include%2FHsBase.h;h=9281db006d9a14ca896f7571d03995113d404b3e;hb=ce95dd798cdf6068515e4e6e08fb8b3f9d65f79a;hp=e8b7ae3a3cb501a5307ce4c5043158ca3ffb7c16;hpb=ec3ba94b254bd444e7a1c560c1d91c4879948c69;p=ghc-base.git diff --git a/include/HsBase.h b/include/HsBase.h index e8b7ae3..9281db0 100644 --- a/include/HsBase.h +++ b/include/HsBase.h @@ -117,6 +117,7 @@ #endif #include "lockFile.h" #include "dirUtils.h" +#include "WCsubst.h" #include "runProcess.h" @@ -135,9 +136,6 @@ /* in inputReady.c */ int inputReady(int fd, int msecs, int isSock); -/* in writeError.c */ -void writeErrString__(HsAddr msg, HsInt len); - /* in Signals.c */ extern HsInt nocldstop; @@ -668,44 +666,6 @@ extern void __hscore_set_saved_termios(int fd, void* ts); INLINE int __hscore_hs_fileno (FILE *f) { return fileno (f); } -#if !defined(mingw32_HOST_OS) && !defined(_MSC_VER) -INLINE int __hsposix_SIGABRT() { return SIGABRT; } -INLINE int __hsposix_SIGALRM() { return SIGALRM; } -INLINE int __hsposix_SIGBUS() { return SIGBUS; } -INLINE int __hsposix_SIGCHLD() { return SIGCHLD; } -INLINE int __hsposix_SIGCONT() { return SIGCONT; } -INLINE int __hsposix_SIGFPE() { return SIGFPE; } -INLINE int __hsposix_SIGHUP() { return SIGHUP; } -INLINE int __hsposix_SIGILL() { return SIGILL; } -INLINE int __hsposix_SIGINT() { return SIGINT; } -INLINE int __hsposix_SIGKILL() { return SIGKILL; } -INLINE int __hsposix_SIGPIPE() { return SIGPIPE; } -INLINE int __hsposix_SIGQUIT() { return SIGQUIT; } -INLINE int __hsposix_SIGSEGV() { return SIGSEGV; } -INLINE int __hsposix_SIGSTOP() { return SIGSTOP; } -INLINE int __hsposix_SIGTERM() { return SIGTERM; } -INLINE int __hsposix_SIGTSTP() { return SIGTSTP; } -INLINE int __hsposix_SIGTTIN() { return SIGTTIN; } -INLINE int __hsposix_SIGTTOU() { return SIGTTOU; } -INLINE int __hsposix_SIGUSR1() { return SIGUSR1; } -INLINE int __hsposix_SIGUSR2() { return SIGUSR2; } -#ifdef SIGPOLL -INLINE int __hsposix_SIGPOLL() { return SIGPOLL; } -#endif -INLINE int __hsposix_SIGPROF() { return SIGPROF; } -INLINE int __hsposix_SIGSYS() { return SIGSYS; } -INLINE int __hsposix_SIGTRAP() { return SIGTRAP; } -INLINE int __hsposix_SIGURG() { return SIGURG; } -INLINE int __hsposix_SIGVTALRM() { return SIGVTALRM; } -INLINE int __hsposix_SIGXCPU() { return SIGXCPU; } -INLINE int __hsposix_SIGXFSZ() { return SIGXFSZ; } - -INLINE int __hsposix_SIG_BLOCK() { return SIG_BLOCK; } -INLINE int __hsposix_SIG_UNBLOCK() { return SIG_UNBLOCK; } -INLINE int __hsposix_SIG_SETMASK() { return SIG_SETMASK; } - -#endif /* mingw32_HOST_OS */ - INLINE int __hscore_open(char *file, int how, mode_t mode) { #ifdef mingw32_HOST_OS if ((how & O_WRONLY) || (how & O_RDWR) || (how & O_APPEND)) @@ -763,7 +723,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 @@ -791,6 +751,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;