From 44268c4e45e521bdd017ab8148b60822aa3805a9 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Fri, 18 May 2012 13:07:59 -0700 Subject: include: Rename waffle_visibility.h -> waffle_portable.h The intent is that this header contain all macro cruft for cross-platform portability. Signed-off-by: Chad Versace --- include/CMakeLists.txt | 2 +- include/waffle/waffle.h | 2 +- include/waffle/waffle_attrib_list.h | 2 +- include/waffle/waffle_config.h | 2 +- include/waffle/waffle_context.h | 2 +- include/waffle/waffle_display.h | 2 +- include/waffle/waffle_dl.h | 2 +- include/waffle/waffle_enum.h | 2 +- include/waffle/waffle_error.h | 2 +- include/waffle/waffle_gl_misc.h | 2 +- include/waffle/waffle_init.h | 2 +- include/waffle/waffle_portable.h | 54 +++++++++++++++++++++++++++++++++++++ include/waffle/waffle_visibility.h | 52 ----------------------------------- include/waffle/waffle_window.h | 2 +- 14 files changed, 66 insertions(+), 64 deletions(-) create mode 100644 include/waffle/waffle_portable.h delete mode 100644 include/waffle/waffle_visibility.h (limited to 'include') diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 384127a..26f9f22 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -8,6 +8,6 @@ install(FILES waffle/waffle.h waffle/waffle_error.h waffle/waffle_gl_misc.h waffle/waffle_init.h - waffle/waffle_visibility.h + waffle/waffle_portable.h waffle/waffle_window.h DESTINATION ${waffle_install_includedir}/waffle) diff --git a/include/waffle/waffle.h b/include/waffle/waffle.h index e0a0748..81dbee1 100644 --- a/include/waffle/waffle.h +++ b/include/waffle/waffle.h @@ -31,7 +31,7 @@ #include "waffle_error.h" #include "waffle_gl_misc.h" #include "waffle_init.h" -#include "waffle_visibility.h" +#include "waffle_portable.h" #include "waffle_window.h" /// @} diff --git a/include/waffle/waffle_attrib_list.h b/include/waffle/waffle_attrib_list.h index 14c5e69..ad69008 100644 --- a/include/waffle/waffle_attrib_list.h +++ b/include/waffle/waffle_attrib_list.h @@ -27,7 +27,7 @@ #include #include -#include "waffle_visibility.h" +#include "waffle_portable.h" #ifdef __cplusplus extern "C" { diff --git a/include/waffle/waffle_config.h b/include/waffle/waffle_config.h index f27baa3..dd8266a 100644 --- a/include/waffle/waffle_config.h +++ b/include/waffle/waffle_config.h @@ -23,7 +23,7 @@ #include #include -#include "waffle_visibility.h" +#include "waffle_portable.h" #ifdef __cplusplus extern "C" { diff --git a/include/waffle/waffle_context.h b/include/waffle/waffle_context.h index b91795b..e89a35e 100644 --- a/include/waffle/waffle_context.h +++ b/include/waffle/waffle_context.h @@ -22,7 +22,7 @@ #include -#include "waffle_visibility.h" +#include "waffle_portable.h" #ifdef __cplusplus extern "C" { diff --git a/include/waffle/waffle_display.h b/include/waffle/waffle_display.h index 6a1f6b0..377c11f 100644 --- a/include/waffle/waffle_display.h +++ b/include/waffle/waffle_display.h @@ -23,7 +23,7 @@ #include #include -#include "waffle_visibility.h" +#include "waffle_portable.h" #ifdef __cplusplus extern "C" { diff --git a/include/waffle/waffle_dl.h b/include/waffle/waffle_dl.h index 74a08c8..c0b385e 100644 --- a/include/waffle/waffle_dl.h +++ b/include/waffle/waffle_dl.h @@ -32,7 +32,7 @@ #include #include -#include "waffle_visibility.h" +#include "waffle_portable.h" #ifdef __cplusplus extern "C" { diff --git a/include/waffle/waffle_enum.h b/include/waffle/waffle_enum.h index 7d92c8f..661a600 100644 --- a/include/waffle/waffle_enum.h +++ b/include/waffle/waffle_enum.h @@ -23,7 +23,7 @@ #include #include -#include "waffle_visibility.h" +#include "waffle_portable.h" #ifdef __cplusplus extern "C" { diff --git a/include/waffle/waffle_error.h b/include/waffle/waffle_error.h index 4dec1b9..472f6de 100644 --- a/include/waffle/waffle_error.h +++ b/include/waffle/waffle_error.h @@ -35,7 +35,7 @@ #include #include -#include "waffle_visibility.h" +#include "waffle_portable.h" #ifdef __cplusplus extern "C" { diff --git a/include/waffle/waffle_gl_misc.h b/include/waffle/waffle_gl_misc.h index 7ef1483..d7291b0 100644 --- a/include/waffle/waffle_gl_misc.h +++ b/include/waffle/waffle_gl_misc.h @@ -23,7 +23,7 @@ #include #include -#include "waffle_visibility.h" +#include "waffle_portable.h" #ifdef __cplusplus extern "C" { diff --git a/include/waffle/waffle_init.h b/include/waffle/waffle_init.h index 92badb7..d4608ba 100644 --- a/include/waffle/waffle_init.h +++ b/include/waffle/waffle_init.h @@ -23,7 +23,7 @@ #include #include -#include "waffle_visibility.h" +#include "waffle_portable.h" #ifdef __cplusplus extern "C" { diff --git a/include/waffle/waffle_portable.h b/include/waffle/waffle_portable.h new file mode 100644 index 0000000..bd3483b --- /dev/null +++ b/include/waffle/waffle_portable.h @@ -0,0 +1,54 @@ +// Copyright 2012 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// @defgroup waffle_portable waffle_portable +/// @ingroup waffle_api +/// +/// @brief Cross-platform portability. +/// +/// Visual Studio doesn't support C99. Ugh. +/// @{ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +/// @def WAFFLE_API +/// @brief Declare that a symbol is in Waffle's public API. +//// +/// @see "GCC Wiki - Visibility". (http://gcc.gnu.org/wiki/Visibility). +/// @see "How to Write Shared Libraries. Ulrich Drepper. +/// (http://www.akkadia.org/drepper/dsohowto.pdf). +/// +/// @todo Implement WAFFLE_API for Apple. +/// @todo Implement WAFFLE_API for Windows. +/// +#if defined(__GNUC__) && __GNUC__ >= 4 +# define WAFFLE_API __attribute__ ((visibility("default"))) +#else +# define WAFFLE_API +#endif + +/// @def WAFFLE_APIENTRY +/// +/// Used only on Windows. +#define WAFFLE_APIENTRY + +#ifdef __cplusplus +} // end extern "C" +#endif + +/// @} diff --git a/include/waffle/waffle_visibility.h b/include/waffle/waffle_visibility.h deleted file mode 100644 index 728e22e..0000000 --- a/include/waffle/waffle_visibility.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2012 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// @defgroup waffle_visibility waffle_visibility -/// @ingroup waffle_api -/// -/// @brief Macros for visibility of shared library symbols. -/// @{ - -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -/// @def WAFFLE_API -/// @brief Declare that a symbol is in Waffle's public API. -//// -/// @see "GCC Wiki - Visibility". (http://gcc.gnu.org/wiki/Visibility). -/// @see "How to Write Shared Libraries. Ulrich Drepper. -/// (http://www.akkadia.org/drepper/dsohowto.pdf). -/// -/// @todo Implement WAFFLE_API for Apple. -/// @todo Implement WAFFLE_API for Windows. -/// -#if defined(__GNUC__) && __GNUC__ >= 4 -# define WAFFLE_API __attribute__ ((visibility("default"))) -#else -# define WAFFLE_API -#endif - -/// @def WAFFLE_APIENTRY -/// -/// Used only on Windows. -#define WAFFLE_APIENTRY - -#ifdef __cplusplus -} // end extern "C" -#endif - -/// @} diff --git a/include/waffle/waffle_window.h b/include/waffle/waffle_window.h index d8f159a..887e6ae 100644 --- a/include/waffle/waffle_window.h +++ b/include/waffle/waffle_window.h @@ -21,7 +21,7 @@ #include #include -#include "waffle_visibility.h" +#include "waffle_portable.h" #ifdef __cplusplus extern "C" { -- cgit v1.2.3