-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
/* | ||
* Copyright (C) 1999-2008 by Zilog, Inc. | ||
* All Rights Reserved | ||
*/ | ||
#ifndef STDARG_H | ||
#define STDARG_H | ||
#ifndef _STDARG_H | ||
#define _STDARG_H | ||
|
||
typedef char * va_list; | ||
#define _INTSIZEOF(n) (sizeof(n) + sizeof(int)-1-((sizeof(n)-1)%sizeof(int))) | ||
#ifndef __GNUC_VA_LIST | ||
#define __GNUC_VA_LIST | ||
typedef __builtin_va_list __gnuc_va_list; | ||
#endif /* __GNUC_VA_LIST */ | ||
|
||
#define va_start(ap, parm) (ap = (char *)&parm + _INTSIZEOF(parm)) | ||
#define va_arg(ap,type) (*(type *)((ap += _INTSIZEOF(type)) - _INTSIZEOF(type))) | ||
#define va_end(ap) | ||
#ifndef _VA_LIST | ||
#define _VA_LIST | ||
typedef __builtin_va_list va_list; | ||
#endif /* _VA_LIST */ | ||
|
||
#endif | ||
#define va_start(ap, param) __builtin_va_start(ap, param) | ||
#define va_end(ap) __builtin_va_end(ap) | ||
#define va_arg(ap, type) __builtin_va_arg(ap, type) | ||
#define __va_copy(dest, src) __builtin_va_copy(dest, src) | ||
#if __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L | ||
# define va_copy(dest, src) __builtin_va_copy(dest, src) | ||
#endif /* __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L */ | ||
|
||
#endif /* _STDARG_H */ |