This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix libio operator << with glibc 2.2
- To: gcc-patches at gcc dot gnu dot org
- Subject: [PATCH] Fix libio operator << with glibc 2.2
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Wed, 11 Oct 2000 10:11:09 +0200
- Cc: Ulrich Drepper <drepper at redhat dot com>
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
Hi!
Without this libstdc++ v2 uses wrong padding character for floating values.
Ok to commit?
2000-10-11 Jakub Jelinek <jakub@redhat.com>
* iostream.cc (ostream::operator<<(double n)) [__GLIBC_MINOR__ >= 2]:
Initialize new fields wide and i18n of struct printf_info.
(ostream::operator<<(long double n)) [__GLIBC_MINOR__ >= 2]:
Likewise.
--- gcc/libio/iostream.cc.jj Wed May 24 09:06:07 2000
+++ gcc/libio/iostream.cc Wed Oct 11 10:04:22 2000
@@ -1,5 +1,5 @@
/* This is part of libio/iostream, providing -*- C++ -*- input/output.
- Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU IO Library. This library is free
software; you can redistribute it and/or modify it under the
@@ -687,6 +687,10 @@ ostream& ostream::operator<<(double n)
/* extra: */ 0,
#if __GLIBC_MINOR__ >= 1
/* is_char: */ 0,
+#if __GLIBC_MINOR__ >= 2
+ /* wide: */ 0,
+ /* i18n: */ 0,
+#endif
#endif
#endif
/* pad: */ fill()
@@ -793,6 +797,10 @@ ostream& ostream::operator<<(long double
/* extra: */ 0,
#if __GLIBC_MINOR__ >= 1
/* is_char: */ 0,
+#if __GLIBC_MINOR__ >= 2
+ /* wide: */ 0,
+ /* i18n: */ 0,
+#endif
#endif
#endif
/* pad: */ fill()
Jakub