diff --git a/include/GL/glfw3.h b/include/GL/glfw3.h
index 44e26b62..180fca80 100644
--- a/include/GL/glfw3.h
+++ b/include/GL/glfw3.h
@@ -119,7 +119,7 @@ extern "C" {
/* ---------------- GLFW related system specific defines ----------------- */
-#if defined(_WIN32) && defined(GLFW_BUILD_DLL)
+#if defined(_WIN32) && defined(_GLFW_BUILD_DLL)
/* We are building a Win32 DLL */
#define GLFWAPI __declspec(dllexport)
diff --git a/readme.html b/readme.html
index 84cc2a66..f631acd7 100644
--- a/readme.html
+++ b/readme.html
@@ -288,6 +288,7 @@ version of GLFW.
Renamed glfw.h
to glfw3.h
to avoid conflicts with 2.x series
Renamed GLFW_WINDOW
token to GLFW_WINDOWED
Renamed GLFW_WINDOW_NO_RESIZE
to GLFW_WINDOW_RESIZABLE
+ Renamed GLFW_BUILD_DLL
to _GLFW_BUILD_DLL
Renamed version
test to glfwinfo
Replaced ad hoc build system with CMake
Replaced layout-dependent key codes with single, platform-independent set based on US layout
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b8c0fd7d..b87ac3b1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -39,7 +39,7 @@ if (BUILD_SHARED_LIBS)
if (_GLFW_WIN32_WGL)
# The GLFW DLL needs a special compile-time macro and import library name
set_target_properties(glfw PROPERTIES
- COMPILE_DEFINITIONS "GLFW_BUILD_DLL;_GLFW_NO_DLOAD_GDI32;_GLFW_NO_DLOAD_WINMM"
+ COMPILE_DEFINITIONS "_GLFW_BUILD_DLL;_GLFW_NO_DLOAD_GDI32;_GLFW_NO_DLOAD_WINMM"
PREFIX ""
IMPORT_PREFIX ""
IMPORT_SUFFIX "dll.lib")
diff --git a/src/win32_dllmain.c b/src/win32_dllmain.c
index a999af0e..95258ccc 100644
--- a/src/win32_dllmain.c
+++ b/src/win32_dllmain.c
@@ -31,7 +31,7 @@
#include "internal.h"
-#if defined(GLFW_BUILD_DLL)
+#if defined(_GLFW_BUILD_DLL)
//========================================================================
// GLFW DLL entry point
@@ -45,5 +45,5 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
return TRUE;
}
-#endif // GLFW_BUILD_DLL
+#endif // _GLFW_BUILD_DLL
diff --git a/src/win32_init.c b/src/win32_init.c
index 4fab9b74..55232fd7 100644
--- a/src/win32_init.c
+++ b/src/win32_init.c
@@ -271,7 +271,7 @@ const char* _glfwPlatformGetVersionString(void)
#else
" (unknown compiler)"
#endif
-#if defined(GLFW_BUILD_DLL)
+#if defined(_GLFW_BUILD_DLL)
" DLL"
#endif
#if !defined(_GLFW_NO_DLOAD_GDI32)