[vlc-commits] Use WINAPI_FAMILY_PARTITION to differentiate Windows Store apps
Rafaël Carré
git at videolan.org
Mon Apr 22 06:53:39 CEST 2013
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon Apr 22 06:52:51 2013 +0200| [e3c8977469b22e0af5462842f5d5a2c46911af6c] | committer: Rafaël Carré
Use WINAPI_FAMILY_PARTITION to differentiate Windows Store apps
WINAPI_FAMILY_APP is always defined
Close #8410
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e3c8977469b22e0af5462842f5d5a2c46911af6c
---
configure.ac | 2 +-
modules/access/file.c | 2 +-
modules/lua/extension.c | 2 +-
modules/lua/intf.c | 2 +-
modules/lua/libs/win.c | 4 ++--
src/config/help.c | 6 +++---
src/modules/bank.c | 4 ++--
src/text/unicode.c | 2 +-
src/win32/filesystem.c | 2 +-
src/win32/specific.c | 6 +++---
src/win32/thread.c | 2 +-
11 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/configure.ac b/configure.ac
index 225e3a3..8f6a3df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -473,7 +473,7 @@ AC_ARG_ENABLE(winstore_app,
AS_IF([test "${SYS}" = "mingw32"], [
AS_IF([test "${enable_winstore_app}" = "yes"], [
- AC_DEFINE(WINAPI_FAMILY_APP, 1, [Define if you want to build for Windows Store apps])])
+ AC_DEFINE(WINAPI_FAMILY_APP, WINAPI_PARTITION_APP, [Define to WINAPI_PARTITION_APP if you want to build for Windows Store apps])])
])
diff --git a/modules/access/file.c b/modules/access/file.c
index 97fa2af..7b1e60b 100644
--- a/modules/access/file.c
+++ b/modules/access/file.c
@@ -112,7 +112,7 @@ static bool IsRemote (int fd)
#else /* WIN32 || __OS2__ */
static bool IsRemote (const char *path)
{
-# if !defined(__OS2__) && !defined(WINAPI_FAMILY_APP)
+# if !defined(__OS2__) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
wchar_t *wpath = ToWide (path);
bool is_remote = (wpath != NULL && PathIsNetworkPathW (wpath));
free (wpath);
diff --git a/modules/lua/extension.c b/modules/lua/extension.c
index 1ebccdc..41e5677 100644
--- a/modules/lua/extension.c
+++ b/modules/lua/extension.c
@@ -833,7 +833,7 @@ static lua_State* GetLuaState( extensions_manager_t *p_mgr,
luaopen_vlm( L );
luaopen_volume( L );
luaopen_xml( L );
-#if defined(WIN32) && !defined(WINAPI_FAMILY_APP)
+#if defined(WIN32) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
luaopen_win( L );
#endif
diff --git a/modules/lua/intf.c b/modules/lua/intf.c
index e382647..e53d92d 100644
--- a/modules/lua/intf.c
+++ b/modules/lua/intf.c
@@ -266,7 +266,7 @@ static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
luaopen_gettext( L );
luaopen_xml( L );
luaopen_equalizer( L );
-#if defined(WIN32) && !defined(WINAPI_FAMILY_APP)
+#if defined(WIN32) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
luaopen_win( L );
#endif
diff --git a/modules/lua/libs/win.c b/modules/lua/libs/win.c
index 49a01f8..104c029 100644
--- a/modules/lua/libs/win.c
+++ b/modules/lua/libs/win.c
@@ -33,7 +33,7 @@
#include "../vlc.h"
#include "../libs.h"
-#ifndef WINAPI_FAMILY_APP
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
/* Based on modules/control/rc.c and include/vlc_interface.h */
static HANDLE GetConsole( lua_State *L )
@@ -158,4 +158,4 @@ void luaopen_win( lua_State *L )
lua_setfield( L, -2, "win" );
}
-#endif /* WINAPI_FAMILY_APP */
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
diff --git a/src/config/help.c b/src/config/help.c
index d347cb8..0daa105 100644
--- a/src/config/help.c
+++ b/src/config/help.c
@@ -34,7 +34,7 @@
#include "config/configuration.h"
#include "libvlc.h"
-#if defined( WIN32 ) && !defined(WINAPI_FAMILY_APP)
+#if defined( WIN32 ) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
static void ShowConsole (void);
static void PauseConsole (void);
#else
@@ -796,7 +796,7 @@ static void Version( void )
PauseConsole();
}
-#if defined( WIN32 ) && !defined(WINAPI_FAMILY_APP)
+#if defined( WIN32 ) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
/*****************************************************************************
* ShowConsole: On Win32, create an output console for debug messages
*****************************************************************************
@@ -862,7 +862,7 @@ static int ConsoleWidth( void )
i_width = 80;
pclose( file );
}
-#elif !defined(WINAPI_FAMILY_APP)
+#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
CONSOLE_SCREEN_BUFFER_INFO buf;
if (GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &buf))
diff --git a/src/modules/bank.c b/src/modules/bank.c
index 7b05b8d..6b30ae0 100644
--- a/src/modules/bank.c
+++ b/src/modules/bank.c
@@ -317,7 +317,7 @@ static void AllocateAllPlugins (vlc_object_t *p_this)
else
mode = CACHE_USE;
-#ifdef WINAPI_FAMILY_APP
+#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
/* Windows Store Apps can not load external plugins with absolute paths. */
AllocatePluginPath (p_this, "plugins", mode);
#else
@@ -331,7 +331,7 @@ static void AllocateAllPlugins (vlc_object_t *p_this)
free( paths );
}
free (vlcpath);
-#endif /* WINAPI_FAMILY_APP */
+#endif /* !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
/* If the user provided a plugin path, we add it to the list */
paths = getenv( "VLC_PLUGIN_PATH" );
diff --git a/src/text/unicode.c b/src/text/unicode.c
index 65a158d..d488b9b 100644
--- a/src/text/unicode.c
+++ b/src/text/unicode.c
@@ -59,7 +59,7 @@ int utf8_vfprintf( FILE *stream, const char *fmt, va_list ap )
if (unlikely(res == -1))
return -1;
-#if !defined(WINAPI_FAMILY_APP)
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
/* Writing to the console is a lot of fun on Microsoft Windows.
* If you use the standard I/O functions, you must use the OEM code page,
* which is different from the usual ANSI code page. Or maybe not, if the
diff --git a/src/win32/filesystem.c b/src/win32/filesystem.c
index 7758123..b87dd8c 100644
--- a/src/win32/filesystem.c
+++ b/src/win32/filesystem.c
@@ -240,7 +240,7 @@ int vlc_dup (int oldfd)
int vlc_pipe (int fds[2])
{
-#ifdef WINAPI_FAMILY_APP
+#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
_set_errno(EPERM);
return -1;
#else
diff --git a/src/win32/specific.c b/src/win32/specific.c
index ee1c56f..b58ab2b 100644
--- a/src/win32/specific.c
+++ b/src/win32/specific.c
@@ -80,7 +80,7 @@ typedef struct
void system_Configure( libvlc_int_t *p_this, int i_argc, const char *const ppsz_argv[] )
{
-#if !defined(WINAPI_FAMILY_APP)
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
/* Raise default priority of the current process */
#ifndef ABOVE_NORMAL_PRIORITY_CLASS
# define ABOVE_NORMAL_PRIORITY_CLASS 0x00008000
@@ -210,7 +210,7 @@ void system_Configure( libvlc_int_t *p_this, int i_argc, const char *const ppsz_
#endif
}
-#if !defined(WINAPI_FAMILY_APP)
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
static unsigned __stdcall IPCHelperThread( void *data )
{
vlc_object_t *p_this = data;
@@ -323,7 +323,7 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
*/
void system_End(void)
{
-#if !defined(WINAPI_FAMILY_APP)
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
HWND ipcwindow;
/* FIXME: thread-safety... */
diff --git a/src/win32/thread.c b/src/win32/thread.c
index 589b10b..3c9b837 100644
--- a/src/win32/thread.c
+++ b/src/win32/thread.c
@@ -680,7 +680,7 @@ static mtime_t mdate_wall (void)
FILETIME ts;
ULARGE_INTEGER s;
-#if (_WIN32_WINNT >= 0x0602) && !defined(WINAPI_FAMILY_APP)
+#if (_WIN32_WINNT >= 0x0602) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
GetSystemTimePreciseAsFileTime (&ts);
#else
GetSystemTimeAsFileTime (&ts);
More information about the vlc-commits
mailing list