This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] tr1/c_compatibility: cfloat, climits...
- From: Paolo Carlini <pcarlini at suse dot de>
- To: "'gcc-patches at gcc dot gnu dot org'" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 02 Feb 2006 20:49:02 +0100
- Subject: [v3] tr1/c_compatibility: cfloat, climits...
Hi,
tested x86-linux, committed to mainline.
Paolo.
////////////////////
2006-02-02 Paolo Carlini <pcarlini@suse.de>
* include/tr1/cfloat: New.
* include/tr1/climits: Likewise.
* include/tr1/cstdarg: Likewise.
* include/tr1/ctype.h: Likewise.
* include/tr1/fenv.h: Likewise.
* include/tr1/float.h: Likewise.
* include/tr1/inttypes.h: Likewise.
* include/tr1/limits.h: Likewise.
* include/tr1/stdint.h: Likewise.
* include/tr1/stdarg.h: Likewise.
* include/Makefile.am: Add.
* include/Makefile.in: Regenerate.
* docs/html/ext/tr1.html: Update.
* testsuite/tr1/headers.cc: New.
* include/tr1/cctype: Include <cctype> instead.
Index: include/tr1/fenv.h
===================================================================
--- include/tr1/fenv.h (revision 0)
+++ include/tr1/fenv.h (revision 0)
@@ -0,0 +1,39 @@
+// TR1 fenv.h -*- C++ -*-
+
+// Copyright (C) 2006 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This 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 General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/** @file
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_FENV_H
+#define _TR1_FENV_H 1
+
+#include <tr1/cfenv>
+
+#endif
Index: include/tr1/cstdarg
===================================================================
--- include/tr1/cstdarg (revision 0)
+++ include/tr1/cstdarg (revision 0)
@@ -0,0 +1,39 @@
+// TR1 cstdarg -*- C++ -*-
+
+// Copyright (C) 2006 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This 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 General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/** @file
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_CSTDARG
+#define _TR1_CSTDARG 1
+
+#include <cstdarg>
+
+#endif
Index: include/tr1/limits.h
===================================================================
--- include/tr1/limits.h (revision 0)
+++ include/tr1/limits.h (revision 0)
@@ -0,0 +1,39 @@
+// TR1 limits.h -*- C++ -*-
+
+// Copyright (C) 2006 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This 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 General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/** @file
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_LIMITS_H
+#define _TR1_LIMITS_H 1
+
+#include <tr1/climits>
+
+#endif
Index: include/tr1/float.h
===================================================================
--- include/tr1/float.h (revision 0)
+++ include/tr1/float.h (revision 0)
@@ -0,0 +1,39 @@
+// TR1 float.h -*- C++ -*-
+
+// Copyright (C) 2006 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This 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 General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/** @file
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_FLOAT_H
+#define _TR1_FLOAT_H 1
+
+#include <tr1/cfloat>
+
+#endif
Index: include/tr1/stdint.h
===================================================================
--- include/tr1/stdint.h (revision 0)
+++ include/tr1/stdint.h (revision 0)
@@ -0,0 +1,39 @@
+// TR1 stdint.h -*- C++ -*-
+
+// Copyright (C) 2006 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This 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 General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/** @file
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_STDINT_H
+#define _TR1_STDINT_H 1
+
+#include <tr1/cstdint>
+
+#endif
Index: include/tr1/climits
===================================================================
--- include/tr1/climits (revision 0)
+++ include/tr1/climits (revision 0)
@@ -0,0 +1,51 @@
+// TR1 climits -*- C++ -*-
+
+// Copyright (C) 2006 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This 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 General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/** @file
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_CLIMITS
+#define _TR1_CLIMITS 1
+
+#include <climits>
+
+#ifndef LLONG_MIN
+#define LLONG_MIN -__LONG_LONG_MAX__ - 1
+#endif
+
+#ifndef LLONG_MAX
+#define LLONG_MAX __LONG_LONG_MAX__
+#endif
+
+#ifndef ULLONG_MAX
+#define ULLONG_MAX __LONG_LONG_MAX__ * 2ULL + 1
+#endif
+
+#endif
Index: include/tr1/cctype
===================================================================
--- include/tr1/cctype (revision 110510)
+++ include/tr1/cctype (working copy)
@@ -35,7 +35,7 @@
#define _TR1_CCTYPE 1
#include <bits/c++config.h>
-#include <ctype.h>
+#include <cctype>
#if _GLIBCXX_USE_C99_CTYPE_TR1
Index: include/tr1/inttypes.h
===================================================================
--- include/tr1/inttypes.h (revision 0)
+++ include/tr1/inttypes.h (revision 0)
@@ -0,0 +1,46 @@
+// TR1 inttypes.h -*- C++ -*-
+
+// Copyright (C) 2006 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This 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 General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/** @file
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_INTTYPES_H
+#define _TR1_INTTYPES_H 1
+
+#include <tr1/cinttypes>
+
+#if _GLIBCXX_USE_C99_INTTYPES_TR1
+
+using std::tr1::abs;
+using std::tr1::div;
+
+#endif
+
+#endif
Index: include/tr1/cfloat
===================================================================
--- include/tr1/cfloat (revision 0)
+++ include/tr1/cfloat (revision 0)
@@ -0,0 +1,47 @@
+// TR1 cfloat -*- C++ -*-
+
+// Copyright (C) 2006 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This 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 General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/** @file
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_CFLOAT
+#define _TR1_CFLOAT 1
+
+#include <cfloat>
+
+#ifndef DECIMAL_DIG
+#define DECIMAL_DIG __DECIMAL_DIG__
+#endif
+
+#ifndef FLT_EVAL_METHOD
+#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
+#endif
+
+#endif
Index: include/tr1/ctype.h
===================================================================
--- include/tr1/ctype.h (revision 0)
+++ include/tr1/ctype.h (revision 0)
@@ -0,0 +1,39 @@
+// TR1 ctype.h -*- C++ -*-
+
+// Copyright (C) 2006 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This 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 General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/** @file
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_CTYPE_H
+#define _TR1_CTYPE_H 1
+
+#include <tr1/cctype>
+
+#endif
Index: include/tr1/stdarg.h
===================================================================
--- include/tr1/stdarg.h (revision 0)
+++ include/tr1/stdarg.h (revision 0)
@@ -0,0 +1,39 @@
+// TR1 stdarg.h -*- C++ -*-
+
+// Copyright (C) 2006 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This 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 General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/** @file
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_STDARG_H
+#define _TR1_STDARG_H 1
+
+#include <tr1/cstdarg>
+
+#endif
Index: include/Makefile.am
===================================================================
--- include/Makefile.am (revision 110510)
+++ include/Makefile.am (working copy)
@@ -486,18 +486,28 @@
${tr1_srcdir}/boost_shared_ptr.h \
${tr1_srcdir}/cctype \
${tr1_srcdir}/cfenv \
+ ${tr1_srcdir}/cfloat \
${tr1_srcdir}/cinttypes \
+ ${tr1_srcdir}/climits \
${tr1_srcdir}/common.h \
${tr1_srcdir}/complex \
+ ${tr1_srcdir}/cstdarg \
${tr1_srcdir}/cstdint \
+ ${tr1_srcdir}/ctype.h \
+ ${tr1_srcdir}/fenv.h \
+ ${tr1_srcdir}/float.h \
${tr1_srcdir}/functional \
${tr1_srcdir}/functional_iterate.h \
${tr1_srcdir}/hashtable \
+ ${tr1_srcdir}/inttypes.h \
+ ${tr1_srcdir}/limits.h \
${tr1_srcdir}/memory \
${tr1_srcdir}/mu_iterate.h \
${tr1_srcdir}/ref_fwd.h \
${tr1_srcdir}/ref_wrap_iterate.h \
${tr1_srcdir}/repeat.h \
+ ${tr1_srcdir}/stdarg.h \
+ ${tr1_srcdir}/stdint.h \
${tr1_srcdir}/tuple \
${tr1_srcdir}/tuple_iterate.h \
${tr1_srcdir}/type_traits \
Index: docs/html/ext/tr1.html
===================================================================
--- docs/html/ext/tr1.html (revision 110510)
+++ docs/html/ext/tr1.html (working copy)
@@ -1827,9 +1827,9 @@
<tr>
<td>8.5</td>
<td>Additions to header <code><ctype.h></code></td>
+ <td>done</td>
<td></td>
<td></td>
- <td>missing</td>
<td></td>
</tr>
<tr>
@@ -1859,25 +1859,25 @@
<tr>
<td>8.7</td>
<td>Header <code><fenv.h></code></td>
+ <td>done</td>
<td></td>
<td></td>
- <td>missing</td>
<td></td>
</tr>
<tr>
<td>8.8</td>
<td>Additions to header <code><cfloat></code></td>
+ <td>done</td>
<td></td>
<td></td>
- <td>missing</td>
<td></td>
</tr>
<tr>
<td>8.9</td>
<td>Additions to header <code><float.h></code></td>
+ <td>done</td>
<td></td>
<td></td>
- <td>missing</td>
<td></td>
</tr>
<tr>
@@ -1931,25 +1931,25 @@
<tr>
<td>8.12</td>
<td>Header <code><inttypes.h></code></td>
+ <td>done</td>
<td></td>
<td></td>
- <td>missing</td>
<td></td>
</tr>
<tr>
<td>8.13</td>
<td>Additions to header <code><climits></code></td>
+ <td>done</td>
<td></td>
<td></td>
- <td>missing</td>
<td></td>
</tr>
<tr>
<td>8.14</td>
<td>Additions to header <code><limits.h></code></td>
+ <td>done</td>
<td></td>
<td></td>
- <td>missing</td>
<td></td>
</tr>
<tr>
@@ -2011,17 +2011,17 @@
<tr>
<td>8.18</td>
<td>Additions to header <code><cstdarg></code></td>
+ <td>done</td>
<td></td>
<td></td>
- <td>missing</td>
<td></td>
</tr>
<tr>
<td>8.19</td>
<td>Additions to header <code><stdarg.h></code></td>
+ <td>done</td>
<td></td>
<td></td>
- <td>missing</td>
<td></td>
</tr>
<tr>
@@ -2067,9 +2067,9 @@
<tr>
<td>8.23</td>
<td>The header <code><stdint.h></code></td>
+ <td>done</td>
<td></td>
<td></td>
- <td>missing</td>
<td></td>
</tr>
<tr>
Index: testsuite/tr1/headers.cc
===================================================================
--- testsuite/tr1/headers.cc (revision 0)
+++ testsuite/tr1/headers.cc (revision 0)
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2006-02-02 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2006 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This 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 General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <tr1/array>
+#include <tr1/cctype>
+#include <tr1/cfenv>
+#include <tr1/cfloat>
+#include <tr1/cinttypes>
+#include <tr1/climits>
+#include <tr1/complex>
+#include <tr1/cstdarg>
+#include <tr1/cstdint>
+#include <tr1/ctype.h>
+#include <tr1/fenv.h>
+#include <tr1/float.h>
+#include <tr1/functional>
+#include <tr1/hashtable>
+#include <tr1/inttypes.h>
+#include <tr1/limits.h>
+#include <tr1/memory>
+#include <tr1/stdarg.h>
+#include <tr1/stdint.h>
+#include <tr1/tuple>
+#include <tr1/type_traits>
+#include <tr1/unordered_set>
+#include <tr1/unordered_map>
+#include <tr1/utility>