[Midnightbsd-cvs] src: stdarg.h: While pcc is i386 only right now, let's prepare for the

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Tue May 13 00:18:09 EDT 2008


Log Message:
-----------
While pcc is i386 only right now, let's prepare for the future.

Modified Files:
--------------
    src/sys/amd64/include:
        stdarg.h (r1.1.1.1 -> r1.2)

-------------- next part --------------
Index: stdarg.h
===================================================================
RCS file: /home/cvs/src/sys/amd64/include/stdarg.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -L sys/amd64/include/stdarg.h -L sys/amd64/include/stdarg.h -u -r1.1.1.1 -r1.2
--- sys/amd64/include/stdarg.h
+++ sys/amd64/include/stdarg.h
@@ -1,4 +1,5 @@
 /*-
+ * Copyright (c) 2008 Lucas Holt.  All rights reserved.
  * Copyright (c) 2002 David E. O'Brien.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -26,6 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/amd64/include/stdarg.h,v 1.8 2005/03/11 22:16:09 peter Exp $
+ * $MidnightBSD$
  */
 
 #ifndef _MACHINE_STDARG_H_
@@ -68,6 +70,17 @@
 	(*(type *)((ap) += __va_size(type), (ap) - __va_size(type)))
 #define	va_end(ap)
 
+#elif defined(__PCC__) /* !__GNUCLIKE_BUILTIN_STDARG */
+
+#define va_start(ap, last) \
+        __builtin_stdarg_start((ap), last)
+#define va_arg(ap, type) \
+        __builtin_va_arg((ap), type)
+#define va_end(ap) \
+        __builtin_va_end((ap))
+#define __va_copy(dest, src) \
+        __builtin_va_copy((dest), (src))
+
 #else
 #error this file needs to be ported to your compiler
 #endif


More information about the Midnightbsd-cvs mailing list