]> git.sesse.net Git - vlc/commitdiff
Remove broken setting of WINAPI_FAMILY_APP
authorRafaël Carré <funman@videolan.org>
Mon, 22 Apr 2013 05:47:28 +0000 (07:47 +0200)
committerRafaël Carré <funman@videolan.org>
Mon, 22 Apr 2013 05:51:01 +0000 (07:51 +0200)
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

configure.ac
modules/access/file.c
modules/lua/extension.c
modules/lua/intf.c
modules/lua/libs/win.c
src/config/help.c
src/modules/bank.c
src/text/unicode.c
src/win32/filesystem.c
src/win32/specific.c
src/win32/thread.c

index 225e3a3b773ca63337d8270a6064df6756161240..463a1552c15bc44eaf47c0a2dec3d600d77e0eb7 100644 (file)
@@ -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
index 97fa2af189fd1a39d19ec49c33a8ba4278941d53..a46a31b093c1970978196473a4be809a17f43eb1 100644 (file)
@@ -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);
index 1ebccdca606483c95aa4c03bb916971f581dfe38..9e91888531bdc510db3ba319a0bf9f2bc28ccb7c 100644 (file)
@@ -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
 
index e382647dcdf400f04912fbbdd6028852a236b920..96db69f72b4c4943be3deed5fd7cf5cbdfefe1bf 100644 (file)
@@ -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
 
index 49a01f821b9caa96652be217ad6fe6aaf15c95ec..c7c0ee649011d27be5339baf685dbb5491ea4597 100644 (file)
@@ -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 */
index d347cb8caa8c8456c75364ea9d702735f3620b2a..5cb7b7bb31ca43c29357b8cbf976364de881f0b3 100644 (file)
@@ -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))
index 7b05b8d1bacb38562960e335e122cbd94e462dad..22cfaea4b80bbf8b24a546f763f7969ceba943d4 100644 (file)
@@ -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" );
index 65a158de21b5aaecdf4394f9705f532ab79c07b9..d1de73918a2054c096b9d690df8c83a6078349fc 100644 (file)
@@ -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
index 775812307e4593a0d02ed03945374dfaf521ae0c..f20f7e4ff4db6e0d95d613aac1e5ef0805a91487 100644 (file)
@@ -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
index ee1c56f82d41d142155464946a79bcb30c1b03df..00587340dc8d3e4259a9a6691c9f710b95f8a834 100644 (file)
@@ -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... */
index 589b10b4855a6a9a1e4a27cfabb7f43de0bedf44..1744b08b351646f6e9f387fce2e86e672b1be619 100644 (file)
@@ -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);