Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix simdag issue
[simgrid.git] / src / include / surf / maxmin.h
index ba06c74..6049913 100644 (file)
@@ -7,10 +7,10 @@
 #ifndef _SURF_MAXMIN_H
 #define _SURF_MAXMIN_H
 
-#include <math.h>
 #include "portable.h"
 #include "xbt/misc.h"
 #include "surf/datatypes.h"
+#include <math.h>
 
 extern double sg_maxmin_precision;
 #define MAXMIN_PRECISION sg_maxmin_precision
@@ -31,6 +31,10 @@ static XBT_INLINE int double_equals(double value1, double value2)
   return (fabs(value1 - value2) < MAXMIN_PRECISION);
 }
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 XBT_PUBLIC(lmm_system_t) lmm_system_new(int selective_update);
 XBT_PUBLIC(void) lmm_system_free(lmm_system_t sys);
 void lmm_variable_disable(lmm_system_t sys, lmm_variable_t var);
@@ -46,7 +50,7 @@ XBT_PUBLIC(lmm_variable_t) lmm_variable_new(lmm_system_t sys, void *id,
                                             double weight_value,
                                             double bound,
                                             int number_of_constraints);
-void lmm_variable_free(lmm_system_t sys, lmm_variable_t var);
+XBT_PUBLIC(void) lmm_variable_free(lmm_system_t sys, lmm_variable_t var);
 XBT_PUBLIC(double) lmm_variable_getvalue(lmm_variable_t var);
 XBT_PUBLIC(double) lmm_variable_getbound(lmm_variable_t var);
 
@@ -126,5 +130,8 @@ XBT_PUBLIC(double func_vegas_f) (lmm_variable_t var, double x);
 XBT_PUBLIC(double func_vegas_fp) (lmm_variable_t var, double x);
 XBT_PUBLIC(double func_vegas_fpi) (lmm_variable_t var, double x);
 
+#ifdef __cplusplus
+}
+#endif
 
 #endif                          /* _SURF_MAXMIN_H */