Changeset 55cff86 in mainline for libc/include/stdarg.h
- Timestamp:
- 2006-03-15T12:36:49Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2345061
- Parents:
- d73942c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libc/include/stdarg.h
rd73942c r55cff86 30 30 #define __LIBC__STDARG_H__ 31 31 32 #include<types.h> 33 #include<stackarg.h> 34 32 35 #ifndef __VARARGS_DEFINED 33 # define __VARARGS_DEFINED36 # define __VARARGS_DEFINED 34 37 35 /* 36 * Variable argument list manipulation macros 37 * for architectures using stack to pass arguments. 38 */ 39 40 #include <types.h> 38 typedef __builtin_va_list va_list; 41 39 42 typedef struct va_list { 43 int pos; 44 uint8_t *last; 45 } va_list; 40 # define va_start(ap, last) __builtin_va_start(ap, last) 41 # define va_arg(ap, type) __builtin_va_arg(ap, type) 42 # define va_end(ap) __builtin_va_end(ap) 46 43 47 #define va_start(ap, lst) \ 48 (ap).pos = sizeof(lst); \ 49 (ap).last = (uint8_t *) &(lst) 50 51 #define va_arg(ap, type) \ 52 (*((type *)((ap).last + ((ap).pos += sizeof(type) ) - sizeof(type)))) 53 54 #define va_end(ap) 44 # endif 55 45 56 46 #endif 57 58 59 #endif
Note:
See TracChangeset
for help on using the changeset viewer.