Move the visibility pragmas below the includes.
authorEthan Lee <flibitijibibo@flibitijibibo.com>
Tue, 23 Apr 2019 14:55:13 -0400
changeset 1200 eb1e5280a5a9
parent 1199 b8ece252a201
child 1201 2ca303e50e27
Move the visibility pragmas below the includes. This fixes some possible issues with the linker and the standard C runtime.
profiles/mojoshader_profile_arb1.c
profiles/mojoshader_profile_bytecode.c
profiles/mojoshader_profile_common.c
profiles/mojoshader_profile_d3d.c
profiles/mojoshader_profile_glsl.c
profiles/mojoshader_profile_metal.c
--- a/profiles/mojoshader_profile_arb1.c	Tue Apr 23 14:43:10 2019 -0400
+++ b/profiles/mojoshader_profile_arb1.c	Tue Apr 23 14:55:13 2019 -0400
@@ -7,11 +7,11 @@
  *  This file written by Ryan C. Gordon.
  */
 
-#pragma GCC visibility push(hidden)
-
 #define __MOJOSHADER_INTERNAL__ 1
 #include "mojoshader_profile.h"
 
+#pragma GCC visibility push(hidden)
+
 #if SUPPORT_PROFILE_ARB1
 
 static inline const char *get_ARB1_register_string(Context *ctx,
@@ -2249,4 +2249,4 @@
 
 #endif  // SUPPORT_PROFILE_ARB1
 
-#pragma GCC visibility pop
\ No newline at end of file
+#pragma GCC visibility pop
--- a/profiles/mojoshader_profile_bytecode.c	Tue Apr 23 14:43:10 2019 -0400
+++ b/profiles/mojoshader_profile_bytecode.c	Tue Apr 23 14:55:13 2019 -0400
@@ -7,11 +7,11 @@
  *  This file written by Ryan C. Gordon.
  */
 
-#pragma GCC visibility push(hidden)
-
 #define __MOJOSHADER_INTERNAL__ 1
 #include "mojoshader_profile.h"
 
+#pragma GCC visibility push(hidden)
+
 #if SUPPORT_PROFILE_BYTECODE
 
 void emit_BYTECODE_start(Context *ctx, const char *profilestr)
@@ -149,4 +149,4 @@
 
 #endif  // SUPPORT_PROFILE_BYTECODE
 
-#pragma GCC visibility pop
\ No newline at end of file
+#pragma GCC visibility pop
--- a/profiles/mojoshader_profile_common.c	Tue Apr 23 14:43:10 2019 -0400
+++ b/profiles/mojoshader_profile_common.c	Tue Apr 23 14:55:13 2019 -0400
@@ -7,11 +7,11 @@
  *  This file written by Ryan C. Gordon.
  */
 
-#pragma GCC visibility push(hidden)
-
 #define __MOJOSHADER_INTERNAL__ 1
 #include "mojoshader_profile.h"
 
+#pragma GCC visibility push(hidden)
+
 // Common Utilities
 
 void out_of_memory(Context *ctx)
@@ -501,4 +501,4 @@
     return StrDup(ctx, buf);
 } // get_D3D_varname
 
-#pragma GCC visibility pop
\ No newline at end of file
+#pragma GCC visibility pop
--- a/profiles/mojoshader_profile_d3d.c	Tue Apr 23 14:43:10 2019 -0400
+++ b/profiles/mojoshader_profile_d3d.c	Tue Apr 23 14:55:13 2019 -0400
@@ -7,11 +7,11 @@
  *  This file written by Ryan C. Gordon.
  */
 
-#pragma GCC visibility push(hidden)
-
 #define __MOJOSHADER_INTERNAL__ 1
 #include "mojoshader_profile.h"
 
+#pragma GCC visibility push(hidden)
+
 #if SUPPORT_PROFILE_D3D
 
 const char *make_D3D_srcarg_string_in_buf(Context *ctx,
@@ -683,4 +683,4 @@
 
 #endif  // SUPPORT_PROFILE_D3D
 
-#pragma GCC visibility pop
\ No newline at end of file
+#pragma GCC visibility pop
--- a/profiles/mojoshader_profile_glsl.c	Tue Apr 23 14:43:10 2019 -0400
+++ b/profiles/mojoshader_profile_glsl.c	Tue Apr 23 14:55:13 2019 -0400
@@ -7,11 +7,11 @@
  *  This file written by Ryan C. Gordon.
  */
 
-#pragma GCC visibility push(hidden)
-
 #define __MOJOSHADER_INTERNAL__ 1
 #include "mojoshader_profile.h"
 
+#pragma GCC visibility push(hidden)
+
 #if SUPPORT_PROFILE_GLSL
 
 #define EMIT_GLSL_OPCODE_UNIMPLEMENTED_FUNC(op) \
@@ -2304,4 +2304,4 @@
 
 #endif  // SUPPORT_PROFILE_GLSL
 
-#pragma GCC visibility pop
\ No newline at end of file
+#pragma GCC visibility pop
--- a/profiles/mojoshader_profile_metal.c	Tue Apr 23 14:43:10 2019 -0400
+++ b/profiles/mojoshader_profile_metal.c	Tue Apr 23 14:55:13 2019 -0400
@@ -7,11 +7,11 @@
  *  This file written by Ryan C. Gordon.
  */
 
-#pragma GCC visibility push(hidden)
-
 #define __MOJOSHADER_INTERNAL__ 1
 #include "mojoshader_profile.h"
 
+#pragma GCC visibility push(hidden)
+
 // !!! FIXME: A lot of this is cut-and-paste from the GLSL version.
 #if SUPPORT_PROFILE_METAL
 
@@ -2302,4 +2302,4 @@
 
 #endif  // SUPPORT_PROFILE_METAL
 
-#pragma GCC visibility pop
\ No newline at end of file
+#pragma GCC visibility pop