[Mesa-dev] [PATCH 13/18] mesa/main: consistently use ifndef guards over pragma once

Emil Velikov emil.l.velikov at gmail.com
Mon Mar 20 16:13:03 UTC 2017


Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/mesa/main/formatquery.h           | 1 -
 src/mesa/main/performance_monitor.h   | 1 -
 src/mesa/main/performance_query.h     | 1 -
 src/mesa/main/sse_minmax.h            | 5 +++++
 src/mesa/main/streaming-load-memcpy.h | 6 ++++++
 5 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/formatquery.h b/src/mesa/main/formatquery.h
index 1061fd26753..66dcf736dcb 100644
--- a/src/mesa/main/formatquery.h
+++ b/src/mesa/main/formatquery.h
@@ -21,7 +21,6 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#pragma once
 #ifndef FORMATQUERY_H
 #define FORMATQUERY_H
 
diff --git a/src/mesa/main/performance_monitor.h b/src/mesa/main/performance_monitor.h
index 88de14546dc..2ba703276b8 100644
--- a/src/mesa/main/performance_monitor.h
+++ b/src/mesa/main/performance_monitor.h
@@ -27,7 +27,6 @@
  * INTEL_performance_query extension.
  */
 
-#pragma once
 #ifndef PERFORMANCE_MONITOR_H
 #define PERFORMANCE_MONITOR_H
 
diff --git a/src/mesa/main/performance_query.h b/src/mesa/main/performance_query.h
index 8268f0ef194..784866402ba 100644
--- a/src/mesa/main/performance_query.h
+++ b/src/mesa/main/performance_query.h
@@ -26,7 +26,6 @@
  * Core Mesa support for the INTEL_performance_query extension
  */
 
-#pragma once
 #ifndef PERFORMANCE_QUERY_H
 #define PERFORMANCE_QUERY_H
 
diff --git a/src/mesa/main/sse_minmax.h b/src/mesa/main/sse_minmax.h
index 953c4e9eb48..f23a42481df 100644
--- a/src/mesa/main/sse_minmax.h
+++ b/src/mesa/main/sse_minmax.h
@@ -25,6 +25,11 @@
  *
  */
 
+#ifndef SSE_MINMAX_H
+#define SSE_MINMAX_H
+
 void
 _mesa_uint_array_min_max(const unsigned *ui_indices, unsigned *min_index,
                          unsigned *max_index, const unsigned count);
+
+#endif /* SSE_MINMAX_H */
diff --git a/src/mesa/main/streaming-load-memcpy.h b/src/mesa/main/streaming-load-memcpy.h
index 41eeeeca0f1..d31c199a27c 100644
--- a/src/mesa/main/streaming-load-memcpy.h
+++ b/src/mesa/main/streaming-load-memcpy.h
@@ -29,5 +29,11 @@
 /* Copies memory from src to dst, using SSE 4.1's MOVNTDQA to get streaming
  * read performance from uncached memory.
  */
+
+#ifndef STREAMING_LOAD_MEMCPY_H
+#define STREAMING_LOAD_MEMCPY_H
+
 void
 _mesa_streaming_load_memcpy(void *restrict dst, void *restrict src, size_t len);
+
+#endif /* STREAMING_LOAD_MEMCPY_H */
-- 
2.11.1



More information about the mesa-dev mailing list