From 3ac35789687936c0aa55c273e5b9e8610c769bf5 Mon Sep 17 00:00:00 2001
From: John Kessenich <cepheus@frii.com>
Date: Thu, 7 Nov 2013 01:36:56 +0000
Subject: [PATCH] Fix some Linux issues.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23939 e7fa87d3-cd2b-0410-9028-fcbf551c1848
---
 LinuxDoAll.bash                           | 34 +++++++++++++++++++++++
 Test/runtests                             |  0
 glslang/MachineIndependent/reflection.cpp |  4 +--
 glslang/MachineIndependent/reflection.h   |  6 ++--
 4 files changed, 39 insertions(+), 5 deletions(-)
 create mode 100755 LinuxDoAll.bash
 mode change 100644 => 100755 Test/runtests

diff --git a/LinuxDoAll.bash b/LinuxDoAll.bash
new file mode 100755
index 000000000..e27b5e19d
--- /dev/null
+++ b/LinuxDoAll.bash
@@ -0,0 +1,34 @@
+#! /bin/bash
+
+svn update
+
+rm -f StandAlone/glslangValidator
+rm -f Test/glslangValidator
+rm -f glslang/MachineIndependent/lib/libglslang.so
+rm -f Install/Linux/libglslang.so
+rm -f Install/Linux/glslangValidator
+
+cd StandAlone
+make clean
+cd ../glslang/MachineIndependent
+make clean
+cd ../..
+
+# build the StandAlone app and all it's dependencies
+make -C StandAlone
+
+# so we can find the shared library
+#LD_LIBRARY_PATH=`pwd`/glslang/MachineIndependent/lib
+#export LD_LIBRARY_PATH
+
+# install
+cd Install/Linux
+./install
+
+# run using test data
+cd Test
+../StandAlone/glslangValidator -i sample.vert sample.frag
+
+cd ../../Test
+chmod +x runtests
+./runtests
diff --git a/Test/runtests b/Test/runtests
old mode 100644
new mode 100755
diff --git a/glslang/MachineIndependent/reflection.cpp b/glslang/MachineIndependent/reflection.cpp
index 44cd22c97..b27118cc0 100644
--- a/glslang/MachineIndependent/reflection.cpp
+++ b/glslang/MachineIndependent/reflection.cpp
@@ -312,14 +312,14 @@ void TReflection::dump()
 {
     printf("Uniform reflection:\n");
     for (size_t i = 0; i < indexToUniform.size(); ++i) {
-        printf("%d:", i);
+        printf("%d:", (int)i);
         indexToUniform[i].dump();
     }
     printf("\n");
 
     printf("Uniform block reflection:\n");
     for (size_t i = 0; i < indexToUniformBlock.size(); ++i) {
-        printf("%d: ", i);
+        printf("%d: ", (int)i);
         indexToUniformBlock[i].dump();
     }
     printf("\n");
diff --git a/glslang/MachineIndependent/reflection.h b/glslang/MachineIndependent/reflection.h
index efff37766..1474259ad 100644
--- a/glslang/MachineIndependent/reflection.h
+++ b/glslang/MachineIndependent/reflection.h
@@ -54,10 +54,10 @@ class TLiveTraverser;
 // Data needed for just a single object at the granularity exchanged by the reflection API
 class TObjectReflection {
 public:
-    TObjectReflection(const TString pName, int pOffset, int pGLDefineType, int pSize, int pIndex) : 
+    TObjectReflection(const TString& pName, int pOffset, int pGLDefineType, int pSize, int pIndex) : 
         name(pName), offset(pOffset), glDefineType(pGLDefineType), size(pSize), index(pIndex) { }
     void dump() const { printf("%s: offset %d, type %d, arraySize %d, index %d\n", name.c_str(), offset, glDefineType, size, index); }
-    const TString name;
+    TString name;
     int offset;
     int glDefineType;
     int size;         // data size in bytes for a block, array size for a (non-block) object that's an array
@@ -119,4 +119,4 @@ protected:
 
 } // end namespace glslang
 
-#endif _REFLECTION_INCLUDED
+#endif // _REFLECTION_INCLUDED
-- 
GitLab