X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Ffopen.c;h=8fead5a81a5bdec7e4433cc84cb32628a29a3870;hb=7ef6c64e210ac0979d7e8ac69bc5b5208c2405ab;hp=81c861724ec751a5b51ada8a7b6834c474ecd050;hpb=d60f3b0c6b0f93a601acd1cfd3923f94ca05abb0;p=gnulib.git diff --git a/lib/fopen.c b/lib/fopen.c index 81c861724..8fead5a81 100644 --- a/lib/fopen.c +++ b/lib/fopen.c @@ -1,5 +1,5 @@ /* Open a stream to a file. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,21 +16,26 @@ /* Written by Bruno Haible , 2007. */ +/* If the user's config.h happens to include , let it include only + the system's here, so that orig_fopen doesn't recurse to + rpl_fopen. */ +#define __need_FILE #include /* Get the original definition of fopen. It might be defined as a macro. */ -#define __need_FILE #include #undef __need_FILE -static inline FILE * +static FILE * orig_fopen (const char *filename, const char *mode) { return fopen (filename, mode); } /* Specification. */ -#include +/* Write "stdio.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates + this include because of the preliminary #include above. */ +#include "stdio.h" #include #include