mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-15 06:50:32 +00:00
Add extern "C" to glsym headers.
This commit is contained in:
parent
26d74be8b8
commit
c007e5860c
@ -80,6 +80,11 @@ if __name__ == '__main__':
|
||||
with open(sys.argv[2], 'w') as f:
|
||||
f.write('#ifndef RGLGEN_DECL_H__\n')
|
||||
f.write('#define RGLGEN_DECL_H__\n')
|
||||
|
||||
f.write('#ifdef __cplusplus\n')
|
||||
f.write('extern "C" {\n')
|
||||
f.write('#endif\n')
|
||||
|
||||
f.write('#ifdef GL_APIENTRY\n')
|
||||
f.write('typedef void (GL_APIENTRY *RGLGENGLDEBUGPROC)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*, GLvoid*);\n')
|
||||
f.write('#else\n')
|
||||
@ -92,17 +97,26 @@ if __name__ == '__main__':
|
||||
f.write('typedef void (APIENTRY *RGLGENGLDEBUGPROCARB)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*, GLvoid*);\n')
|
||||
f.write('typedef void (APIENTRY *RGLGENGLDEBUGPROC)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*, GLvoid*);\n')
|
||||
f.write('#endif\n')
|
||||
|
||||
f.write('#ifndef GL_OES_EGL_image\n')
|
||||
f.write('typedef void *GLeglImageOES;\n')
|
||||
f.write('#endif\n')
|
||||
|
||||
f.write('#if !defined(GL_OES_fixed_point) && !defined(HAVE_OPENGLES2)\n')
|
||||
f.write('typedef GLint GLfixed;\n')
|
||||
f.write('#endif\n')
|
||||
|
||||
dump(f, typedefs)
|
||||
dump(f, overrides)
|
||||
dump(f, externs)
|
||||
|
||||
f.write('struct rglgen_sym_map { const char *sym; void *ptr; };\n')
|
||||
f.write('extern const struct rglgen_sym_map rglgen_symbol_map[];\n')
|
||||
|
||||
f.write('#ifdef __cplusplus\n')
|
||||
f.write('}\n')
|
||||
f.write('#endif\n')
|
||||
|
||||
f.write('#endif\n')
|
||||
|
||||
with open(sys.argv[3], 'w') as f:
|
||||
|
@ -1,14 +1,26 @@
|
||||
#ifndef RGLGEN_DECL_H__
|
||||
#define RGLGEN_DECL_H__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifdef GL_APIENTRY
|
||||
typedef void (GL_APIENTRY *RGLGENGLDEBUGPROC)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*, GLvoid*);
|
||||
#else
|
||||
#ifndef APIENTRY
|
||||
#define APIENTRY
|
||||
#endif
|
||||
#ifndef APIENTRYP
|
||||
#define APIENTRYP APIENTRY *
|
||||
#endif
|
||||
typedef void (APIENTRY *RGLGENGLDEBUGPROCARB)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*, GLvoid*);
|
||||
typedef void (APIENTRY *RGLGENGLDEBUGPROC)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*, GLvoid*);
|
||||
#endif
|
||||
#ifndef GL_OES_EGL_image
|
||||
typedef void *GLeglImageOES;
|
||||
#endif
|
||||
#if !defined(GL_OES_fixed_point) && !defined(HAVE_OPENGLES2)
|
||||
typedef GLint GLfixed;
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP RGLSYMGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
|
||||
@ -98,4 +110,7 @@ extern RGLSYMGLGETPOINTERVPROC __rglgen_glGetPointerv;
|
||||
|
||||
struct rglgen_sym_map { const char *sym; void *ptr; };
|
||||
extern const struct rglgen_sym_map rglgen_symbol_map[];
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1,5 +1,8 @@
|
||||
#ifndef RGLGEN_DECL_H__
|
||||
#define RGLGEN_DECL_H__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifdef GL_APIENTRY
|
||||
typedef void (GL_APIENTRY *RGLGENGLDEBUGPROC)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*, GLvoid*);
|
||||
#else
|
||||
@ -3011,4 +3014,7 @@ extern RGLSYMGLQUERYMATRIXXOESPROC __rglgen_glQueryMatrixxOES;
|
||||
|
||||
struct rglgen_sym_map { const char *sym; void *ptr; };
|
||||
extern const struct rglgen_sym_map rglgen_symbol_map[];
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user