]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Quest for platform independence: [1] fixup logstream.cc
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 7 Oct 2012 20:18:12 +0000 (20:18 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 7 Oct 2012 20:18:12 +0000 (20:18 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26982 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/logstream.h
deal.II/source/base/logstream.cc

index f87f5a3aa3b8c4e1531a9d8ab9fd5f6ef4f176ab..e8223227c534f5fa6648c07887d9ee6fc424a1a6 100644 (file)
@@ -24,7 +24,7 @@
 #include <sstream>
 
 #ifdef HAVE_SYS_TIMES_H
-#include <sys/times.h>
+#  include <sys/times.h>
 #else
 struct tms
 {
index 182650442c53ab96c1613550ace427880177c1f6..8bd01ce9e3bb6c9de8aed8c0b1a9f56d5d83ac93 100644 (file)
 #include <deal.II/base/memory_consumption.h>
 #include <deal.II/base/thread_management.h>
 
-#if defined(HAVE_SYS_RESOURCE_H) and defined(HAVE_UNISTD_H)
+#if defined(HAVE_SYS_RESOURCE_H)
 #  include <sys/resource.h>
-#  include <unistd.h>
 #endif
-#include <sys/types.h>
+
 #include <iostream>
 #include <iomanip>
 #include <fstream>
 #include <sstream>
 
 
-// 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)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.