Commit 2f1ba54e authored by Rafaël Carré's avatar Rafaël Carré

Remove broken setting of WINAPI_FAMILY_APP

The define to set would be WINAPI_FAMILY, and it is set by default already.
We should not set it though, as it would prevent us from using forbidden APIs (e.g. winsock).

Close #8410
parent 90e82fb6
......@@ -471,10 +471,9 @@ AC_ARG_ENABLE(winstore_app,
AS_HELP_STRING([--enable-winstore-app],
[Build targetted for Windows Store apps (default disabled)]))
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])])
])
vlc_winstore_app=0
AS_IF([test "${SYS}" = "mingw32" -a "${enable_winstore_app}" = "yes"], [vlc_winstore_app=1])
AC_DEFINE_UNQUOTED(VLC_WINSTORE_APP, ${vlc_winstore_app}, [Define to 1 if you want to build for Windows Store apps])
dnl
......
......@@ -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__) && !VLC_WINSTORE_APP
wchar_t *wpath = ToWide (path);
bool is_remote = (wpath != NULL && PathIsNetworkPathW (wpath));
free (wpath);
......
......@@ -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) && !VLC_WINSTORE_APP
luaopen_win( L );
#endif
......
......@@ -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) && !VLC_WINSTORE_APP
luaopen_win( L );
#endif
......
......@@ -33,7 +33,7 @@
#include "../vlc.h"
#include "../libs.h"
#ifndef WINAPI_FAMILY_APP
#if !VLC_WINSTORE_APP
/* 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 /* !VLC_WINSTORE_APP */
......@@ -34,7 +34,7 @@
#include "config/configuration.h"
#include "libvlc.h"
#if defined( WIN32 ) && !defined(WINAPI_FAMILY_APP)
#if defined( WIN32 ) && !VLC_WINSTORE_APP
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 ) && !VLC_WINSTORE_APP
/*****************************************************************************
* 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 !VLC_WINSTORE_APP
CONSOLE_SCREEN_BUFFER_INFO buf;
if (GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &buf))
......
......@@ -317,7 +317,7 @@ static void AllocateAllPlugins (vlc_object_t *p_this)
else
mode = CACHE_USE;
#ifdef WINAPI_FAMILY_APP
#if VLC_WINSTORE_APP
/* 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 /* VLC_WINSTORE_APP */
/* If the user provided a plugin path, we add it to the list */
paths = getenv( "VLC_PLUGIN_PATH" );
......
......@@ -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 !VLC_WINSTORE_APP
/* 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
......
......@@ -240,7 +240,7 @@ int vlc_dup (int oldfd)
int vlc_pipe (int fds[2])
{
#ifdef WINAPI_FAMILY_APP
#if VLC_WINSTORE_APP
_set_errno(EPERM);
return -1;
#else
......
......@@ -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 !VLC_WINSTORE_APP
/* 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 !VLC_WINSTORE_APP
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 !VLC_WINSTORE_APP
HWND ipcwindow;
/* FIXME: thread-safety... */
......
......@@ -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) && !VLC_WINSTORE_APP
GetSystemTimePreciseAsFileTime (&ts);
#else
GetSystemTimeAsFileTime (&ts);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment