Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/modules/examples/current_time Switch to type generic PRI...



details:   https://anonhg.NetBSD.org/src/rev/86236004db62
branches:  trunk
changeset: 850477:86236004db62
user:      kamil <kamil%NetBSD.org@localhost>
date:      Sat Apr 04 23:22:12 2020 +0000

description:
Switch to type generic PRIu macros

Fixes build on i386.

diffstat:

 sys/modules/examples/current_time/current_time.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 66d69395da74 -r 86236004db62 sys/modules/examples/current_time/current_time.c
--- a/sys/modules/examples/current_time/current_time.c  Sat Apr 04 23:19:08 2020 +0000
+++ b/sys/modules/examples/current_time/current_time.c  Sat Apr 04 23:22:12 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: current_time.c,v 1.1 2020/04/04 21:15:04 kamil Exp $  */
+/*     $NetBSD: current_time.c,v 1.2 2020/04/04 23:22:12 kamil Exp $  */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: current_time.c,v 1.1 2020/04/04 21:15:04 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: current_time.c,v 1.2 2020/04/04 23:22:12 kamil Exp $");
 
 #include <sys/param.h>
 #include <sys/module.h>
@@ -55,7 +55,8 @@
        getmicrotime(&tv);
        clock_secs_to_ymdhms(tv.tv_sec, &dt);
     
-       printf("Current Time: %s, %04lu/%02u/%02u %02u:%02u:%02u UTC\n",
+       printf("Current Time: %s, %04" PRIu64 "/%02" PRIu8 "/%02" PRIu8
+           " %02" PRIu8 ":%02" PRIu8 ":%02" PRIu8 " UTC\n",
            w_day[dt.dt_wday], dt.dt_year, dt.dt_mon, dt.dt_day, dt.dt_hour,
            dt.dt_min, dt.dt_sec);
 }



Home | Main Index | Thread Index | Old Index