diff options
Diffstat (limited to 'libstdc++-v3/config')
-rw-r--r-- | libstdc++-v3/config/locale/generic/c_locale.cc | 11 | ||||
-rw-r--r-- | libstdc++-v3/config/locale/generic/c_locale.h | 7 | ||||
-rw-r--r-- | libstdc++-v3/config/locale/generic/codecvt_members.cc | 4 | ||||
-rw-r--r-- | libstdc++-v3/config/locale/generic/time_members.cc | 4 | ||||
-rw-r--r-- | libstdc++-v3/config/locale/generic/time_members.h | 7 | ||||
-rw-r--r-- | libstdc++-v3/config/locale/gnu/c_locale.h | 7 | ||||
-rw-r--r-- | libstdc++-v3/config/locale/gnu/codecvt_members.cc | 4 | ||||
-rw-r--r-- | libstdc++-v3/config/locale/gnu/messages_members.cc | 6 | ||||
-rw-r--r-- | libstdc++-v3/config/locale/gnu/messages_members.h | 4 | ||||
-rw-r--r-- | libstdc++-v3/config/locale/gnu/monetary_members.cc | 4 | ||||
-rw-r--r-- | libstdc++-v3/config/locale/gnu/time_members.cc | 4 | ||||
-rw-r--r-- | libstdc++-v3/config/locale/gnu/time_members.h | 11 | ||||
-rw-r--r-- | libstdc++-v3/config/os/djgpp/error_constants.h | 124 |
13 files changed, 160 insertions, 37 deletions
diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc index 4ae951e7711..468816092d7 100644 --- a/libstdc++-v3/config/locale/generic/c_locale.cc +++ b/libstdc++-v3/config/locale/generic/c_locale.cc @@ -36,7 +36,6 @@ #include <cstdio> #include <locale> #include <limits> -#include <cstddef> #ifdef _GLIBCXX_HAVE_IEEEFP_H #include <ieeefp.h> @@ -50,7 +49,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const __c_locale&) throw() { // Assumes __s formatted for "C" locale. - 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); @@ -115,7 +114,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const __c_locale&) throw() { // Assumes __s formatted for "C" locale. - 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); @@ -160,7 +159,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ios_base::iostate& __err, const __c_locale&) throw() { // Assumes __s formatted for "C" locale. - 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); @@ -212,7 +211,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { // Currently, the generic model only supports the "C" locale. // See http://gcc.gnu.org/ml/libstdc++/2003-02/msg00345.html - __cloc = NULL; + __cloc = 0; if (strcmp(__s, "C")) __throw_runtime_error(__N("locale::facet::_S_create_c_locale " "name not valid")); @@ -220,7 +219,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) void locale::facet::_S_destroy_c_locale(__c_locale& __cloc) - { __cloc = NULL; } + { __cloc = 0; } __c_locale locale::facet::_S_clone_c_locale(__c_locale&) throw() diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h index 472ef550530..7d685b8b607 100644 --- a/libstdc++-v3/config/locale/generic/c_locale.h +++ b/libstdc++-v3/config/locale/generic/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_NUM_CATEGORIES 0 @@ -57,8 +56,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const int __size __attribute__((__unused__)), const char* __fmt, ...) { - 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/generic/codecvt_members.cc b/libstdc++-v3/config/locale/generic/codecvt_members.cc index b68e18aaf54..655ce822666 100644 --- a/libstdc++-v3/config/locale/generic/codecvt_members.cc +++ b/libstdc++-v3/config/locale/generic/codecvt_members.cc @@ -1,6 +1,6 @@ // std::codecvt implementation details, generic 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 @@ -186,7 +186,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) while (__from < __end && __max) { - size_t __conv = mbrtowc(NULL, __from, __end - __from, &__tmp_state); + size_t __conv = mbrtowc(0, __from, __end - __from, &__tmp_state); if (__conv == static_cast<size_t>(-1)) { // Invalid source character diff --git a/libstdc++-v3/config/locale/generic/time_members.cc b/libstdc++-v3/config/locale/generic/time_members.cc index 225bc3c247c..040e228fd05 100644 --- a/libstdc++-v3/config/locale/generic/time_members.cc +++ b/libstdc++-v3/config/locale/generic/time_members.cc @@ -42,7 +42,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _M_put(char* __s, size_t __maxlen, const char* __format, const tm* __tm) const throw() { - 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); @@ -127,7 +127,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, const tm* __tm) const throw() { - 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/generic/time_members.h b/libstdc++-v3/config/locale/generic/time_members.h index d06faf409b1..394989edd11 100644 --- a/libstdc++-v3/config/locale/generic/time_members.h +++ b/libstdc++-v3/config/locale/generic/time_members.h @@ -1,6 +1,7 @@ // std::time_get, std::time_put implementation, generic 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,7 +40,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template<typename _CharT> __timepunct<_CharT>::__timepunct(size_t __refs) - : facet(__refs), _M_data(NULL) + : facet(__refs), _M_data(0) { _M_name_timepunct = _S_get_c_name(); _M_initialize_timepunct(); @@ -56,7 +57,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template<typename _CharT> __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, size_t __refs) - : facet(__refs), _M_data(NULL) + : facet(__refs), _M_data(0) { if (__builtin_strcmp(__s, _S_get_c_name()) != 0) { diff --git a/libstdc++-v3/config/locale/gnu/c_locale.h b/libstdc++-v3/config/locale/gnu/c_locale.h index 749a97ad6af..1809119d384 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 1215e4816e4..7cc12edc191 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 1a42b38983a..94ebcb5fa7f 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 8773562b0c4..b633efa54fd 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 159eb97cad5..e5f90ca5b0f 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 43cab22964c..cf139716ee9 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 90bc0cec329..5b81d9ce2fc 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) { diff --git a/libstdc++-v3/config/os/djgpp/error_constants.h b/libstdc++-v3/config/os/djgpp/error_constants.h new file mode 100644 index 00000000000..3efe540d302 --- /dev/null +++ b/libstdc++-v3/config/os/djgpp/error_constants.h @@ -0,0 +1,124 @@ +// Specific definitions for DJGPP platform -*- C++ -*- + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, 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. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +/** @file error_constants.h + * This is an internal header file, included by other library headers. + * You should not attempt to use it directly. + */ + +#ifndef _GLIBCXX_ERROR_CONSTANTS +#define _GLIBCXX_ERROR_CONSTANTS 1 + +#include <bits/c++config.h> +#include <cerrno> + +_GLIBCXX_BEGIN_NAMESPACE(std) + +// Most of the commented-out error codes are socket-related and could be +// replaced by Winsock WSA-prefixed equivalents. + enum class errc + { +// address_family_not_supported = EAFNOSUPPORT, +// address_in_use = EADDRINUSE, +// address_not_available = EADDRNOTAVAIL, +// already_connected = EISCONN, + argument_list_too_long = E2BIG, + argument_out_of_domain = EDOM, + bad_address = EFAULT, + bad_file_descriptor = EBADF, +// bad_message = EBADMSG, + broken_pipe = EPIPE, +// connection_aborted = ECONNABORTED, +// connection_already_in_progress = EALREADY, +// connection_refused = ECONNREFUSED, +// connection_reset = ECONNRESET, +// cross_device_link = EXDEV, +// destination_address_required = EDESTADDRREQ, + device_or_resource_busy = EBUSY, + directory_not_empty = ENOTEMPTY, + executable_format_error = ENOEXEC, + file_exists = EEXIST, + file_too_large = EFBIG, + filename_too_long = ENAMETOOLONG, + function_not_supported = ENOSYS, +// host_unreachable = EHOSTUNREACH, +// identifier_removed = EIDRM, + illegal_byte_sequence = EILSEQ, + inappropriate_io_control_operation = ENOTTY, + interrupted = EINTR, + invalid_argument = EINVAL, + invalid_seek = ESPIPE, + io_error = EIO, + is_a_directory = EISDIR, +// message_size = EMSGSIZE, +// network_down = ENETDOWN, +// network_reset = ENETRESET, +// network_unreachable = ENETUNREACH, +// no_buffer_space = ENOBUFS, +// no_child_process = ECHILD, +// no_link = ENOLINK, + no_lock_available = ENOLCK, +// no_message_available = ENODATA, +// no_message = ENOMSG, +// no_protocol_option = ENOPROTOOPT, +// no_space_on_device = ENOSPC, +// no_stream_resources = ENOSR, + no_such_device_or_address = ENXIO, + no_such_device = ENODEV, + no_such_file_or_directory = ENOENT, + no_such_process = ESRCH, + not_a_directory = ENOTDIR, +// not_a_socket = ENOTSOCK, +// not_a_stream = ENOSTR, +// not_connected = ENOTCONN, + not_enough_memory = ENOMEM, +// not_supported = ENOTSUP, +// operation_canceled = ECANCELED, +// operation_in_progress = EINPROGRESS, +// operation_not_permitted = EPERM, +// operation_not_supported = EOPNOTSUPP, +// operation_would_block = EWOULDBLOCK, +// owner_dead = EOWNERDEAD, + permission_denied = EACCES, +// protocol_error = EPROTO, +// protocol_not_supported = EPROTONOSUPPORT, + read_only_file_system = EROFS, + resource_deadlock_would_occur = EDEADLK, + resource_unavailable_try_again = EAGAIN, + result_out_of_range = ERANGE, +// state_not_recoverable = ENOTRECOVERABLE, +// stream_timeout = ETIME, +// text_file_busy = ETXTBSY, +// timed_out = ETIMEDOUT, + too_many_files_open_in_system = ENFILE, + too_many_files_open = EMFILE, + too_many_links = EMLINK + // too_many_symbolic_link_levels = ELOOP, + // value_too_large = EOVERFLOW, + // wrong_protocol_type = EPROTOTYPE + }; + +_GLIBCXX_END_NAMESPACE + +#endif |