#ifndef XBT_BASE_H
#define XBT_BASE_H
-#include "simgrid_config.h"
-
/* Define _GNU_SOURCE for getline, isfinite, etc. */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#ifndef SIMGRID_XBT_SIGNAL_HPP
#define SIMGRID_XBT_SIGNAL_HPP
+#include "simgrid_config.h"
#if SIMGRID_HAVE_LIBSIG
#include <sigc++/sigc++.h>
#else
#ifndef SIMGRIC_XBT_STRING_HPP
#define SIMGRIC_XBT_STRING_HPP
+#include "src/internal_config.h"
#if HAVE_MC
#include <stdexcept>
* The argument is never modified, and the returned value must be freed after use.
*/
char *xbt_dirname(const char *path) {
-#if _MSC_VER
+#ifdef _MSC_VER
char drive[_MAX_DRIVE];
char dir[_MAX_DIR];
errno_t err;
* The argument is never modified, and the returned value must be freed after use.
*/
char *xbt_basename(const char *path) {
-#if _MSC_VER
+#ifdef _MSC_VER
char file[1024];
char ext[1024];
errno_t err;
if(enable_compile_warnings)
- set(warnCFLAGS "-fno-common -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror ")
+ set(warnCFLAGS "-fno-common -Wall -Wundef -Wunused -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror ")
if(CMAKE_COMPILER_IS_GNUCC)
set(warnCFLAGS "${warnCFLAGS}-Wclobbered -Wno-error=clobbered -Wno-unused-local-typedefs")
endif()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wunused -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wundef -Wunused -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror")
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wclobbered -Wno-error=clobbered -Wno-unused-local-typedefs")
endif()