In hindsight my emscripten-ifdef (70d416a8f63f) is nonsense.
As fpcrtl_glShaderSource() would not be defined and lead to compiling issues.
So either it's 3 ifdefs (in pas2cRedo, pas2cSystem and misc.c),
in order to toggle between fpcrtl_ and the native function,
or alternatively have no ifdef for it at all.
I'm going with none at all,
which means emscripten will compile with the original (const) function prototype,
being wrapped by the fpcrtl_ function, same as non-emscripten builds.
--- a/project_files/hwc/rtl/GL.h Sun Aug 04 01:52:12 2019 +0200
+++ b/project_files/hwc/rtl/GL.h Mon Aug 05 00:20:45 2019 +0200
@@ -33,5 +33,6 @@
void glGetShaderiv(GLuint shader, GLenum pname, GLint *params);
GLuint glCreateShader(GLenum shaderType);
void glCompileShader(GLuint shader);
-void glShaderSource(GLuint shader, GLsizei count,/* const dropped for pas2c compat */ GLchar **string, const GLint *length);
+//void glShaderSource(GLuint shader, GLsizei count,/* const dropped for pas2c compat */ GLchar **string, const GLint *length);
+void glShaderSource(GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
#endif
--- a/project_files/hwc/rtl/misc.c Sun Aug 04 01:52:12 2019 +0200
+++ b/project_files/hwc/rtl/misc.c Mon Aug 05 00:20:45 2019 +0200
@@ -224,8 +224,8 @@
{
return GLEW_OK;
}
-#else
+#endif
+
void fpcrtl_glShaderSource(GLuint shader, GLsizei count,/* const dropped for pas2c compat */ GLchar **string, const GLint *length) {
glShaderSource(shader, count, (const char * const *)string, length);
}
-#endif