mapi/glapi: Fix dll linkage of GLES1 symbols.

This fixes several MSVC warnings like:

  warning C4273: 'glClearColorx' : inconsistent dll linkage

In fact, we should avoid using `declspec(dllexport)` altogether, and use
exclusively the .DEF instead, which gives more precise control of which
symbols must be exported, but all the public GL/GLES headers practically
force us to pick between `declspec(dllexport)` or
`declspec(dllimport)`.

Cc: "10.4" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
José Fonseca 2014-11-25 23:06:25 +00:00
parent 4b6e93650c
commit 5fdb6d6839
1 changed files with 1 additions and 0 deletions

View File

@ -16,6 +16,7 @@ if env['platform'] == 'windows':
env.Append(CPPDEFINES = [
'_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers
'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
'KHRONOS_DLL_EXPORTS', # declare gl* as __declspec(dllexport) in Khronos headers
])
if env['gles']:
env.Append(CPPDEFINES = ['_GLAPI_DLL_EXPORTS'])