From bea9b19322c77265033a068ac60c95a37e798a80 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 30 Jul 2012 16:09:11 -0700 Subject: Fix lots of bitrot for stub configurations. --- stdio-common/_i18n_number.h | 3 ++- stdio-common/reg-modifier.c | 3 ++- stdio-common/tmpfile.c | 4 ++++ stdio-common/tmpfile64.c | 31 ++++++++++++++++++++++++++++--- stdio-common/vfscanf.c | 1 + 5 files changed, 37 insertions(+), 5 deletions(-) (limited to 'stdio-common') 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 , 2000. @@ -16,6 +16,7 @@ License along with the GNU C Library; if not, see . */ +#include #include #include 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 #include #include +#include #include #include 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 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 +/* 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 + . */ + +#include + +/* 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 +#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 #include #include +#include #include #include #include -- cgit v1.2.3-70-g09d2