diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-02-15 03:33:23 +0000 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-02-15 03:33:23 +0000 |
commit | 34276794ce110cd2f9204e4b504aea41fb584145 (patch) | |
tree | 614343b8dd17e74468019c46daabd3861ef8dfbc /core/glibc/glibc-2.18-scanf-parse-0e-0.patch | |
parent | 86a5624291a8a72d9a0a2c51fcc64bf6e221524b (diff) |
Sat Feb 15 03:31:19 UTC 2014
Diffstat (limited to 'core/glibc/glibc-2.18-scanf-parse-0e-0.patch')
-rw-r--r-- | core/glibc/glibc-2.18-scanf-parse-0e-0.patch | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/core/glibc/glibc-2.18-scanf-parse-0e-0.patch b/core/glibc/glibc-2.18-scanf-parse-0e-0.patch deleted file mode 100644 index 651e56590..000000000 --- a/core/glibc/glibc-2.18-scanf-parse-0e-0.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff --git a/stdio-common/tst-sscanf.c b/stdio-common/tst-sscanf.c -index 1edb227..3c34f58 100644 ---- a/stdio-common/tst-sscanf.c -+++ b/stdio-common/tst-sscanf.c -@@ -109,6 +109,19 @@ struct test double_tests[] = - { L("-inf"), L("%g"), 1 } - }; - -+struct test2 -+{ -+ const CHAR *str; -+ const CHAR *fmt; -+ int retval; -+ char residual; -+} double_tests2[] = -+{ -+ { L("0e+0"), L("%g%c"), 1, 0 }, -+ { L("0xe+0"), L("%g%c"), 2, '+' }, -+ { L("0x.e+0"), L("%g%c"), 2, '+' }, -+}; -+ - int - main (void) - { -@@ -196,5 +209,26 @@ main (void) - } - } - -+ for (i = 0; i < sizeof (double_tests2) / sizeof (double_tests2[0]); ++i) -+ { -+ double dummy; -+ int ret; -+ char c = 0; -+ -+ if ((ret = SSCANF (double_tests2[i].str, double_tests2[i].fmt, -+ &dummy, &c)) != double_tests2[i].retval) -+ { -+ printf ("double_tests2[%d] returned %d != %d\n", -+ i, ret, double_tests2[i].retval); -+ result = 1; -+ } -+ else if (ret == 2 && c != double_tests2[i].residual) -+ { -+ printf ("double_tests2[%d] stopped at '%c' != '%c'\n", -+ i, c, double_tests2[i].residual); -+ result = 1; -+ } -+ } -+ - return result; - } -diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c -index 78dc2fc..e6fa8f3 100644 ---- a/stdio-common/vfscanf.c -+++ b/stdio-common/vfscanf.c -@@ -1966,6 +1966,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr, - if (width > 0) - --width; - } -+ else -+ got_digit = 1; - } - - while (1) --- -1.8.4.2 - |