From c14ba4847e76f78a2f78bcbb55c00d408c5131b0 Mon Sep 17 00:00:00 2001 From: Davis King Date: Tue, 1 Sep 2020 09:30:52 -0400 Subject: [PATCH] Rename POSIX macro to DLIB_POSIX to avoid name clashes with some libraries. --- dlib/dir_nav/dir_nav_kernel_2.cpp | 4 ++-- dlib/gui_core/gui_core_kernel_2.cpp | 4 ++-- dlib/gui_widgets/nativefont.h | 4 ++-- dlib/misc_api/misc_api_kernel_2.cpp | 4 ++-- dlib/platform.h | 8 ++++---- dlib/sockets/sockets_kernel_2.cpp | 4 ++-- dlib/threads/threads_kernel_2.cpp | 4 ++-- docs/docs/term_index.xml | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dlib/dir_nav/dir_nav_kernel_2.cpp b/dlib/dir_nav/dir_nav_kernel_2.cpp index be97b984c..928197a8f 100644 --- a/dlib/dir_nav/dir_nav_kernel_2.cpp +++ b/dlib/dir_nav/dir_nav_kernel_2.cpp @@ -5,7 +5,7 @@ #include "../platform.h" -#ifdef POSIX +#ifdef DLIB_POSIX #include "dir_nav_kernel_2.h" @@ -248,7 +248,7 @@ namespace dlib } -#endif // POSIX +#endif // DLIB_POSIX #endif // DLIB_DIR_NAV_KERNEL_2_CPp_ diff --git a/dlib/gui_core/gui_core_kernel_2.cpp b/dlib/gui_core/gui_core_kernel_2.cpp index feca4bf22..3a0787cc4 100644 --- a/dlib/gui_core/gui_core_kernel_2.cpp +++ b/dlib/gui_core/gui_core_kernel_2.cpp @@ -4,7 +4,7 @@ #define DLIB_GUI_CORE_KERNEL_2_CPp_ #include "../platform.h" -#ifdef POSIX +#ifdef DLIB_POSIX #include "gui_core_kernel_2.h" @@ -1990,7 +1990,7 @@ namespace dlib // ---------------------------------------------------------------------------------------- -#endif // POSIX +#endif // DLIB_POSIX #endif // DLIB_GUI_CORE_KERNEL_2_CPp_ diff --git a/dlib/gui_widgets/nativefont.h b/dlib/gui_widgets/nativefont.h index 2de0edfaa..c895d19e7 100644 --- a/dlib/gui_widgets/nativefont.h +++ b/dlib/gui_widgets/nativefont.h @@ -20,7 +20,7 @@ #if defined(WIN32) #include #include -#elif defined(POSIX) +#elif defined(DLIB_POSIX) #include #include #include @@ -295,7 +295,7 @@ namespace nativefont ~vals_internal(){ destroy(); } -#elif defined(POSIX) +#elif defined(DLIB_POSIX) XImage *ximg; Display *d; GC gc; diff --git a/dlib/misc_api/misc_api_kernel_2.cpp b/dlib/misc_api/misc_api_kernel_2.cpp index e6dc772da..1812fd175 100644 --- a/dlib/misc_api/misc_api_kernel_2.cpp +++ b/dlib/misc_api/misc_api_kernel_2.cpp @@ -4,7 +4,7 @@ #define DLIB_MISC_API_KERNEL_2_CPp_ #include "../platform.h" -#ifdef POSIX +#ifdef DLIB_POSIX #include #include "misc_api_kernel_2.h" @@ -117,7 +117,7 @@ namespace dlib // ---------------------------------------------------------------------------------------- } -#endif // POSIX +#endif // DLIB_POSIX #endif // DLIB_MISC_API_KERNEL_2_CPp_ diff --git a/dlib/platform.h b/dlib/platform.h index f3000a6cd..349954520 100644 --- a/dlib/platform.h +++ b/dlib/platform.h @@ -12,7 +12,7 @@ /*! This file ensures that: - if (we are compiling under a posix platform) then - - POSIX will be defined + - DLIB_POSIX will be defined - if (this is also Mac OS X) then - MACOSX will be defined - if (this is also HP-UX) then @@ -36,9 +36,9 @@ #ifndef WIN32 // since this is the only other platform the library currently supports - // just assume it is POSIX if it isn't WIN32 - #ifndef POSIX - #define POSIX + // just assume it is DLIB_POSIX if it isn't WIN32 + #ifndef DLIB_POSIX + #define DLIB_POSIX #endif #ifndef HPUX diff --git a/dlib/sockets/sockets_kernel_2.cpp b/dlib/sockets/sockets_kernel_2.cpp index 9dedb852d..455f3dc68 100644 --- a/dlib/sockets/sockets_kernel_2.cpp +++ b/dlib/sockets/sockets_kernel_2.cpp @@ -5,7 +5,7 @@ #include "../platform.h" -#ifdef POSIX +#ifdef DLIB_POSIX #include "sockets_kernel_2.h" @@ -1104,7 +1104,7 @@ namespace dlib } -#endif // POSIX +#endif // DLIB_POSIX #endif // DLIB_SOCKETS_KERNEL_2_CPp_ diff --git a/dlib/threads/threads_kernel_2.cpp b/dlib/threads/threads_kernel_2.cpp index 06fb80d00..02e6c3d9f 100644 --- a/dlib/threads/threads_kernel_2.cpp +++ b/dlib/threads/threads_kernel_2.cpp @@ -5,7 +5,7 @@ #include "../platform.h" -#ifdef POSIX +#ifdef DLIB_POSIX #include "threads_kernel_2.h" @@ -69,7 +69,7 @@ namespace dlib } -#endif // POSIX +#endif // DLIB_POSIX #endif // DLIB_THREADS_KERNEL_2_CPp_ diff --git a/docs/docs/term_index.xml b/docs/docs/term_index.xml index 382126605..fce311bd1 100644 --- a/docs/docs/term_index.xml +++ b/docs/docs/term_index.xml @@ -966,7 +966,7 @@ - +