Changeset f922d1d in rtems


Ignore:
Timestamp:
10/02/11 10:37:28 (12 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.11, 5, master
Children:
f2f1d342
Parents:
ff09991
Message:

2011-10-02 Ralf Corsépius <ralf.corsepius@…>

  • libmisc/uuid/gen_uuid.c: Introduce PRIutime_t, SCNutime_t and "utime_t" for 64bit-time_t support.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rff09991 rf922d1d  
    112011-10-02      Ralf Corsépius <ralf.corsepius@rtems.org>
    22
    3         * libmisc/shell/main_time.c: Introduce PRIutime_t, SCNutime_t and
     3        * libmisc/uuid/gen_uuid.c: Introduce PRIutime_t, SCNutime_t and
    44        "utime_t" for 64bit-time_t support.
    55
  • cpukit/libmisc/uuid/gen_uuid.c

    rff09991 rf922d1d  
    9696#endif
    9797
     98#if SIZEOF_TIME_T == 8
     99#define PRIutime_t      PRIu64
     100#define SCNutime_t      SCNu64
     101#define utime_t         uint64_t
     102#elif SIZEOF_TIME_T == 4
     103#define PRIutime_t      PRIu32
     104#define SCNutime_t      SCNu32
     105#define utime_t         uint32_t
     106#else
     107#error "unsupport size of time_t"
     108#endif
     109
    98110#include "uuidP.h"
    99111#include "uuidd.h"
     
    353365        if (state_fd >= 0) {
    354366                unsigned int cl;
    355                 unsigned long tv1, tv2;
     367                utime_t tv1;
     368                unsigned long tv2;
    356369                int a;
    357370
    358                 if (fscanf(state_f, "clock: %04x tv: %lu %lu adj: %d\n",
     371                if (fscanf(state_f, "clock: %04x tv: %" SCNutime_t " %lu adj: %d\n",
    359372                           &cl, &tv1, &tv2, &a) == 4) {
    360373                        clock_seq = cl & 0x3FFF;
     
    405418                rewind(state_f);
    406419                len = fprintf(state_f,
    407                               "clock: %04x tv: %016lu %08lu adj: %08d\n",
     420                              "clock: %04x tv: %016" PRIutime_t " %08lu adj: %08d\n",
    408421                              clock_seq, last.tv_sec, last.tv_usec, adjustment);
    409422                fflush(state_f);
Note: See TracChangeset for help on using the changeset viewer.