Force a specific locale for sorting

Avoids irrelevant output differences based on the user's locale. The
current output files were generated with a C or POSIX locale, and sort
differently under en_US.UTF-8.

Change-Id: I0dd85475e9ee2d58e7fa9fe2a4f86ad5c8142e00
diff --git a/opengl/libs/tools/genfiles b/opengl/libs/tools/genfiles
index 50bbf08..9a2038e 100755
--- a/opengl/libs/tools/genfiles
+++ b/opengl/libs/tools/genfiles
@@ -14,6 +14,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+# Force a specific locale for sorting to avoid irrelevant differences
+# in the generated files that could hide real differences.
+export LC_ALL=POSIX
+
 ./glapigen ../../include/GLES/gl.h      > ../GLES_CM/gl_api.in
 ./glapigen ../../include/GLES/glext.h   > ../GLES_CM/glext_api.in
 ./glapigen ../../include/GLES2/gl2.h    > ../GLES2/gl2_api.in
@@ -24,6 +28,10 @@
 ./glentrygen ../../include/GLES2/gl2.h    > /tmp/gl2_entries.in
 ./glentrygen ../../include/GLES2/gl2ext.h > /tmp/gl2ext_entries.in
 
+# The awk command removes lines with the same function name as an earlier
+# line, even if the rest of the line differs. Although signatures of
+# functions with the same name should be the same, the ES and ES2 headers
+# have some minor whitespace and parameter name differences.
 cat /tmp/gl_entries.in \
     /tmp/glext_entries.in \
     /tmp/gl2_entries.in \