Changeset e330da6e in mainline for boot


Ignore:
Timestamp:
2017-03-30T06:33:22Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
907d91a
Parents:
5b46ec8
git-author:
Supragya Raj <supragyaraj@…> (2017-03-30 06:33:22)
git-committer:
Jakub Jermar <jakub@…> (2017-03-30 06:33:22)
Message:

Add support for printing ptrdiff_t

Location:
boot
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/arm32/include/types.h

    r5b46ec8 re330da6e  
    4545typedef uint32_t pfn_t;
    4646
     47typedef int32_t ptrdiff_t;
     48
    4749typedef struct {
    4850        /** Address where the task was placed. */
  • boot/arch/ia64/include/types.h

    r5b46ec8 re330da6e  
    4040typedef uint64_t uintptr_t;
    4141
     42typedef int64_t ptrdiff_t;
     43
    4244typedef struct {
    4345        void *addr;
  • boot/arch/mips32/include/types.h

    r5b46ec8 re330da6e  
    3737typedef uint32_t uintptr_t;
    3838
     39typedef int32_t ptrdiff_t;
     40
    3941typedef struct {
    4042        /** Address where the task was placed. */
  • boot/arch/ppc32/include/types.h

    r5b46ec8 re330da6e  
    3838typedef int32_t native_t;
    3939
     40typedef int32_t ptrdiff_t;
     41
    4042typedef struct {
    4143        void *addr;
  • boot/arch/riscv64/include/types.h

    r5b46ec8 re330da6e  
    3737typedef uint64_t uintptr_t;
    3838
     39typedef int64_t ptrdiff_t;
     40
    3941typedef struct {
    4042        void *start;
  • boot/arch/sparc64/include/types.h

    r5b46ec8 re330da6e  
    3838typedef int64_t native_t;
    3939
     40typedef int64_t ptrdiff_t;
     41
    4042typedef struct {
    4143        void *addr;
  • boot/generic/src/printf_core.c

    r5b46ec8 re330da6e  
    605605                       
    606606                        switch (uc) {
    607                         /** @todo Unimplemented qualifiers:
    608                          *        t ptrdiff_t - ISO C 99
    609                          */
     607                        case 't':
     608                                /* ptrdiff_t */
     609                                if (sizeof(ptrdiff_t) == sizeof(int32_t))
     610                                        qualifier = PrintfQualifierInt;
     611                                else
     612                                        qualifier = PrintfQualifierLongLong;
    610613                        case 'h':
    611614                                /* Char or short */
Note: See TracChangeset for help on using the changeset viewer.