summaryrefslogtreecommitdiffstats
path: root/libc/stdio/vfscanf.c
diff options
context:
space:
mode:
authorChris Fries <C.Fries@motorola.com>2011-05-04 09:54:06 -0500
committerChris Fries <C.Fries@motorola.com>2011-05-05 11:02:33 -0500
commit712e4f81e066578b0925dbfb5a6b664aeba5f564 (patch)
tree9a587fdc41cf8409ca832b58234843c552ba72d4 /libc/stdio/vfscanf.c
parente274a9fac077d350391b721e9a08b650b243577e (diff)
downloadbionic-712e4f81e066578b0925dbfb5a6b664aeba5f564.zip
bionic-712e4f81e066578b0925dbfb5a6b664aeba5f564.tar.gz
bionic-712e4f81e066578b0925dbfb5a6b664aeba5f564.tar.bz2
vfscanf: Add support for L type modifier for long long
scanf()'s man page suggests support for %Ld, (and ioux). Implement this so that 3rd party code will work correctly. Change-Id: Idce9d266071cb688ca71429395a2d9edf6813595
Diffstat (limited to 'libc/stdio/vfscanf.c')
-rw-r--r--libc/stdio/vfscanf.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libc/stdio/vfscanf.c b/libc/stdio/vfscanf.c
index dbd0a8b..c48dd36 100644
--- a/libc/stdio/vfscanf.c
+++ b/libc/stdio/vfscanf.c
@@ -159,7 +159,13 @@ literal:
flags |= MAXINT;
goto again;
case 'L':
- flags |= LONGDBL;
+ flags |=
+ (*fmt == 'd') ? LLONG :
+ (*fmt == 'i') ? LLONG :
+ (*fmt == 'o') ? LLONG :
+ (*fmt == 'u') ? LLONG :
+ (*fmt == 'x') ? LLONG :
+ LONGDBL;
goto again;
case 'h':
if (*fmt == 'h') {