Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reorder includes.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 10 Oct 2012 09:08:40 +0000 (11:08 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 10 Oct 2012 09:08:40 +0000 (11:08 +0200)
Only include math.h after having changed _*_SOURCE.  Otherwise, strange
errors may appear, depending on what's included from smx_private.h for
example.

src/simix/smx_user.c

index 9344984..50b6db4 100644 (file)
@@ -4,6 +4,11 @@
 
 /* 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 "smx_private.h"
+#include "mc/mc.h"
+#include "xbt/ex.h"
+
 #ifndef _SVID_SOURCE
 #  define _SVID_SOURCE    /* strdup() */
 #endif
 #endif
 #include <math.h>         /* isfinite() */
 
-#include "smx_private.h"
-#include "mc/mc.h"
-#include "xbt/ex.h"
-
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix);
 
 static const char* simcall_names[] = {