Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix misbalanced parentheses in checks for va_copy. [Arnaud Giersch]
[simgrid.git] / src / win32 / compiler / visualc.h
index 8c62ff5..37d93ec 100644 (file)
        #undef HAVE_UNISTD_H    
 #endif
 
-/* 
- * The compiler has the <windows.h> header file. 
- * Process the case of afx.h
-*/
-#if !defined(HAVE_WINDOWS_H)
-       #define HAVE_WINDOWS_H          1
-#endif
-
-/* The compiler has the <winsock2.h> header file. */
-#if !defined(HAVE_WINSOCK2_H)
-       #define HAVE_WINSOCK2_H
-#endif
-
-/*  
- * The compiler has the <winsock.h> header file.
- * Trouble if winsock2.h exists ?  
- */
-#if !defined(HAVE_WINSOCK_H)
-       #define HAVE_WINSOCK_H  1
-#endif
-
 /* The compiler has the <signal.h> header file */
 #if !defined(HAVE_SIGNAL_H)
        #define HAVE_SIGNAL_H   1
@@ -326,56 +305,65 @@ the double. For now, GRAS requires the structures to be compacted. */
        #undef ADDR2LINE
 #endif
 
-#if !defined(HAVE_VA_COPY)
-       #define HAVE_VA_COPY 1
-#endif
 
-/* This macro is not defined in borland stdarg.h include file, adds it. */
-#ifndef va_copy(dest,src)
-       #define va_copy(dest,src)   ((dest)=(src))
-#endif
+#ifndef __VISUALC__
 
-#ifndef __VA_COPY_USE_ASP(d, s)
-/* Predefined possible va_copy() implementation (id: ASP) */
-       #define __VA_COPY_USE_ASP(d, s) do { *(d) = *(s); } while (0)
-#endif
+       #if !defined(HAVE_VA_COPY)
+               #define HAVE_VA_COPY 1
+       #endif
 
-#ifndef __VA_COPY_USE_ASS(d, s)
-/* Predefined possible va_copy() implementation (id: ASS) */
-       #define __VA_COPY_USE_ASS(d, s) do { (d) = (s); } while (0)
-#endif
+       /* This macro is not defined in borland stdarg.h include file, adds it. */
+       #ifndef va_copy(dest,src)
+               #define va_copy(dest,src)   ((dest)=(src))
+       #endif
 
-#ifndef __VA_COPY_USE_C99(d, s)
-/* Predefined possible va_copy() implementation (id: C99) */
-       #define __VA_COPY_USE_C99(d, s) va_copy((d), (s))
-#endif
+       #ifndef __VA_COPY_USE_ASP(d, s)
+       /* Predefined possible va_copy() implementation (id: ASP) */
+               #define __VA_COPY_USE_ASP(d, s) do { *(d) = *(s); } while (0)
+       #endif
 
-#ifndef __VA_COPY_USE_CPP(d, s)
-/* Predefined possible va_copy() implementation (id: CPP) */
-       #define __VA_COPY_USE_CPP(d, s) memcpy((void *)(d), (void *)(s)), sizeof(*(s))
-#endif
+       #ifndef __VA_COPY_USE_ASS(d, s)
+       /* Predefined possible va_copy() implementation (id: ASS) */
+               #define __VA_COPY_USE_ASS(d, s) do { (d) = (s); } while (0)
+       #endif
 
-#ifndef __VA_COPY_USE_CPS(d, s)
-/* Predefined possible va_copy() implementation (id: CPS) */
-       #define __VA_COPY_USE_CPS(d, s) memcpy((void *)&(d), (void *)&(s)), sizeof((s))
-#endif
+       #ifndef __VA_COPY_USE_C99(d, s)
+       /* Predefined possible va_copy() implementation (id: C99) */
+               #define __VA_COPY_USE_C99(d, s) va_copy((d), (s))
+       #endif
 
-#ifndef __VA_COPY_USE_GCB(d, s)
-/* Predefined possible va_copy() implementation (id: GCB) */
-       #define __VA_COPY_USE_GCB(d, s) __builtin_va_copy((d), (s))
-#endif
+       #ifndef __VA_COPY_USE_CPP(d, s)
+       /* Predefined possible va_copy() implementation (id: CPP) */
+               #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) */
+               #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) */
+               #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) */
+               #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))
 
-#ifndef __VA_COPY_USE_GCH(d, s)
-/* Predefined possible va_copy() implementation (id: GCH) */
-       #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))
 
+       /* Optional va_copy() implementation activation */
+       #ifndef HAVE_VA_COPY
+       #define va_copy(d, s) __VA_COPY_USE(d, s)
+       #endif
 
-/* Optional va_copy() implementation activation */
-#ifndef HAVE_VA_COPY
-#define va_copy(d, s) __VA_COPY_USE(d, s)
+       /* Define to id of used va_copy() implementation */
+       #ifndef __VA_COPY_USE
+               #define __VA_COPY_USE __VA_COPY_USE_C99
+       #endif
 #endif
 
 /* xbt contexts are based on our threads implementation */
@@ -383,15 +371,12 @@ the double. For now, GRAS requires the structures to be compacted. */
 #define CONTEXT_THREADS 1
 #endif
 
+
 /* xbt contexts are not based on ucontext */
 #ifdef CONTEXT_UCONTEXT
 #undef CONTEXT_UCONTEXT
 #endif
 
-/* Define to id of used va_copy() implementation */
-#ifndef __VA_COPY_USE
-       #define __VA_COPY_USE __VA_COPY_USE_C99
-#endif
 
 #ifndef _XBT_CALL
        #if defined(_XBT_DESIGNATED_DLL)