aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/src
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r--libstdc++-v3/src/chrono.cc4
-rw-r--r--libstdc++-v3/src/condition_variable.cc4
-rw-r--r--libstdc++-v3/src/localename.cc2
-rw-r--r--libstdc++-v3/src/mt_allocator.cc36
-rw-r--r--libstdc++-v3/src/thread.cc4
5 files changed, 25 insertions, 25 deletions
diff --git a/libstdc++-v3/src/chrono.cc b/libstdc++-v3/src/chrono.cc
index 422b973..6d7a64d 100644
--- a/libstdc++-v3/src/chrono.cc
+++ b/libstdc++-v3/src/chrono.cc
@@ -1,6 +1,6 @@
// chrono -*- C++ -*-
-// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2008, 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
@@ -51,7 +51,7 @@ namespace std
#elif defined(_GLIBCXX_USE_GETTIMEOFDAY)
timeval tv;
// EINVAL, EFAULT
- gettimeofday(&tv, NULL);
+ gettimeofday(&tv, 0);
return time_point(duration(chrono::seconds(tv.tv_sec)
+ chrono::microseconds(tv.tv_usec)));
#else
diff --git a/libstdc++-v3/src/condition_variable.cc b/libstdc++-v3/src/condition_variable.cc
index fdcb6a0..d3f29f6 100644
--- a/libstdc++-v3/src/condition_variable.cc
+++ b/libstdc++-v3/src/condition_variable.cc
@@ -1,6 +1,6 @@
// condition_variable -*- C++ -*-
-// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2008, 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
@@ -34,7 +34,7 @@ namespace std
__native_type __tmp = __GTHREAD_COND_INIT;
_M_cond = __tmp;
#else
- int __e = __gthread_cond_init(&_M_cond, NULL);
+ int __e = __gthread_cond_init(&_M_cond, 0);
if (__e)
__throw_system_error(__e);
diff --git a/libstdc++-v3/src/localename.cc b/libstdc++-v3/src/localename.cc
index 5ee8258..1dc1d68 100644
--- a/libstdc++-v3/src/localename.cc
+++ b/libstdc++-v3/src/localename.cc
@@ -137,7 +137,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
else
- __throw_runtime_error(__N("locale::locale NULL not valid"));
+ __throw_runtime_error(__N("locale::locale null not valid"));
}
locale::locale(const locale& __base, const char* __s, category __cat)
diff --git a/libstdc++-v3/src/mt_allocator.cc b/libstdc++-v3/src/mt_allocator.cc
index 9c3af0e..b04fe5b 100644
--- a/libstdc++-v3/src/mt_allocator.cc
+++ b/libstdc++-v3/src/mt_allocator.cc
@@ -1,6 +1,6 @@
// Allocator details.
-// Copyright (C) 2004, 2005, 2006, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 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
@@ -150,7 +150,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__block->_M_next = reinterpret_cast<_Block_record*>(__c);
__block = __block->_M_next;
}
- __block->_M_next = NULL;
+ __block->_M_next = 0;
__block = __bin._M_first[__thread_id];
__bin._M_first[__thread_id] = __block->_M_next;
@@ -206,8 +206,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_Bin_record& __bin = _M_bin[__n];
__v = ::operator new(sizeof(_Block_record*));
__bin._M_first = static_cast<_Block_record**>(__v);
- __bin._M_first[0] = NULL;
- __bin._M_address = NULL;
+ __bin._M_first[0] = 0;
+ __bin._M_address = 0;
}
_M_init = true;
}
@@ -362,7 +362,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// blocks on global list (and if not add new ones) and
// get the first one.
_Bin_record& __bin = _M_bin[__which];
- _Block_record* __block = NULL;
+ _Block_record* __block = 0;
if (__gthread_active_p())
{
// Resync the _M_used counters.
@@ -374,7 +374,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__atomic_add(&__reclaimed_base[__thread_id], -__reclaimed);
__gthread_mutex_lock(__bin._M_mutex);
- if (__bin._M_first[0] == NULL)
+ if (__bin._M_first[0] == 0)
{
void* __v = ::operator new(__options._M_chunk_size);
_Block_address* __address = static_cast<_Block_address*>(__v);
@@ -395,7 +395,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__block->_M_next = reinterpret_cast<_Block_record*>(__c);
__block = __block->_M_next;
}
- __block->_M_next = NULL;
+ __block->_M_next = 0;
}
else
{
@@ -407,7 +407,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
{
__bin._M_free[__thread_id] = __bin._M_free[0];
__bin._M_free[0] = 0;
- __bin._M_first[0] = NULL;
+ __bin._M_first[0] = 0;
}
else
{
@@ -417,7 +417,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
while (--__block_count > 0)
__block = __block->_M_next;
__bin._M_first[0] = __block->_M_next;
- __block->_M_next = NULL;
+ __block->_M_next = 0;
}
__gthread_mutex_unlock(__bin._M_mutex);
}
@@ -439,7 +439,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__block->_M_next = reinterpret_cast<_Block_record*>(__c);
__block = __block->_M_next;
}
- __block->_M_next = NULL;
+ __block->_M_next = 0;
}
__block = __bin._M_first[__thread_id];
@@ -527,7 +527,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
}
// Set last record.
- _M_thread_freelist[__i - 1]._M_next = NULL;
+ _M_thread_freelist[__i - 1]._M_next = 0;
_M_thread_freelist[__i - 1]._M_id = __i;
if (!freelist._M_thread_freelist_array)
@@ -572,7 +572,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
std::memset(__v, 0, sizeof(_Block_record*) * __max_threads);
__bin._M_first = static_cast<_Block_record**>(__v);
- __bin._M_address = NULL;
+ __bin._M_address = 0;
__v = ::operator new(sizeof(size_t) * __max_threads);
std::memset(__v, 0, sizeof(size_t) * __max_threads);
@@ -606,8 +606,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_Bin_record& __bin = _M_bin[__n];
__v = ::operator new(sizeof(_Block_record*));
__bin._M_first = static_cast<_Block_record**>(__v);
- __bin._M_first[0] = NULL;
- __bin._M_address = NULL;
+ __bin._M_first[0] = 0;
+ __bin._M_address = 0;
}
}
_M_init = true;
@@ -722,7 +722,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
}
// Set last record.
- _M_thread_freelist[__i - 1]._M_next = NULL;
+ _M_thread_freelist[__i - 1]._M_next = 0;
_M_thread_freelist[__i - 1]._M_id = __i;
if (!freelist._M_thread_freelist_array)
@@ -767,7 +767,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
std::memset(__v, 0, sizeof(_Block_record*) * __max_threads);
__bin._M_first = static_cast<_Block_record**>(__v);
- __bin._M_address = NULL;
+ __bin._M_address = 0;
__v = ::operator new(sizeof(size_t) * __max_threads);
std::memset(__v, 0, sizeof(size_t) * __max_threads);
@@ -800,8 +800,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_Bin_record& __bin = _M_bin[__n];
__v = ::operator new(sizeof(_Block_record*));
__bin._M_first = static_cast<_Block_record**>(__v);
- __bin._M_first[0] = NULL;
- __bin._M_address = NULL;
+ __bin._M_first[0] = 0;
+ __bin._M_address = 0;
}
}
_M_init = true;
diff --git a/libstdc++-v3/src/thread.cc b/libstdc++-v3/src/thread.cc
index 879e864..2ea6a49 100644
--- a/libstdc++-v3/src/thread.cc
+++ b/libstdc++-v3/src/thread.cc
@@ -1,6 +1,6 @@
// thread -*- C++ -*-
-// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2008, 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
@@ -58,7 +58,7 @@ namespace std
int __e = EINVAL;
if (_M_id != id())
- __e = __gthread_join(_M_id._M_thread, NULL);
+ __e = __gthread_join(_M_id._M_thread, 0);
if (__e)
__throw_system_error(__e);