kolibrios-gitea/programs/develop/libraries/menuetlibc/include/stdarg.h
CleverMouse 4f5f25a6c2 add menuetlibc sources
git-svn-id: svn://kolibrios.org@1882 a494cfbc-eb01-0410-851d-a64ba20cac60
2011-02-21 13:30:08 +00:00

55 lines
1.2 KiB
C
Executable File

/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#ifndef __dj_include_stdarg_h_
#define __dj_include_stdarg_h_
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
#ifdef __dj_include_varargs_h_
#error stdarg.h and varargs.h are mutually exclusive
#endif
#include <sys/djtypes.h>
__DJ_va_list
#undef __DJ_va_list
#define __DJ_va_list
#define __dj_va_rounded_size(T) \
(((sizeof (T) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
#define va_arg(ap, T) \
(ap = (va_list) ((char *) (ap) + __dj_va_rounded_size (T)), \
*((T *) (void *) ((char *) (ap) - __dj_va_rounded_size (T))))
#define va_end(ap)
#ifdef __GNUC__
#define va_start(ap, last_arg) \
(ap = ((va_list) __builtin_next_arg (last_arg)))
#else
#define va_start(ap, last_arg) \
(ap = (va_list) ((char*) &(last_arg) + __dj_va_rounded_size (last_arg)))
#endif
#ifndef __STRICT_ANSI__
#ifndef _POSIX_SOURCE
#endif /* !_POSIX_SOURCE */
#endif /* !__STRICT_ANSI__ */
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
#ifndef __dj_ENFORCE_FUNCTION_CALLS
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
#ifdef __cplusplus
}
#endif
#endif /* !__dj_include_stdarg_h_ */