summary refs log tree commit diff
path: root/libio
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2012-01-07 10:39:03 -0500
committerUlrich Drepper <drepper@gmail.com>2012-01-07 10:39:03 -0500
commitfbb68a84ee16345203f896f29b93e92a52582201 (patch)
tree6ea41119ba1f55d479effba3e922845d5f76b9e2 /libio
parent28926a1be178dd3b5811219e32b0d6b937bf21cf (diff)
parent8ecd6b2a1283a28bcf56cfe48099fafa412a3929 (diff)
downloadglibc-fbb68a84ee16345203f896f29b93e92a52582201.tar.gz
glibc-fbb68a84ee16345203f896f29b93e92a52582201.tar.xz
glibc-fbb68a84ee16345203f896f29b93e92a52582201.zip
Merge branch 'master' of ssh://sourceware.org/git/glibc
Conflicts:
	ChangeLog
Diffstat (limited to 'libio')
-rw-r--r--libio/stdio.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/libio/stdio.h b/libio/stdio.h
index b39202879c..d9cb573b6b 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -1,5 +1,5 @@
 /* Define ISO C stdio on top of C++ iostreams.
-   Copyright (C) 1991, 1994-2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1994-2011, 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
@@ -628,13 +628,16 @@ __BEGIN_NAMESPACE_STD
 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
      __wur;
 
-#ifndef __USE_ISOC11
+#if !defined __USE_ISOC11 \
+    || (defined __cplusplus && __cplusplus <= 201103L)
 /* Get a newline-terminated string from stdin, removing the newline.
    DO NOT USE THIS FUNCTION!!  There is no limit on how much it will read.
 
    The function has been officially removed in ISO C11.  This opportunity
    is used to also remove it from the GNU feature list.  It is now only
    available when explicitly using an old ISO C, Unix, or POSIX standard.
+   GCC defines _GNU_SOURCE when building C++ code and the function is still
+   in C++11, so it is also available for C++.
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */