[RTEMS Project] #2983: Create <rtems/inttypes.h> to consolidate extensions to <inttypes.h>

RTEMS trac trac at rtems.org
Thu Apr 6 22:45:08 UTC 2017


#2983: Create <rtems/inttypes.h> to consolidate extensions to <inttypes.h>
---------------------------+--------------------------------
 Reporter:  Joel Sherrill  |      Owner:  (none)
     Type:  defect         |     Status:  new
 Priority:  normal         |  Milestone:  4.12
Component:  General        |    Version:  4.12
 Severity:  normal         |   Keywords:  printf, inttypes.h
---------------------------+--------------------------------
 Per discussion at
 https://lists.rtems.org/pipermail/devel/2017-April/017483.html, create
 <rtems/inttypes.h> to consolidate extensions to the C99 <inttypes.h> file.
 A quick search shows that there are the following set of defines which
 could be consolidated as a starting point. Then these are available to
 address other printf() format warnings.

 $ grep -r "#define PRI" . | grep -v PRIORITY | grep -v PRINT

 ./cpukit/libmisc/shell/main_time.c:#define PRIdtime_t PRId64
 ./cpukit/libmisc/shell/main_time.c:#define PRIdtime_t PRId32
 ./cpukit/libmisc/uuid/gen_uuid.c:#define PRIutime_t     PRIu64
 ./cpukit/libmisc/uuid/gen_uuid.c:#define PRIutime_t     PRIu32
 ./cpukit/libdl/rtl-shell.c:#define PRIdoff_t PRIo32
 ./cpukit/libdl/rtl-shell.c:#define PRIdoff_t PRIo64
 ./cpukit/libfs/src/nfsclient/src/dirutils.c:#define PRIomode_t PRIo64
 ./cpukit/libfs/src/nfsclient/src/dirutils.c:#define PRIomode_t PRIo32
 ./cpukit/libfs/src/nfsclient/src/dirutils.c:#define PRIdoff_t PRIo64
 ./cpukit/libfs/src/nfsclient/src/dirutils.c:#define PRIdoff_t PRIo32
 ./cpukit/libfs/src/rfs/rtems-rfs-dir.c:#define PRIooff_t PRIo64
 ./cpukit/libfs/src/rfs/rtems-rfs-dir.c:#define PRIooff_t PRIo32
 ./cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c:#define PRIdoff_t PRId64
 ./cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c:#define PRIdoff_t PRId32
 ./cpukit/libfs/src/rfs/rtems-rfs-rtems.c:#define PRIomode_t PRIo64
 ./cpukit/libfs/src/rfs/rtems-rfs-rtems.c:#define PRIomode_t PRIo32
 ./testsuites/psxtests/include/pmacros.h:#define PRIdoff_t PRIo64
 ./testsuites/psxtests/include/pmacros.h:#define PRIdoff_t PRIo32
 ./testsuites/psxtests/include/pmacros.h:#define PRIxblksize_t PRIx64
 ./testsuites/psxtests/include/pmacros.h:#define PRIxblksize_t PRIx32
 ./testsuites/psxtests/include/pmacros.h:#define PRIxblksize_t "lx"
 ./testsuites/psxtests/include/pmacros.h:#define PRIxblkcnt_t PRIx64
 ./testsuites/psxtests/include/pmacros.h:#define PRIxblkcnt_t PRIx32
 ./testsuites/psxtests/include/pmacros.h:#define PRIxblkcnt_t "lx"
 ./testsuites/libtests/termios01/init.c:#define PRIdrtems_termios_baud_t
 PRId32
 ./testsuites/support/include/pritime.h:#define PRIdtime_t PRId64
 ./testsuites/support/include/pritime.h:#define PRIdtime_t PRId32
 ./testsuites/support/include/tmacros.h:#define PRIxrtems_id PRIx16
 ./testsuites/support/include/tmacros.h:#define PRIxrtems_id PRIx32
 ./testsuites/support/include/tmacros.h:#define PRIdPriority_Control PRIu64
 ./testsuites/support/include/tmacros.h:#define PRIxPriority_Control PRIx64
 ./testsuites/support/include/tmacros.h:#define PRIdrtems_task_priority
 PRIu32
 ./testsuites/support/include/tmacros.h:#define PRIxrtems_task_priority
 PRIx32
 ./testsuites/support/include/tmacros.h:#define PRIdWatchdog_Interval
 PRIu32
 ./testsuites/support/include/tmacros.h:#define PRIdrtems_interval
 PRIdWatchdog_Interval
 ./testsuites/support/include/tmacros.h:#define
 PRIdThread_Entry_numeric_type PRIuPTR
 ./testsuites/support/include/tmacros.h:#define PRIdrtems_task_argument
 PRIdThread_Entry_numeric_type
 ./testsuites/support/include/tmacros.h:#define PRIxrtems_event_set PRIx32
 ./testsuites/support/include/tmacros.h:#define PRIxpthread_t PRIx32
 ./testsuites/support/include/tmacros.h:#define PRIxrtems_signal_set PRIx32
 ./testsuites/support/include/tmacros.h:#define PRIxino_t "lx"
 ./testsuites/support/include/primode.h:#define PRIomode_t PRIo64
 ./testsuites/support/include/primode.h:#define PRIomode_t PRIo32
 ./testsuites/sptests/sp21/init.c:#define PRIurtems_device_major_number
 PRIu32
 ./testsuites/sptests/sp08/init.c:#define PRIxModes_Control      PRIx32
 ./testsuites/sptests/sp08/init.c:#define PRIxrtems_mode
 PRIxModes_Control
 ./testsuites/sptests/sp47/init.c:#define PRIXModes_Control      PRIX32
 ./testsuites/sptests/sp47/init.c:#define PRIXrtems_mode
 PRIXModes_Control

--
Ticket URL: <http://devel.rtems.org/ticket/2983>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list