Module Name:    src
Committed By:   christos
Date:           Wed Jan 20 15:43:05 UTC 2016

Modified Files:
        src/lib/libc/gen: fmtcheck.c

Log Message:
Add support for Windows I{32,64} formats from Jason Hood via file(1).


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/gen/fmtcheck.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/gen/fmtcheck.c
diff -u src/lib/libc/gen/fmtcheck.c:1.9 src/lib/libc/gen/fmtcheck.c:1.10
--- src/lib/libc/gen/fmtcheck.c:1.9	Sat Jun 14 04:18:24 2014
+++ src/lib/libc/gen/fmtcheck.c	Wed Jan 20 10:43:05 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fmtcheck.c,v 1.9 2014/06/14 08:18:24 apb Exp $	*/
+/*	$NetBSD: fmtcheck.c,v 1.10 2016/01/20 15:43:05 christos Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fmtcheck.c,v 1.9 2014/06/14 08:18:24 apb Exp $");
+__RCSID("$NetBSD: fmtcheck.c,v 1.10 2016/01/20 15:43:05 christos Exp $");
 #endif
 
 #include "namespace.h"
@@ -101,6 +101,23 @@ get_next_format_from_precision(const cha
 		f++;
 		longdouble = 1;
 		break;
+#ifdef WIN32
+	case 'I':
+		f++;
+		if (!*f) RETURN(pf,f,FMTCHECK_UNKNOWN);
+		if (*f == '3' && f[1] == '2') {
+			f += 2;
+		} else if (*f == '6' && f[1] == '4') {
+			f += 2;
+			quad = 1;
+		}
+#ifdef _WIN64
+		else {
+			quad = 1;
+		}
+#endif
+		break;
+#endif
 	default:
 		break;
 	}

Reply via email to