Changeset 54bdf0c in rtems


Ignore:
Timestamp:
Apr 14, 2017, 6:55:48 PM (3 years ago)
Author:
Joel Sherrill <joel@…>
Branches:
5, master
Children:
d420b67
Parents:
18f63c0
git-author:
Joel Sherrill <joel@…> (04/14/17 18:55:48)
git-committer:
Joel Sherrill <joel@…> (04/18/17 16:24:44)
Message:

rtems/inttypes.h: New file. Uses contents from cpukit

Provide extentions to <inttpes.h> PRIxxx constants for more POSIX types.
Start with existing definitions found in RTEMS Project owned code
in cpukit/.

updates #2983.

Location:
cpukit
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • cpukit/Makefile.am

    r18f63c0 r54bdf0c  
    112112
    113113include_rtems_HEADERS += include/rtems/bspIo.h
     114include_rtems_HEADERS += include/rtems/inttypes.h
    114115include_rtems_HEADERS += include/rtems/print.h
    115116include_rtems_HEADERS += include/rtems/printer.h
  • cpukit/libdl/rtl-shell.c

    r18f63c0 r54bdf0c  
    2121
    2222#include <inttypes.h>
    23 
    24 /*
    25  *  Flag the targets where off_t is 32 bits. This is not a compiler type
    26  *  so we can't rely on prerdefines.
    27  */
    28 #if defined(__moxie__)
    29 #define PRIdoff_t PRIo32
    30 #else
    31 #define PRIdoff_t PRIo64
    32 #endif
     23#include <rtems/inttypes.h>
    3324
    3425#include <stdio.h>
  • cpukit/libfs/src/nfsclient/src/dirutils.c

    r18f63c0 r54bdf0c  
    7171
    7272#include <inttypes.h> /* PRI* */
    73 
    74 #if SIZEOF_MODE_T == 8
    75 #define PRIomode_t PRIo64
    76 #elif SIZEOF_MODE_T == 4
    77 #define PRIomode_t PRIo32
    78 #else
    79 #error "unsupport size of mode_t"
    80 #endif
    81 
    82 #if SIZEOF_OFF_T == 8
    83 #define PRIdoff_t PRIo64
    84 #elif SIZEOF_OFF_T == 4
    85 #define PRIdoff_t PRIo32
    86 #else
    87 #error "unsupported size of off_t"
    88 #endif
     73#include <rtems/inttypes.h> /* extended PRI* */
    8974
    9075#ifdef HAVE_CEXP
     
    143128        }
    144129
    145         printf("%10li, %10" PRIdoff_t "b, %5i.%-5i 0%04" PRIomode_t " %s%s\n",
     130        printf("%10li, %10" PRIooff_t "b, %5i.%-5i 0%04" PRIomode_t " %s%s\n",
    146131                                buf->st_ino,
    147132                                buf->st_size,
  • cpukit/libfs/src/rfs/rtems-rfs-dir.c

    r18f63c0 r54bdf0c  
    2929
    3030#include <inttypes.h>
     31#include <rtems/inttypes.h>
    3132#include <string.h>
    32 
    33 #if SIZEOF_OFF_T == 8
    34 #define PRIooff_t PRIo64
    35 #elif SIZEOF_OFF_T == 4
    36 #define PRIooff_t PRIo32
    37 #else
    38 #error "unsupported size of off_t"
    39 #endif
    4033
    4134#include <rtems/rfs/rtems-rfs-block.h>
  • cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c

    r18f63c0 r54bdf0c  
    2222
    2323#include <inttypes.h>
     24#include <rtems/inttypes.h>
    2425#include <string.h>
    25 
    26 #if SIZEOF_OFF_T == 8
    27 #define PRIdoff_t PRId64
    28 #elif SIZEOF_OFF_T == 4
    29 #define PRIdoff_t PRId32
    30 #else
    31 #error "unsupported size of off_t"
    32 #endif
    3326
    3427#include <rtems/rfs/rtems-rfs-file.h>
  • cpukit/libfs/src/rfs/rtems-rfs-rtems.c

    r18f63c0 r54bdf0c  
    2626#include <stdlib.h>
    2727
    28 #if SIZEOF_MODE_T == 8
    29 #define PRIomode_t PRIo64
    30 #elif SIZEOF_MODE_T == 4
    31 #define PRIomode_t PRIo32
    32 #else
    33 #error "unsupport size of mode_t"
    34 #endif
     28#include <rtems/inttypes.h>
    3529
    3630#include <rtems/rfs/rtems-rfs-file.h>
  • cpukit/libmisc/shell/main_time.c

    r18f63c0 r54bdf0c  
    2323#include <rtems.h>
    2424#include <rtems/shell.h>
     25#include <rtems/inttypes.h>
    2526#include "internal.h"
    26 
    27 /* Helper macro to print "time_t" */
    28 #if SIZEOF_TIME_T == 8
    29 #define PRIdtime_t PRId64
    30 #elif SIZEOF_TIME_T == 4
    31 #define PRIdtime_t PRId32
    32 #else
    33 #error "PRIdtime_t: unsupported size of time_t"
    34 #endif
    3527
    3628static int rtems_shell_main_time(
  • cpukit/preinstall.am

    r18f63c0 r54bdf0c  
    264264PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/bspIo.h
    265265
     266$(PROJECT_INCLUDE)/rtems/inttypes.h: include/rtems/inttypes.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
     267        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/inttypes.h
     268PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/inttypes.h
     269
    266270$(PROJECT_INCLUDE)/rtems/print.h: include/rtems/print.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
    267271        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/print.h
Note: See TracChangeset for help on using the changeset viewer.