rename __LIBVLC__ to LIBVLC_INTERNAL_

define names starting with 2 underscore are reserved.

https://devblogs.microsoft.com/oldnewthing/20230109-00/?p=107685
This commit is contained in:
Steve Lhomme 2023-01-12 15:19:00 +01:00
parent 39e7bc0f52
commit 352ad101b3
7 changed files with 10 additions and 10 deletions

View File

@ -75,7 +75,7 @@
#endif /* _WIN32 */
/* Define within the LibVLC source code tree. */
#define __LIBVLC__
#define LIBVLC_INTERNAL_
/* Define to the libdir */
#mesondefine LIBDIR

View File

@ -48,7 +48,7 @@ AH_VERBATIM([FORTIFY_SOURCE],
# define _FORTIFY_SOURCE 2
#endif])
AC_DEFINE([_FILE_OFFSET_BITS], 64, [Define to 64 for large files support.])
AC_DEFINE([__LIBVLC__],, [Define within the LibVLC source code tree.])
AC_DEFINE([LIBVLC_INTERNAL_],, [Define within the LibVLC source code tree.])
AC_DEFINE([WIN32_LEAN_AND_MEAN],, [Define to limit the scope of <windows.h>.])
AC_PROG_CXX

View File

@ -42,7 +42,7 @@
# define LIBVLC_API
#endif
#ifdef __LIBVLC__
#ifdef LIBVLC_INTERNAL_
/* Avoid unhelpful warnings from libvlc with our deprecated APIs */
# define LIBVLC_DEPRECATED
#elif defined(__GNUC__) && \

View File

@ -298,7 +298,7 @@
*
* This macro performs a run-time assertion if C assertions are enabled
* and the following preprocessor symbol is defined:
* @verbatim __LIBVLC__ @endverbatim
* @verbatim LIBVLC_INTERNAL_ @endverbatim
* That restriction ensures that assertions in public header files are not
* unwittingly <i>leaked</i> to externally-compiled plug-ins
* including those header files.
@ -306,7 +306,7 @@
* Within the LibVLC code base, this is exactly the same as assert(), which can
* and probably should be used directly instead.
*/
#ifdef __LIBVLC__
#ifdef LIBVLC_INTERNAL_
# define vlc_assert(pred) assert(pred)
#else
# define vlc_assert(pred) ((void)0)

View File

@ -577,7 +577,7 @@ int CDECL_SYMBOL VLC_SYMBOL(vlc_entry_cfg_str_enum)(const char *name, \
"\x47\x4e\x55\x20\x47\x65\x6e\x65\x72\x61\x6c\x20\x50\x75\x62\x6c" \
"\x69\x63\x20\x4c\x69\x63\x65\x6e\x73\x65\x2c\x20\x76\x65\x72\x73" \
"\x69\x6f\x6e\x20\x32\x20\x6f\x72\x20\x6c\x61\x74\x65\x72\x2e"
#if defined (__LIBVLC__)
#if defined (LIBVLC_INTERNAL_)
# define VLC_MODULE_COPYRIGHT VLC_COPYRIGHT_VIDEOLAN
# ifndef VLC_MODULE_LICENSE
# define VLC_MODULE_LICENSE VLC_LICENSE_LGPL_2_1_PLUS

View File

@ -12,7 +12,7 @@ while read l; do
test -z "$d" && continue
test "$d" = "WORDS_BIGENDIAN" && continue
test "$d" = "UNICODE" && continue
test "$d" = "__LIBVLC__" && continue
test "$d" = "LIBVLC_INTERNAL_" && continue
if test -z "$regexp"; then
regexp="[^A-Za-z0-9_]\("

View File

@ -25,10 +25,10 @@
#define PACKAGE "vlc"
/* Because we are from src/ __LIBVLC__ is defined, but we don't want that,
/* Because we are from src/ LIBVLC_INTERNAL_ is defined, but we don't want that,
* as we act here as a third-party program just linking to libvlc */
#ifdef __LIBVLC__
# undef __LIBVLC__
#ifdef LIBVLC_INTERNAL_
# undef LIBVLC_INTERNAL_
#endif
#include <vlc/vlc.h>