aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/config/locale/gnu
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2010-06-03 23:11:46 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2010-06-03 23:11:46 +0000
commit445877a9da79aad47e0eb895dd0270fda8a29b85 (patch)
treeeb879b8d32b59d997be9b0c425cc28a80cfcb039 /libstdc++-v3/config/locale/gnu
parentbb6c4ac85a9fe189488bbe48541218b61342937f (diff)
downloadgcc-445877a9da79aad47e0eb895dd0270fda8a29b85.zip
gcc-445877a9da79aad47e0eb895dd0270fda8a29b85.tar.gz
gcc-445877a9da79aad47e0eb895dd0270fda8a29b85.tar.bz2
testsuite_iterators.h: Don't include <cstddef>, don't use NULL, use std::size_t and std::ptrdiff_t.
2010-06-03 Paolo Carlini <paolo.carlini@oracle.com> * testsuite/util/testsuite_iterators.h: Don't include <cstddef>, don't use NULL, use std::size_t and std::ptrdiff_t. * testsuite/18_support/exception/38732.cc: Likewise. * testsuite/22_locale/time_put/put/wchar_t/12439_1.cc: Likewise. * testsuite/22_locale/time_put/put/wchar_t/12439_2.cc: Likewise. * testsuite/22_locale/time_put/put/wchar_t/12439_3.cc: Likewise. * testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise. * testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise. * testsuite/23_containers/list/pthread1.cc: Likewise. * testsuite/23_containers/map/pthread6.cc: Likewise. * testsuite/util/testsuite_hooks.cc: Likewise. * config/locale/gnu/codecvt_members.cc: Likewise. * config/locale/gnu/messages_members.cc: Likewise. * config/locale/gnu/c_locale.h: Likewise. * config/locale/gnu/messages_members.h: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/c_locale.cc: Likewise. * config/locale/generic/codecvt_members.cc: Likewise. * config/locale/generic/c_locale.h: Likewise. * config/locale/generic/time_members.cc: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r160238
Diffstat (limited to 'libstdc++-v3/config/locale/gnu')
-rw-r--r--libstdc++-v3/config/locale/gnu/c_locale.h7
-rw-r--r--libstdc++-v3/config/locale/gnu/codecvt_members.cc4
-rw-r--r--libstdc++-v3/config/locale/gnu/messages_members.cc6
-rw-r--r--libstdc++-v3/config/locale/gnu/messages_members.h4
-rw-r--r--libstdc++-v3/config/locale/gnu/monetary_members.cc4
-rw-r--r--libstdc++-v3/config/locale/gnu/time_members.cc4
-rw-r--r--libstdc++-v3/config/locale/gnu/time_members.h11
7 files changed, 20 insertions, 20 deletions
diff --git a/libstdc++-v3/config/locale/gnu/c_locale.h b/libstdc++-v3/config/locale/gnu/c_locale.h
index 749a97a..1809119 100644
--- a/libstdc++-v3/config/locale/gnu/c_locale.h
+++ b/libstdc++-v3/config/locale/gnu/c_locale.h
@@ -1,6 +1,6 @@
// Wrapper for underlying C-language localization -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -40,7 +40,6 @@
#pragma GCC system_header
#include <clocale>
-#include <cstddef>
#define _GLIBCXX_C_LOCALE_GNU 1
@@ -71,8 +70,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__c_locale __old = __gnu_cxx::__uselocale(__cloc);
#else
- char* __old = std::setlocale(LC_NUMERIC, NULL);
- char* __sav = NULL;
+ char* __old = std::setlocale(LC_NUMERIC, 0);
+ char* __sav = 0;
if (__builtin_strcmp(__old, "C"))
{
const size_t __len = __builtin_strlen(__old) + 1;
diff --git a/libstdc++-v3/config/locale/gnu/codecvt_members.cc b/libstdc++-v3/config/locale/gnu/codecvt_members.cc
index 1215e48..7cc12ed 100644
--- a/libstdc++-v3/config/locale/gnu/codecvt_members.cc
+++ b/libstdc++-v3/config/locale/gnu/codecvt_members.cc
@@ -1,6 +1,6 @@
// std::codecvt implementation details, GNU version -*- C++ -*-
-// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -268,7 +268,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// mbrtowc.
for (__from = __tmp_from;; __from += __conv)
{
- __conv = mbrtowc(NULL, __from, __end - __from,
+ __conv = mbrtowc(0, __from, __end - __from,
&__tmp_state);
if (__conv == static_cast<size_t>(-1)
|| __conv == static_cast<size_t>(-2))
diff --git a/libstdc++-v3/config/locale/gnu/messages_members.cc b/libstdc++-v3/config/locale/gnu/messages_members.cc
index 1a42b38..94ebcb5 100644
--- a/libstdc++-v3/config/locale/gnu/messages_members.cc
+++ b/libstdc++-v3/config/locale/gnu/messages_members.cc
@@ -1,6 +1,6 @@
// std::messages implementation details, GNU version -*- C++ -*-
-// Copyright (C) 2001, 2002, 2005, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2005, 2009, 2010 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
@@ -44,7 +44,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__uselocale(__old);
return string(__msg);
#else
- char* __old = setlocale(LC_ALL, NULL);
+ char* __old = setlocale(LC_ALL, 0);
const size_t __len = strlen(__old) + 1;
char* __sav = new char[__len];
memcpy(__sav, __old, __len);
@@ -67,7 +67,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__uselocale(__old);
return _M_convert_from_char(__msg);
# else
- char* __old = setlocale(LC_ALL, NULL);
+ char* __old = setlocale(LC_ALL, 0);
const size_t __len = strlen(__old) + 1;
char* __sav = new char[__len];
memcpy(__sav, __old, __len);
diff --git a/libstdc++-v3/config/locale/gnu/messages_members.h b/libstdc++-v3/config/locale/gnu/messages_members.h
index 8773562..b633efa 100644
--- a/libstdc++-v3/config/locale/gnu/messages_members.h
+++ b/libstdc++-v3/config/locale/gnu/messages_members.h
@@ -1,6 +1,6 @@
// std::messages implementation details, GNU version -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -48,7 +48,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
template<typename _CharT>
messages<_CharT>::messages(__c_locale __cloc, const char* __s,
size_t __refs)
- : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL)
+ : facet(__refs), _M_c_locale_messages(0), _M_name_messages(0)
{
if (__builtin_strcmp(__s, _S_get_c_name()) != 0)
{
diff --git a/libstdc++-v3/config/locale/gnu/monetary_members.cc b/libstdc++-v3/config/locale/gnu/monetary_members.cc
index 159eb97..e5f90ca 100644
--- a/libstdc++-v3/config/locale/gnu/monetary_members.cc
+++ b/libstdc++-v3/config/locale/gnu/monetary_members.cc
@@ -574,7 +574,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__c_locale __old = __uselocale(__cloc);
#else
// Switch to named locale so that mbsrtowcs will work.
- char* __old = setlocale(LC_ALL, NULL);
+ char* __old = setlocale(LC_ALL, 0);
const size_t __llen = strlen(__old) + 1;
char* __sav = new char[__llen];
memcpy(__sav, __old, __llen);
@@ -757,7 +757,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__c_locale __old = __uselocale(__cloc);
#else
// Switch to named locale so that mbsrtowcs will work.
- char* __old = setlocale(LC_ALL, NULL);
+ char* __old = setlocale(LC_ALL, 0);
const size_t __llen = strlen(__old) + 1;
char* __sav = new char[__llen];
memcpy(__sav, __old, __llen);
diff --git a/libstdc++-v3/config/locale/gnu/time_members.cc b/libstdc++-v3/config/locale/gnu/time_members.cc
index 43cab22..cf13971 100644
--- a/libstdc++-v3/config/locale/gnu/time_members.cc
+++ b/libstdc++-v3/config/locale/gnu/time_members.cc
@@ -45,7 +45,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
_M_c_locale_timepunct);
#else
- char* __old = setlocale(LC_ALL, NULL);
+ char* __old = setlocale(LC_ALL, 0);
const size_t __llen = strlen(__old) + 1;
char* __sav = new char[__llen];
memcpy(__sav, __old, __llen);
@@ -201,7 +201,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
_M_c_locale_timepunct);
#else
- char* __old = setlocale(LC_ALL, NULL);
+ char* __old = setlocale(LC_ALL, 0);
const size_t __llen = strlen(__old) + 1;
char* __sav = new char[__llen];
memcpy(__sav, __old, __llen);
diff --git a/libstdc++-v3/config/locale/gnu/time_members.h b/libstdc++-v3/config/locale/gnu/time_members.h
index 90bc0ce..5b81d9c 100644
--- a/libstdc++-v3/config/locale/gnu/time_members.h
+++ b/libstdc++-v3/config/locale/gnu/time_members.h
@@ -1,6 +1,7 @@
// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+// 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -39,21 +40,21 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
template<typename _CharT>
__timepunct<_CharT>::__timepunct(size_t __refs)
- : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
+ : facet(__refs), _M_data(0), _M_c_locale_timepunct(0),
_M_name_timepunct(_S_get_c_name())
{ _M_initialize_timepunct(); }
template<typename _CharT>
__timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
- : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
+ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(0),
_M_name_timepunct(_S_get_c_name())
{ _M_initialize_timepunct(); }
template<typename _CharT>
__timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
size_t __refs)
- : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
- _M_name_timepunct(NULL)
+ : facet(__refs), _M_data(0), _M_c_locale_timepunct(0),
+ _M_name_timepunct(0)
{
if (__builtin_strcmp(__s, _S_get_c_name()) != 0)
{