1 #ifndef __XBT_WIN32_CONFIG_H__
2 #define __XBT_WIN32_CONFIG_H__
5 /* config.h - simgrid config selection for windows platforms. */
7 /* Copyright (c) 2006, 2007, 2008, 2010. The SimGrid Team.
8 * All rights reserved. */
10 /* This program is free software; you can redistribute it and/or modify it
11 * under the terms of the license (GNU LGPL) which comes with this package. */
17 /* data comes from autoconf when using gnuc (cross-compiling?) */
18 # include "gras_config.h"
20 typedef unsigned int uint32_t;
23 # error "Unknown compiler - please report the problems to the main simgrid mailing list (http://gforge.inria.fr/mail/?group_id=12)"
26 typedef int socklen_t;
27 #define tcp_read( s, buf, len ) recv( s, buf, len, 0 )
28 #define tcp_write( s, buf, len ) send( s, buf, len, 0 )
29 #define ioctl( s, c, a ) ioctlsocket( (s), (c), (a) )
30 #define ioctl_t u_long
31 #define AC_SOCKET_INVALID ((unsigned int) ~0)
34 #define tcp_close(s) (shutdown( s, SD_BOTH ), closesocket(s))
36 #define tcp_close( s ) closesocket( s )
39 #ifndef _XBT_VISUALC_COMPILER
41 #define EWOULDBLOCK WSAEWOULDBLOCK
45 #define EINPROGRESS WSAEINPROGRESS
49 #define ETIMEDOUT WSAETIMEDOUT
59 #define sock_errno WSAGetLastError()
65 #define sock_errstr(err) xbt_wsa_err2string(err)
67 const char *xbt_wsa_err2string(int errcode);
81 #endif /* #ifndef __XBT_WIN32_CONFIG_H__ */