smock: Document how to use it without httpd
[fedora-mingw.git] / gmp / mingw32-gmp-4.2.4-sscanf-test.patch
1 --- gmp-4.2.4.orig/tests/misc/t-scanf.c 2008-08-02 21:11:59.000000000 +0100
2 +++ gmp-4.2.4.sscanf/tests/misc/t-scanf.c       2009-01-28 16:42:26.000000000 +0000
3 @@ -93,6 +93,24 @@
4    return result;
5  }
6  
7 +/* This is a problem found on i686-pc-mingw32, running binaries under
8 +   Wine.  Windows scanf functions don't skip whitespace before %-specifiers
9 +   [http://msdn.microsoft.com/en-us/library/kwwtf9ch(VS.71).aspx] */
10 +int
11 +test_sscanf_s_skips_whitespace (void)
12 +{
13 +  char str[16];
14 +
15 +  if (sscanf (" ", "%s", str) == EOF)
16 +    return 1;
17 +  else
18 +    {
19 +      printf ("Warning, sscanf (\" \", \"%s\", str) != EOF.\n");
20 +      printf ("This affects gmp_sscanf, some tests will be suppressed.\n");
21 +      return 0;
22 +    }
23 +}
24 +
25  
26  /* Convert fmt from a GMP scanf format string to an equivalent for a plain
27     libc scanf, for example "%Zd" becomes "%ld".  Return 1 if this succeeds,
28 @@ -1489,6 +1507,7 @@
29    }
30  
31    /* EOF for no matching */
32 +  if (test_sscanf_s_skips_whitespace ())
33    {
34      char buf[128];
35      ret = gmp_sscanf ("   ", "%s", buf);