]> AND Public Git Repository - simgrid.git/blobdiff - include/xbt/misc.h
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Better fix to the comparison between signed and unsigned int around dynar size: chang...
[simgrid.git] / include / xbt / misc.h
index 6a5f341ec03cb01e92140421b06a8d2545b70a02..44a3b79ba1a63d51f2d09c4e02466fa29eac472c 100644 (file)
 #    define XBT_INLINE  inline
 #endif
 
+/* improvable on gcc (by evaluating arguments only once), but wouldn't be portable */
+#ifdef MIN
+# undef MIN
+#endif
+#define MIN(a,b) ((a)<(b)?(a):(b))
+
+#ifdef MAX
+# undef MAX
+#endif
+#define MAX(a,b) ((a)>(b)?(a):(b))
+
+
 /* 
  * Function calling convention (not used for now) 
  */
 #  define XBT_PUBLIC(type)            extern type
 #  define XBT_EXPORT_NO_IMPORT(type)  type
 #  define XBT_IMPORT_NO_EXPORT(type)  type
-#  define XBT_PUBLIC_DATA(type)       type
+#  define XBT_PUBLIC_DATA(type)       extern type
 #endif
    
 #if !defined (max) && !defined(__cplusplus)