X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstdio-read.c;h=4e87380c23ea8477d288af31f30877581738669a;hb=7ef6c64e210ac0979d7e8ac69bc5b5208c2405ab;hp=358d8cd9df2ad17e1fa010dd5b1563e5abb67f86;hpb=66712c23388e93e5c518ebc8515140fa0c807348;p=gnulib.git diff --git a/lib/stdio-read.c b/lib/stdio-read.c index 358d8cd9d..4e87380c2 100644 --- a/lib/stdio-read.c +++ b/lib/stdio-read.c @@ -1,5 +1,5 @@ /* POSIX compatible FILE stream read function. - Copyright (C) 2008-2012 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify @@ -72,6 +72,9 @@ return ret; \ } +/* Enable this function definition only if gnulib's has prepared it. + Otherwise we get a function definition conflict with mingw64's . */ +# if GNULIB_SCANF int scanf (const char *format, ...) { @@ -84,7 +87,11 @@ scanf (const char *format, ...) return retval; } +# endif +/* Enable this function definition only if gnulib's has prepared it. + Otherwise we get a function definition conflict with mingw64's . */ +# if GNULIB_FSCANF int fscanf (FILE *stream, const char *format, ...) { @@ -97,19 +104,28 @@ fscanf (FILE *stream, const char *format, ...) return retval; } +# endif +/* Enable this function definition only if gnulib's has prepared it. + Otherwise we get a function definition conflict with mingw64's . */ +# if GNULIB_VSCANF int vscanf (const char *format, va_list args) { return vfscanf (stdin, format, args); } +# endif +/* Enable this function definition only if gnulib's has prepared it. + Otherwise we get a function definition conflict with mingw64's . */ +# if GNULIB_VFSCANF int vfscanf (FILE *stream, const char *format, va_list args) #undef vfscanf { CALL_WITH_ERRNO_FIX (int, vfscanf (stream, format, args), ret == EOF) } +# endif int getchar (void)