Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Protect macro definitions for VA_COPY. They should probably all be removed from this...
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 4 Jun 2010 16:04:31 +0000 (16:04 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 4 Jun 2010 16:04:31 +0000 (16:04 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7832 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/win32/compiler/visualc.h

index bff6a33..8c62ff5 100644 (file)
@@ -331,29 +331,44 @@ the double. For now, GRAS requires the structures to be compacted. */
 #endif
 
 /* This macro is not defined in borland stdarg.h include file, adds it. */
 #endif
 
 /* This macro is not defined in borland stdarg.h include file, adds it. */
-#define va_copy(dest,src)   ((dest)=(src))  
+#ifndef va_copy(dest,src)
+       #define va_copy(dest,src)   ((dest)=(src))
+#endif
 
 
+#ifndef __VA_COPY_USE_ASP(d, s)
 /* Predefined possible va_copy() implementation (id: ASP) */
 /* Predefined possible va_copy() implementation (id: ASP) */
-#define __VA_COPY_USE_ASP(d, s) do { *(d) = *(s); } while (0)
+       #define __VA_COPY_USE_ASP(d, s) do { *(d) = *(s); } while (0)
+#endif
 
 
+#ifndef __VA_COPY_USE_ASS(d, s)
 /* Predefined possible va_copy() implementation (id: ASS) */
 /* Predefined possible va_copy() implementation (id: ASS) */
-#define __VA_COPY_USE_ASS(d, s) do { (d) = (s); } while (0)
+       #define __VA_COPY_USE_ASS(d, s) do { (d) = (s); } while (0)
+#endif
 
 
+#ifndef __VA_COPY_USE_C99(d, s)
 /* Predefined possible va_copy() implementation (id: C99) */
 /* Predefined possible va_copy() implementation (id: C99) */
-#define __VA_COPY_USE_C99(d, s) va_copy((d), (s))
+       #define __VA_COPY_USE_C99(d, s) va_copy((d), (s))
+#endif
 
 
+#ifndef __VA_COPY_USE_CPP(d, s)
 /* Predefined possible va_copy() implementation (id: CPP) */
 /* Predefined possible va_copy() implementation (id: CPP) */
-#define __VA_COPY_USE_CPP(d, s) memcpy((void *)(d), (void *)(s)), sizeof(*(s))
+       #define __VA_COPY_USE_CPP(d, s) memcpy((void *)(d), (void *)(s)), sizeof(*(s))
+#endif
 
 
+#ifndef __VA_COPY_USE_CPS(d, s)
 /* Predefined possible va_copy() implementation (id: CPS) */
 /* Predefined possible va_copy() implementation (id: CPS) */
-#define __VA_COPY_USE_CPS(d, s) memcpy((void *)&(d), (void *)&(s)), sizeof((s))
+       #define __VA_COPY_USE_CPS(d, s) memcpy((void *)&(d), (void *)&(s)), sizeof((s))
+#endif
 
 
+#ifndef __VA_COPY_USE_GCB(d, s)
 /* Predefined possible va_copy() implementation (id: GCB) */
 /* Predefined possible va_copy() implementation (id: GCB) */
-#define __VA_COPY_USE_GCB(d, s) __builtin_va_copy((d), (s))
+       #define __VA_COPY_USE_GCB(d, s) __builtin_va_copy((d), (s))
+#endif
 
 
+#ifndef __VA_COPY_USE_GCH(d, s)
 /* Predefined possible va_copy() implementation (id: GCH) */
 /* Predefined possible va_copy() implementation (id: GCH) */
-#define __VA_COPY_USE_GCH(d, s) __va_copy((d), (s))
-
+       #define __VA_COPY_USE_GCH(d, s) __va_copy((d), (s))
+#endif
 /* Predefined possible va_copy() implementation (id: GCM) */
 #define __VA_COPY_USE_GCM(d, s) VA_COPY((d), (s))
 
 /* Predefined possible va_copy() implementation (id: GCM) */
 #define __VA_COPY_USE_GCM(d, s) VA_COPY((d), (s))
 
@@ -374,7 +389,9 @@ the double. For now, GRAS requires the structures to be compacted. */
 #endif
 
 /* Define to id of used va_copy() implementation */
 #endif
 
 /* Define to id of used va_copy() implementation */
-#define __VA_COPY_USE __VA_COPY_USE_C99
+#ifndef __VA_COPY_USE
+       #define __VA_COPY_USE __VA_COPY_USE_C99
+#endif
 
 #ifndef _XBT_CALL
        #if defined(_XBT_DESIGNATED_DLL)
 
 #ifndef _XBT_CALL
        #if defined(_XBT_DESIGNATED_DLL)