1 #ifndef __XBT_WIN32_CONFIG_H__
2 #define __XBT_WIN32_CONFIG_H__
5 /* config.h - simgrid config selection for windows platforms. */
7 /* Copyright (c) 2003, 2004 Cherier Malek. All rights reserved. */
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. */
15 #include <win32/compiler/select_compiler_features.h>
18 #if defined(_XBT_BORLAND_COMPILER)
19 # include <win32/compiler/borland.h>
20 #elif defined(__GNUC__)
21 /* data comes from autoconf when using gnuc (cross-compiling?) */
22 # include "gras_config.h"
23 #elif defined(_XBT_VISUALC_COMPILER)
24 # include <win32/compiler/visualc.h>
26 # error "Unknown compiler - please report the problems to the main simgrid mailing list (http://gforge.inria.fr/mail/?group_id=12)"
29 typedef int socklen_t;
30 #define tcp_read( s, buf, len ) recv( s, buf, len, 0 )
31 #define tcp_write( s, buf, len ) send( s, buf, len, 0 )
32 #define ioctl( s, c, a ) ioctlsocket( (s), (c), (a) )
33 #define ioctl_t u_long
34 #define AC_SOCKET_INVALID ((unsigned int) ~0)
37 #define tcp_close(s) (shutdown( s, SD_BOTH ), closesocket(s))
39 #define tcp_close( s ) closesocket( s )
43 #define EWOULDBLOCK WSAEWOULDBLOCK
47 #define EINPROGRESS WSAEINPROGRESS
51 #define ETIMEDOUT WSAETIMEDOUT
58 #define sock_errno WSAGetLastError()
64 #define sock_errstr(err) gras_wsa_err2string(err)
66 const char *gras_wsa_err2string(int errcode);
82 #endif /* #ifndef __XBT_WIN32_CONFIG_H__ */