Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix supernovae compilation
authorChristophe Thiéry <christopho128@gmail.com>
Wed, 27 Apr 2011 07:01:17 +0000 (09:01 +0200)
committerChristophe Thiéry <christopho128@gmail.com>
Wed, 27 Apr 2011 07:01:17 +0000 (09:01 +0200)
src/mk_supernovae.pl
src/simix/smx_user.c

index 5eb5100..bd99ab4 100755 (executable)
@@ -44,7 +44,16 @@ open OUT, ">$outfile" or die "ERROR: cannot open $outfile: $!\n";
 print OUT <<EOF
 #define SUPERNOVAE_MODE 1
 #ifndef _GNU_SOURCE
-#  define _GNU_SOURCE   /* for getline() with older libc */
+#  define _GNU_SOURCE     /* for getline() with older libc */
+#endif
+#ifndef _SVID_SOURCE
+#  define _SVID_SOURCE    /* strdup() */
+#endif
+#ifndef _ISOC99_SOURCE
+#  define _ISOC99_SOURCE  /* isfinite() */
+#endif
+#ifndef _ISO_C99_SOURCE
+#  define _ISO_C99_SOURCE /* isfinite() */
 #endif
 #include <ctype.h>
 #include "portable.h"
index fb75607..243adf3 100644 (file)
@@ -4,10 +4,16 @@
 
 /* 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. */
-#define _SVID_SOURCE    /* strdup */
-#define _ISO_C99_SOURCE /* isfinite() */
-#define _ISOC99_SOURCE  /* isfinite() */
-#include <math.h>       /* isfinite() */
+#ifndef _SVID_SOURCE
+#  define _SVID_SOURCE    /* strdup() */
+#endif
+#ifndef _ISOC99_SOURCE
+#  define _ISOC99_SOURCE  /* isfinite() */
+#endif
+#ifndef _ISO_C99_SOURCE
+#  define _ISO_C99_SOURCE /* isfinite() */
+#endif
+#include <math.h>         /* isfinite() */
 
 #include "private.h"
 #include "mc/mc.h"