mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-04 22:32:05 +03:00
6496d04506
This version of menuetlibc was taken from revision 4743, right before I made any changes git-svn-id: svn://kolibrios.org@4973 a494cfbc-eb01-0410-851d-a64ba20cac60
52 lines
1.1 KiB
C
52 lines
1.1 KiB
C
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
|
#ifndef __dj_include_vararg_h_
|
|
#define __dj_include_vararg_h_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
|
|
|
|
#ifdef __dj_include_stdarg_h_
|
|
#error varargs.h and stdarg.h are mutually exclusive
|
|
#endif
|
|
|
|
#include <sys/djtypes.h>
|
|
|
|
__DJ_va_list
|
|
#undef __DJ_va_list
|
|
#define __DJ_va_list
|
|
|
|
#define va_alist __dj_last_arg
|
|
|
|
#define va_dcl int __dj_last_arg;
|
|
|
|
#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)
|
|
|
|
#define va_start(ap) (ap=(char *)(&__dj_last_arg))
|
|
|
|
#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_varargs_h_ */
|