util: consistently use ifndef guards over pragma once
authorEmil Velikov <emil.l.velikov@gmail.com>
Mon, 20 Mar 2017 16:04:40 +0000 (16:04 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 22 Mar 2017 16:55:22 +0000 (16:55 +0000)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Vedran Miletić <vedran@miletic.net>
Acked-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
src/util/build_id.h
src/util/format_r11g11b10f.h
src/util/register_allocate.h
src/util/strndup.h

index 551ac6989bc061edfe615e1b4a3158648f6799b5..18641c44af24b623dc8bc8d61550f647799c5320 100644 (file)
@@ -21,6 +21,9 @@
  * IN THE SOFTWARE.
  */
 
+#ifndef BUILD_ID_H
+#define BUILD_ID_H
+
 #ifdef HAVE_DL_ITERATE_PHDR
 
 struct build_id_note;
@@ -35,3 +38,5 @@ const uint8_t *
 build_id_data(const struct build_id_note *note);
 
 #endif
+
+#endif /* BUILD_ID_H */
index f6cd4ac696a1e920568c0bd918fbcbe0010c235a..ec5abf96119353c355bbe48167897e5ccb4ba7e6 100644 (file)
@@ -27,6 +27,9 @@
  * below.
  */
 
+#ifndef FORMAT_R11G11B10F_H
+#define FORMAT_R11G11B10F_H
+
 #include <stdint.h>
 
 #define UF11(e, m)           ((e << 6) | (m))
@@ -225,3 +228,5 @@ static inline void r11g11b10f_to_float3(uint32_t rgb, float retval[3])
    retval[1] = uf11_to_f32((rgb >> 11) & 0x7ff);
    retval[2] = uf10_to_f32((rgb >> 22) & 0x3ff);
 }
+
+#endif /* FORMAT_R11G11B10F_H */
index 628d2bbbceda921fb9bdc3152fddba0cd7a85807..6abb4e04d0bbf93def6650fb7f84f2eb06b685be 100644 (file)
  *
  */
 
-#include <stdbool.h>
+#ifndef REGISTER_ALLOCATE_H
+#define REGISTER_ALLOCATE_H
 
+#include <stdbool.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -89,3 +91,5 @@ int ra_get_best_spill_node(struct ra_graph *g);
 #ifdef __cplusplus
 }  // extern "C"
 #endif
+
+#endif /* REGISTER_ALLOCATE_H */
index c5ed7a8c8d2323ba71c71598842bf6997b8867e0..a3d739841322750ff996f0a3a72fc77af612bfde 100644 (file)
@@ -21,7 +21,8 @@
  * IN THE SOFTWARE.
  */
 
-#pragma once
+#ifndef STRNDUP_H
+#define STRNDUP_H
 
 #include <stdlib.h> // size_t
 
@@ -38,3 +39,5 @@ char *strndup(const char *str, size_t max);
 #endif
 
 #endif
+
+#endif /* STRNDUP_H */