From: maier Date: Sun, 7 Oct 2012 20:18:12 +0000 (+0000) Subject: Quest for platform independence: [1] fixup logstream.cc X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75936b88a835d3b285dcff43a52247f2004ae08f;p=dealii-svn.git Quest for platform independence: [1] fixup logstream.cc git-svn-id: https://svn.dealii.org/branches/branch_cmake@26982 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/base/logstream.h b/deal.II/include/deal.II/base/logstream.h index f87f5a3aa3..e8223227c5 100644 --- a/deal.II/include/deal.II/base/logstream.h +++ b/deal.II/include/deal.II/base/logstream.h @@ -24,7 +24,7 @@ #include #ifdef HAVE_SYS_TIMES_H -#include +# include #else struct tms { diff --git a/deal.II/source/base/logstream.cc b/deal.II/source/base/logstream.cc index 182650442c..8bd01ce9e3 100644 --- a/deal.II/source/base/logstream.cc +++ b/deal.II/source/base/logstream.cc @@ -17,27 +17,16 @@ #include #include -#if defined(HAVE_SYS_RESOURCE_H) and defined(HAVE_UNISTD_H) +#if defined(HAVE_SYS_RESOURCE_H) # include -# include #endif -#include + #include #include #include #include -// on SunOS 4.x, getrusage is stated in the man pages and exists, but -// is not declared in resource.h. declare it ourselves -#ifdef NO_HAVE_GETRUSAGE -extern "C" { - int getrusage(int who, struct rusage* ru); -} -#endif - -// When modifying the prefix list, we need to lock it just in case -// another thread tries to do the same. DEAL_II_NAMESPACE_OPEN namespace @@ -368,7 +357,7 @@ LogStream::log_thread_id (const bool flag) void LogStream::print_line_head() { -#if defined(HAVE_SYS_RESOURCE_H) and defined(HAVE_UNISTD_H) +#if defined(HAVE_SYS_RESOURCE_H) rusage usage; double utime = 0.; if (print_utime)