Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
92a747a7
Commit
92a747a7
authored
25 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1999-07-03 19:15:26 by sof]
Don't use WinSock under cygwin
parent
e95d9ed1
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ghc/lib/misc/SocketPrim.lhs
+1
-1
1 addition, 1 deletion
ghc/lib/misc/SocketPrim.lhs
ghc/lib/misc/cbits/ghcSockets.h
+2
-2
2 additions, 2 deletions
ghc/lib/misc/cbits/ghcSockets.h
ghc/lib/misc/cbits/initWinSock.c
+5
-2
5 additions, 2 deletions
ghc/lib/misc/cbits/initWinSock.c
with
8 additions
and
5 deletions
ghc/lib/misc/SocketPrim.lhs
+
1
−
1
View file @
92a747a7
...
@@ -1252,7 +1252,7 @@ use @withSocketsDo@...:
...
@@ -1252,7 +1252,7 @@ use @withSocketsDo@...:
\begin{code}
\begin{code}
withSocketsDo :: IO a -> IO a
withSocketsDo :: IO a -> IO a
#if
ndef _
WIN32
#if
!defined(HAVE_WINSOCK_H) || defined(__CYG
WIN32
__)
withSocketsDo x = x
withSocketsDo x = x
#else
#else
withSocketsDo act = do
withSocketsDo act = do
...
...
This diff is collapsed.
Click to expand it.
ghc/lib/misc/cbits/ghcSockets.h
+
2
−
2
View file @
92a747a7
#ifndef GHC_SOCKETS_H
#ifndef GHC_SOCKETS_H
#define GHC_SOCKETS_H
#define GHC_SOCKETS_H
#ifdef
HAVE_WINSOCK_H
#if
def
ined(
HAVE_WINSOCK_H
) && !defined(__CYGWIN__)
#include
<winsock.h>
#include
<winsock.h>
#else
#else
...
@@ -94,7 +94,7 @@ StgInt setSocketOption__ (StgInt, StgInt, StgInt);
...
@@ -94,7 +94,7 @@ StgInt setSocketOption__ (StgInt, StgInt, StgInt);
StgInt
writeDescriptor
(
StgInt
,
StgAddr
,
StgInt
);
StgInt
writeDescriptor
(
StgInt
,
StgAddr
,
StgInt
);
/* initWinSock.c */
/* initWinSock.c */
#ifdef
_WIN32
#if
def
ined(HAVE_WINSOCK_H) && !defined(__CYGWIN__)
StgInt
initWinSock
();
StgInt
initWinSock
();
void
shutdownWinSock
();
void
shutdownWinSock
();
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
ghc/lib/misc/cbits/initWinSock.c
+
5
−
2
View file @
92a747a7
...
@@ -5,10 +5,13 @@
...
@@ -5,10 +5,13 @@
#include
"stgio.h"
#include
"stgio.h"
#ifdef _WIN32
#if defined(HAVE_WINSOCK_H) && !defined(__CYGWIN__)
#define USE_WINSOCK
#endif
/* Initialising WinSock... */
#ifdef USE_WINSOCK
/* Initialising WinSock... */
StgInt
StgInt
initWinSock
()
initWinSock
()
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment