Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
new tracing mask TRACE_VOLUME to trace the msg tasks communication size and group...
[simgrid.git] / src / win32 / config.h
1 #ifndef __XBT_WIN32_CONFIG_H__
2 #define __XBT_WIN32_CONFIG_H__
3
4
5 /* config.h - simgrid config selection for windows platforms. */
6
7 /* Copyright (c) 2003, 2004 Cherier Malek. All rights reserved.            */
8
9 /* This program is free software; you can redistribute it and/or modify it
10  * under the terms of the license (GNU LGPL) which comes with this package. */
11
12 /* 
13  * config selection. 
14 */
15 #include <win32/compiler/select_compiler_features.h>
16
17
18 #if defined(_XBT_BORLAND_COMPILER)
19 # include <win32/compiler/borland.h>
20
21 #elif defined(__GNUC__)
22   /* data comes from autoconf when using gnuc (cross-compiling?) */
23 # include "gras_config.h"
24 typedef unsigned int uint32_t;
25
26 #elif defined(_XBT_VISUALC_COMPILER)
27 # include <win32/compiler/visualc.h>
28 # else
29 # error "Unknown compiler - please report the problems to the main simgrid mailing list (http://gforge.inria.fr/mail/?group_id=12)"
30 #endif
31
32 typedef int socklen_t;
33 #define tcp_read( s, buf, len )         recv( s, buf, len, 0 )
34 #define tcp_write( s, buf, len )        send( s, buf, len, 0 )
35 #define ioctl( s, c, a )                ioctlsocket( (s), (c), (a) )
36 #define ioctl_t                                         u_long
37 #define AC_SOCKET_INVALID               ((unsigned int) ~0)
38
39 #ifdef SD_BOTH
40         #define tcp_close(s)    (shutdown( s, SD_BOTH ), closesocket(s))
41 #else
42         #define tcp_close( s )  closesocket( s )
43 #endif
44
45 #ifndef EWOULDBLOCK
46         #define EWOULDBLOCK WSAEWOULDBLOCK
47 #endif
48
49 #ifndef EINPROGRESS
50         #define EINPROGRESS WSAEINPROGRESS
51 #endif
52
53 #ifndef ETIMEDOUT
54         #define ETIMEDOUT   WSAETIMEDOUT
55 #endif
56
57 #ifdef sock_errno
58         #undef  sock_errno
59 #endif
60
61 #define sock_errno         WSAGetLastError()
62
63 #ifdef sock_errstr
64         #undef  sock_errstr
65 #endif
66
67 #define sock_errstr(err)   gras_wsa_err2string(err)
68
69 const char *gras_wsa_err2string(int errcode);
70
71 #ifdef S_IRGRP
72         #undef S_IRGRP
73 #endif
74
75 #define S_IRGRP 0
76
77 #ifdef S_IWGRP
78         #undef S_IWGRP
79 #endif
80
81 #define S_IWGRP 0
82
83
84
85 #endif /* #ifndef __XBT_WIN32_CONFIG_H__ */