about summary refs log tree commit diff
path: root/stdio-common
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/_i18n_number.h3
-rw-r--r--stdio-common/reg-modifier.c3
-rw-r--r--stdio-common/tmpfile.c4
-rw-r--r--stdio-common/tmpfile64.c31
-rw-r--r--stdio-common/vfscanf.c1
5 files changed, 37 insertions, 5 deletions
diff --git a/stdio-common/_i18n_number.h b/stdio-common/_i18n_number.h
index f18b152852..17d99112fb 100644
--- a/stdio-common/_i18n_number.h
+++ b/stdio-common/_i18n_number.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2004, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.org>, 2000.
 
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <stdbool.h>
 #include <wchar.h>
 #include <wctype.h>
 
diff --git a/stdio-common/reg-modifier.c b/stdio-common/reg-modifier.c
index dcfd3a812a..697a408f83 100644
--- a/stdio-common/reg-modifier.c
+++ b/stdio-common/reg-modifier.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2012 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
@@ -18,6 +18,7 @@
 #include <errno.h>
 #include <limits.h>
 #include <printf.h>
+#include <stdlib.h>
 #include <wchar.h>
 #include <bits/libc-lock.h>
 
diff --git a/stdio-common/tmpfile.c b/stdio-common/tmpfile.c
index c6da9acb0b..6a4d48e7be 100644
--- a/stdio-common/tmpfile.c
+++ b/stdio-common/tmpfile.c
@@ -58,6 +58,10 @@ tmpfile (void)
   return f;
 }
 
+#if !defined O_LARGEFILE || O_LARGEFILE == 0
+weak_alias (__new_tmpfile, tmpfile64)
+#endif
+
 #ifndef FLAGS /* Not for tmpfile64.  */
 # undef tmpfile
 # include <shlib-compat.h>
diff --git a/stdio-common/tmpfile64.c b/stdio-common/tmpfile64.c
index ead3f50fba..e8ce8930c1 100644
--- a/stdio-common/tmpfile64.c
+++ b/stdio-common/tmpfile64.c
@@ -1,3 +1,28 @@
-#define FLAGS	O_LARGEFILE
-#define tmpfile	tmpfile64
-#include <tmpfile.c>
+/* Open a stdio stream on an anonymous, large temporary file.  Generic version.
+   Copyright (C) 2012 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fcntl.h>
+
+/* If there is no O_LARGEFILE, then the plain tmpfile definition
+   does the job and it gets tmpfile64 as an alias.  */
+
+#if defined O_LARGEFILE && O_LARGEFILE != 0
+# define FLAGS		O_LARGEFILE
+# define tmpfile	tmpfile64
+# include <tmpfile.c>
+#endif
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index 23a8ac7694..43f25caa6f 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -20,6 +20,7 @@
 #include <limits.h>
 #include <ctype.h>
 #include <stdarg.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>