[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r16839 - in /fsf/trunk/libc: ./ debug/ elf/ include/ stdio-common/
- To: commits@xxxxxxxxxx
- Subject: [Commits] r16839 - in /fsf/trunk/libc: ./ debug/ elf/ include/ stdio-common/
- From: eglibc@xxxxxxxxxx
- Date: Thu, 26 Jan 2012 00:04:18 -0000
Author: eglibc
Date: Thu Jan 26 00:04:16 2012
New Revision: 16839
Log:
Import glibc-mainline for 2012-01-26
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/debug/tst-chk1.c
fsf/trunk/libc/elf/tst-unique3.cc
fsf/trunk/libc/elf/tst-unique3lib.cc
fsf/trunk/libc/elf/tst-unique3lib2.cc
fsf/trunk/libc/elf/tst-unique4.cc
fsf/trunk/libc/include/stdio.h
fsf/trunk/libc/stdio-common/tst-gets.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Jan 26 00:04:16 2012
@@ -1,3 +1,17 @@
+2012-01-25 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * elf/tst-unique3.cc (gets): Remove declaration.
+ * elf/tst-unique3lib.cc (gets): Likewise.
+ * elf/tst-unique3lib2.cc (gets): Likewise.
+ * elf/tst-unique4.cc (gets): Likewise.
+
+2012-01-24 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * include/stdio.h: Add C++ protection. Add gets declarations and
+ definitions.
+ * debug/tst-chk1.c: Don't declare gets here.
+ * stdio-common/tst-gets.c: Likewise.
+
2012-01-24 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* posix/glob: Remove directory.
Modified: fsf/trunk/libc/debug/tst-chk1.c
==============================================================================
--- fsf/trunk/libc/debug/tst-chk1.c (original)
+++ fsf/trunk/libc/debug/tst-chk1.c Thu Jan 26 00:04:16 2012
@@ -34,11 +34,6 @@
#include <sys/socket.h>
#include <sys/un.h>
-__BEGIN_DECLS
-/* The <stdio.h> header does not include the declaration for gets
- anymore when compiling with _GNU_SOURCE. Provide a copy here. */
-extern char *gets (char *__s);
-__END_DECLS
#define obstack_chunk_alloc malloc
#define obstack_chunk_free free
Modified: fsf/trunk/libc/elf/tst-unique3.cc
==============================================================================
--- fsf/trunk/libc/elf/tst-unique3.cc (original)
+++ fsf/trunk/libc/elf/tst-unique3.cc Thu Jan 26 00:04:16 2012
@@ -1,5 +1,4 @@
#include "tst-unique3.h"
-extern char *gets (char *);
#include <cstdio>
#include "../dlfcn/dlfcn.h"
Modified: fsf/trunk/libc/elf/tst-unique3lib.cc
==============================================================================
--- fsf/trunk/libc/elf/tst-unique3lib.cc (original)
+++ fsf/trunk/libc/elf/tst-unique3lib.cc Thu Jan 26 00:04:16 2012
@@ -1,5 +1,3 @@
-extern char *gets (char *);
-
#include <cstdio>
#include "tst-unique3.h"
template<typename T> int S<T>::i = 1;
Modified: fsf/trunk/libc/elf/tst-unique3lib2.cc
==============================================================================
--- fsf/trunk/libc/elf/tst-unique3lib2.cc (original)
+++ fsf/trunk/libc/elf/tst-unique3lib2.cc Thu Jan 26 00:04:16 2012
@@ -1,5 +1,3 @@
-extern char *gets (char *);
-
#include <cstdio>
#include "tst-unique3.h"
Modified: fsf/trunk/libc/elf/tst-unique4.cc
==============================================================================
--- fsf/trunk/libc/elf/tst-unique4.cc (original)
+++ fsf/trunk/libc/elf/tst-unique4.cc Thu Jan 26 00:04:16 2012
@@ -1,6 +1,5 @@
// BZ 12511
#include "tst-unique4.h"
-extern char *gets (char *);
#include <cstdio>
Modified: fsf/trunk/libc/include/stdio.h
==============================================================================
--- fsf/trunk/libc/include/stdio.h (original)
+++ fsf/trunk/libc/include/stdio.h Thu Jan 26 00:04:16 2012
@@ -5,6 +5,8 @@
# include <libio/stdio.h>
/* Now define the internal interfaces. */
+__BEGIN_DECLS
+
extern int __fcloseall (void);
extern int __snprintf (char *__restrict __s, size_t __maxlen,
const char *__restrict __format, ...)
@@ -164,6 +166,26 @@
libc_hidden_proto (__vasprintf_chk)
libc_hidden_proto (__vdprintf_chk)
libc_hidden_proto (__obstack_vprintf_chk)
+
+/* The <stdio.h> header does not include the declaration for gets
+ anymore when compiling with _GNU_SOURCE. Provide a copy here. */
+extern char *gets (char *__s);
+# if __USE_FORTIFY_LEVEL > 0
+extern char *__gets_chk (char *__str, size_t) __wur;
+extern char *__REDIRECT (__gets_warn, (char *__str), gets)
+ __wur __warnattr ("please use fgets or getline instead, gets can't "
+ "specify buffer size");
+
+__extern_always_inline __wur char *
+gets (char *__str)
+{
+ if (__bos (__str) != (size_t) -1)
+ return __gets_chk (__str, __bos (__str));
+ return __gets_warn (__str);
+}
+# endif
+
+__END_DECLS
# endif
#endif
Modified: fsf/trunk/libc/stdio-common/tst-gets.c
==============================================================================
--- fsf/trunk/libc/stdio-common/tst-gets.c (original)
+++ fsf/trunk/libc/stdio-common/tst-gets.c Thu Jan 26 00:04:16 2012
@@ -1,5 +1,5 @@
/* Tests for gets.
- Copyright (C) 2001, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2001.
@@ -20,10 +20,6 @@
#include <stdio.h>
#include <string.h>
-
-/* The <stdio.h> header does not include the declaration for gets
- anymore when compiling with _GNU_SOURCE. Provide a copy here. */
-extern char *gets (char *__s);
int
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits