]> git.ipfire.org Git - thirdparty/glibc.git/blame - libio/clearerr.c
Fix BZ #18043 comment # 19: don't call undefined setenv(..., NULL, 1).
[thirdparty/glibc.git] / libio / clearerr.c
CommitLineData
b168057a 1/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
68dbb3a6 2 This file is part of the GNU C Library.
7c713e28 3
68dbb3a6 4 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
7c713e28 8
68dbb3a6
UD
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 12 Lesser General Public License for more details.
7c713e28 13
41bdb6e2 14 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
7c713e28 17
96aa2d94
RM
18#include "libioP.h"
19#include "stdio.h"
20
21void
7c713e28
RM
22clearerr (fp)
23 FILE *fp;
96aa2d94 24{
7c713e28 25 CHECK_FILE (fp, /*nothing*/);
edf5b2d7 26 _IO_flockfile (fp);
7c713e28 27 _IO_clearerr (fp);
edf5b2d7 28 _IO_funlockfile (fp);
96aa2d94 29}
bdb04ee8
UD
30
31#if defined weak_alias && !defined _IO_MTSAFE_IO
32weak_alias (clearerr, clearerr_unlocked)
33#endif