From 24165e16b6f17e6f27b80a206c3f37e7843843cb Mon Sep 17 00:00:00 2001
From: Thomas Fischer <thomas.fischer@ufz.de>
Date: Thu, 28 Jun 2012 13:54:57 +0200
Subject: [PATCH] [file SimpleTestsMatrixTests/MatMult.cpp] - added copyright
 notice - output machine name running the program

[file SimpleTestsMatrixTests/MatVecMultNDPerm.cpp]
- added copyright notice
---
 SimpleTests/MatrixTests/MatMult.cpp          | 20 ++++++++++++++++++--
 SimpleTests/MatrixTests/MatVecMultNDPerm.cpp |  7 ++++++-
 2 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/SimpleTests/MatrixTests/MatMult.cpp b/SimpleTests/MatrixTests/MatMult.cpp
index dcef87a134f..f5d20d737f7 100644
--- a/SimpleTests/MatrixTests/MatMult.cpp
+++ b/SimpleTests/MatrixTests/MatMult.cpp
@@ -1,5 +1,10 @@
 /**
- * MatMult.cpp
+ * Copyright (c) 2012, OpenGeoSys Community (http://www.opengeosys.net)
+ *            Distributed under a Modified BSD License.
+ *              See accompanying file LICENSE.txt or
+ *              http://www.opengeosys.net/LICENSE.txt
+ *
+ * \file MatMult.cpp
  *
  * Created on 2012-01-03 by Thomas Fischer
  */
@@ -23,6 +28,10 @@
 // BaseLib/tclap
 #include "tclap/CmdLine.h"
 
+#ifdef UNIX
+#include <sys/unistd.h>
+#endif
+
 #ifdef OGS_BUILD_INFO
 #include "BuildInfo.h"
 #endif
@@ -96,7 +105,14 @@ int main(int argc, char *argv[])
 	} else {
 		INFO("CXX_FLAGS: %s %s", CMAKE_CXX_FLAGS, CMAKE_CXX_FLAGS_DEBUG);
 	}
-	INFO("hostname: %s", HOSTNAME);
+#endif
+
+#ifdef UNIX
+	const int max_host_name_len (255);
+	char *hostname(new char[max_host_name_len]);
+	if (gethostname(hostname, max_host_name_len) == 0)
+		INFO("hostname: %s", hostname);
+	delete [] host_name_len;
 #endif
 
 	// *** reading matrix in crs format from file
diff --git a/SimpleTests/MatrixTests/MatVecMultNDPerm.cpp b/SimpleTests/MatrixTests/MatVecMultNDPerm.cpp
index 0e2474671a4..50cc513f624 100644
--- a/SimpleTests/MatrixTests/MatVecMultNDPerm.cpp
+++ b/SimpleTests/MatrixTests/MatVecMultNDPerm.cpp
@@ -1,5 +1,10 @@
 /**
- * MatVecMultNDPerm.cpp
+ * Copyright (c) 2012, OpenGeoSys Community (http://www.opengeosys.net)
+ *            Distributed under a Modified BSD License.
+ *              See accompanying file LICENSE.txt or
+ *              http://www.opengeosys.net/LICENSE.txt
+ *
+ * @file MatVecMultNDPerm.cpp
  *
  * Created on 2012-01-03 by Thomas Fischer
  */
-- 
GitLab