summaryrefslogtreecommitdiff
path: root/libio/wfiledoalloc.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 15:26:46 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 15:26:46 +0000
commitdf6d86d8822458cf787b5f5620490d6a962da3b8 (patch)
tree8d499fa24a32a195bd6e384dfb70639c45c4a9bb /libio/wfiledoalloc.c
parent2c7242b971fd7b63fa842df15ec6fa3d0ff8aeb0 (diff)
parent1949a12d5da678a8532359a95717d8e63910d93b (diff)
Merge commit 'refs/top-bases/t/____longjmp_chk' into t/____longjmp_chkt/____longjmp_chk
Diffstat (limited to 'libio/wfiledoalloc.c')
-rw-r--r--libio/wfiledoalloc.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/libio/wfiledoalloc.c b/libio/wfiledoalloc.c
index 28c10b6d0d..c3f4ba8cd4 100644
--- a/libio/wfiledoalloc.c
+++ b/libio/wfiledoalloc.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -55,32 +55,14 @@
/* Modified for GNU iostream by Per Bothner 1991, 1992. */
-#ifndef _POSIX_SOURCE
-# define _POSIX_SOURCE
-#endif
#include "libioP.h"
-#include <sys/types.h>
-#include <sys/stat.h>
#include <stdlib.h>
-#include <unistd.h>
-
-#ifdef _LIBC
-# undef isatty
-# define isatty(Fd) __isatty (Fd)
-#endif
-
-/*
- * Allocate a file buffer, or switch to unbuffered I/O.
- * Per the ANSI C standard, ALL tty devices default to line buffered.
- *
- * As a side effect, we set __SOPT or __SNPT (en/dis-able fseek
- * optimisation) right after the _fstat() that finds the buffer size.
- */
+/* Allocate a file buffer, or switch to unbuffered I/O. */
int
-_IO_wfile_doallocate (_IO_FILE *fp)
+_IO_wfile_doallocate (FILE *fp)
{
- _IO_size_t size;
+ size_t size;
wchar_t *p;
/* Allocate room for the external buffer. */