I did only what I can test to work on my machine so far (ie, all but
windows stuff)
14 files changed:
-#if defined(_MSC_VER) && !defined(strdup)
-# define strdup _strdup /* POSIX name is not ANSI complient blabla */
-#endif
-
/** @brief Like strdup, but xbt_die() on error */
static XBT_ALWAYS_INLINE char *xbt_strdup(const char *s) {
char *res = NULL;
/** @brief Like strdup, but xbt_die() on error */
static XBT_ALWAYS_INLINE char *xbt_strdup(const char *s) {
char *res = NULL;
#include <string.h>
#include <link.h>
#include <dirent.h>
#include <string.h>
#include <link.h>
#include <dirent.h>
#include <memory>
#include <utility>
#include <memory>
#include <utility>
#include <cstdlib>
#define DW_LANG_Objc DW_LANG_ObjC /* fix spelling error in older dwarf.h */
#include <dwarf.h>
#include <cstdlib>
#define DW_LANG_Objc DW_LANG_ObjC /* fix spelling error in older dwarf.h */
#include <dwarf.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <libunwind.h>
#include <libunwind-ptrace.h>
#include <libunwind.h>
#include <libunwind-ptrace.h>
#include <signal.h>
#include <poll.h>
#include <signal.h>
#include <poll.h>
#include "simgrid_config.h" /* what was compiled in? */
#include "src/internal_config.h" /* some information about the environment */
#include "simgrid_config.h" /* what was compiled in? */
#include "src/internal_config.h" /* some information about the environment */
-#include "xbt/base.h"
-#include "xbt/misc.h"
#ifdef _WIN32
# include <windows.h>
#endif
#ifdef _WIN32
# include <windows.h>
#endif
-#include <stdarg.h>
-#include <stdio.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
#endif
/* File handling */
#endif
/* File handling */
- #ifndef EWOULDBLOCK
- #define EWOULDBLOCK WSAEWOULDBLOCK
- #endif
-
- #ifndef EINPROGRESS
- #define EINPROGRESS WSAEINPROGRESS
- #endif
-
- #ifndef ETIMEDOUT
- #define ETIMEDOUT WSAETIMEDOUT
- #endif
-
#ifdef S_IRGRP
#undef S_IRGRP
#endif
#define S_IRGRP 0
#ifdef S_IRGRP
#undef S_IRGRP
#endif
#define S_IRGRP 0
-
- #ifdef S_IWGRP
- #undef S_IWGRP
- #endif
- #define S_IWGRP 0
-#endif
-
-#ifndef O_BINARY
-# define O_BINARY 0
-#endif
-
-/* Time handling */
-#include <sys/time.h>
-#include <time.h>
-
-/* Signals */
-#ifdef HAVE_SIGNAL_H
-# include <signal.h>
-
-/* What we need to extract the backtrace in exception handling code */
-#ifdef HAVE_EXECINFO_H
-# include <execinfo.h>
-#endif
-
#endif /* SIMGRID_PORTABLE_H */
#endif /* SIMGRID_PORTABLE_H */
#include "popping_private.h"
#include "smx_synchro_private.h"
#include "popping_private.h"
#include "smx_synchro_private.h"
#ifdef __cplusplus
#include <simgrid/simix.hpp>
#ifdef __cplusplus
#include <simgrid/simix.hpp>
#include "surf/surf.h"
#include "surf/maxmin.h"
#include "src/surf/trace_mgr.hpp"
#include "surf/surf.h"
#include "surf/maxmin.h"
#include "src/surf/trace_mgr.hpp"
#define NO_MAX_DURATION -1.0
#define NO_MAX_DURATION -1.0
/* 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. */
#include <execinfo.h>
#include <sys/stat.h>
#include <execinfo.h>
#include <sys/stat.h>
/* At some point we should use https://github.com/google/googletest instead */
#include "src/portable.h"
/* At some point we should use https://github.com/google/googletest instead */
#include "src/portable.h"
#include "xbt/sysdep.h" /* bvprintf */
#include "xbt/cunit.h"
#include "xbt/sysdep.h" /* bvprintf */
#include "xbt/cunit.h"
#include "surf/surf.h"
#include <stdio.h>
#include "surf/surf.h"
#include <stdio.h>
+#ifdef HAVE_EXECINFO_H
+# include <execinfo.h> /* Function backtrace */
+#endif
+
extern const char *xbt_log_priority_names[8];
static double format_begin_of_time = -1;
extern const char *xbt_log_priority_names[8];
static double format_begin_of_time = -1;
#define XBT_LOG_LOCALLY_DEFINE_XBT_CHANNEL /* MSVC don't want it to be declared extern in headers and local here */
#define XBT_LOG_LOCALLY_DEFINE_XBT_CHANNEL /* MSVC don't want it to be declared extern in headers and local here */
#include "xbt/misc.h"
#include "simgrid_config.h"
#include "xbt/misc.h"
#include "simgrid_config.h"
-#include "src/portable.h"
#include "xbt/sysdep.h"
#include "xbt/log.h"
#include "xbt/dynar.h"
#include "xbt/sysdep.h"
#include "xbt/log.h"
#include "xbt/dynar.h"
#include "simgrid/sg_config.h"
#include "simgrid/sg_config.h"
+#include "src/portable.h"
#include <stdio.h>
#ifdef _WIN32
#include <signal.h> /* To silence MSVC on abort() */
#endif
#include <stdio.h>
#ifdef _WIN32
#include <signal.h> /* To silence MSVC on abort() */
#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(module, xbt, "module handling");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(module, xbt, "module handling");
/* xbt_os_time.c -- portable interface to time-related functions */
/* xbt_os_time.c -- portable interface to time-related functions */
-/* Copyright (c) 2007-2010, 2012-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved. */
/* 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. */
+#include "src/internal_config.h"
-#include "xbt/xbt_os_time.h" /* this module */
-#include "src/portable.h"
+#include "xbt/xbt_os_time.h" /* this module */
#include <math.h> /* floor */
#include <math.h> /* floor */
+#include <sys/time.h>
+#include <time.h>
#ifdef _WIN32
#include <sys/timeb.h>
#ifdef _WIN32
#include <sys/timeb.h>
//teshsuite/simdag/platforms/evaluate_parse_time ../examples/platforms/nancy.xml
#include <stdio.h>
//teshsuite/simdag/platforms/evaluate_parse_time ../examples/platforms/nancy.xml
#include <stdio.h>
+#include "src/internal_config.h"
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
#include "simgrid/simdag.h"
#include "surf/surf.h"
#include "xbt/xbt_os_time.h"
#include "simgrid/simdag.h"
#include "surf/surf.h"
#include "xbt/xbt_os_time.h"