summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2005-09-23 02:33:34 +0000
committertedu <tedu@openbsd.org>2005-09-23 02:33:34 +0000
commit79a35ee84b4c06fe75e93c943aebc2905b689e97 (patch)
tree6163202f7538d72a17bc06b15f7b1eef628cac63 /lib/libc
parent- fix PowerNow flags, cosmetic, only affects dmesg output. (diff)
downloadwireguard-openbsd-79a35ee84b4c06fe75e93c943aebc2905b689e97.tar.xz
wireguard-openbsd-79a35ee84b4c06fe75e93c943aebc2905b689e97.zip
support %jd from c99, although intmax_t may not be available.
ok deraadt espie kettenis
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdio/printf.317
-rw-r--r--lib/libc/stdio/vfprintf.c5
2 files changed, 20 insertions, 2 deletions
diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3
index 0678581bff4..e6fe04825f7 100644
--- a/lib/libc/stdio/printf.3
+++ b/lib/libc/stdio/printf.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: printf.3,v 1.49 2005/07/26 03:30:25 jaredy Exp $
+.\" $OpenBSD: printf.3,v 1.50 2005/09/23 02:33:34 tedu Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -304,6 +304,21 @@ string for
conversions.
.It
The optional character
+.Cm j ,
+specifying that a following
+.Cm d ,
+.Cm i ,
+.Cm o ,
+.Cm u ,
+.Cm x ,
+or
+.Cm X
+conversion corresponds to an
+.Li intmax_t
+or
+.Li uintmax_t
+argument.
+The optional character
.Cm h ,
specifying that a following
.Cm d ,
diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c
index 78c8b77a0d2..2b5314856db 100644
--- a/lib/libc/stdio/vfprintf.c
+++ b/lib/libc/stdio/vfprintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfprintf.c,v 1.32 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: vfprintf.c,v 1.33 2005/09/23 02:33:34 tedu Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
@@ -425,6 +425,9 @@ reswitch: switch (ch) {
case 'h':
flags |= SHORTINT;
goto rflag;
+ case 'j':
+ flags |= QUADINT;
+ goto rflag;
case 'l':
if (*fmt == 'l') {
fmt++;