Annotation of funnyos/libkern/stdarg.h, Revision 1.1.1.1
1.1 init 1: /* $Id: stdarg.h,v 1.1.1.1 2007/10/12 08:40:42 init Exp $ */
2: /* $OpenBSD: stdarg.h,v 1.4 2006/01/06 18:53:06 millert Exp $ */
3: /*
4: * Copyright (c) 2003, 2004 Marc espie <espie@openbsd.org>
5: *
6: * Permission to use, copy, modify, and distribute this software for any
7: * purpose with or without fee is hereby granted, provided that the above
8: * copyright notice and this permission notice appear in all copies.
9: *
10: * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11: * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12: * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13: * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14: * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15: * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16: * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17: */
18: #ifndef _LIBKERN_STDARG_H
19: #define _LIBKERN_STDARG_H
20:
21: #if defined(__GNUC__) && __GNUC__ >= 3
22:
23: /* Define __gnuc_va_list. */
24:
25: #ifndef __GNUC_VA_LIST
26: #define __GNUC_VA_LIST
27: typedef __builtin_va_list __gnuc_va_list;
28: #endif
29:
30: /* Note that the type used in va_arg is supposed to match the
31: actual type **after default promotions**.
32: Thus, va_arg (..., short) is not valid. */
33:
34: #define va_start(v,l) __builtin_stdarg_start((v),l)
35: #define va_end __builtin_va_end
36: #define va_arg __builtin_va_arg
37: #define va_copy(d,s) __builtin_va_copy((d),(s))
38: #define __va_copy(d,s) __builtin_va_copy((d),(s))
39:
40:
41: typedef __gnuc_va_list va_list;
42:
43: #endif /* not _LIBKERN_STDARG_H */
44:
CVSweb