git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3030
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
#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;
#endif
FD_SET(sock_iter->sd, &FDS);
} else {
#endif
FD_SET(sock_iter->sd, &FDS);
} else {
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;
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 begin,increment;
if (buffsize<5*(size+1)) {
if (buff)
if (buffsize<5*(size+1)) {
if (buff)
buff=xbt_malloc(buffsize);
}
buff=xbt_malloc(buffsize);
}
if (downside) {
begin=size-1;
increment=-1;
if (downside) {
begin=size-1;
increment=-1;
static const char* disk_drives_letter_table[MAX_DRIVE] =
{
"A:\\",
static const char* disk_drives_letter_table[MAX_DRIVE] =
{
"A:\\",
+
+#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
"$" "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. */
+
+#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>
-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 *);
#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/dynar.h"
/** \addtogroup XBT_log
#include "xbt/dynar.h"
/** \addtogroup XBT_log
/* 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];
/* 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];