Changeset 52352ec in mainline for libc/arch/ppc32/include/stackarg.h
- Timestamp:
- 2006-05-14T17:59:31Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- babe786
- Parents:
- 8a568e3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libc/arch/ppc32/include/stackarg.h
r8a568e3 r52352ec 1 1 /* 2 * Copyright (C) 2006 Martin Decky2 * Copyright (C) 2006 Josef Cejka 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 30 /* 31 * Variable argument list manipulation macros 32 * for architectures using stack to pass arguments. 33 */ 34 35 #ifndef __LIBC_STACKARG_H__ 36 #define __LIBC_STACKARG_H__ 37 38 #include <types.h> 39 40 /* dont allow to define it second time in stdarg.h */ 41 #define __VARARGS_DEFINED 42 43 typedef struct va_list { 44 int pos; 45 uint8_t *last; 46 } va_list; 47 48 #define va_start(ap, lst) \ 49 (ap).pos = sizeof(lst); \ 50 (ap).last = (uint8_t *) &(lst) 51 52 #define va_arg(ap, type) \ 53 (*((type *)((ap).last + ((ap).pos += sizeof(type)) - sizeof(type)))) 54 55 #define va_end(ap) 56 29 #ifndef __LIBC__STACKARG_H__ 30 #define __LIBC__STACKARG_H__ 57 31 58 32 #endif 33
Note:
See TracChangeset
for help on using the changeset viewer.