Mesa (master): mesa/program: consistently use ifndef guards over pragma once

Emil Velikov evelikov at kemper.freedesktop.org
Wed Mar 22 16:59:32 UTC 2017


Module: Mesa
Branch: master
Commit: 43a9ca8eb42884e2386a4ff8cda5fa4b925b290e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=43a9ca8eb42884e2386a4ff8cda5fa4b925b290e

Author: Emil Velikov <emil.l.velikov at gmail.com>
Date:   Mon Mar 20 16:04:39 2017 +0000

mesa/program: consistently use ifndef guards over pragma once

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
Acked-by: Vedran Miletić <vedran at miletic.net>
Acked-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>

---

 src/mesa/program/ir_to_mesa.h            | 5 ++++-
 src/mesa/program/prog_parameter_layout.h | 1 -
 src/mesa/program/prog_to_nir.h           | 1 -
 src/mesa/program/program_parser.h        | 6 +++++-
 4 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/mesa/program/ir_to_mesa.h b/src/mesa/program/ir_to_mesa.h
index c46d090b77..09446197b2 100644
--- a/src/mesa/program/ir_to_mesa.h
+++ b/src/mesa/program/ir_to_mesa.h
@@ -21,7 +21,8 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#pragma once
+#ifndef IR_TO_MESA_H
+#define IR_TO_MESA_H
 
 #include "main/glheader.h"
 
@@ -51,3 +52,5 @@ _mesa_associate_uniform_storage(struct gl_context *ctx,
 #ifdef __cplusplus
 }
 #endif
+
+#endif /* IR_TO_MESA_H */
diff --git a/src/mesa/program/prog_parameter_layout.h b/src/mesa/program/prog_parameter_layout.h
index 99a7b6c726..0e2d43a625 100644
--- a/src/mesa/program/prog_parameter_layout.h
+++ b/src/mesa/program/prog_parameter_layout.h
@@ -28,7 +28,6 @@
  * \author Ian Romanick <ian.d.romanick at intel.com>
  */
 
-#pragma once
 
 #ifndef PROG_PARAMETER_LAYOUT_H
 #define PROG_PARAMETER_LAYOUT_H
diff --git a/src/mesa/program/prog_to_nir.h b/src/mesa/program/prog_to_nir.h
index 09425b52e1..22a2b420cf 100644
--- a/src/mesa/program/prog_to_nir.h
+++ b/src/mesa/program/prog_to_nir.h
@@ -21,7 +21,6 @@
  * IN THE SOFTWARE.
  */
 
-#pragma once
 #ifndef PROG_TO_NIR_H
 #define PROG_TO_NIR_H
 
diff --git a/src/mesa/program/program_parser.h b/src/mesa/program/program_parser.h
index 412aca1e53..dadce12624 100644
--- a/src/mesa/program/program_parser.h
+++ b/src/mesa/program/program_parser.h
@@ -20,7 +20,9 @@
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
  */
-#pragma once
+
+#ifndef PROGRAM_PARSER_H
+#define PROGRAM_PARSER_H
 
 #include "main/config.h"
 #include "program/prog_parameter.h"
@@ -288,3 +290,5 @@ extern int _mesa_parse_instruction_suffix(const struct asm_parser_state *state,
     const char *suffix, struct prog_instruction *inst);
 
 /*@}*/
+
+#endif /* PROGRAM_PARSER_H */




More information about the mesa-commit mailing list