From: cherierm Date: Thu, 21 Dec 2006 17:22:44 +0000 (+0000) Subject: a directory for all builds X-Git-Tag: v3.3~2329 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/901dca0c34d7c5411125d67ac97ad8e1df788157?ds=sidebyside a directory for all builds git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3030 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/gras/Transport/rl_transport.c b/src/gras/Transport/rl_transport.c index 098a2355f9..7d7c7a413c 100644 --- a/src/gras/Transport/rl_transport.c +++ b/src/gras/Transport/rl_transport.c @@ -89,6 +89,9 @@ gras_socket_t gras_trp_select(double timeout) { #ifndef HAVE_WINSOCK_H if (max_fds < sock_iter->sd) max_fds = sock_iter->sd; +#else + max_fds = 0; + #endif FD_SET(sock_iter->sd, &FDS); } else { diff --git a/src/gras/Virtu/rl_time.c b/src/gras/Virtu/rl_time.c index 1941d779cc..24e1fd6f4e 100644 --- a/src/gras/Virtu/rl_time.c +++ b/src/gras/Virtu/rl_time.c @@ -27,6 +27,12 @@ void gras_os_sleep(double sec) { DEBUG1("Do sleep %f sec", sec); sleep(sec); (void)usleep( (sec - floor(sec)) * 1000000); + +#elif _WIN32 + DEBUG1("Do sleep %f sec", sec); + + Sleep((floor(sec) * 1000) +((sec - floor(sec)) * 1000)); + #else /* don't have usleep. Use select to sleep less than one second */ struct timeval timeout; @@ -40,3 +46,5 @@ void gras_os_sleep(double sec) { #endif } + + diff --git a/src/gras/gras.c b/src/gras/gras.c index 58c8045551..0c696f7f67 100644 --- a/src/gras/gras.c +++ b/src/gras/gras.c @@ -100,7 +100,8 @@ void gras_exit(void) { const char *hexa_str(unsigned char *data, int size, int downside) { static char*buff=NULL; static int buffsize=0; - int i,pos=0; + int i,pos=0; + int begin,increment; if (buffsize<5*(size+1)) { if (buff) @@ -109,7 +110,7 @@ const char *hexa_str(unsigned char *data, int size, int downside) { buff=xbt_malloc(buffsize); } - int begin,increment; + if (downside) { begin=size-1; increment=-1; diff --git a/src/surf/surf.c b/src/surf/surf.c index 3d4ec1c9aa..83f661465f 100644 --- a/src/surf/surf.c +++ b/src/surf/surf.c @@ -19,6 +19,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_kernel, surf, #endif #ifdef _WIN32 +#include static const char* disk_drives_letter_table[MAX_DRIVE] = { "A:\\", diff --git a/src/surf/surfxml.c b/src/surf/surfxml.c index 3365f52643..bbc0ac1106 100644 --- a/src/surf/surfxml.c +++ b/src/surf/surfxml.c @@ -1,4 +1,8 @@ + +#include "portable.h" +#include "surf/surfxml.h" + #line 3 "surf/surfxml.c" #define YY_INT_ALIGNED short int @@ -1798,7 +1802,17 @@ const char rcs_surfxml_flexml[] = "$" "Id: flexml.pl,v 1.53 2006/07/18 12:12:06 mquinson Exp $"; /* ANSI headers. */ -#include + +#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__) +# ifndef _STRICT_ANSI_ +# include +# include +# include +# endif +#else +# include +#endif + #include #include #include diff --git a/src/xbt/context_win32.h b/src/xbt/context_win32.h index 022be48830..6fc82039f7 100644 --- a/src/xbt/context_win32.h +++ b/src/xbt/context_win32.h @@ -41,9 +41,9 @@ typedef struct __ucontext { } ucontext_t; -XBT_PUBLIC int getcontext(ucontext_t *ucp); -XBT_PUBLIC int setcontext(const ucontext_t *ucp); -XBT_PUBLIC int makecontext(ucontext_t *, void (*)(), int, ...); -XBT_PUBLIC int swapcontext(ucontext_t *, const ucontext_t *); +int getcontext(ucontext_t *ucp); +int setcontext(const ucontext_t *ucp); +int makecontext(ucontext_t *, void (*)(), int, ...); +int swapcontext(ucontext_t *, const ucontext_t *); #endif /* UCONTEXT_H */ diff --git a/src/xbt/log.c b/src/xbt/log.c index 6e02d5354b..c085796aee 100644 --- a/src/xbt/log.c +++ b/src/xbt/log.c @@ -20,7 +20,7 @@ #include "xbt/misc.h" #include "xbt/ex.h" #include "xbt/sysdep.h" -#include "xbt/log.h" +#include #include "xbt/dynar.h" /** \addtogroup XBT_log diff --git a/testsuite/gras/datadesc.big64 b/testsuite/gras/datadesc.big64 index b223009837..167f95d310 100644 Binary files a/testsuite/gras/datadesc.big64 and b/testsuite/gras/datadesc.big64 differ diff --git a/testsuite/gras/trp_file_client.c b/testsuite/gras/trp_file_client.c index 4ec10d71b3..c60f9fadd8 100644 --- a/testsuite/gras/trp_file_client.c +++ b/testsuite/gras/trp_file_client.c @@ -6,6 +6,10 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif #include #include "gras.h" @@ -13,6 +17,10 @@ XBT_LOG_NEW_CATEGORY(test,"Logging for this test"); +#ifdef __BORLANDC__ +#pragma argsused +#endif + int main(int argc,char *argv[]) { gras_socket_t sock; char data_send[256]; diff --git a/testsuite/gras/trp_file_server.c b/testsuite/gras/trp_file_server.c index 7d8b3273ca..89521b7e8f 100644 --- a/testsuite/gras/trp_file_server.c +++ b/testsuite/gras/trp_file_server.c @@ -6,6 +6,10 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif #include #include "gras.h" @@ -13,6 +17,10 @@ XBT_LOG_NEW_CATEGORY(test,"Logging for this test"); +#ifdef __BORLANDC__ +#pragma argsused +#endif + int main(int argc,char *argv[]) { gras_socket_t sock; char data_recv[256];