Changeset 81887b7 in mainline for include/stackarg.h


Ignore:
Timestamp:
2005-08-30T08:59:22Z (20 years ago)
Author:
Josef Cejka <malyzelenyhnus@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
00e00fa
Parents:
1fbbcd6
Message:

Bugs in printf and va_arg functions repaired.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/stackarg.h

    r1fbbcd6 r81887b7  
    4040typedef struct va_list {
    4141        int pos;
    42         __address *last;
     42        __u8 *last;
    4343} va_list;
    4444
    4545#define va_start(ap, lst)               \
    46         (ap).pos = 0;                   \
    47         (ap).last = (__address *) &(lst)
     46        (ap).pos = sizeof(lst);                         \
     47        (ap).last = (__u8 *) &(lst)
    4848
    4949#define va_arg(ap, type)                \
    50         ((type) *((ap).last + ++((ap).pos)))
     50        (*((type *)((ap).last + ((ap).pos  += sizeof(type) ) - sizeof(type))))
    5151
    5252#define va_end(ap)
Note: See TracChangeset for help on using the changeset viewer.