Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
a directory for all builds
authorcherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 21 Dec 2006 17:22:44 +0000 (17:22 +0000)
committercherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 21 Dec 2006 17:22:44 +0000 (17:22 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3030 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/gras/Transport/rl_transport.c
src/gras/Virtu/rl_time.c
src/gras/gras.c
src/surf/surf.c
src/surf/surfxml.c
src/xbt/context_win32.h
src/xbt/log.c
testsuite/gras/datadesc.big64
testsuite/gras/trp_file_client.c
testsuite/gras/trp_file_server.c

index 098a235..7d7c7a4 100644 (file)
@@ -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;
 #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 {
 #endif
        FD_SET(sock_iter->sd, &FDS);
       } else {
index 1941d77..24e1fd6 100644 (file)
@@ -27,6 +27,12 @@ void gras_os_sleep(double sec) {
   DEBUG1("Do sleep %f sec", sec);
   sleep(sec);
   (void)usleep( (sec - floor(sec)) * 1000000);
   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;
         
 #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
 }
 
 #endif
 }
 
+
+
index 58c8045..0c696f7 100644 (file)
@@ -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;
 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)
   
   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);
   }
    
     buff=xbt_malloc(buffsize);
   }
    
-  int begin,increment;   
+
   if (downside) {
      begin=size-1;
      increment=-1;
   if (downside) {
      begin=size-1;
      increment=-1;
index 3d4ec1c..83f6614 100644 (file)
@@ -19,6 +19,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_kernel, surf,
 #endif 
 
 #ifdef _WIN32
 #endif 
 
 #ifdef _WIN32
+#include <windows.h>
 static const char* disk_drives_letter_table[MAX_DRIVE] =
 {
         "A:\\",
 static const char* disk_drives_letter_table[MAX_DRIVE] =
 {
         "A:\\",
index 3365f52..bbc0ac1 100644 (file)
@@ -1,4 +1,8 @@
 
 
+
+#include "portable.h"
+#include "surf/surfxml.h"
+
 #line 3 "surf/surfxml.c"
 
 #define  YY_INT_ALIGNED short int
 #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. */
  "$" "Id: flexml.pl,v 1.53 2006/07/18 12:12:06 mquinson Exp $";
 
 /* ANSI headers. */
-#include <unistd.h>
+
+#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__)
+#    ifndef _STRICT_ANSI_ 
+#        include <io.h>
+#        include <process.h>
+#        include <stdio.h>
+#    endif
+#else
+#    include <unistd.h> 
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #include <assert.h>
 #include <stdio.h>
 #include <string.h>
 #include <assert.h>
index 022be48..6fc8203 100644 (file)
@@ -41,9 +41,9 @@ typedef struct __ucontext {
 } ucontext_t;
 
 
 } 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 */
 
 #endif /* UCONTEXT_H */
index 6e02d53..c085796 100644 (file)
@@ -20,7 +20,7 @@
 #include "xbt/misc.h"
 #include "xbt/ex.h"
 #include "xbt/sysdep.h"
 #include "xbt/misc.h"
 #include "xbt/ex.h"
 #include "xbt/sysdep.h"
-#include "xbt/log.h"
+#include <xbt/log.h>
 #include "xbt/dynar.h"
 
 /** \addtogroup XBT_log
 #include "xbt/dynar.h"
 
 /** \addtogroup XBT_log
index b223009..167f95d 100644 (file)
Binary files a/testsuite/gras/datadesc.big64 and b/testsuite/gras/datadesc.big64 differ
index 4ec10d7..c60f9fa 100644 (file)
@@ -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. */
 
 /* 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 <stdio.h>
 #include "gras.h"
 
 #include <stdio.h>
 #include "gras.h"
 
 XBT_LOG_NEW_CATEGORY(test,"Logging for this test");
 
 
 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];
 int main(int argc,char *argv[]) {
   gras_socket_t sock;
   char data_send[256];
index 7d8b327..89521b7 100644 (file)
@@ -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. */
 
 /* 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 <stdio.h>
 #include "gras.h"
 
 #include <stdio.h>
 #include "gras.h"
 
 XBT_LOG_NEW_CATEGORY(test,"Logging for this test");
 
 
 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];
 int main(int argc,char *argv[]) {
   gras_socket_t sock;
   char data_recv[256];