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>
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;
26 #elif defined(_XBT_VISUALC_COMPILER)
27 # include <win32/compiler/visualc.h>
29 # error "Unknown compiler - please report the problems to the main simgrid mailing list (http://gforge.inria.fr/mail/?group_id=12)"
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)
40 #define tcp_close(s) (shutdown( s, SD_BOTH ), closesocket(s))
42 #define tcp_close( s ) closesocket( s )
46 #define EWOULDBLOCK WSAEWOULDBLOCK
50 #define EINPROGRESS WSAEINPROGRESS
54 #define ETIMEDOUT WSAETIMEDOUT
61 #define sock_errno WSAGetLastError()
67 #define sock_errstr(err) gras_wsa_err2string(err)
69 const char *gras_wsa_err2string(int errcode);
85 #endif /* #ifndef __XBT_WIN32_CONFIG_H__ */