diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2009-09-14 12:51:53 +0800 |
---|---|---|
committer | Chia-I Wu <olvaffe@gmail.com> | 2009-09-14 13:04:57 +0800 |
commit | cbd17236c83071c55230f02c8da045f04b8b180f (patch) | |
tree | c7fec4af6882db3af160f33d1415b4b16dc3771f /src/mesa/glapi | |
parent | 8077986205ad1bf2a14f650c2067a74efe428f78 (diff) |
glapi: Respect IN_DRI_DRIVER in extension_helper.h.
This allows extension_helper.h to be used with IN_DRI_DRIVER undefined.
In such case, generate macros for source level compatibility.
Diffstat (limited to 'src/mesa/glapi')
-rw-r--r-- | src/mesa/glapi/extension_helper.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/glapi/extension_helper.py b/src/mesa/glapi/extension_helper.py index 83471d89f5..3b6e2ce404 100644 --- a/src/mesa/glapi/extension_helper.py +++ b/src/mesa/glapi/extension_helper.py @@ -165,6 +165,8 @@ class PrintGlExtensionGlue(gl_XML.gl_print_base): print '# define NULL 0' print '#endif' print '' + print '#if defined(IN_DRI_DRIVER)' + print '' for f in api.functionIterateAll(): condition = condition_for_function(f, abi, 0) @@ -232,6 +234,15 @@ class PrintGlExtensionGlue(gl_XML.gl_print_base): print '#endif' print '' + print '#else /* IN_DRI_DRIVER */' + print '' + for category in keys: + print '#if defined(need_%s)' % (category) + print '#define %s_functions NULL' % (category) + print '#endif' + print '' + print '#endif /* IN_DRI_DRIVER */' + print '' return |