Rev 2726 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2726 | Rev 3022 | ||
---|---|---|---|
1 | #ifndef _EFISTDARG_H_ |
1 | #ifndef _EFISTDARG_H_ |
2 | #define _EFISTDARG_H_ |
2 | #define _EFISTDARG_H_ |
3 | 3 | ||
4 | /*++ |
4 | /*++ |
5 | 5 | ||
6 | Copyright (c) 1998 Intel Corporation |
6 | Copyright (c) 1998 Intel Corporation |
7 | 7 | ||
8 | Module Name: |
8 | Module Name: |
9 | 9 | ||
10 | devpath.h |
10 | devpath.h |
11 | 11 | ||
12 | Abstract: |
12 | Abstract: |
13 | 13 | ||
14 | Defines for parsing the EFI Device Path structures |
14 | Defines for parsing the EFI Device Path structures |
15 | 15 | ||
16 | 16 | ||
17 | 17 | ||
18 | Revision History |
18 | Revision History |
19 | 19 | ||
20 | --*/ |
20 | --*/ |
21 | #ifdef __GNUC__ |
21 | #ifdef __GNUC__ |
22 | #include "stdarg.h" |
22 | #include "stdarg.h" |
23 | #else |
23 | #else |
24 | #define _INTSIZEOF(n) ( (sizeof(n) + sizeof(UINTN) - 1) & ~(sizeof(UINTN) - 1) ) |
24 | #define _INTSIZEOF(n) ( (sizeof(n) + sizeof(UINTN) - 1) & ~(sizeof(UINTN) - 1) ) |
25 | 25 | ||
26 | typedef CHAR8 * va_list; |
26 | typedef CHAR8 * va_list; |
27 | 27 | ||
28 | #define va_start(ap,v) ( ap = (va_list)&v + _INTSIZEOF(v) ) |
28 | #define va_start(ap,v) ( ap = (va_list)&v + _INTSIZEOF(v) ) |
29 | #define va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) ) |
29 | #define va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) ) |
30 | #define va_end(ap) ( ap = (va_list)0 ) |
30 | #define va_end(ap) ( ap = (va_list)0 ) |
31 | #endif |
31 | #endif |
32 | 32 | ||
33 | #endif /* _INC_STDARG */ |
33 | #endif /* _INC_STDARG */ |
34 | 34 |