# HG changeset patch # User sheepluva # Date 1564957245 -7200 # Node ID f382ec6dba110dba5e12c49f5086e86d94adb4c9 # Parent 95281174e29701bc575705ef1c954fb81cbf8a35 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. diff -r 95281174e297 -r f382ec6dba11 project_files/hwc/rtl/GL.h --- 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 diff -r 95281174e297 -r f382ec6dba11 project_files/hwc/rtl/misc.c --- 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