Mercurial > lcfOS
changeset 11:607898120eb1
Work on error in stdarg
author | windel |
---|---|
date | Sun, 13 Nov 2011 23:24:10 +0100 |
parents | 2feec49e6d0a |
children | fcdae30b2782 de004f808e56 |
files | cos/Makefile cos/include/stdarg.h |
diffstat | 2 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/cos/Makefile Sun Nov 13 12:49:13 2011 +0100 +++ b/cos/Makefile Sun Nov 13 23:24:10 2011 +0100 @@ -2,7 +2,7 @@ all: lcfosc.elf -bootdisk: lcfosc.elf grub/menu.lst +bootdisk.img: lcfosc.elf grub/menu.lst objcopy -O binary lcfosc.elf lcfosc.bin cp grub/emptybootdisk.img bootdisk.img mcopy -D o -i bootdisk.img lcfosc.bin ::
--- a/cos/include/stdarg.h Sun Nov 13 12:49:13 2011 +0100 +++ b/cos/include/stdarg.h Sun Nov 13 23:24:10 2011 +0100 @@ -24,16 +24,18 @@ typedef char *va_list; +// In a 64 bits kernel we are using 64 bits pointers: +#define STACKITEM long + /* Amount of space required in an argument list for an arg of type TYPE. TYPE may alternatively be an expression whose type is used. */ #define __va_rounded_size(TYPE) \ - (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) + (((sizeof (TYPE) + sizeof (STACKITEM) - 1) / sizeof (STACKITEM)) * sizeof (STACKITEM)) #define va_start(AP, LASTARG) \ (AP = ((char *) &(LASTARG) + __va_rounded_size(LASTARG))) -extern void va_end (va_list); #define va_end(AP) /* Nothing */ #define va_arg(AP, TYPE) (AP += __va_rounded_size (TYPE), \