1 /******************************************************************************
2   Copyright (c) 1992, 1995, 1996 Xerox Corporation.  All rights reserved.
3   Portions of this code were written by Stephen White, aka ghond.
4   Use and copying of this software and preparation of derivative works based
5   upon this software are permitted.  Any distribution of this software or
6   derivative works must comply with all applicable United States export
7   control laws.  This software is made available AS IS, and Xerox Corporation
8   makes no warranty about the software, its performance or its conformity to
9   any specification.  Any person obtaining a copy of this software is requested
10   to send their name and post office or electronic mail address to:
11     Pavel Curtis
12     Xerox PARC
13     3333 Coyote Hill Rd.
14     Palo Alto, CA 94304
15     Pavel@Xerox.Com
16  *****************************************************************************/
17 
18 #include "config.h"
19 
20 /* The server no longer uses variable-length argument lists of large (size > 8
21  * bytes) structures, so this code is no longer needed and BUGGY_STDARG is
22  * never defined in config.h.  I've left the code here for possible future use.
23  */
24 
25 #if BUGGY_STDARG
26 
27 /*
28  * This implementation of the stdarg.h stuff is very simplistic; it ignores all
29  * promotion and alignment issues.  This is good enough for LambdaMOO's uses on
30  * most machines.  Regardless, this implementation should not be used unless
31  * the one on your machine won't work.
32  */
33 
34 #ifndef STDARG_H
35 #define STDARG_H 1
36 
37 #ifndef _VA_LIST_
38 #define _VA_LIST_ 1
39 typedef void *va_list;
40 #endif
41 
42 #define va_start(ptr, arg) \
43 		(ptr = (void *) ((unsigned) &arg + sizeof(arg)))
44 
45 #define va_arg(ptr, type) \
46 		((type *) (ptr = (void *) ((unsigned) ptr + sizeof(type))))[-1]
47 
48 #define va_end(ptr)
49 
50 #endif				/* STDARG_H */
51 
52 #else
53 
54 #include <stdarg.h>
55 
56 #endif				/* BUGGY_STDARG */
57 
58 /*
59  * $Log: my-stdarg.h,v $
60  * Revision 1.3  1998/12/14 13:18:16  nop
61  * Merge UNSAFE_OPTS (ref fixups); fix Log tag placement to fit CVS whims
62  *
63  * Revision 1.2  1997/03/03 04:18:55  nop
64  * GNU Indent normalization
65  *
66  * Revision 1.1.1.1  1997/03/03 03:45:05  nop
67  * LambdaMOO 1.8.0p5
68  *
69  * Revision 2.1  1996/02/08  06:02:14  pavel
70  * Updated copyright notice for 1996.  Release 1.8.0beta1.
71  *
72  * Revision 2.0  1995/11/30  04:58:36  pavel
73  * New baseline version, corresponding to release 1.8.0alpha1.
74  *
75  * Revision 1.4  1992/10/23  23:03:47  pavel
76  * Added copyright notice.
77  *
78  * Revision 1.3  1992/10/21  03:02:35  pavel
79  * Converted to use new automatic configuration system.
80  *
81  * Revision 1.2  1992/09/22  22:47:15  pavel
82  * Added missing #include of "config.h".
83  *
84  * Revision 1.1  1992/07/20  23:23:12  pavel
85  * Initial RCS-controlled version.
86  */
87