aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-01-22 01:26:03 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-01-22 01:26:03 +0000
commit786abaefa90e3cdc198cd37ff1430f910d7a99ea (patch)
treefe50de86bf15c949ce32051ad7e4c66de2b1d110
parent66704a9a841d861bd97d339237915296cf6f5e3b (diff)
downloadpaludis-786abaefa90e3cdc198cd37ff1430f910d7a99ea.tar.gz
paludis-786abaefa90e3cdc198cd37ff1430f910d7a99ea.tar.xz
Fix GCC 4.3 build, thanks to Almathea.
-rw-r--r--doc/api/cplusplus/examples/example_command_line.cc4
-rw-r--r--paludis/dep_spec.cc2
-rw-r--r--paludis/dep_spec.hh2
-rw-r--r--paludis/environments/no_config/no_config_environment.cc1
-rw-r--r--paludis/environments/paludis/mirrors_conf.cc1
-rw-r--r--paludis/environments/paludis/use_conf.cc1
-rw-r--r--paludis/package_database.cc1
-rw-r--r--paludis/repositories/e/e_repository_sets.cc1
-rw-r--r--paludis/repositories/fake/fake_repository_base.cc1
-rw-r--r--paludis/repositories/unpackaged/dep_parser_TEST.cc1
-rw-r--r--paludis/repositories/unpackaged/unpackaged_key.cc1
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository_TEST.cc1
-rw-r--r--paludis/sync_task.cc1
-rw-r--r--paludis/util/config_file_TEST.cc1
-rw-r--r--paludis/util/dir_iterator.cc5
-rw-r--r--paludis/util/exception.cc1
-rw-r--r--paludis/util/fs_entry.hh1
-rw-r--r--paludis/util/indirect_iterator_TEST.cc1
-rw-r--r--paludis/util/output_wrapper.cc17
-rw-r--r--paludis/util/system.cc7
-rw-r--r--src/clients/adjutrix/adjutrix.cc1
-rw-r--r--src/clients/reconcilio/broken_linkage_finder/configuration_TEST.cc1
-rw-r--r--src/clients/reconcilio/broken_linkage_finder/elf_linkage_checker.cc5
-rw-r--r--src/clients/reconcilio/broken_linkage_finder/libtool_linkage_checker.cc3
-rw-r--r--src/clients/reconcilio/reconcilio.cc1
-rw-r--r--src/clients/reconcilio/util/wildcard_expander.cc3
-rw-r--r--src/output/console_install_task.cc8
27 files changed, 49 insertions, 24 deletions
diff --git a/doc/api/cplusplus/examples/example_command_line.cc b/doc/api/cplusplus/examples/example_command_line.cc
index ad8b8cd..a1c9f2d 100644
--- a/doc/api/cplusplus/examples/example_command_line.cc
+++ b/doc/api/cplusplus/examples/example_command_line.cc
@@ -63,7 +63,7 @@ examples::show_help_and_exit(const char * const argv[])
cout << endl;
cout << *CommandLine::get_instance();
- exit(EXIT_SUCCESS);
+ std::exit(EXIT_SUCCESS);
}
void
@@ -75,7 +75,7 @@ examples::show_version_and_exit()
cout << " svn " << PALUDIS_SUBVERSION_REVISION;
cout << endl;
- exit(EXIT_SUCCESS);
+ std::exit(EXIT_SUCCESS);
}
void
diff --git a/paludis/dep_spec.cc b/paludis/dep_spec.cc
index e656cd2..6ef2ab0 100644
--- a/paludis/dep_spec.cc
+++ b/paludis/dep_spec.cc
@@ -449,7 +449,7 @@ PackageDepSpec::version_requirements_ptr() const
return _imp->data->version_requirements_ptr();
}
-const VersionRequirementsMode
+VersionRequirementsMode
PackageDepSpec::version_requirements_mode() const
{
return _imp->data->version_requirements_mode();
diff --git a/paludis/dep_spec.hh b/paludis/dep_spec.hh
index 74354f6..3c041db 100644
--- a/paludis/dep_spec.hh
+++ b/paludis/dep_spec.hh
@@ -347,7 +347,7 @@ namespace paludis
/**
* Fetch the version requirements mode.
*/
- const VersionRequirementsMode version_requirements_mode() const;
+ VersionRequirementsMode version_requirements_mode() const;
/**
* Fetch the slot name (may be a zero pointer).
diff --git a/paludis/environments/no_config/no_config_environment.cc b/paludis/environments/no_config/no_config_environment.cc
index e0a0e69..e2bba70 100644
--- a/paludis/environments/no_config/no_config_environment.cc
+++ b/paludis/environments/no_config/no_config_environment.cc
@@ -35,6 +35,7 @@
#include <paludis/package_database.hh>
#include <paludis/hook.hh>
#include <paludis/repositories/e/e_repository_params.hh>
+#include <algorithm>
#include <set>
#include <list>
diff --git a/paludis/environments/paludis/mirrors_conf.cc b/paludis/environments/paludis/mirrors_conf.cc
index c141f8f..b868cf5 100644
--- a/paludis/environments/paludis/mirrors_conf.cc
+++ b/paludis/environments/paludis/mirrors_conf.cc
@@ -31,6 +31,7 @@
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/wrapped_output_iterator.hh>
+#include <algorithm>
#include <vector>
using namespace paludis;
diff --git a/paludis/environments/paludis/use_conf.cc b/paludis/environments/paludis/use_conf.cc
index fcbcdc8..0d96317 100644
--- a/paludis/environments/paludis/use_conf.cc
+++ b/paludis/environments/paludis/use_conf.cc
@@ -36,6 +36,7 @@
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/set.hh>
#include <paludis/util/mutex.hh>
+#include <algorithm>
#include <list>
#include <vector>
diff --git a/paludis/package_database.cc b/paludis/package_database.cc
index 83d3801..ee7b960 100644
--- a/paludis/package_database.cc
+++ b/paludis/package_database.cc
@@ -39,6 +39,7 @@
#include <paludis/util/member_iterator.hh>
#include <paludis/query.hh>
+#include <algorithm>
#include <list>
#include <map>
#include <set>
diff --git a/paludis/repositories/e/e_repository_sets.cc b/paludis/repositories/e/e_repository_sets.cc
index a43eab1..2f00f0c 100644
--- a/paludis/repositories/e/e_repository_sets.cc
+++ b/paludis/repositories/e/e_repository_sets.cc
@@ -43,6 +43,7 @@
#include <paludis/util/sequence.hh>
#include <paludis/util/tr1_functional.hh>
+#include <algorithm>
#include <list>
#include <map>
#include <set>
diff --git a/paludis/repositories/fake/fake_repository_base.cc b/paludis/repositories/fake/fake_repository_base.cc
index b997f63..477c0de 100644
--- a/paludis/repositories/fake/fake_repository_base.cc
+++ b/paludis/repositories/fake/fake_repository_base.cc
@@ -28,6 +28,7 @@
#include <paludis/util/sequence.hh>
#include <paludis/util/wrapped_output_iterator.hh>
#include <map>
+#include <algorithm>
/** \file
* Implementation for FakeRepositoryBase.
diff --git a/paludis/repositories/unpackaged/dep_parser_TEST.cc b/paludis/repositories/unpackaged/dep_parser_TEST.cc
index 48921e5..5eb2651 100644
--- a/paludis/repositories/unpackaged/dep_parser_TEST.cc
+++ b/paludis/repositories/unpackaged/dep_parser_TEST.cc
@@ -21,6 +21,7 @@
#include <paludis/repositories/unpackaged/dep_printer.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/stringify_formatter.hh>
+#include <paludis/util/visitor-impl.hh>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
diff --git a/paludis/repositories/unpackaged/unpackaged_key.cc b/paludis/repositories/unpackaged/unpackaged_key.cc
index ae0e2bf..1f00c9c 100644
--- a/paludis/repositories/unpackaged/unpackaged_key.cc
+++ b/paludis/repositories/unpackaged/unpackaged_key.cc
@@ -20,6 +20,7 @@
#include <paludis/repositories/unpackaged/unpackaged_key.hh>
#include <paludis/repositories/unpackaged/dep_printer.hh>
#include <paludis/repositories/unpackaged/dep_parser.hh>
+#include <paludis/util/visitor-impl.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/fs_entry.hh>
diff --git a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
index 97348f3..1c49c75 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
@@ -21,6 +21,7 @@
#include <paludis/repositories/unpackaged/installed_repository.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/package_database.hh>
+#include <paludis/util/visitor-impl.hh>
#include <paludis/query.hh>
#include <paludis/package_id.hh>
#include <paludis/action.hh>
diff --git a/paludis/sync_task.cc b/paludis/sync_task.cc
index 4fe8daf..a76b0d9 100644
--- a/paludis/sync_task.cc
+++ b/paludis/sync_task.cc
@@ -27,6 +27,7 @@
#include <paludis/util/tr1_functional.hh>
#include <paludis/package_database.hh>
#include <paludis/hook.hh>
+#include <algorithm>
#include <list>
using namespace paludis;
diff --git a/paludis/util/config_file_TEST.cc b/paludis/util/config_file_TEST.cc
index 162483c..784e118 100644
--- a/paludis/util/config_file_TEST.cc
+++ b/paludis/util/config_file_TEST.cc
@@ -28,6 +28,7 @@
#include <test/test_framework.hh>
#include <test/test_runner.hh>
#include <vector>
+#include <cstdlib>
#include <iomanip>
#include <unistd.h>
diff --git a/paludis/util/dir_iterator.cc b/paludis/util/dir_iterator.cc
index 9864864..5af3b44 100644
--- a/paludis/util/dir_iterator.cc
+++ b/paludis/util/dir_iterator.cc
@@ -18,12 +18,13 @@
*/
#include <dirent.h>
-#include <errno.h>
#include <paludis/util/dir_iterator.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <sys/types.h>
#include <set>
+#include <cstring>
+#include <cerrno>
using namespace paludis;
@@ -52,7 +53,7 @@ namespace paludis
}
DirOpenError::DirOpenError(const FSEntry & location, const int errno_value) throw () :
- FSError("Error opening directory '" + stringify(location) + "': " + strerror(errno_value))
+ FSError("Error opening directory '" + stringify(location) + "': " + std::strerror(errno_value))
{
}
diff --git a/paludis/util/exception.cc b/paludis/util/exception.cc
index a0ba83a..dee44ef 100644
--- a/paludis/util/exception.cc
+++ b/paludis/util/exception.cc
@@ -22,6 +22,7 @@
#include <paludis/util/join.hh>
#include <paludis/util/tr1_memory.hh>
#include <list>
+#include <cstdlib>
#include "config.h"
diff --git a/paludis/util/fs_entry.hh b/paludis/util/fs_entry.hh
index 244463b..8efa744 100644
--- a/paludis/util/fs_entry.hh
+++ b/paludis/util/fs_entry.hh
@@ -28,6 +28,7 @@
#include <string>
#include <iosfwd>
#include <paludis/util/tr1_memory.hh>
+#include <sys/types.h>
/** \file
* Declarations for FSEntry.
diff --git a/paludis/util/indirect_iterator_TEST.cc b/paludis/util/indirect_iterator_TEST.cc
index 350cbdd..a21ecd8 100644
--- a/paludis/util/indirect_iterator_TEST.cc
+++ b/paludis/util/indirect_iterator_TEST.cc
@@ -23,6 +23,7 @@
#include <paludis/util/iterator_funcs.hh>
#include <test/test_runner.hh>
#include <test/test_framework.hh>
+#include <algorithm>
#include <vector>
#include <list>
diff --git a/paludis/util/output_wrapper.cc b/paludis/util/output_wrapper.cc
index dd6cee0..14eff0b 100644
--- a/paludis/util/output_wrapper.cc
+++ b/paludis/util/output_wrapper.cc
@@ -18,6 +18,7 @@
*/
#include <string>
+#include <cstring>
#include <iostream>
#include <unistd.h>
#include <errno.h>
@@ -82,13 +83,13 @@ main(int argc, char *argv[])
if (0 != pipe(stdout_pipes))
{
- std::cerr << argv[0] << ": pipe failed: " << strerror(errno) << std::endl;
+ std::cerr << argv[0] << ": pipe failed: " << std::strerror(errno) << std::endl;
return EXIT_FAILURE;
}
if (0 != pipe(stderr_pipes))
{
- std::cerr << argv[0] << ": pipe failed: " << strerror(errno) << std::endl;
+ std::cerr << argv[0] << ": pipe failed: " << std::strerror(errno) << std::endl;
return EXIT_FAILURE;
}
@@ -98,25 +99,25 @@ main(int argc, char *argv[])
{
if (-1 == dup2(stdout_pipes[1], 1))
{
- std::cerr << argv[0] << ": dup2 failed: " << strerror(errno) << std::endl;
+ std::cerr << argv[0] << ": dup2 failed: " << std::strerror(errno) << std::endl;
return EXIT_FAILURE;
}
close(stdout_pipes[0]);
if (-1 == dup2(stderr_pipes[1], 2))
{
- std::cerr << argv[0] << ": dup2 failed: " << strerror(errno) << std::endl;
+ std::cerr << argv[0] << ": dup2 failed: " << std::strerror(errno) << std::endl;
return EXIT_FAILURE;
}
close(stderr_pipes[0]);
execvp(argv[argi], &argv[argi]);
- std::cerr << argv[0] << ": execvp failed: " << strerror(errno) << std::endl;
+ std::cerr << argv[0] << ": execvp failed: " << std::strerror(errno) << std::endl;
return EXIT_FAILURE;
}
else if (-1 == pid)
{
- std::cerr << argv[0] << ": fork failed: " << strerror(errno) << std::endl;
+ std::cerr << argv[0] << ": fork failed: " << std::strerror(errno) << std::endl;
return EXIT_FAILURE;
}
else
@@ -139,7 +140,7 @@ main(int argc, char *argv[])
ret = select(std::max(stdout_pipes[0], stderr_pipes[0]) + 1, &fds, 0, 0, 0);
if (-1 == ret)
{
- std::cerr << argv[0] << ": select failed: " << strerror(errno) << std::endl;
+ std::cerr << argv[0] << ": select failed: " << std::strerror(errno) << std::endl;
return EXIT_FAILURE;
}
else if (ret)
@@ -254,7 +255,7 @@ main(int argc, char *argv[])
int status(-1);
if (-1 == wait(&status))
{
- std::cerr << argv[0] << ": wait failed: " << strerror(errno) << std::endl;
+ std::cerr << argv[0] << ": wait failed: " << std::strerror(errno) << std::endl;
return EXIT_FAILURE;
}
return WIFSIGNALED(status) ? WTERMSIG(status) + 128 : WEXITSTATUS(status);
diff --git a/paludis/util/system.cc b/paludis/util/system.cc
index 00befb2..c7b0e55 100644
--- a/paludis/util/system.cc
+++ b/paludis/util/system.cc
@@ -40,6 +40,7 @@
#include <pwd.h>
#include <map>
#include <iostream>
+#include <cstring>
#include "config.h"
using namespace paludis;
@@ -415,18 +416,18 @@ paludis::run_command(const Command & cmd)
{
std::cerr << "exec of '" << command << "' failed due to exception '" << e.message()
<< "' (" << e.what() << ")" << std::endl;
- exit(123);
+ std::exit(123);
}
catch (...)
{
std::cerr << "exec of '" << command << "' failed due to unknown exception" << std::endl;
- exit(124);
+ std::exit(124);
}
}
else if (-1 == child_child)
{
std::cerr << "fork failed: " + stringify(strerror(errno)) + "'" << std::endl;
- exit(125);
+ std::exit(125);
}
else
{
diff --git a/src/clients/adjutrix/adjutrix.cc b/src/clients/adjutrix/adjutrix.cc
index 42c9e18..e232af5 100644
--- a/src/clients/adjutrix/adjutrix.cc
+++ b/src/clients/adjutrix/adjutrix.cc
@@ -35,6 +35,7 @@
#include <paludis/util/fs_entry.hh>
#include <paludis/environments/no_config/no_config_environment.hh>
#include <iostream>
+#include <cstdlib>
#include <unistd.h>
using namespace paludis;
diff --git a/src/clients/reconcilio/broken_linkage_finder/configuration_TEST.cc b/src/clients/reconcilio/broken_linkage_finder/configuration_TEST.cc
index e8e4bdd..8f65a32 100644
--- a/src/clients/reconcilio/broken_linkage_finder/configuration_TEST.cc
+++ b/src/clients/reconcilio/broken_linkage_finder/configuration_TEST.cc
@@ -27,6 +27,7 @@
#include <test/test_framework.hh>
#include <unistd.h>
+#include <cstdlib>
using namespace broken_linkage_finder;
diff --git a/src/clients/reconcilio/broken_linkage_finder/elf_linkage_checker.cc b/src/clients/reconcilio/broken_linkage_finder/elf_linkage_checker.cc
index 19491e0..76ccd83 100644
--- a/src/clients/reconcilio/broken_linkage_finder/elf_linkage_checker.cc
+++ b/src/clients/reconcilio/broken_linkage_finder/elf_linkage_checker.cc
@@ -37,6 +37,7 @@
#include <algorithm>
#include <cerrno>
+#include <cstring>
#include <fstream>
#include <map>
#include <set>
@@ -152,7 +153,7 @@ ElfLinkageChecker::check_file(const FSEntry & file)
std::ifstream stream(stringify(file).c_str());
if (! stream)
- throw FSError("Error opening file '" + stringify(file) + "': " + strerror(errno));
+ throw FSError("Error opening file '" + stringify(file) + "': " + std::strerror(errno));
return _imp->check_elf<Elf32Type>(file, stream) || _imp->check_elf<Elf64Type>(file, stream);
}
@@ -305,7 +306,7 @@ ElfLinkageChecker::need_breakage_added(
std::ifstream stream(stringify(file).c_str());
if (! stream)
{
- Log::get_instance()->message(ll_warning, lc_no_context, "Error opening '" + stringify(file) + "': " + strerror(errno));
+ Log::get_instance()->message(ll_warning, lc_no_context, "Error opening '" + stringify(file) + "': " + std::strerror(errno));
continue;
}
diff --git a/src/clients/reconcilio/broken_linkage_finder/libtool_linkage_checker.cc b/src/clients/reconcilio/broken_linkage_finder/libtool_linkage_checker.cc
index d5ce47b..36db4c0 100644
--- a/src/clients/reconcilio/broken_linkage_finder/libtool_linkage_checker.cc
+++ b/src/clients/reconcilio/broken_linkage_finder/libtool_linkage_checker.cc
@@ -31,6 +31,7 @@
#include <paludis/util/tokeniser.hh>
#include <algorithm>
+#include <cstring>
#include <cerrno>
#include <fstream>
#include <functional>
@@ -91,7 +92,7 @@ LibtoolLinkageChecker::check_file(const FSEntry & file)
std::ifstream stream(stringify(file).c_str());
if (! stream)
- throw FSError("Error opening file '" + stringify(file) + "': " + strerror(errno));
+ throw FSError("Error opening file '" + stringify(file) + "': " + std::strerror(errno));
KeyValueConfigFileOptions opts;
opts += kvcfo_disallow_space_around_equals;
diff --git a/src/clients/reconcilio/reconcilio.cc b/src/clients/reconcilio/reconcilio.cc
index 109ca3e..03679f2 100644
--- a/src/clients/reconcilio/reconcilio.cc
+++ b/src/clients/reconcilio/reconcilio.cc
@@ -32,6 +32,7 @@
#include <src/output/colour.hh>
#include <iostream>
+#include <cstdlib>
using namespace paludis;
diff --git a/src/clients/reconcilio/util/wildcard_expander.cc b/src/clients/reconcilio/util/wildcard_expander.cc
index b882929..f28695f 100644
--- a/src/clients/reconcilio/util/wildcard_expander.cc
+++ b/src/clients/reconcilio/util/wildcard_expander.cc
@@ -28,6 +28,7 @@
#include <vector>
#include <cerrno>
+#include <cstring>
#include <glob.h>
using namespace paludis;
@@ -98,7 +99,7 @@ namespace
case GLOB_ABORTED:
globfree(&g);
- throw WildcardExpansionError("Error running glob(): " + stringify(strerror(errno)));
+ throw WildcardExpansionError("Error running glob(): " + stringify(std::strerror(errno)));
default:
globfree(&g);
diff --git a/src/output/console_install_task.cc b/src/output/console_install_task.cc
index 9de4e6c..cc8550d 100644
--- a/src/output/console_install_task.cc
+++ b/src/output/console_install_task.cc
@@ -51,6 +51,8 @@
#include <iostream>
#include <iomanip>
#include <limits>
+#include <cstring>
+#include <cstdlib>
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
@@ -88,7 +90,7 @@ namespace
}
cerr << endl;
cerr << "Exiting with failure" << endl;
- exit(EXIT_FAILURE);
+ std::exit(EXIT_FAILURE);
}
}
@@ -1725,14 +1727,14 @@ ConsoleInstallTask::show_resume_command(const std::string & resume_command_templ
else
{
cerr << "Resume command NOT saved to file: " << file_name << " due to error "
- << strerror(errno) << endl;
+ << std::strerror(errno) << endl;
cerr << "Resume command: " << file_name << endl;
}
}
else
{
cerr << "Resume command NOT saved to file: " << file_name << " due to error "
- << strerror(errno) << endl;
+ << std::strerror(errno) << endl;
cerr << "Resume command: " << resume_command << endl;
}
}