summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2015-10-26 20:42:30 +0100
committerBen Gamari <ben@smart-cactus.org>2015-10-26 21:42:57 +0100
commit23e344bbbd27418bb84bdc588374b3e44f6d23a6 (patch)
treee621ef8fc81eedfbc9f2ff45a7688d9cd41efb77 /rts
parent73c273af193f56ea339d423e79d803bea5f45db5 (diff)
downloadhaskell-23e344bbbd27418bb84bdc588374b3e44f6d23a6.tar.gz
Remove cygwin32_HOST_OS #ifdefs
Build system support for Cygwin was removed in b6be81b841. Test Plan: - Validate on x86_64/linux - Cross-compile rts/RtsSymbols.c and rts/Linker.c to Windows using the i686-w64-mingw32-gcc and x86_64-w64-mingw32-gcc cross compilers. Reviewers: hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1371
Diffstat (limited to 'rts')
-rw-r--r--rts/Linker.c18
-rw-r--r--rts/RtsMessages.c14
-rw-r--r--rts/RtsSymbols.c90
-rw-r--r--rts/Trace.c2
4 files changed, 10 insertions, 114 deletions
diff --git a/rts/Linker.c b/rts/Linker.c
index 101e5494a3..6be9a5a030 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -58,22 +58,6 @@
#include <dlfcn.h>
#endif
-#if defined(cygwin32_HOST_OS)
-#ifdef HAVE_DIRENT_H
-#include <dirent.h>
-#endif
-
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <regex.h>
-#include <sys/fcntl.h>
-#include <sys/termios.h>
-#include <sys/utime.h>
-#include <sys/utsname.h>
-#include <sys/wait.h>
-#endif
-
#if (defined(powerpc_HOST_ARCH) && defined(linux_HOST_OS)) \
|| (!defined(powerpc_HOST_ARCH) && \
( defined(linux_HOST_OS) || defined(freebsd_HOST_OS) || \
@@ -110,7 +94,7 @@
# define OBJFORMAT_ELF
# include <regex.h> // regex is already used by dlopen() so this is OK
// to use here without requiring an additional lib
-#elif defined(cygwin32_HOST_OS) || defined (mingw32_HOST_OS)
+#elif defined (mingw32_HOST_OS)
# define OBJFORMAT_PEi386
# include <windows.h>
# include <shfolder.h> /* SHGetFolderPathW */
diff --git a/rts/RtsMessages.c b/rts/RtsMessages.c
index b3d8f94b48..c74e3387f1 100644
--- a/rts/RtsMessages.c
+++ b/rts/RtsMessages.c
@@ -108,7 +108,7 @@ vdebugBelch(const char*s, va_list ap)
#define BUFSIZE 512
-#if defined(cygwin32_HOST_OS) || defined (mingw32_HOST_OS)
+#if defined (mingw32_HOST_OS)
static int
isGUIApp(void)
{
@@ -133,7 +133,7 @@ isGUIApp(void)
void GNU_ATTRIBUTE(__noreturn__)
rtsFatalInternalErrorFn(const char *s, va_list ap)
{
-#if defined(cygwin32_HOST_OS) || defined (mingw32_HOST_OS)
+#if defined (mingw32_HOST_OS)
if (isGUIApp())
{
char title[BUFSIZE], message[BUFSIZE];
@@ -174,7 +174,7 @@ rtsFatalInternalErrorFn(const char *s, va_list ap)
void
rtsErrorMsgFn(const char *s, va_list ap)
{
-#if defined(cygwin32_HOST_OS) || defined (mingw32_HOST_OS)
+#if defined (mingw32_HOST_OS)
if (isGUIApp())
{
char buf[BUFSIZE];
@@ -206,7 +206,7 @@ rtsSysErrorMsgFn(const char *s, va_list ap)
{
char *syserr;
-#if defined(cygwin32_HOST_OS) || defined (mingw32_HOST_OS)
+#if defined (mingw32_HOST_OS)
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
@@ -245,7 +245,7 @@ rtsSysErrorMsgFn(const char *s, va_list ap)
}
vfprintf(stderr, s, ap);
if (syserr) {
-#if defined(cygwin32_HOST_OS) || defined (mingw32_HOST_OS)
+#if defined (mingw32_HOST_OS)
// Win32 error messages have a terminating \n
fprintf(stderr, ": %s", syserr);
#else
@@ -256,7 +256,7 @@ rtsSysErrorMsgFn(const char *s, va_list ap)
}
}
-#if defined(cygwin32_HOST_OS) || defined (mingw32_HOST_OS)
+#if defined (mingw32_HOST_OS)
if (syserr) LocalFree(syserr);
#endif
}
@@ -264,7 +264,7 @@ rtsSysErrorMsgFn(const char *s, va_list ap)
void
rtsDebugMsgFn(const char *s, va_list ap)
{
-#if defined(cygwin32_HOST_OS) || defined (mingw32_HOST_OS)
+#if defined (mingw32_HOST_OS)
if (isGUIApp())
{
char buf[BUFSIZE];
diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c
index b9b0d2c204..569255094f 100644
--- a/rts/RtsSymbols.c
+++ b/rts/RtsSymbols.c
@@ -47,93 +47,8 @@
SymI_NeedsDataProto(nocldstop)
#endif
-#if defined (cygwin32_HOST_OS)
-#define RTS_MINGW_ONLY_SYMBOLS /**/
-/* Don't have the ability to read import libs / archives, so
- * we have to stupidly list a lot of what libcygwin.a
- * exports; sigh.
- */
-#define RTS_CYGWIN_ONLY_SYMBOLS \
- SymI_HasProto(regfree) \
- SymI_HasProto(regexec) \
- SymI_HasProto(regerror) \
- SymI_HasProto(regcomp) \
- SymI_HasProto(__errno) \
- SymI_HasProto(access) \
- SymI_HasProto(chmod) \
- SymI_HasProto(chdir) \
- SymI_HasProto(close) \
- SymI_HasProto(creat) \
- SymI_HasProto(dup) \
- SymI_HasProto(dup2) \
- SymI_HasProto(fstat) \
- SymI_HasProto(fcntl) \
- SymI_HasProto(getcwd) \
- SymI_HasProto(getenv) \
- SymI_HasProto(lseek) \
- SymI_HasProto(open) \
- SymI_HasProto(fpathconf) \
- SymI_HasProto(pathconf) \
- SymI_HasProto(stat) \
- SymI_HasProto(pow) \
- SymI_HasProto(tanh) \
- SymI_HasProto(cosh) \
- SymI_HasProto(sinh) \
- SymI_HasProto(atan) \
- SymI_HasProto(acos) \
- SymI_HasProto(asin) \
- SymI_HasProto(tan) \
- SymI_HasProto(cos) \
- SymI_HasProto(sin) \
- SymI_HasProto(exp) \
- SymI_HasProto(log) \
- SymI_HasProto(sqrt) \
- SymI_HasProto(localtime_r) \
- SymI_HasProto(gmtime_r) \
- SymI_HasProto(mktime) \
- SymI_NeedsProto(_imp___tzname) \
- SymI_HasProto(gettimeofday) \
- SymI_HasProto(timezone) \
- SymI_HasProto(tcgetattr) \
- SymI_HasProto(tcsetattr) \
- SymI_HasProto(memcpy) \
- SymI_HasProto(memmove) \
- SymI_HasProto(realloc) \
- SymI_HasProto(malloc) \
- SymI_HasProto(free) \
- SymI_HasProto(fork) \
- SymI_HasProto(lstat) \
- SymI_HasProto(isatty) \
- SymI_HasProto(mkdir) \
- SymI_HasProto(opendir) \
- SymI_HasProto(readdir) \
- SymI_HasProto(rewinddir) \
- SymI_HasProto(closedir) \
- SymI_HasProto(link) \
- SymI_HasProto(mkfifo) \
- SymI_HasProto(pipe) \
- SymI_HasProto(read) \
- SymI_HasProto(rename) \
- SymI_HasProto(rmdir) \
- SymI_HasProto(select) \
- SymI_HasProto(system) \
- SymI_HasProto(write) \
- SymI_HasProto(strcmp) \
- SymI_HasProto(strcpy) \
- SymI_HasProto(strncpy) \
- SymI_HasProto(strerror) \
- SymI_HasProto(sigaddset) \
- SymI_HasProto(sigemptyset) \
- SymI_HasProto(sigprocmask) \
- SymI_HasProto(umask) \
- SymI_HasProto(uname) \
- SymI_HasProto(unlink) \
- SymI_HasProto(utime) \
- SymI_HasProto(waitpid)
-
-#elif defined(mingw32_HOST_OS)
+#if defined(mingw32_HOST_OS)
#define RTS_POSIX_ONLY_SYMBOLS /**/
-#define RTS_CYGWIN_ONLY_SYMBOLS /**/
#if HAVE_GETTIMEOFDAY
#define RTS_MINGW_GETTIMEOFDAY_SYM SymI_NeedsProto(gettimeofday)
@@ -476,7 +391,6 @@
#else
#define RTS_MINGW_ONLY_SYMBOLS /**/
-#define RTS_CYGWIN_ONLY_SYMBOLS /**/
#endif
@@ -1144,7 +1058,6 @@ RTS_SYMBOLS
RTS_RET_SYMBOLS
RTS_POSIX_ONLY_SYMBOLS
RTS_MINGW_ONLY_SYMBOLS
-RTS_CYGWIN_ONLY_SYMBOLS
RTS_DARWIN_ONLY_SYMBOLS
RTS_LIBGCC_SYMBOLS
RTS_LIBFFI_SYMBOLS
@@ -1182,7 +1095,6 @@ RtsSymbolVal rtsSyms[] = {
RTS_RET_SYMBOLS
RTS_POSIX_ONLY_SYMBOLS
RTS_MINGW_ONLY_SYMBOLS
- RTS_CYGWIN_ONLY_SYMBOLS
RTS_DARWIN_ONLY_SYMBOLS
RTS_LIBGCC_SYMBOLS
RTS_LIBFFI_SYMBOLS
diff --git a/rts/Trace.c b/rts/Trace.c
index 0ab636abf4..d0fa1e57a0 100644
--- a/rts/Trace.c
+++ b/rts/Trace.c
@@ -460,7 +460,7 @@ void traceOSProcessInfo_(void) {
CAPSET_OSPROCESS_DEFAULT,
getpid());
-#if !defined(cygwin32_HOST_OS) && !defined (mingw32_HOST_OS)
+#if !defined (mingw32_HOST_OS)
/* Windows has no strong concept of process hierarchy, so no getppid().
* In any case, this trace event is mainly useful for tracing programs
* that use 'forkProcess' which Windows doesn't support anyway.