[Mesa-dev] [PATCH] anv: Use proper header guards over 'pragma once' directives

Edward O'Callaghan funfunctor at folklore1984.net
Sun Oct 9 05:29:42 UTC 2016


Signed-off-by: Edward O'Callaghan <funfunctor at folklore1984.net>
---
 src/intel/vulkan/anv_meta.h       | 5 ++++-
 src/intel/vulkan/anv_nir.h        | 5 ++++-
 src/intel/vulkan/anv_private.h    | 5 ++++-
 src/intel/vulkan/anv_wsi.h        | 5 ++++-
 src/intel/vulkan/vk_format_info.h | 5 ++++-
 5 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/src/intel/vulkan/anv_meta.h b/src/intel/vulkan/anv_meta.h
index 47c6d33..a7cb730 100644
--- a/src/intel/vulkan/anv_meta.h
+++ b/src/intel/vulkan/anv_meta.h
@@ -21,7 +21,8 @@
  * IN THE SOFTWARE.
  */
 
-#pragma once
+#ifndef ANV_META_H
+#define ANV_META_H
 
 #include "anv_private.h"
 
@@ -67,3 +68,5 @@ anv_meta_get_iview_layer(const struct anv_image *dest_image,
 #ifdef __cplusplus
 }
 #endif
+
+#endif /* ANV_META_H */
diff --git a/src/intel/vulkan/anv_nir.h b/src/intel/vulkan/anv_nir.h
index 567de6c..4fff7f4 100644
--- a/src/intel/vulkan/anv_nir.h
+++ b/src/intel/vulkan/anv_nir.h
@@ -21,7 +21,8 @@
  * IN THE SOFTWARE.
  */
 
-#pragma once
+#ifndef ANV_NIR_H
+#define ANV_NIR_H
 
 #include "nir/nir.h"
 #include "anv_private.h"
@@ -43,3 +44,5 @@ void anv_nir_apply_pipeline_layout(struct anv_pipeline *pipeline,
 #ifdef __cplusplus
 }
 #endif
+
+#endif /* ANV_NIR_H */
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index fd886bf..e821714 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -21,7 +21,8 @@
  * IN THE SOFTWARE.
  */
 
-#pragma once
+#ifndef ANV_PRIVATE_H
+#define ANV_PRIVATE_H
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -2009,3 +2010,5 @@ ANV_DEFINE_STRUCT_CASTS(anv_common, VkImageMemoryBarrier)
 #ifdef __cplusplus
 }
 #endif
+
+#endif /* ANV_PRIVATE_H */
diff --git a/src/intel/vulkan/anv_wsi.h b/src/intel/vulkan/anv_wsi.h
index 67cb690..02be86d 100644
--- a/src/intel/vulkan/anv_wsi.h
+++ b/src/intel/vulkan/anv_wsi.h
@@ -21,7 +21,8 @@
  * IN THE SOFTWARE.
  */
 
-#pragma once
+#ifndef ANV_WSI_H
+#define ANV_WSI_H
 
 #include "anv_private.h"
 
@@ -76,3 +77,5 @@ VkResult anv_x11_init_wsi(struct anv_physical_device *physical_device);
 void anv_x11_finish_wsi(struct anv_physical_device *physical_device);
 VkResult anv_wl_init_wsi(struct anv_physical_device *physical_device);
 void anv_wl_finish_wsi(struct anv_physical_device *physical_device);
+
+#endif /* ANV_WSI_H */
diff --git a/src/intel/vulkan/vk_format_info.h b/src/intel/vulkan/vk_format_info.h
index effed55..5c5a1f3 100644
--- a/src/intel/vulkan/vk_format_info.h
+++ b/src/intel/vulkan/vk_format_info.h
@@ -21,7 +21,8 @@
  * IN THE SOFTWARE.
  */
 
-#pragma once
+#ifndef VK_FORMAT_INFO_H
+#define VK_FORMAT_INFO_H
 
 #include <stdbool.h>
 #include <vulkan/vulkan.h>
@@ -63,3 +64,5 @@ vk_format_is_depth_or_stencil(VkFormat format)
    const VkImageAspectFlags aspects = vk_format_aspects(format);
    return aspects & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT);
 }
+
+#endif /* VK_FORMAT_INFO_H */
-- 
2.7.4



More information about the mesa-dev mailing list