From e3659329e0b91ea78afe32e231f2f75d3d728af9 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Thu, 2 Dec 2010 17:27:05 +0000 Subject: WIN32_THREADS -> WIN32 Fixes nasty bug where some parts of the code didn't define WIN32_THREADS and were using the integer mutex implementation, causing even confusion to the debuggers. And there is little interest of other thread implemenation on Win32 besides Win32 threads. --- src/mapi/glapi/SConscript | 1 - 1 file changed, 1 deletion(-) (limited to 'src/mapi/glapi/SConscript') diff --git a/src/mapi/glapi/SConscript b/src/mapi/glapi/SConscript index 77a5f9bd2e..4ef855fc35 100644 --- a/src/mapi/glapi/SConscript +++ b/src/mapi/glapi/SConscript @@ -16,7 +16,6 @@ if env['platform'] != 'winddk': env.Append(CPPDEFINES = [ '_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers - 'WIN32_THREADS', # use Win32 thread API ]) env.Append(CPPPATH = [ -- cgit v1.2.3 From c17d4999f108d86c468cf4b11b08f915c282ce12 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 10 Dec 2010 17:14:04 +0800 Subject: mapi: Clean up u_current interface. Try not to use macros to make u_current.h appear to be glapi.h. Use u_current.h to implement glapi.h instead whenever possible. --- src/mapi/es1api/Makefile | 2 +- src/mapi/glapi/Makefile | 2 +- src/mapi/glapi/SConscript | 1 + src/mapi/glapi/glapi.c | 65 ++++++++++++++++++++++++++++++++++++++++ src/mapi/glapi/sources.mak | 3 +- src/mapi/mapi/entry_x86-64_tls.h | 4 +-- src/mapi/mapi/entry_x86_tls.h | 2 +- src/mapi/mapi/u_current.c | 35 ++++++++++------------ src/mapi/mapi/u_current.h | 46 ++++++++++------------------ 9 files changed, 104 insertions(+), 56 deletions(-) create mode 100644 src/mapi/glapi/glapi.c (limited to 'src/mapi/glapi/SConscript') diff --git a/src/mapi/es1api/Makefile b/src/mapi/es1api/Makefile index 576ac5afdc..1e2b5e523b 100644 --- a/src/mapi/es1api/Makefile +++ b/src/mapi/es1api/Makefile @@ -72,7 +72,7 @@ lib$(ESAPI).a: $(ESAPI_OBJECTS) @$(MKLIB) -o $(ESAPI) -static $(ESAPI_OBJECTS) $(GLAPI_OBJECTS): %.o: $(GLAPI)/%.c - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ + $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) -DMAPI_GLAPI_CURRENT $< -o $@ $(GLAPI_ASM_OBJECTS): %.o: $(GEN)/%.S $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ diff --git a/src/mapi/glapi/Makefile b/src/mapi/glapi/Makefile index ca9381d425..acd8429778 100644 --- a/src/mapi/glapi/Makefile +++ b/src/mapi/glapi/Makefile @@ -28,7 +28,7 @@ lib$(TARGET).a: $(TARGET_OBJECTS) @$(MKLIB) -o $(TARGET) -static $(TARGET_OBJECTS) $(GLAPI_OBJECTS): %.o: %.c - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ + $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) -DMAPI_GLAPI_CURRENT $< -o $@ $(GLAPI_ASM_OBJECTS): %.o: %.S $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ diff --git a/src/mapi/glapi/SConscript b/src/mapi/glapi/SConscript index 4ef855fc35..27258f808a 100644 --- a/src/mapi/glapi/SConscript +++ b/src/mapi/glapi/SConscript @@ -29,6 +29,7 @@ if env['platform'] != 'winddk': 'glapi_getproc.c', 'glapi_nop.c', 'glthread.c', + 'glapi.c', ] mapi_sources = [ diff --git a/src/mapi/glapi/glapi.c b/src/mapi/glapi/glapi.c new file mode 100644 index 0000000000..f7655c558c --- /dev/null +++ b/src/mapi/glapi/glapi.c @@ -0,0 +1,65 @@ +/* + * Mesa 3-D graphics library + * Version: 7.9 + * + * Copyright (C) 2010 LunarG Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Authors: + * Chia-I Wu + */ + +#include "glapi/glapi.h" +#include "mapi/u_current.h" + +/* + * Global variables, _glapi_get_context, and _glapi_get_dispatch are defined in + * u_current.c. + */ + +#ifdef GLX_USE_TLS +/* not used, but defined for compatibility */ +const struct _glapi_table *_glapi_Dispatch; +const void *_glapi_Context; +#endif /* GLX_USE_TLS */ + +void +_glapi_destroy_multithread(void) +{ + u_current_destroy(); +} + +void +_glapi_check_multithread(void) +{ + u_current_init(); +} + +void +_glapi_set_context(void *context) +{ + u_current_set_user((const void *) context); +} + +void +_glapi_set_dispatch(struct _glapi_table *dispatch) +{ + u_current_set((const struct mapi_table *) dispatch); +} diff --git a/src/mapi/glapi/sources.mak b/src/mapi/glapi/sources.mak index cdcfa36e51..0b4d8cf65d 100644 --- a/src/mapi/glapi/sources.mak +++ b/src/mapi/glapi/sources.mak @@ -5,7 +5,8 @@ GLAPI_SOURCES = \ glapi_entrypoint.c \ glapi_getproc.c \ glapi_nop.c \ - glthread.c + glthread.c \ + glapi.c X86_API = \ glapi_x86.S diff --git a/src/mapi/mapi/entry_x86-64_tls.h b/src/mapi/mapi/entry_x86-64_tls.h index cc3d5a8d7e..2c02933802 100644 --- a/src/mapi/mapi/entry_x86-64_tls.h +++ b/src/mapi/mapi/entry_x86-64_tls.h @@ -46,7 +46,7 @@ __asm__(".section .note.ABI-tag, \"a\"\n\t" __asm__(".text"); __asm__("x86_64_current_tls:\n\t" - "movq u_current_table_tls@GOTTPOFF(%rip), %rax\n\t" + "movq u_current_table@GOTTPOFF(%rip), %rax\n\t" "ret"); #define STUB_ASM_ENTRY(func) \ @@ -56,7 +56,7 @@ __asm__("x86_64_current_tls:\n\t" func ":" #define STUB_ASM_CODE(slot) \ - "movq u_current_table_tls@GOTTPOFF(%rip), %rax\n\t" \ + "movq u_current_table@GOTTPOFF(%rip), %rax\n\t" \ "movq %fs:(%rax), %r11\n\t" \ "jmp *(8 * " slot ")(%r11)" diff --git a/src/mapi/mapi/entry_x86_tls.h b/src/mapi/mapi/entry_x86_tls.h index 9a1f6e4ec4..3d0b7caffe 100644 --- a/src/mapi/mapi/entry_x86_tls.h +++ b/src/mapi/mapi/entry_x86_tls.h @@ -50,7 +50,7 @@ __asm__("x86_current_tls:\n\t" "1:\n\t" "popl %eax\n\t" "addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %eax\n\t" - "movl u_current_table_tls@GOTNTPOFF(%eax), %eax\n\t" + "movl u_current_table@GOTNTPOFF(%eax), %eax\n\t" "ret"); #ifndef GLX_X86_READONLY_TEXT diff --git a/src/mapi/mapi/u_current.c b/src/mapi/mapi/u_current.c index 77a593b330..d84520f313 100644 --- a/src/mapi/mapi/u_current.c +++ b/src/mapi/mapi/u_current.c @@ -99,16 +99,13 @@ extern void (*__glapi_noop_table[])(void); /*@{*/ #if defined(GLX_USE_TLS) -__thread struct mapi_table *u_current_table_tls +__thread struct mapi_table *u_current_table __attribute__((tls_model("initial-exec"))) = (struct mapi_table *) table_noop_array; -__thread void *u_current_user_tls +__thread void *u_current_user __attribute__((tls_model("initial-exec"))); -const struct mapi_table *u_current_table; -const void *u_current_user; - #else struct mapi_table *u_current_table = @@ -179,8 +176,8 @@ u_current_init(void) } else if (knownID != u_thread_self()) { ThreadSafe = 1; - u_current_set_internal(NULL); - u_current_set_user_internal(NULL); + u_current_set(NULL); + u_current_set_user(NULL); } CHECK_MULTITHREAD_UNLOCK(); } @@ -202,17 +199,17 @@ u_current_init(void) * void from the real context pointer type. */ void -u_current_set_user_internal(void *ptr) +u_current_set_user(const void *ptr) { u_current_init(); #if defined(GLX_USE_TLS) - u_current_user_tls = ptr; + u_current_user = (void *) ptr; #elif defined(THREADS) - u_tsd_set(&u_current_user_tsd, ptr); - u_current_user = (ThreadSafe) ? NULL : ptr; + u_tsd_set(&u_current_user_tsd, (void *) ptr); + u_current_user = (ThreadSafe) ? NULL : (void *) ptr; #else - u_current_user = ptr; + u_current_user = (void *) ptr; #endif } @@ -225,7 +222,7 @@ void * u_current_get_user_internal(void) { #if defined(GLX_USE_TLS) - return u_current_user_tls; + return u_current_user; #elif defined(THREADS) return (ThreadSafe) ? u_tsd_get(&u_current_user_tsd) @@ -241,22 +238,22 @@ u_current_get_user_internal(void) * table (__glapi_noop_table). */ void -u_current_set_internal(struct mapi_table *tbl) +u_current_set(const struct mapi_table *tbl) { u_current_init(); stub_init_once(); if (!tbl) - tbl = (struct mapi_table *) table_noop_array; + tbl = (const struct mapi_table *) table_noop_array; #if defined(GLX_USE_TLS) - u_current_table_tls = tbl; + u_current_table = (struct mapi_table *) tbl; #elif defined(THREADS) u_tsd_set(&u_current_table_tsd, (void *) tbl); - u_current_table = (ThreadSafe) ? NULL : tbl; + u_current_table = (ThreadSafe) ? NULL : (void *) tbl; #else - u_current_table = tbl; + u_current_table = (struct mapi_table *) tbl; #endif } @@ -267,7 +264,7 @@ struct mapi_table * u_current_get_internal(void) { #if defined(GLX_USE_TLS) - return u_current_table_tls; + return u_current_table; #elif defined(THREADS) return (struct mapi_table *) ((ThreadSafe) ? u_tsd_get(&u_current_table_tsd) : (void *) u_current_table); diff --git a/src/mapi/mapi/u_current.h b/src/mapi/mapi/u_current.h index 62e54c6c93..373d48fb93 100644 --- a/src/mapi/mapi/u_current.h +++ b/src/mapi/mapi/u_current.h @@ -8,16 +8,15 @@ /* ugly renames to match glapi.h */ #define mapi_table _glapi_table -#define u_current_table_tls _glapi_tls_Dispatch -#define u_current_user_tls _glapi_tls_Context +#ifdef GLX_USE_TLS +#define u_current_table _glapi_tls_Dispatch +#define u_current_user _glapi_tls_Context +#else #define u_current_table _glapi_Dispatch #define u_current_user _glapi_Context +#endif -#define u_current_destroy _glapi_destroy_multithread -#define u_current_init _glapi_check_multithread -#define u_current_set_internal _glapi_set_dispatch #define u_current_get_internal _glapi_get_dispatch -#define u_current_set_user_internal _glapi_set_context #define u_current_get_user_internal _glapi_get_context #define u_current_table_tsd _gl_DispatchTSD @@ -30,15 +29,12 @@ struct mapi_table; #ifdef GLX_USE_TLS -extern __thread struct mapi_table *u_current_table_tls +extern __thread struct mapi_table *u_current_table __attribute__((tls_model("initial-exec"))); -extern __thread void *u_current_user_tls +extern __thread void *u_current_user __attribute__((tls_model("initial-exec"))); -extern const struct mapi_table *u_current_table; -extern const void *u_current_user; - #else /* GLX_USE_TLS */ extern struct mapi_table *u_current_table; @@ -46,6 +42,8 @@ extern void *u_current_user; #endif /* GLX_USE_TLS */ +#endif /* MAPI_GLAPI_CURRENT */ + void u_current_init(void); @@ -53,50 +51,36 @@ void u_current_destroy(void); void -u_current_set_internal(struct mapi_table *tbl); +u_current_set(const struct mapi_table *tbl); struct mapi_table * u_current_get_internal(void); void -u_current_set_user_internal(void *ptr); +u_current_set_user(const void *ptr); void * u_current_get_user_internal(void); -static INLINE void -u_current_set(const struct mapi_table *tbl) -{ - u_current_set_internal((struct mapi_table *) tbl); -} - static INLINE const struct mapi_table * u_current_get(void) { #ifdef GLX_USE_TLS - return (const struct mapi_table *) u_current_table_tls; + return u_current_table; #else return (likely(u_current_table) ? - (const struct mapi_table *) u_current_table : u_current_get_internal()); + u_current_table : u_current_get_internal()); #endif } -static INLINE void -u_current_set_user(void *ptr) -{ - u_current_set_internal(ptr); -} - -static INLINE void * +static INLINE const void * u_current_get_user(void) { #ifdef GLX_USE_TLS - return u_current_user_tls; + return u_current_user; #else return likely(u_current_user) ? u_current_user : u_current_get_user_internal(); #endif } -#endif /* MAPI_GLAPI_CURRENT */ - #endif /* _U_CURRENT_H_ */ -- cgit v1.2.3 From 7048095513f8e91db26736eee0343b1a00d18f6f Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Sat, 11 Dec 2010 03:27:54 +0800 Subject: mapi: Clean up sources.mk. Rename MAPI_GLAPI_SOURCES to MAPI_UTIL_SOURCES. Rename macro MAPI_GLAPI_CURRENT to MAPI_MODE_UTIL. Update the comments to make it clear that mapi may be used in two ways and how. --- src/mapi/es1api/Makefile | 16 ++++++++-------- src/mapi/glapi/Makefile | 16 ++++++++-------- src/mapi/glapi/SConscript | 2 +- src/mapi/mapi/sources.mak | 14 ++++++++------ src/mapi/mapi/u_current.c | 2 +- src/mapi/mapi/u_current.h | 6 +++--- 6 files changed, 29 insertions(+), 27 deletions(-) (limited to 'src/mapi/glapi/SConscript') diff --git a/src/mapi/es1api/Makefile b/src/mapi/es1api/Makefile index 1e2b5e523b..3659d6486a 100644 --- a/src/mapi/es1api/Makefile +++ b/src/mapi/es1api/Makefile @@ -44,10 +44,10 @@ GLAPI_ASM_OBJECTS := $(GLAPI_ASM_SOURCES:.S=.o) GLAPI_ASM_SOURCES := $(addprefix $(GEN)/, $(GLAPI_ASM_SOURCES)) include $(MAPI)/sources.mak -MAPI_GLAPI_OBJECTS := $(MAPI_GLAPI_SOURCES:.c=.o) -MAPI_GLAPI_SOURCES := $(addprefix $(MAPI)/, $(MAPI_GLAPI_SOURCES)) +MAPI_UTIL_OBJECTS := $(MAPI_UTIL_SOURCES:.c=.o) +MAPI_UTIL_SOURCES := $(addprefix $(MAPI)/, $(MAPI_UTIL_SOURCES)) -ESAPI_OBJECTS = $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS) $(MAPI_GLAPI_OBJECTS) +ESAPI_OBJECTS = $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS) $(MAPI_UTIL_OBJECTS) INCLUDE_DIRS = \ -I$(TOP)/include \ @@ -72,13 +72,13 @@ lib$(ESAPI).a: $(ESAPI_OBJECTS) @$(MKLIB) -o $(ESAPI) -static $(ESAPI_OBJECTS) $(GLAPI_OBJECTS): %.o: $(GLAPI)/%.c - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) -DMAPI_GLAPI_CURRENT $< -o $@ + $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) -DMAPI_MODE_UTIL $< -o $@ $(GLAPI_ASM_OBJECTS): %.o: $(GEN)/%.S $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ -$(MAPI_GLAPI_OBJECTS): %.o: $(MAPI)/%.c - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) -DMAPI_GLAPI_CURRENT $< -o $@ +$(MAPI_UTIL_OBJECTS): %.o: $(MAPI)/%.c + $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) -DMAPI_MODE_UTIL $< -o $@ $(GLAPI_SOURCES) $(GLAPI_ASM_SOURCES): | glapi-stamp @@ -135,10 +135,10 @@ install: default install-headers install-pc $(MINSTALL) $(TOP)/$(LIB_DIR)/$(GLES_LIB_GLOB) \ $(DESTDIR)$(INSTALL_LIB_DIR) -depend: $(GLAPI_SOURCES) $(MAPI_GLAPI_SOURCES) +depend: $(GLAPI_SOURCES) $(MAPI_UTIL_SOURCES) @echo "running $(MKDEP)" @touch depend @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(INCLUDE_DIRS) \ - -DMAPI_GLAPI_CURRENT $(GLAPI_SOURCES) $(MAPI_GLAPI_SOURCES) \ + -DMAPI_MODE_UTIL $(GLAPI_SOURCES) $(MAPI_UTIL_SOURCES) \ 2>/dev/null | sed -e 's,^$(GLAPI)/,,' -e 's,^$(MAPI)/,,' \ > depend diff --git a/src/mapi/glapi/Makefile b/src/mapi/glapi/Makefile index acd8429778..a9ab07903c 100644 --- a/src/mapi/glapi/Makefile +++ b/src/mapi/glapi/Makefile @@ -12,10 +12,10 @@ GLAPI_OBJECTS = $(GLAPI_SOURCES:.c=.o) GLAPI_ASM_OBJECTS = $(GLAPI_ASM_SOURCES:.S=.o) include $(MAPI)/sources.mak -MAPI_GLAPI_OBJECTS := $(MAPI_GLAPI_SOURCES:.c=.o) -MAPI_GLAPI_SOURCES := $(addprefix $(MAPI)/, $(MAPI_GLAPI_SOURCES)) +MAPI_UTIL_OBJECTS := $(MAPI_UTIL_SOURCES:.c=.o) +MAPI_UTIL_SOURCES := $(addprefix $(MAPI)/, $(MAPI_UTIL_SOURCES)) -TARGET_OBJECTS = $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS) $(MAPI_GLAPI_OBJECTS) +TARGET_OBJECTS = $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS) $(MAPI_UTIL_OBJECTS) INCLUDE_DIRS = \ -I$(TOP)/include \ @@ -28,13 +28,13 @@ lib$(TARGET).a: $(TARGET_OBJECTS) @$(MKLIB) -o $(TARGET) -static $(TARGET_OBJECTS) $(GLAPI_OBJECTS): %.o: %.c - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) -DMAPI_GLAPI_CURRENT $< -o $@ + $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) -DMAPI_MODE_UTIL $< -o $@ $(GLAPI_ASM_OBJECTS): %.o: %.S $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ -$(MAPI_GLAPI_OBJECTS): %.o: $(MAPI)/%.c - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) -DMAPI_GLAPI_CURRENT $< -o $@ +$(MAPI_UTIL_OBJECTS): %.o: $(MAPI)/%.c + $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) -DMAPI_MODE_UTIL $< -o $@ install: @@ -43,11 +43,11 @@ clean: -rm -f lib$(TARGET).a -rm -f depend depend.bak -depend: $(GLAPI_SOURCES) $(MAPI_GLAPI_SOURCES) +depend: $(GLAPI_SOURCES) $(MAPI_UTIL_SOURCES) @ echo "running $(MKDEP)" @ touch depend @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(INCLUDE_DIRS) \ - -DMAPI_GLAPI_CURRENT $(GLAPI_SOURCES) $(MAPI_GLAPI_SOURCES) \ + -DMAPI_MODE_UTIL $(GLAPI_SOURCES) $(MAPI_UTIL_SOURCES) \ 2>/dev/null | sed -e 's,^$(MAPI)/,,' > depend -include depend diff --git a/src/mapi/glapi/SConscript b/src/mapi/glapi/SConscript index 27258f808a..4057991ec8 100644 --- a/src/mapi/glapi/SConscript +++ b/src/mapi/glapi/SConscript @@ -9,7 +9,7 @@ if env['platform'] != 'winddk': env = env.Clone() env.Append(CPPDEFINES = [ - 'MAPI_GLAPI_CURRENT', + 'MAPI_MODE_UTIL', ]) if env['platform'] == 'windows': diff --git a/src/mapi/mapi/sources.mak b/src/mapi/mapi/sources.mak index 5f327f3df6..ed36e1af48 100644 --- a/src/mapi/mapi/sources.mak +++ b/src/mapi/mapi/sources.mak @@ -1,12 +1,14 @@ # src/mapi/mapi/sources.mak # -# When MAPI_GLAPI_CURRENT is defined, MAPI_GLAPI_SOURCES can be built without -# MAPI_SOURCES and it is used by glapi. +# mapi may be used in several ways # -# Otherwise, MAPI_ABI_HEADER must be defined. It should expand to the header -# generated by mapi_abi.py. +# - In default mode, mapi implements the interface defined by mapi.h. To use +# this mode, compile MAPI_SOURCES. +# +# - In util mode, mapi provides utility functions for use with glapi. To use +# this mode, compile MAPI_UTIL_SOURCES with MAPI_MODE_UTIL defined. -MAPI_GLAPI_SOURCES = \ +MAPI_UTIL_SOURCES = \ u_current.c \ u_execmem.c \ u_thread.c @@ -16,4 +18,4 @@ MAPI_SOURCES = \ mapi.c \ stub.c \ table.c \ - $(MAPI_GLAPI_SOURCES) + $(MAPI_UTIL_SOURCES) diff --git a/src/mapi/mapi/u_current.c b/src/mapi/mapi/u_current.c index d84520f313..7946d2a274 100644 --- a/src/mapi/mapi/u_current.c +++ b/src/mapi/mapi/u_current.c @@ -51,7 +51,7 @@ #include "u_current.h" #include "u_thread.h" -#ifndef MAPI_GLAPI_CURRENT +#ifndef MAPI_MODE_UTIL #include "table.h" #include "stub.h" diff --git a/src/mapi/mapi/u_current.h b/src/mapi/mapi/u_current.h index 373d48fb93..061fccc949 100644 --- a/src/mapi/mapi/u_current.h +++ b/src/mapi/mapi/u_current.h @@ -1,7 +1,7 @@ #ifndef _U_CURRENT_H_ #define _U_CURRENT_H_ -#ifdef MAPI_GLAPI_CURRENT +#ifdef MAPI_MODE_UTIL #include "glapi/glapi.h" @@ -21,7 +21,7 @@ #define u_current_table_tsd _gl_DispatchTSD -#else /* MAPI_GLAPI_CURRENT */ +#else /* MAPI_MODE_UTIL */ #include "u_compiler.h" @@ -42,7 +42,7 @@ extern void *u_current_user; #endif /* GLX_USE_TLS */ -#endif /* MAPI_GLAPI_CURRENT */ +#endif /* MAPI_MODE_UTIL */ void u_current_init(void); -- cgit v1.2.3