[project @ 1998-02-02 17:27:26 by simonm]
[ghc-hetmet.git] / ghc / lib / misc / cbits / ghcSockets.h
1 #ifndef GHC_SOCKETS_H
2 #define GHC_SOCKETS_H
3
4 #include <ctype.h>
5 #include <netdb.h>
6 #include <netinet/in.h>
7 #include <arpa/inet.h>
8 #include <stdio.h>
9
10 #ifdef HAVE_STDLIB_H
11 # include <stdlib.h>
12 #endif
13 #ifdef HAVE_STRING_H
14 # include <string.h>
15 #endif
16 #ifdef HAVE_FCNTL_H
17 # include <fcntl.h>
18 #endif
19 #ifdef HAVE_SYS_SOCKET_H
20 # include <sys/socket.h>
21 #endif
22 #if TIME_WITH_SYS_TIME
23 # include <sys/time.h>
24 # include <time.h>
25 #else
26 # if HAVE_SYS_TIME_H
27 #  include <sys/time.h>
28 # else
29 #  include <time.h>
30 # endif
31 #endif
32 #ifdef HAVE_SYS_TYPES_H
33 # include <sys/types.h>
34 #endif
35 #include <sys/uio.h>
36
37 /* ToDo: featurise this */
38 #ifndef cygwin32_TARGET_OS
39 #include <sys/un.h>
40 #endif
41
42 #ifdef HAVE_UNISTD_H
43 # include <unistd.h>
44 #endif
45
46 /* acceptSocket.lc */
47 StgInt  acceptSocket PROTO((StgInt, StgAddr, StgAddr));
48
49 /* bindSocket.lc */
50 StgInt  bindSocket PROTO((StgInt, StgAddr, StgInt, StgInt));
51
52 /* connectSocket.lc */
53 StgInt  connectSocket PROTO((StgInt, StgAddr, StgInt, StgInt));
54
55 /* createSocket.lc */
56 StgInt  createSocket PROTO((StgInt, StgInt, StgInt));
57
58 /* getSockName.lc */
59 StgInt  getSockName PROTO((StgInt, StgAddr, StgAddr));
60
61 /* getPeerName.lc */
62 StgInt  getPeerName PROTO((StgInt, StgAddr, StgAddr));
63
64 /* listenSocket.lc */
65 StgInt  listenSocket PROTO((StgInt, StgInt));
66
67 /* shutdownSocket.lc */
68 StgInt  shutdownSocket PROTO((StgInt, StgInt));
69
70 /* readDescriptor.lc */
71 StgInt  readDescriptor PROTO((StgInt, StgAddr, StgInt));
72
73 /* writeDescriptor.lc */
74 StgInt  writeDescriptor PROTO((StgInt, StgAddr, StgInt));
75
76
77 #endif /* !GHC_SOCKETS_H */