Changeset 438ca2f in rtems


Ignore:
Timestamp:
Apr 22, 2017, 7:15:22 PM (3 years ago)
Author:
Joel Sherrill <joel@…>
Branches:
master
Children:
9ed3266
Parents:
8ed5889f
Message:

rtems/inttypes.h: Add blksize_t and blkcnt_t

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/configure.ac

    r8ed5889f r438ca2f  
    244244AC_CHECK_SIZEOF([time_t])
    245245AC_CHECK_SIZEOF([size_t])
     246AC_CHECK_SIZEOF([blksize_t])
     247AC_CHECK_SIZEOF([blkcnt_t])
    246248
    247249## Provide sizeof(mode_t) information via cpuopts.h
     
    262264  [${ac_cv_sizeof_time_t}],
    263265  [sizeof(time_t)])
     266
     267## Provide sizeof(blksize_t) information via cpuopts.h
     268RTEMS_CPUOPT([__RTEMS_SIZEOF_BLKSIZE_T__],
     269  [true],
     270  [${ac_cv_sizeof_blksize_t}],
     271  [sizeof(blksize_t)])
     272
     273## Provide sizeof(blkcnt_t) information via cpuopts.h
     274RTEMS_CPUOPT([__RTEMS_SIZEOF_BLKCNT_T__],
     275  [true],
     276  [${ac_cv_sizeof_blkcnt_t}],
     277  [sizeof(blkcnt_t)])
    264278
    265279## Then we propagate a private copy of the value into cpuopts.h
  • cpukit/include/rtems/inttypes.h

    r8ed5889f r438ca2f  
    7171#endif
    7272
     73/** Helper macro to print "blksize_t" in decimal */
     74#if __RTEMS_SIZEOF_BLKSIZE_T__ == 8
     75#define PRIxblksize_t PRIx64
     76#elif __RTEMS_SIZEOF_BLKSIZE_T__ == 4
     77#define PRIxblksize_t PRIx32
     78#else
     79/* Warn and fall back to "long" */
     80#warning "unsupported size of blksize_t"
     81#define PRIxblksize_t "lx"
     82#endif
     83
     84/** Helper macro to print "blkcnt_t" in decimal */
     85#if __RTEMS_SIZEOF_BLKCNT_T__ == 8
     86#define PRIxblkcnt_t PRIx64
     87#elif __RTEMS_SIZEOF_BLKCNT_T__ == 4
     88#define PRIxblkcnt_t PRIx32
     89#else
     90/* Warn and fall back to "long" */
     91#warning "unsupported size of blkcnt_t"
     92#define PRIxblkcnt_t "lx"
     93#endif
     94
    7395/*
    7496 * Various inttypes.h-stype macros to assist printing
  • testsuites/psxtests/include/pmacros.h

    r8ed5889f r438ca2f  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2009, 2017.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    9292#define empty_line() puts( "" )
    9393
    94 #if SIZEOF_OFF_T == 8
    95 #define PRIdoff_t PRIo64
    96 #elif SIZEOF_OFF_T == 4
    97 #define PRIdoff_t PRIo32
    98 #else
    99 #error "unsupported size of off_t"
    100 #endif
    101 
    102 #if SIZEOF_BLKSIZE_T == 8
    103 #define PRIxblksize_t PRIx64
    104 #elif SIZEOF_BLKSIZE_T == 4
    105 #define PRIxblksize_t PRIx32
    106 #else
    107 /* Warn and fall back to "long" */
    108 #warning "unsupported size of blksize_t"
    109 #define PRIxblksize_t "lx"
    110 #endif
    111 
    112 #if SIZEOF_BLKSIZE_T == 8
    113 #define PRIxblkcnt_t PRIx64
    114 #elif SIZEOF_BLKSIZE_T == 4
    115 #define PRIxblkcnt_t PRIx32
    116 #else
    117 /* Warn and fall back to "long" */
    118 #warning "unsupported size of blkcnt_t"
    119 #define PRIxblkcnt_t "lx"
    120 #endif
    121 
    12294#endif
    12395
Note: See TracChangeset for help on using the changeset viewer.