Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jberryman
GHC
Commits
35e4502b
Commit
35e4502b
authored
Jun 04, 2002
by
sof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[project @ 2002-06-04 19:21:28 by sof]
cygwin support.
parent
c49a75b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
116 additions
and
5 deletions
+116
-5
ghc/rts/Linker.c
ghc/rts/Linker.c
+116
-5
No files found.
ghc/rts/Linker.c
View file @
35e4502b
/* -----------------------------------------------------------------------------
* $Id: Linker.c,v 1.
89 2002/05/01 15:46:14 simonmar
Exp $
* $Id: Linker.c,v 1.
90 2002/06/04 19:21:28 sof
Exp $
*
* (c) The GHC Team, 2000, 2001
*
...
...
@@ -7,7 +7,9 @@
*
* ---------------------------------------------------------------------------*/
#if 0
#include "PosixSource.h"
#endif
#include "Rts.h"
#include "RtsFlags.h"
#include "HsFFI.h"
...
...
@@ -30,6 +32,22 @@
#include <dlfcn.h>
#endif
#if defined(cygwin32_TARGET_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(linux_TARGET_OS) || defined(solaris2_TARGET_OS) || defined(freebsd_TARGET_OS)
# define OBJFORMAT_ELF
#elif defined(cygwin32_TARGET_OS) || defined (mingw32_TARGET_OS)
...
...
@@ -73,19 +91,110 @@ typedef struct _RtsSymbolVal {
#endif
#if !defined (mingw32_TARGET_OS)
#define RTS_POSIX_ONLY_SYMBOLS \
SymX(stg_sig_install) \
Sym(nocldstop)
#
define RTS_MINGW_ONLY_SYMBOLS
/**/
#
endif
#else
#if defined (cygwin32_TARGET_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 \
SymX(regfree) \
SymX(regexec) \
SymX(regerror) \
SymX(regcomp) \
SymX(__errno) \
SymX(access) \
SymX(chmod) \
SymX(chdir) \
SymX(close) \
SymX(creat) \
SymX(dup) \
SymX(dup2) \
SymX(fstat) \
SymX(fcntl) \
SymX(getcwd) \
SymX(getenv) \
SymX(lseek) \
SymX(open) \
SymX(fpathconf) \
SymX(pathconf) \
SymX(stat) \
SymX(pow) \
SymX(tanh) \
SymX(cosh) \
SymX(sinh) \
SymX(atan) \
SymX(acos) \
SymX(asin) \
SymX(tan) \
SymX(cos) \
SymX(sin) \
SymX(exp) \
SymX(log) \
SymX(sqrt) \
SymX(localtime_r) \
SymX(gmtime_r) \
SymX(mktime) \
Sym(_imp___tzname) \
SymX(gettimeofday) \
SymX(timezone) \
SymX(tcgetattr) \
SymX(tcsetattr) \
SymX(memcpy) \
SymX(memmove) \
SymX(realloc) \
SymX(malloc) \
SymX(free) \
SymX(fork) \
SymX(lstat) \
SymX(isatty) \
SymX(mkdir) \
SymX(opendir) \
SymX(readdir) \
SymX(rewinddir) \
SymX(closedir) \
SymX(link) \
SymX(mkfifo) \
SymX(pipe) \
SymX(read) \
SymX(rename) \
SymX(rmdir) \
SymX(select) \
SymX(system) \
SymX(write) \
SymX(strcmp) \
SymX(strcpy) \
SymX(strncpy) \
SymX(strerror) \
SymX(sigaddset) \
SymX(sigemptyset) \
SymX(sigprocmask) \
SymX(umask) \
SymX(uname) \
SymX(unlink) \
SymX(utime) \
SymX(waitpid) \
Sym(__divdi3) \
Sym(__udivdi3) \
Sym(__moddi3) \
Sym(__umoddi3)
#define RTS_POSIX_ONLY_SYMBOLS
#elif !defined(mingw32_TARGET_OS)
#define RTS_MINGW_ONLY_SYMBOLS
/**/
#define RTS_CYGWIN_ONLY_SYMBOLS
/**/
#else
/* defined(mingw32_TARGET_OS) */
#define RTS_POSIX_ONLY_SYMBOLS
/**/
#define RTS_CYGWIN_ONLY_SYMBOLS
/**/
/* These are statically linked from the mingw libraries into the ghc
executable, so we have to employ this hack. */
#define RTS_MINGW_ONLY_SYMBOLS \
SymX(memset) \
SymX(memset) \
SymX(inet_ntoa) \
SymX(inet_addr) \
...
...
@@ -365,6 +474,7 @@ RTS_SYMBOLS
RTS_LONG_LONG_SYMS
RTS_POSIX_ONLY_SYMBOLS
RTS_MINGW_ONLY_SYMBOLS
RTS_CYGWIN_ONLY_SYMBOLS
#undef Sym
#undef SymX
...
...
@@ -383,6 +493,7 @@ static RtsSymbolVal rtsSyms[] = {
RTS_LONG_LONG_SYMS
RTS_POSIX_ONLY_SYMBOLS
RTS_MINGW_ONLY_SYMBOLS
RTS_CYGWIN_ONLY_SYMBOLS
{
0
,
0
}
/* sentinel */
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment