summaryrefslogtreecommitdiff
path: root/libc-0.0.4/include/stdarg.h
diff options
context:
space:
mode:
authorRobert de Bath <rdebath@poboxes.com>1996-03-24 17:45:55 +0100
committerLubomir Rintel <lkundrak@v3.sk>2013-10-23 23:29:43 +0200
commitfe22c37817ce338fbbc90b239320248c270957fa (patch)
treed9550410c4a20bdd382fcc58d2d3d7c5e04e5245 /libc-0.0.4/include/stdarg.h
parenta7aba15e8efffb1c5d3097656f1a93955a64f01f (diff)
parent42192453ea219b80d0bf9f41e51e36d3d4d0740b (diff)
downloaddev86-fe22c37817ce338fbbc90b239320248c270957fa.tar.gz
Import Dev86-0.0.4.tar.gzv0.0.4
Diffstat (limited to 'libc-0.0.4/include/stdarg.h')
-rw-r--r--libc-0.0.4/include/stdarg.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/libc-0.0.4/include/stdarg.h b/libc-0.0.4/include/stdarg.h
new file mode 100644
index 0000000..978529b
--- /dev/null
+++ b/libc-0.0.4/include/stdarg.h
@@ -0,0 +1,38 @@
+ /*
+ * @(#) stdarg.h 1.2 91/11/30 21:10:39
+ *
+ * Sample stdarg.h file for use with the unproto filter.
+ *
+ * This file serves two purposes.
+ *
+ * 1 - As an include file for use with ANSI-style C source that implements
+ * variadic functions.
+ *
+ * 2 - To configure the unproto filter itself. If the _VA_ALIST_ macro is
+ * defined, its value will appear in the place of the "..." in argument
+ * lists of variadic function *definitions* (not declarations).
+ *
+ * Compilers that pass arguments via the stack can use the default code at the
+ * end of this file (this usually applies for the VAX, MC68k and 80*86
+ * architectures).
+ *
+ * RISC-based systems often need special tricks. An example of the latter is
+ * given for the SPARC architecture. Read your /usr/include/varargs.h for
+ * more information.
+ *
+ * You can use the varargs.c program provided with the unproto package to
+ * verify that the stdarg.h file has been set up correctly.
+ */
+
+#ifdef sparc
+# define _VA_ALIST_ "__builtin_va_alist"
+ typedef char *va_list;
+# define va_start(ap, p) (ap = (char *) &__builtin_va_alist)
+# define va_arg(ap, type) ((type *) __builtin_va_arg_incr((type *) ap))[0]
+# define va_end(ap)
+#else /* vax, mc68k, 80*86 */
+ typedef char *va_list;
+# define va_start(ap, p) (ap = (char *) (&(p)+1))
+# define va_arg(ap, type) ((type *) (ap += sizeof(type)))[-1]
+# define va_end(ap)
+#endif