1cea198a11f15a2eb071d98491ca9a8bc8cebfbc4The Android Open Source Project/* Like stdio.h, but redefine some names to avoid glitches.
2cea198a11f15a2eb071d98491ca9a8bc8cebfbc4The Android Open Source Project
305436638acc7c010349a69c3395f1a57c642dc62Ying Wang   Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc.
4cea198a11f15a2eb071d98491ca9a8bc8cebfbc4The Android Open Source Project
505436638acc7c010349a69c3395f1a57c642dc62Ying Wang   This program is free software: you can redistribute it and/or modify
6cea198a11f15a2eb071d98491ca9a8bc8cebfbc4The Android Open Source Project   it under the terms of the GNU General Public License as published by
705436638acc7c010349a69c3395f1a57c642dc62Ying Wang   the Free Software Foundation; either version 3 of the License, or
805436638acc7c010349a69c3395f1a57c642dc62Ying Wang   (at your option) any later version.
9cea198a11f15a2eb071d98491ca9a8bc8cebfbc4The Android Open Source Project
10cea198a11f15a2eb071d98491ca9a8bc8cebfbc4The Android Open Source Project   This program is distributed in the hope that it will be useful,
11cea198a11f15a2eb071d98491ca9a8bc8cebfbc4The Android Open Source Project   but WITHOUT ANY WARRANTY; without even the implied warranty of
12cea198a11f15a2eb071d98491ca9a8bc8cebfbc4The Android Open Source Project   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13cea198a11f15a2eb071d98491ca9a8bc8cebfbc4The Android Open Source Project   GNU General Public License for more details.
14cea198a11f15a2eb071d98491ca9a8bc8cebfbc4The Android Open Source Project
15cea198a11f15a2eb071d98491ca9a8bc8cebfbc4The Android Open Source Project   You should have received a copy of the GNU General Public License
1605436638acc7c010349a69c3395f1a57c642dc62Ying Wang   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
17cea198a11f15a2eb071d98491ca9a8bc8cebfbc4The Android Open Source Project
18cea198a11f15a2eb071d98491ca9a8bc8cebfbc4The Android Open Source Project/* Written by Paul Eggert.  */
19cea198a11f15a2eb071d98491ca9a8bc8cebfbc4The Android Open Source Project
20cea198a11f15a2eb071d98491ca9a8bc8cebfbc4The Android Open Source Project#include <stdio.h>
21cea198a11f15a2eb071d98491ca9a8bc8cebfbc4The Android Open Source Project#include "stdio-safer.h"
22cea198a11f15a2eb071d98491ca9a8bc8cebfbc4The Android Open Source Project
2305436638acc7c010349a69c3395f1a57c642dc62Ying Wang#if GNULIB_FOPEN_SAFER
2405436638acc7c010349a69c3395f1a57c642dc62Ying Wang# undef fopen
2505436638acc7c010349a69c3395f1a57c642dc62Ying Wang# define fopen fopen_safer
2605436638acc7c010349a69c3395f1a57c642dc62Ying Wang#endif
2705436638acc7c010349a69c3395f1a57c642dc62Ying Wang
2805436638acc7c010349a69c3395f1a57c642dc62Ying Wang#if GNULIB_FREOPEN_SAFER
2905436638acc7c010349a69c3395f1a57c642dc62Ying Wang# undef freopen
3005436638acc7c010349a69c3395f1a57c642dc62Ying Wang# define freopen freopen_safer
3105436638acc7c010349a69c3395f1a57c642dc62Ying Wang#endif
3205436638acc7c010349a69c3395f1a57c642dc62Ying Wang
3305436638acc7c010349a69c3395f1a57c642dc62Ying Wang#if GNULIB_TMPFILE_SAFER
3405436638acc7c010349a69c3395f1a57c642dc62Ying Wang# undef tmpfile
3505436638acc7c010349a69c3395f1a57c642dc62Ying Wang# define tmpfile tmpfile_safer
3605436638acc7c010349a69c3395f1a57c642dc62Ying Wang#endif
3705436638acc7c010349a69c3395f1a57c642dc62Ying Wang
3805436638acc7c010349a69c3395f1a57c642dc62Ying Wang#if GNULIB_POPEN_SAFER
3905436638acc7c010349a69c3395f1a57c642dc62Ying Wang# undef popen
4005436638acc7c010349a69c3395f1a57c642dc62Ying Wang# define popen popen_safer
4105436638acc7c010349a69c3395f1a57c642dc62Ying Wang#endif
42