diff options
| author | Daniel Eischen <deischen@FreeBSD.org> | 2001-01-24 13:01:12 +0000 |
|---|---|---|
| committer | Daniel Eischen <deischen@FreeBSD.org> | 2001-01-24 13:01:12 +0000 |
| commit | d201fe46e355212750b727061e6a7ac005267852 (patch) | |
| tree | d949d903e602687ee53252807dc4281a27c4f0c4 /lib/libc/stdio/fclose.c | |
| parent | e0aa5ab7184d7449e4c2e2e65107898ad23b31f7 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdio/fclose.c')
| -rw-r--r-- | lib/libc/stdio/fclose.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/libc/stdio/fclose.c b/lib/libc/stdio/fclose.c index 8ddb98bd11aa..0d6fd80cb92e 100644 --- a/lib/libc/stdio/fclose.c +++ b/lib/libc/stdio/fclose.c @@ -42,17 +42,19 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* LIBC_SCCS and not lint */ +#include "namespace.h" #include <errno.h> #include <stdio.h> #include <stdlib.h> -#include "local.h" +#include "un-namespace.h" #include "libc_private.h" +#include "local.h" int fclose(fp) - register FILE *fp; + FILE *fp; { - register int r; + int r; if (fp->_flags == 0) { /* not open! */ errno = EBADF; @@ -71,6 +73,12 @@ fclose(fp) FUNLOCKFILE(fp); fp->_file = -1; fp->_r = fp->_w = 0; /* Mess up if reaccessed. */ +#if 0 + if (fp->_lock != NULL) { + _pthread_mutex_destroy((pthread_mutex_t *)&fp->_lock); + fp->_lock = NULL; + } +#endif fp->_flags = 0; /* Release this FILE for reuse. */ return (r); } |
