create {hp300,i386,tahoe,vax}/include/ansi.h
[unix-history] / usr / src / include / stdarg.h
index af83fe1..e00b811 100644 (file)
@@ -4,18 +4,14 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)stdarg.h    5.3 (Berkeley) %G%
+ *     @(#)stdarg.h    5.5 (Berkeley) %G%
  */
 
  */
 
+#ifndef _STDARG_H
+#define        _STDARG_H
+
 typedef char *va_list;
 
 typedef char *va_list;
 
-/*
- * ANSI says: "If there is no actual next argument, or if type is not
- * compatible with the type of the actual next argument (as promoted
- * according to the default argument promotions), the behavior is
- * undefined."  We read this to mean that we're not allowed to do the
- * promotion for the user, so shorts and chars drop core.
- */
 #define        va_arg(ap, type) \
        ((type *)(ap += sizeof(type) < sizeof(int) ? \
                (abort(), 0) : sizeof(type)))[-1]
 #define        va_arg(ap, type) \
        ((type *)(ap += sizeof(type) < sizeof(int) ? \
                (abort(), 0) : sizeof(type)))[-1]
@@ -27,3 +23,5 @@ typedef char *va_list;
 
 #define        va_start(ap, last) \
        (ap = ((char *)&(last) + __va_promote(last)))
 
 #define        va_start(ap, last) \
        (ap = ((char *)&(last) + __va_promote(last)))
+
+#endif /* !_STDARG_H */