[cfe-commits] r98003 - /cfe/trunk/lib/Headers/stdarg.h

Ted Kremenek kremenek at apple.com
Mon Mar 8 15:13:05 PST 2010


Author: kremenek
Date: Mon Mar  8 17:13:05 2010
New Revision: 98003

URL: http://llvm.org/viewvc/llvm-project?rev=98003&view=rev
Log:
Place the definition of 'va_list' within a preprocessor guard.  This matches the behavior of GCC, and avoids potential conflicts with system headers (e.g., stdio.h).  Fixes <rdar://problem/7727145>.

Modified:
    cfe/trunk/lib/Headers/stdarg.h

Modified: cfe/trunk/lib/Headers/stdarg.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/stdarg.h?rev=98003&r1=98002&r2=98003&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/stdarg.h (original)
+++ cfe/trunk/lib/Headers/stdarg.h Mon Mar  8 17:13:05 2010
@@ -26,7 +26,10 @@
 #ifndef __STDARG_H
 #define __STDARG_H
 
+#ifndef _VA_LIST
 typedef __builtin_va_list va_list;
+#define _VA_LIST
+#endif
 #define va_start(ap, param) __builtin_va_start(ap, param)
 #define va_end(ap)          __builtin_va_end(ap)
 #define va_arg(ap, type)    __builtin_va_arg(ap, type)





More information about the cfe-commits mailing list