From d052d9cc991b483155e66a2758f70bb206622af7 Mon Sep 17 00:00:00 2001
From: "Peter W. Draper" <p.w.draper@durham.ac.uk>
Date: Tue, 27 Oct 2015 13:01:31 +0000
Subject: [PATCH] Fix problems with include files and MPI build

Issuws with MPICH having task_lock argument in API and multiple inclusions

Re-aassert copyrights
---
 src/map.c   | 5 ++---
 src/map.h   | 7 ++++++-
 src/swift.h | 3 ++-
 src/tools.c | 3 +++
 4 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/src/map.c b/src/map.c
index 1ebc01265c..dcaa534657 100644
--- a/src/map.c
+++ b/src/map.c
@@ -18,11 +18,10 @@
  *
  ******************************************************************************/
 
-#include "map.h"
-#include "error.h"
 #include <stdio.h>
 #include <stdlib.h>
-
+#include "error.h"
+#include "map.h"
 
 /**
  * @brief Mapping function to draw a specific cell (gnuplot).
diff --git a/src/map.h b/src/map.h
index ac3fdb2c9c..0fe04ad015 100644
--- a/src/map.h
+++ b/src/map.h
@@ -20,8 +20,11 @@
 
 
 /* Includes. */
-#include "cell.h"
+#ifndef SWIFT_MAP_H
+#define SWIFT_MAP_H
+
 #include "part.h"
+#include "cell.h"
 
 void map_cells_plot(struct cell *c, void *data);
 void map_check(struct part *p, struct cell *c, void *data);
@@ -34,3 +37,5 @@ void map_h_min(struct part *p, struct cell *c, void *data);
 void map_h_max(struct part *p, struct cell *c, void *data);
 void map_icount(struct part *p, struct cell *c, void *data);
 void map_dump(struct part *p, struct cell *c, void *data);
+
+#endif /* SWIFT_MAP_H */
diff --git a/src/swift.h b/src/swift.h
index 2dc8b1d6bd..1b7d86c769 100644
--- a/src/swift.h
+++ b/src/swift.h
@@ -1,6 +1,6 @@
 /*******************************************************************************
  * This file is part of SWIFT.
- * Coypright (c) 2012 Pedro Gonnet (pedro.gonnet@durham.ac.uk)
+ * Copyright (c) 2012 Pedro Gonnet (pedro.gonnet@durham.ac.uk)
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published
@@ -45,6 +45,7 @@
 #include "task.h"
 #include "timers.h"
 #include "units.h"
+#include "tools.h"
 #include "version.h"
 
 #ifdef LEGACY_GADGET2_SPH
diff --git a/src/tools.c b/src/tools.c
index 9570faf7a1..5f8abcbeb6 100644
--- a/src/tools.c
+++ b/src/tools.c
@@ -1,5 +1,7 @@
 /*******************************************************************************
  * This file is part of SWIFT.
+ * Copyright (c) 2012 Pedro Gonnet (pedro.gonnet@durham.ac.uk),
+ *                    Matthieu Schaller (matthieu.schaller@durham.ac.uk)
  * Copyright (c) 2015 Peter W. Draper (p.w.draper@durham.ac.uk)
  *
  * This program is free software: you can redistribute it and/or modify
@@ -23,6 +25,7 @@
 #include <stddef.h>
 #include <stdio.h>
 
+#include "error.h"
 #include "part.h"
 #include "cell.h"
 #include "tools.h"
-- 
GitLab