From: Rafaël Carré Date: Wed, 5 Jun 2013 13:41:18 +0000 (+0200) Subject: Use _WIN32 rather than WIN32 (same for WIN64) X-Git-Tag: 2.1.0-git~180 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=6d5336200143e6d1ad70ef653c72265d25f67640;p=vlc Use _WIN32 rather than WIN32 (same for WIN64) http://msdn.microsoft.com/en-us/library/b0084kay(v=vs.80).aspx only mentions the _ prefixed variable. gcc will always define the _ prefixed variable, like Visual Studio. The prefixless one is defined in some language standards, e.g. gnu99 but not c99. --- diff --git a/bin/winvlc.c b/bin/winvlc.c index db97bae35c..134d5064cf 100644 --- a/bin/winvlc.c +++ b/bin/winvlc.c @@ -275,7 +275,7 @@ LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo) for( unsigned int i = 0; i < pException->NumberParameters; i++ ) fwprintf( fd, L" | %p", pException->ExceptionInformation[i] ); -#ifdef WIN64 +#ifdef _WIN64 fwprintf( fd, L"\n\n[context]\nRDI:%px\nRSI:%px\n" \ "RBX:%px\nRDX:%px\nRCX:%px\nRAX:%px\n" \ "RBP:%px\nRIP:%px\nRSP:%px\nR8:%px\n" \ @@ -298,7 +298,7 @@ LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo) fwprintf( fd, L"\n[stacktrace]\n#EIP|base|module\n" ); -#ifdef WIN64 +#ifdef _WIN64 LPCVOID caller = (LPCVOID)pContext->Rip; LPVOID *pBase = (LPVOID*)pContext->Rbp; #else diff --git a/compat/flockfile.c b/compat/flockfile.c index 6d6c936631..d01fd1ffd8 100644 --- a/compat/flockfile.c +++ b/compat/flockfile.c @@ -24,7 +24,7 @@ #include -#ifdef WIN32 +#ifdef _WIN32 # ifndef HAVE__LOCK_FILE # warning Broken SDK: VLC logs will be garbage. # define _lock_file(s) ((void)(s)) diff --git a/compat/fsync.c b/compat/fsync.c index 8352d8018d..a84ab6314d 100644 --- a/compat/fsync.c +++ b/compat/fsync.c @@ -22,13 +22,13 @@ # include #endif -#ifdef WIN32 +#ifdef _WIN32 # include #endif int fsync (int fd) { -#if defined(WIN32) +#if defined(_WIN32) /* WinCE can use FlushFileBuffers() but it operates on file handles */ return _commit (fd); #else diff --git a/compat/getpid.c b/compat/getpid.c index 7e120f2c4a..d6275e7df3 100644 --- a/compat/getpid.c +++ b/compat/getpid.c @@ -23,13 +23,13 @@ #endif #include -#ifdef WIN32 +#ifdef _WIN32 # include #endif pid_t getpid (void) { -#if defined (WIN32) +#if defined (_WIN32) return (pid_t) GetCurrentProcessId (); #elif defined (__native_client__) return 1; diff --git a/compat/inet_pton.c b/compat/inet_pton.c index 8e0c4c1a83..f5f5f093ab 100644 --- a/compat/inet_pton.c +++ b/compat/inet_pton.c @@ -26,7 +26,7 @@ #include #include -#ifndef WIN32 +#ifndef _WIN32 # include #else # include diff --git a/compat/poll.c b/compat/poll.c index ef00fa5924..8c37609863 100644 --- a/compat/poll.c +++ b/compat/poll.c @@ -26,7 +26,7 @@ #include #include -#ifdef WIN32 +#ifdef _WIN32 # ifdef FD_SETSIZE /* Too late for #undef FD_SETSIZE to work: fd_set is already defined. */ # error Header inclusion order compromised! @@ -40,7 +40,7 @@ int (poll) (struct pollfd *fds, unsigned nfds, int timeout) { -#ifdef WIN32 +#ifdef _WIN32 size_t setsize = sizeof (fd_set) + nfds * sizeof (SOCKET); fd_set *rdset = malloc (setsize); fd_set *wrset = malloc (setsize); @@ -89,7 +89,7 @@ int (poll) (struct pollfd *fds, unsigned nfds, int timeout) * Note that Vista has a much nicer WSAPoll(), but Mingw does not * support it yet. */ -#ifndef WIN32 +#ifndef _WIN32 if ((unsigned)fd >= FD_SETSIZE) { errno = EINVAL; @@ -123,7 +123,7 @@ int (poll) (struct pollfd *fds, unsigned nfds, int timeout) | (FD_ISSET (fd, wrset) ? POLLOUT : 0) | (FD_ISSET (fd, exset) ? POLLPRI : 0); } -#ifdef WIN32 +#ifdef _WIN32 free (exset); free (wrset); free (rdset); diff --git a/compat/posix_memalign.c b/compat/posix_memalign.c index b273385cd9..3c6ffdfe28 100644 --- a/compat/posix_memalign.c +++ b/compat/posix_memalign.c @@ -33,7 +33,7 @@ static int check_align (size_t align) return EINVAL; } -#if !defined (WIN32) && !defined (__APPLE__) +#if !defined (_WIN32) && !defined (__APPLE__) #include int posix_memalign (void **ptr, size_t align, size_t size) diff --git a/configure.ac b/configure.ac index c6cd08f485..878e413cdc 100644 --- a/configure.ac +++ b/configure.ac @@ -204,7 +204,7 @@ case "${host_os}" in *mingw32* | *cygwin* | *wince* | *mingwce*) AC_CHECK_TOOL(WINDRES, windres, :) AC_CHECK_TOOL(OBJCOPY, objcopy, :) - AH_TOP([#if defined(WIN32) && !defined(_WIN32_WINNT)]) + AH_TOP([#if defined(_WIN32) && !defined(_WIN32_WINNT)]) AH_TOP([# define _WIN32_WINNT 0x0502 /* Windows XP SP2 */]) AH_TOP([#endif]) AC_DEFINE([_WIN32_IE], 0x0600, [Define to '0x0600' for IE 6.0 (and shell) APIs.]) @@ -219,7 +219,7 @@ case "${host_os}" in dnl Check if we are using the mno-cygwin mode in which case we are dnl actually dealing with a mingw32 compiler. AC_EGREP_CPP(yes, - [#ifdef WIN32 + [#ifdef _WIN32 yes #endif], SYS=mingw32, AC_MSG_ERROR([VLC requires -mno-cygwin])) @@ -564,7 +564,7 @@ AC_CHECK_TYPES([struct pollfd],,, [#include #if HAVE_POLL # include -#elif defined (WIN32) +#elif defined (_WIN32) # include #endif ]) @@ -590,7 +590,7 @@ AC_SEARCH_LIBS([getaddrinfo], [nsl], [ LIBS="${LIBS} ${SOCKET_LIBS}" AC_LINK_IFELSE([ - AC_LANG_PROGRAM([#ifdef WIN32 + AC_LANG_PROGRAM([#ifdef _WIN32 # if _WIN32_WINNT < 0x600 # error Needs vista+ # endif @@ -616,7 +616,7 @@ AC_CACHE_CHECK([for socklen_t in sys/socket.h], dnl ` (fix VIM syntax highlight ac_cv_type_socklen_t, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ [#include -#ifdef WIN32 +#ifdef _WIN32 # include # include #else @@ -633,7 +633,7 @@ AH_TEMPLATE(ss_family, [Define to `sa_family' if does not define. AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_struct_sockaddr_storage, [AC_TRY_COMPILE( [#include - #if defined( WIN32 ) + #if defined( _WIN32 ) # include #else # include diff --git a/contrib/src/lame/lame-forceinline.patch b/contrib/src/lame/lame-forceinline.patch index 883fc6d42f..1dabba0954 100644 --- a/contrib/src/lame/lame-forceinline.patch +++ b/contrib/src/lame/lame-forceinline.patch @@ -5,7 +5,7 @@ diff -ru lame.orig/libmp3lame/vbrquantize.c lame/libmp3lame/vbrquantize.c # define FORCEINLINE __forceinline # endif # endif -+#elif defined (WIN32) ++#elif defined (_WIN32) +# define VOLATILE +/* Make sure FORCEINLINE does not include "extern" */ +# undef FORCEINLINE diff --git a/contrib/src/zvbi/zvbi-win32.patch b/contrib/src/zvbi/zvbi-win32.patch index 44f32b999e..d9433820c2 100644 --- a/contrib/src/zvbi/zvbi-win32.patch +++ b/contrib/src/zvbi/zvbi-win32.patch @@ -5,7 +5,7 @@ diff -ruN zvbi/src/conv.c zvbi.new/src/conv.c #endif #include -+#ifndef WIN32 ++#ifndef _WIN32 #include +#endif @@ -16,7 +16,7 @@ diff -ruN zvbi/src/conv.c zvbi.new/src/conv.c dst_format = bind_textdomain_codeset (vbi_intl_domainname, NULL); - -+#ifdef WIN32 ++#ifdef _WIN32 +#warning this is wrong +#else if (NULL == dst_format) @@ -62,7 +62,7 @@ diff -ruN zvbi/src/packet.c zvbi.new/src/packet.c #include #include #include -+#ifndef WIN32 ++#ifndef _WIN32 #include +#endif @@ -75,7 +75,7 @@ diff -ruN zvbi/src/proxy-msg.c zvbi.new/src/proxy-msg.c #include #include #include -+#ifndef WIN32 ++#ifndef _WIN32 #include +#endif #include @@ -88,7 +88,7 @@ diff -ruN zvbi/src/proxy-msg.h zvbi.new/src/proxy-msg.h #ifndef PROXY_MSG_H #define PROXY_MSG_H -+#ifndef WIN32 ++#ifndef _WIN32 #include +#endif @@ -101,7 +101,7 @@ diff -ruN zvbi/src/vbi.c zvbi.new/src/vbi.c #include #include #include -+#ifndef WIN32 ++#ifndef _WIN32 #include +#endif #include @@ -138,7 +138,7 @@ diff -ruN zvbi/src/vbi.c zvbi.new/src/vbi.c #include /* open() */ #include /* close(), mmap(), munmap(), gettimeofday() */ -+#ifndef WIN32 ++#ifndef _WIN32 #include /* ioctl() */ #include /* mmap(), munmap() */ +#endif @@ -150,7 +150,7 @@ diff -ruN zvbi/src/vbi.c zvbi.new/src/vbi.c } - -+#ifndef WIN32 ++#ifndef _WIN32 /** * @internal * @@ -167,7 +167,7 @@ diff -ruN zvbi/src/vbi.c zvbi.new/src/vbi.c "EXCL", O_EXCL, "TRUNC", O_TRUNC, "APPEND", O_APPEND, -+#ifndef WIN32 ++#ifndef _WIN32 "NONBLOCK", O_NONBLOCK, +#endif 0); @@ -177,7 +177,7 @@ diff -ruN zvbi/src/vbi.c zvbi.new/src/vbi.c return err; } -+#ifndef WIN32 ++#ifndef _WIN32 /** * @internal * Drop-in for mmap(). Logs the request on fp if not NULL. diff --git a/include/vlc/libvlc.h b/include/vlc/libvlc.h index b4a8c91693..32d0416594 100644 --- a/include/vlc/libvlc.h +++ b/include/vlc/libvlc.h @@ -38,7 +38,7 @@ #ifndef VLC_LIBVLC_H #define VLC_LIBVLC_H 1 -#if defined (WIN32) && defined (DLL_EXPORT) +#if defined (_WIN32) && defined (DLL_EXPORT) # define LIBVLC_API __declspec(dllexport) #elif defined (__GNUC__) && (__GNUC__ >= 4) # define LIBVLC_API __attribute__((visibility("default"))) diff --git a/include/vlc_charset.h b/include/vlc_charset.h index 56808f37d4..4de57ab70f 100644 --- a/include/vlc_charset.h +++ b/include/vlc_charset.h @@ -48,7 +48,7 @@ VLC_API const char * IsUTF8( const char * ) VLC_USED; VLC_API char * FromCharset( const char *charset, const void *data, size_t data_size ) VLC_USED; VLC_API void * ToCharset( const char *charset, const char *in, size_t *outsize ) VLC_USED; -#ifdef WIN32 +#ifdef _WIN32 VLC_USED static inline char *FromWide (const wchar_t *wide) { diff --git a/include/vlc_common.h b/include/vlc_common.h index d75f216724..6116f8e53d 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -126,7 +126,7 @@ # define VLC_EXTERN #endif -#if defined (WIN32) && defined (DLL_EXPORT) +#if defined (_WIN32) && defined (DLL_EXPORT) # define VLC_EXPORT __declspec(dllexport) #elif VLC_GCC_VERSION(4,0) # define VLC_EXPORT __attribute__((visibility("default"))) @@ -392,7 +392,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */ /***************************************************************************** * OS-specific headers and thread types *****************************************************************************/ -#if defined( WIN32 ) +#if defined( _WIN32 ) # include # ifndef PATH_MAX # define PATH_MAX MAX_PATH @@ -774,7 +774,7 @@ static inline void SetQWLE (void *p, uint64_t qw) /* Stuff defined in src/extras/libc.c */ -#if defined(WIN32) +#if defined(_WIN32) /* several type definitions */ # if defined( __MINGW32__ ) # if !defined( _OFF_T_ ) @@ -794,7 +794,7 @@ static inline void SetQWLE (void *p, uint64_t qw) # endif # include -#endif /* WIN32 */ +#endif /* _WIN32 */ VLC_API bool vlc_ureduce( unsigned *, unsigned *, uint64_t, uint64_t, uint64_t ); @@ -803,7 +803,7 @@ VLC_API bool vlc_ureduce( unsigned *, unsigned *, uint64_t, uint64_t, uint64_t ) #include #endif -#ifdef WIN32 +#ifdef _WIN32 # define vlc_memalign(align, size) (__mingw_aligned_malloc(size, align)) # define vlc_free(base) (__mingw_aligned_free(base)) #elif defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6) @@ -906,7 +906,7 @@ VLC_API const char * VLC_Compiler( void ) VLC_USED; #include "vlc_main.h" #include "vlc_configuration.h" -#if defined( WIN32 ) || defined( __SYMBIAN32__ ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __SYMBIAN32__ ) || defined( __OS2__ ) # define DIR_SEP_CHAR '\\' # define DIR_SEP "\\" # define PATH_SEP_CHAR ';' diff --git a/include/vlc_fs.h b/include/vlc_fs.h index c0def6bb83..e0fc4b561a 100644 --- a/include/vlc_fs.h +++ b/include/vlc_fs.h @@ -45,7 +45,7 @@ VLC_API int vlc_unlink( const char *filename ); VLC_API int vlc_rename( const char *oldpath, const char *newpath ); VLC_API char *vlc_getcwd( void ) VLC_USED; -#if defined( WIN32 ) +#if defined( _WIN32 ) static inline int vlc_closedir( DIR *dir ) { _WDIR *wdir = *(_WDIR **)dir; diff --git a/include/vlc_interface.h b/include/vlc_interface.h index 078fc90505..9bc6241b7e 100644 --- a/include/vlc_interface.h +++ b/include/vlc_interface.h @@ -120,7 +120,7 @@ typedef struct msg_subscription { } msg_subscription_t; /*@}*/ -#if defined( WIN32 ) && !VLC_WINSTORE_APP +#if defined( _WIN32 ) && !VLC_WINSTORE_APP # define CONSOLE_INTRO_MSG \ if( !getenv( "PWD" ) ) /* detect Cygwin shell or Wine */ \ { \ diff --git a/include/vlc_intf_strings.h b/include/vlc_intf_strings.h index 3815e17586..c075c98c6b 100644 --- a/include/vlc_intf_strings.h +++ b/include/vlc_intf_strings.h @@ -35,7 +35,7 @@ 2. folder: a string with the same meaning but with directory substituted with "folder" */ -#if defined( WIN32 ) || defined(__APPLE__) +#if defined( _WIN32 ) || defined(__APPLE__) #define I_DIR_OR_FOLDER( dir, folder ) folder #else #define I_DIR_OR_FOLDER( dir, folder ) dir diff --git a/include/vlc_network.h b/include/vlc_network.h index 25680cc3a8..d438642203 100644 --- a/include/vlc_network.h +++ b/include/vlc_network.h @@ -32,7 +32,7 @@ * This file defines interface to communicate with network plug-ins */ -#if defined( WIN32 ) +#if defined( _WIN32 ) # define _NO_OLDNAMES 1 # include # include @@ -157,7 +157,7 @@ VLC_API ssize_t net_Printf( vlc_object_t *p_this, int fd, const v_socket_t *, co VLC_API ssize_t net_vaPrintf( vlc_object_t *p_this, int fd, const v_socket_t *, const char *psz_fmt, va_list args ); #define net_vaPrintf(a,b,c,d,e) net_vaPrintf(VLC_OBJECT(a),b,c,d,e) -#ifdef WIN32 +#ifdef _WIN32 /* Microsoft: same semantic, same value, different name... go figure */ # define SHUT_RD SD_RECEIVE # define SHUT_WR SD_SEND @@ -226,7 +226,7 @@ VLC_API ssize_t net_vaPrintf( vlc_object_t *p_this, int fd, const v_socket_t *, # define AI_IDN 0 /* GNU/libc extension */ #endif -#ifdef WIN32 +#ifdef _WIN32 # undef gai_strerror # define gai_strerror gai_strerrorA #endif diff --git a/include/vlc_plugin.h b/include/vlc_plugin.h index 276ebc3ab5..b31a9c6db3 100644 --- a/include/vlc_plugin.h +++ b/include/vlc_plugin.h @@ -216,7 +216,7 @@ enum vlc_module_properties #define CDECL_SYMBOL #if defined (__PLUGIN__) -# if defined (WIN32) +# if defined (_WIN32) # define DLL_SYMBOL __declspec(dllexport) # undef CDECL_SYMBOL # define CDECL_SYMBOL __cdecl diff --git a/include/vlc_threads.h b/include/vlc_threads.h index ae835882f7..1ffbae6798 100644 --- a/include/vlc_threads.h +++ b/include/vlc_threads.h @@ -34,7 +34,7 @@ * */ -#if defined (WIN32) +#if defined (_WIN32) # include # ifndef ETIMEDOUT # define ETIMEDOUT 10060 /* This is the value in winsock.h. */ diff --git a/lib/media_player.c b/lib/media_player.c index 9366400389..c48daa49e4 100644 --- a/lib/media_player.c +++ b/lib/media_player.c @@ -390,7 +390,7 @@ libvlc_media_player_new( libvlc_instance_t *instance ) var_Create (mp, "vmem-height", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT); var_Create (mp, "vmem-pitch", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT); var_Create (mp, "drawable-xid", VLC_VAR_INTEGER); -#if defined (WIN32) || defined (__OS2__) +#if defined (_WIN32) || defined (__OS2__) var_Create (mp, "drawable-hwnd", VLC_VAR_INTEGER); #endif #ifdef __APPLE__ @@ -910,7 +910,7 @@ void libvlc_media_player_set_hwnd( libvlc_media_player_t *p_mi, void *drawable ) { assert (p_mi != NULL); -#if defined (WIN32) || defined (__OS2__) +#if defined (_WIN32) || defined (__OS2__) var_SetString (p_mi, "window", (drawable != NULL) ? "embed-hwnd,any" : ""); var_SetInteger (p_mi, "drawable-hwnd", (uintptr_t)drawable); @@ -925,7 +925,7 @@ void libvlc_media_player_set_hwnd( libvlc_media_player_t *p_mi, void *libvlc_media_player_get_hwnd( libvlc_media_player_t *p_mi ) { assert (p_mi != NULL); -#if defined (WIN32) || defined (__OS2__) +#if defined (_WIN32) || defined (__OS2__) return (void *)(uintptr_t)var_GetInteger (p_mi, "drawable-hwnd"); #else return NULL; diff --git a/modules/access/cdda.c b/modules/access/cdda.c index d2bdbafc79..e461859055 100644 --- a/modules/access/cdda.c +++ b/modules/access/cdda.c @@ -142,7 +142,7 @@ static int Open( vlc_object_t *p_this ) } else psz_name = ToLocaleDup( p_access->psz_filepath ); -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) if( psz_name[0] && psz_name[1] == ':' && psz_name[2] == '\\' && psz_name[3] == '\0' ) psz_name[2] = '\0'; #endif diff --git a/modules/access/directory.c b/modules/access/directory.c index 2798b5bfc3..f929315f13 100644 --- a/modules/access/directory.c +++ b/modules/access/directory.c @@ -40,7 +40,7 @@ #ifdef HAVE_UNISTD_H # include # include -#elif defined( WIN32 ) +#elif defined( _WIN32 ) # include #endif diff --git a/modules/access/dtv/access.c b/modules/access/dtv/access.c index 71875f7476..2de87408a2 100644 --- a/modules/access/dtv/access.c +++ b/modules/access/dtv/access.c @@ -247,7 +247,7 @@ vlc_module_begin () "cable", "dvb-c", "cqam", "isdb-c", "satellite", "dvb-s", "dvb-s2", "isdb-s", "terrestrial", "dvb-t", "dvb-t2", "isdb-t", "atsc" -#ifdef WIN32 +#ifdef _WIN32 ,"dvbt" #endif ) @@ -261,7 +261,7 @@ vlc_module_begin () change_safe () add_bool ("dvb-budget-mode", false, BUDGET_TEXT, BUDGET_LONGTEXT, true) #endif -#ifdef WIN32 +#ifdef _WIN32 add_integer ("dvb-adapter", -1, ADAPTER_TEXT, ADAPTER_LONGTEXT, true) change_safe () add_string ("dvb-network-name", "", NAME_TEXT, NAME_LONGTEXT, true) @@ -403,7 +403,7 @@ vlc_module_begin () add_integer ("dvb-tone", -1, TONE_TEXT, TONE_LONGTEXT, true) change_integer_list (auto_off_on_vlc, auto_off_on_user) #endif -#ifdef WIN32 +#ifdef _WIN32 add_integer ("dvb-network-id", 0, NETID_TEXT, NETID_TEXT, true) add_integer ("dvb-azimuth", 0, AZIMUTH_TEXT, AZIMUTH_LONGTEXT, true) add_integer ("dvb-elevation", 0, ELEVATION_TEXT, ELEVATION_LONGTEXT, true) diff --git a/modules/access/dv.c b/modules/access/dv.c index 91dff44bc6..508a93560a 100644 --- a/modules/access/dv.c +++ b/modules/access/dv.c @@ -36,7 +36,7 @@ #include #ifdef HAVE_UNISTD_H # include -#elif defined( WIN32 ) +#elif defined( _WIN32 ) # include #endif diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c index 6f8ed87022..13aaa3d5bd 100644 --- a/modules/access/dvdnav.c +++ b/modules/access/dvdnav.c @@ -204,7 +204,7 @@ static int Open( vlc_object_t *p_this ) else psz_file = strdup( p_demux->psz_file ); -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) if( psz_file != NULL ) { /* Remove trailing backslash, otherwise dvdnav_open will fail */ diff --git a/modules/access/dvdread.c b/modules/access/dvdread.c index 79d83041d5..a239053f0c 100644 --- a/modules/access/dvdread.c +++ b/modules/access/dvdread.c @@ -179,7 +179,7 @@ static int Open( vlc_object_t *p_this ) else psz_file = strdup( p_demux->psz_file ); -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) if( psz_file != NULL ) { size_t flen = strlen( psz_file ); diff --git a/modules/access/file.c b/modules/access/file.c index a46a31b093..8e00b3d94f 100644 --- a/modules/access/file.c +++ b/modules/access/file.c @@ -44,7 +44,7 @@ # include #endif -#if defined( WIN32 ) +#if defined( _WIN32 ) # include # include # include @@ -58,7 +58,7 @@ #include #include #include -#ifdef WIN32 +#ifdef _WIN32 # include #endif #include @@ -72,7 +72,7 @@ struct access_sys_t bool b_pace_control; }; -#if !defined (WIN32) && !defined (__OS2__) +#if !defined (_WIN32) && !defined (__OS2__) static bool IsRemote (int fd) { #if defined (HAVE_FSTATVFS) && defined (MNT_LOCAL) @@ -109,7 +109,7 @@ static bool IsRemote (int fd) } # define IsRemote(fd,path) IsRemote(fd) -#else /* WIN32 || __OS2__ */ +#else /* _WIN32 || __OS2__ */ static bool IsRemote (const char *path) { # if !defined(__OS2__) && !VLC_WINSTORE_APP @@ -333,7 +333,7 @@ static ssize_t StreamRead (access_t *p_access, uint8_t *p_buffer, size_t i_len) access_sys_t *p_sys = p_access->p_sys; int fd = p_sys->fd; -#if !defined (WIN32) && !defined (__OS2__) +#if !defined (_WIN32) && !defined (__OS2__) ssize_t val = net_Read (p_access, fd, NULL, p_buffer, i_len, false); #else ssize_t val = read (fd, p_buffer, i_len); diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp index e29ac30c02..9e02630db2 100644 --- a/modules/access/live555.cpp +++ b/modules/access/live555.cpp @@ -52,7 +52,7 @@ #include -#if defined( WIN32 ) +#if defined( _WIN32 ) # include #endif diff --git a/modules/access/rtp/input.c b/modules/access/rtp/input.c index b8c5394661..18dac00ea7 100644 --- a/modules/access/rtp/input.c +++ b/modules/access/rtp/input.c @@ -154,7 +154,7 @@ void *rtp_dgram_thread (void *opaque) */ void *rtp_stream_thread (void *opaque) { -#ifndef WIN32 +#ifndef _WIN32 demux_t *demux = opaque; demux_sys_t *sys = demux->p_sys; int fd = sys->fd; diff --git a/modules/access/rtp/srtp.c b/modules/access/rtp/srtp.c index 8ab5d38336..1f8de38d91 100644 --- a/modules/access/rtp/srtp.c +++ b/modules/access/rtp/srtp.c @@ -39,7 +39,7 @@ #include -#ifdef WIN32 +#ifdef _WIN32 # include #else # include diff --git a/modules/access/screen/screen.c b/modules/access/screen/screen.c index 8340306e85..12fb132d2c 100644 --- a/modules/access/screen/screen.c +++ b/modules/access/screen/screen.c @@ -42,7 +42,7 @@ #define FPS_LONGTEXT N_( \ "Desired frame rate for the capture." ) -#ifdef WIN32 +#ifdef _WIN32 #define FRAGS_TEXT N_("Capture fragment size") #define FRAGS_LONGTEXT N_( \ "Optimize the capture by fragmenting the screen in chunks " \ @@ -86,7 +86,7 @@ static int Open ( vlc_object_t * ); static void Close( vlc_object_t * ); -#ifdef WIN32 +#ifdef _WIN32 # define SCREEN_FPS 1 #else # define SCREEN_FPS 5 @@ -114,7 +114,7 @@ vlc_module_begin () add_loadfile( "screen-mouse-image", "", MOUSE_TEXT, MOUSE_LONGTEXT, true ) #endif -#ifdef WIN32 +#ifdef _WIN32 add_integer( "screen-fragment-size", 0, FRAGS_TEXT, FRAGS_LONGTEXT, true ) #endif diff --git a/modules/access/smb.c b/modules/access/smb.c index 6704574552..1e681aa276 100644 --- a/modules/access/smb.c +++ b/modules/access/smb.c @@ -29,7 +29,7 @@ #endif #include -#ifdef WIN32 +#ifdef _WIN32 # include # include # include @@ -93,7 +93,7 @@ struct access_sys_t int i_smb; }; -#ifdef WIN32 +#ifdef _WIN32 static void Win32AddConnection( access_t *, char *, char *, char *, char * ); #else static void smb_auth( const char *srv, const char *shr, char *wg, int wglen, @@ -179,7 +179,7 @@ static int Open( vlc_object_t *p_this ) if( !psz_domain ) psz_domain = var_InheritString( p_access, "smb-domain" ); if( psz_domain && !*psz_domain ) { free( psz_domain ); psz_domain = NULL; } -#ifdef WIN32 +#ifdef _WIN32 if( psz_user ) Win32AddConnection( p_access, psz_location, psz_user, psz_pwd, psz_domain); i_ret = asprintf( &psz_uri, "//%s", psz_location ); @@ -200,7 +200,7 @@ static int Open( vlc_object_t *p_this ) if( i_ret == -1 ) return VLC_ENOMEM; -#ifndef WIN32 +#ifndef _WIN32 if( smbc_init( smb_auth, 0 ) ) { free( psz_uri ); @@ -343,7 +343,7 @@ static int Control( access_t *p_access, int i_query, va_list args ) return VLC_SUCCESS; } -#ifdef WIN32 +#ifdef _WIN32 static void Win32AddConnection( access_t *p_access, char *psz_path, char *psz_user, char *psz_pwd, char *psz_domain ) @@ -387,4 +387,4 @@ static void Win32AddConnection( access_t *p_access, char *psz_path, msg_Dbg( p_access, "failed to connect to %s", psz_remote ); } } -#endif // WIN32 +#endif // _WIN32 diff --git a/modules/access/vcd/cdrom.c b/modules/access/vcd/cdrom.c index 270f63838b..17ce5edd9d 100644 --- a/modules/access/vcd/cdrom.c +++ b/modules/access/vcd/cdrom.c @@ -73,7 +73,7 @@ #elif defined( HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H ) # include # include -#elif defined( WIN32 ) +#elif defined( _WIN32 ) # include # include #elif defined (__linux__) @@ -97,7 +97,7 @@ vcddev_t *ioctl_Open( vlc_object_t *p_this, const char *psz_dev ) int i_ret; int b_is_file; vcddev_t *p_vcddev; -#if !defined( WIN32 ) && !defined( __OS2__ ) +#if !defined( _WIN32 ) && !defined( __OS2__ ) struct stat fileinfo; #endif @@ -116,7 +116,7 @@ vcddev_t *ioctl_Open( vlc_object_t *p_this, const char *psz_dev ) /* * Check if we are dealing with a device or a file (vcd image) */ -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) if( (strlen( psz_dev ) == 2 && psz_dev[1] == ':') ) { b_is_file = 0; @@ -144,7 +144,7 @@ vcddev_t *ioctl_Open( vlc_object_t *p_this, const char *psz_dev ) * open the vcd device */ -#ifdef WIN32 +#ifdef _WIN32 i_ret = win32_vcd_open( p_this, psz_dev, p_vcddev ); #elif defined( __OS2__ ) i_ret = os2_vcd_open( p_this, psz_dev, p_vcddev ); @@ -189,7 +189,7 @@ void ioctl_Close( vlc_object_t * p_this, vcddev_t *p_vcddev ) * vcd device mode */ -#ifdef WIN32 +#ifdef _WIN32 if( p_vcddev->h_device_handle ) CloseHandle( p_vcddev->h_device_handle ); #elif defined( __OS2__ ) @@ -296,7 +296,7 @@ int ioctl_GetTracksMap( vlc_object_t *p_this, const vcddev_t *p_vcddev, darwin_freeTOC( pTOC ); -#elif defined( WIN32 ) +#elif defined( _WIN32 ) DWORD dwBytesReturned; CDROM_TOC cdrom_toc; @@ -547,7 +547,7 @@ int ioctl_ReadSectors( vlc_object_t *p_this, const vcddev_t *p_vcddev, goto error; } -#elif defined( WIN32 ) +#elif defined( _WIN32 ) DWORD dwBytesReturned; RAW_READ_INFO cdrom_raw; @@ -998,7 +998,7 @@ static int darwin_getNumberOfTracks( CDTOC *pTOC, int i_descriptors ) } #endif /* __APPLE__ */ -#if defined( WIN32 ) +#if defined( _WIN32 ) /***************************************************************************** * win32_vcd_open: open vcd drive ***************************************************************************** @@ -1024,7 +1024,7 @@ static int win32_vcd_open( vlc_object_t * p_this, const char *psz_dev, return (p_vcddev->h_device_handle == NULL) ? -1 : 0; } -#endif /* WIN32 */ +#endif /* _WIN32 */ #ifdef __OS2__ /***************************************************************************** @@ -1217,7 +1217,7 @@ static int CdTextRead( vlc_object_t *p_object, const vcddev_t *p_vcddev, VLC_UNUSED( pi_buffer ); return -1; } -#elif defined( WIN32 ) +#elif defined( _WIN32 ) static int CdTextRead( vlc_object_t *p_object, const vcddev_t *p_vcddev, uint8_t **pp_buffer, int *pi_buffer ) { diff --git a/modules/access/vcd/cdrom_internals.h b/modules/access/vcd/cdrom_internals.h index 2ae806bf1f..bfef07e579 100644 --- a/modules/access/vcd/cdrom_internals.h +++ b/modules/access/vcd/cdrom_internals.h @@ -36,7 +36,7 @@ struct vcddev_s /* Section used in vcd device mode */ -#ifdef WIN32 +#ifdef _WIN32 HANDLE h_device_handle; /* vcd device descriptor */ #elif defined( __OS2__ ) HFILE hcd; /* vcd device descriptor */ @@ -70,7 +70,7 @@ struct vcddev_s #define CD_MAX_TRACK_NO 99 #endif -#if defined( WIN32 ) +#if defined( _WIN32 ) /* Win32 DeviceIoControl specifics */ #ifndef MAXIMUM_NUMBER_TRACKS @@ -127,7 +127,7 @@ typedef struct _CDROM_READ_TOC_EX { #define MINIMUM_CDROM_READ_TOC_EX_SIZE 2 #define CDROM_READ_TOC_EX_FORMAT_CDTEXT 0x05 -#endif /* WIN32 */ +#endif /* _WIN32 */ #ifdef __OS2__ #pragma pack( push, 1 ) @@ -192,7 +192,7 @@ static void CloseVCDImage( vlc_object_t *, struct vcddev_s * ); static CDTOC *darwin_getTOC( vlc_object_t *, const struct vcddev_s * ); static int darwin_getNumberOfTracks( CDTOC *, int ); -#elif defined( WIN32 ) +#elif defined( _WIN32 ) static int win32_vcd_open( vlc_object_t *, const char *, struct vcddev_s *); #elif defined( __OS2__ ) diff --git a/modules/access/vcd/vcd.c b/modules/access/vcd/vcd.c index 817f56590a..d702323965 100644 --- a/modules/access/vcd/vcd.c +++ b/modules/access/vcd/vcd.c @@ -123,7 +123,7 @@ static int Open( vlc_object_t *p_this ) } } -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) if( psz_dup[0] && psz_dup[1] == ':' && psz_dup[2] == '\\' && psz_dup[3] == '\0' ) psz_dup[2] = '\0'; #endif diff --git a/modules/access/vcdx/access.c b/modules/access/vcdx/access.c index 517264a4b5..b2de5a7f8b 100644 --- a/modules/access/vcdx/access.c +++ b/modules/access/vcdx/access.c @@ -555,7 +555,7 @@ VCDParse( access_t * p_access, /*out*/ vcdinfo_itemid_t * p_itemid, p_itemid->num = 0; } -#ifdef WIN32 +#ifdef _WIN32 /* On Win32 we want the VCD access plugin to be explicitly requested, * we end up with lots of problems otherwise */ if( !p_access->psz_access || !*p_access->psz_access ) return NULL; diff --git a/modules/access/vdr.c b/modules/access/vdr.c index ddf1a96573..6cf9c4466b 100644 --- a/modules/access/vdr.c +++ b/modules/access/vdr.c @@ -50,7 +50,7 @@ See http://www.vdr-wiki.de/ and http://www.tvdr.de/ for more information. #include #ifdef HAVE_UNISTD_H # include -#elif defined( WIN32 ) +#elif defined( _WIN32 ) # include #endif diff --git a/modules/access/zip/unzip/ioapi.h b/modules/access/zip/unzip/ioapi.h index 7d457baab3..63ec641bfb 100644 --- a/modules/access/zip/unzip/ioapi.h +++ b/modules/access/zip/unzip/ioapi.h @@ -24,7 +24,7 @@ #ifndef ZCALLBACK -#if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) +#if (defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) #define ZCALLBACK CALLBACK #else #define ZCALLBACK diff --git a/modules/access/zip/unzip/unzip.h b/modules/access/zip/unzip/unzip.h index b247937c80..1b7065f6da 100644 --- a/modules/access/zip/unzip/unzip.h +++ b/modules/access/zip/unzip/unzip.h @@ -58,7 +58,7 @@ extern "C" { #endif #if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) -/* like the STRICT of WIN32, we define a pointer that cannot be converted +/* like the STRICT of _WIN32, we define a pointer that cannot be converted from (void*) without cast */ typedef struct TagunzFile__ { int unused; } unzFile__; typedef unzFile__ *unzFile; diff --git a/modules/access_output/file.c b/modules/access_output/file.c index 07ecaafe1f..a1f529faf0 100644 --- a/modules/access_output/file.c +++ b/modules/access_output/file.c @@ -43,11 +43,11 @@ #include #include -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) # include #endif -#ifndef WIN32 +#ifndef _WIN32 # include #endif @@ -153,7 +153,7 @@ static int Open( vlc_object_t *p_this ) else if( !strcmp( p_access->psz_path, "-" ) ) { -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) setmode (STDOUT_FILENO, O_BINARY); #endif fd = vlc_dup (STDOUT_FILENO); diff --git a/modules/access_output/udp.c b/modules/access_output/udp.c index d996d74927..54aadd20fd 100644 --- a/modules/access_output/udp.c +++ b/modules/access_output/udp.c @@ -42,7 +42,7 @@ # include #endif -#ifdef WIN32 +#ifdef _WIN32 # include # include #else diff --git a/modules/codec/dmo/buffer.c b/modules/codec/dmo/buffer.c index 40677b199c..0e67c88e3b 100644 --- a/modules/codec/dmo/buffer.c +++ b/modules/codec/dmo/buffer.c @@ -32,7 +32,7 @@ #include #include -#ifndef WIN32 +#ifndef _WIN32 # define LOADER #else # include diff --git a/modules/codec/dmo/dmo.c b/modules/codec/dmo/dmo.c index b507dbc45e..6595f70acb 100644 --- a/modules/codec/dmo/dmo.c +++ b/modules/codec/dmo/dmo.c @@ -34,7 +34,7 @@ #include #include -#ifdef WIN32 +#ifdef _WIN32 # include # include #endif diff --git a/modules/codec/dmo/dmo.h b/modules/codec/dmo/dmo.h index 50cd5e88c0..d69b970652 100644 --- a/modules/codec/dmo/dmo.h +++ b/modules/codec/dmo/dmo.h @@ -38,7 +38,7 @@ const GUID MEDIASUBTYPE_RGB24; const GUID MEDIASUBTYPE_RGB565; -#ifndef WIN32 +#ifndef _WIN32 void* CoTaskMemAlloc(unsigned long cb); void CoTaskMemFree(void* cb); #endif diff --git a/modules/codec/fluidsynth.c b/modules/codec/fluidsynth.c index 4003174a20..49d5ab1460 100644 --- a/modules/codec/fluidsynth.c +++ b/modules/codec/fluidsynth.c @@ -36,7 +36,7 @@ #endif /* On Win32, we link statically */ -#ifdef WIN32 +#ifdef _WIN32 # define FLUIDSYNTH_NOT_A_DLL #endif diff --git a/modules/codec/libass.c b/modules/codec/libass.c index b32791c978..aa38f1b2f6 100644 --- a/modules/codec/libass.c +++ b/modules/codec/libass.c @@ -42,7 +42,7 @@ #include -#if defined(WIN32) +#if defined(_WIN32) # include #endif @@ -219,7 +219,7 @@ static int Create( vlc_object_t *p_this ) #endif #ifdef HAVE_FONTCONFIG -#if defined(WIN32) +#if defined(_WIN32) dialog_progress_bar_t *p_dialog = dialog_ProgressCreate( p_dec, _("Building font cache"), @@ -227,7 +227,7 @@ static int Create( vlc_object_t *p_this ) "This should take less than a minute." ), NULL ); #endif ass_set_fonts( p_renderer, psz_font, psz_family, true, NULL, 1 ); // setup default font/family -#ifdef WIN32 +#ifdef _WIN32 if( p_dialog ) { dialog_ProgressSet( p_dialog, NULL, 1.0 ); diff --git a/modules/codec/omxil/OMX_Types.h b/modules/codec/omxil/OMX_Types.h index 31be916552..76fa234e7d 100644 --- a/modules/codec/omxil/OMX_Types.h +++ b/modules/codec/omxil/OMX_Types.h @@ -162,7 +162,7 @@ typedef unsigned long long OMX_U64; /** OMX_S64 is a 64 bit signed quantity that is 64 bit word aligned */ typedef signed long long OMX_S64; -#elif defined(WIN32) +#elif defined(_WIN32) /** OMX_U64 is a 64 bit unsigned quantity that is 64 bit word aligned */ typedef unsigned __int64 OMX_U64; @@ -170,7 +170,7 @@ typedef unsigned __int64 OMX_U64; /** OMX_S64 is a 64 bit signed quantity that is 64 bit word aligned */ typedef signed __int64 OMX_S64; -#else /* WIN32 */ +#else /* _WIN32 */ /** OMX_U64 is a 64 bit unsigned quantity that is 64 bit word aligned */ typedef unsigned long long OMX_U64; @@ -178,7 +178,7 @@ typedef unsigned long long OMX_U64; /** OMX_S64 is a 64 bit signed quantity that is 64 bit word aligned */ typedef signed long long OMX_S64; -#endif /* WIN32 */ +#endif /* _WIN32 */ #endif diff --git a/modules/codec/quicktime.c b/modules/codec/quicktime.c index d4834d7208..885c758e7c 100644 --- a/modules/codec/quicktime.c +++ b/modules/codec/quicktime.c @@ -34,7 +34,7 @@ #include #include -#if !defined (__APPLE__) && !defined(WIN32) +#if !defined (__APPLE__) && !defined(_WIN32) # define LOADER 1 #endif @@ -79,7 +79,7 @@ static int OpenAudio( decoder_t * ); static int OpenVideo( decoder_t * ); static block_t *DecodeAudio( decoder_t *, block_t ** ); -#ifndef WIN32 +#ifndef _WIN32 static picture_t *DecodeVideo( decoder_t *, block_t ** ); #endif @@ -144,7 +144,7 @@ struct decoder_sys_t unsigned int InFrameSize; unsigned int OutFrameSize; -#ifndef WIN32 +#ifndef _WIN32 /* Video */ Component (*FindNextComponent) ( Component prev, ComponentDescription* desc ); @@ -215,7 +215,7 @@ static const int pi_channels_maps[6] = }; static int QTAudioInit( decoder_t * ); -#ifndef WIN32 +#ifndef _WIN32 static int QTVideoInit( decoder_t * ); #endif @@ -666,7 +666,7 @@ static block_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block ) *****************************************************************************/ static int OpenVideo( decoder_t *p_dec ) { -#ifndef WIN32 +#ifndef _WIN32 decoder_sys_t *p_sys = malloc( sizeof( decoder_sys_t ) ); if( !p_sys ) return VLC_ENOMEM; @@ -857,12 +857,12 @@ exit_error: #else VLC_UNUSED( p_dec ); -#endif /* !WIN32 */ +#endif /* !_WIN32 */ return VLC_EGENERIC; } -#ifndef WIN32 +#ifndef _WIN32 /***************************************************************************** * DecodeVideo: *****************************************************************************/ @@ -951,7 +951,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block ) block_Release( p_block ); return p_pic; } -#endif /* !WIN32 */ +#endif /* !_WIN32 */ /***************************************************************************** * QTAudioInit: @@ -1020,7 +1020,7 @@ static int QTAudioInit( decoder_t *p_dec ) return VLC_SUCCESS; } -#ifndef WIN32 +#ifndef _WIN32 /***************************************************************************** * QTVideoInit: *****************************************************************************/ @@ -1092,4 +1092,4 @@ static int QTVideoInit( decoder_t *p_dec ) return VLC_SUCCESS; } -#endif /* !WIN32 */ +#endif /* !_WIN32 */ diff --git a/modules/control/dummy.c b/modules/control/dummy.c index 6e0a364450..4300555b07 100644 --- a/modules/control/dummy.c +++ b/modules/control/dummy.c @@ -33,7 +33,7 @@ #include #include -#ifdef WIN32 +#ifdef _WIN32 #define QUIET_TEXT N_("Do not open a DOS command box interface") #define QUIET_LONGTEXT N_( \ "By default the dummy interface plugin will start a DOS command box. " \ @@ -49,7 +49,7 @@ vlc_module_begin () set_description( N_("Dummy interface") ) set_capability( "interface", 0 ) set_callbacks( Open, NULL ) -#ifdef WIN32 +#ifdef _WIN32 add_bool( "dummy-quiet", false, QUIET_TEXT, QUIET_LONGTEXT, false ) #endif vlc_module_end () @@ -61,7 +61,7 @@ static int Open( vlc_object_t *p_this ) { intf_thread_t *p_intf = (intf_thread_t*) p_this; -#ifdef WIN32 +#ifdef _WIN32 bool b_quiet; b_quiet = var_InheritBool( p_intf, "dummy-quiet" ); if( !b_quiet ) diff --git a/modules/control/globalhotkeys/win32.c b/modules/control/globalhotkeys/win32.c index 62ab7a547c..b67ec2f079 100644 --- a/modules/control/globalhotkeys/win32.c +++ b/modules/control/globalhotkeys/win32.c @@ -1,5 +1,5 @@ /***************************************************************************** - * win32.c: Global-Hotkey WIN32 handling for vlc + * win32.c: Global-Hotkey _WIN32 handling for vlc ***************************************************************************** * Copyright (C) 2008-2009 the VideoLAN team * diff --git a/modules/control/rc.c b/modules/control/rc.c index e8ede5f244..ee9d183869 100644 --- a/modules/control/rc.c +++ b/modules/control/rc.c @@ -58,7 +58,7 @@ # define PF_LOCAL PF_UNIX #endif -#if defined(AF_LOCAL) && ! defined(WIN32) +#if defined(AF_LOCAL) && ! defined(_WIN32) # include #endif @@ -132,7 +132,7 @@ struct intf_sys_t input_thread_t *p_input; bool b_input_buffering; -#ifdef WIN32 +#ifdef _WIN32 HANDLE hConsoleIn; bool b_quiet; #endif @@ -173,7 +173,7 @@ static void msg_rc( intf_thread_t *p_intf, const char *psz_fmt, ... ) #define HOST_LONGTEXT N_("Accept commands over a socket rather than stdin. " \ "You can set the address and port the interface will bind to." ) -#ifdef WIN32 +#ifdef _WIN32 #define QUIET_TEXT N_("Do not open a DOS command box interface") #define QUIET_LONGTEXT N_( \ "By default the rc interface plugin will start a DOS command box. " \ @@ -189,7 +189,7 @@ vlc_module_begin () set_description( N_("Remote control interface") ) add_bool( "rc-show-pos", false, POS_TEXT, POS_LONGTEXT, true ) -#ifdef WIN32 +#ifdef _WIN32 add_bool( "rc-quiet", false, QUIET_TEXT, QUIET_LONGTEXT, false ) #else #if defined (HAVE_ISATTY) @@ -202,7 +202,7 @@ vlc_module_begin () set_capability( "interface", 20 ) set_callbacks( Activate, Deactivate ) -#ifdef WIN32 +#ifdef _WIN32 add_shortcut( "rc" ) #endif vlc_module_end () @@ -218,7 +218,7 @@ static int Activate( vlc_object_t *p_this ) char *psz_host, *psz_unix_path = NULL; int *pi_socket = NULL; -#ifndef WIN32 +#ifndef _WIN32 #if defined(HAVE_ISATTY) /* Check that stdin is a TTY */ if( !var_InheritBool( p_intf, "rc-fake-tty" ) && !isatty( 0 ) ) @@ -293,7 +293,7 @@ static int Activate( vlc_object_t *p_this ) pi_socket[1] = -1; #endif /* AF_LOCAL */ } -#endif /* !WIN32 */ +#endif /* !_WIN32 */ if( ( pi_socket == NULL ) && ( psz_host = var_InheritString( p_intf, "rc-host" ) ) != NULL ) @@ -335,7 +335,7 @@ static int Activate( vlc_object_t *p_this ) /* Non-buffered stdout */ setvbuf( stdout, (char *)NULL, _IOLBF, 0 ); -#ifdef WIN32 +#ifdef _WIN32 p_sys->b_quiet = var_InheritBool( p_intf, "rc-quiet" ); if( !p_sys->b_quiet ) #endif @@ -376,7 +376,7 @@ static void Deactivate( vlc_object_t *p_this ) net_Close( p_sys->i_socket ); if( p_sys->psz_unix_path != NULL ) { -#if defined(AF_LOCAL) && !defined(WIN32) +#if defined(AF_LOCAL) && !defined(_WIN32) unlink( p_sys->psz_unix_path ); #endif free( p_sys->psz_unix_path ); @@ -473,7 +473,7 @@ static void *Run( void *data ) p_buffer[0] = 0; -#ifdef WIN32 +#ifdef _WIN32 /* Get the file descriptor of the console input */ p_intf->p_sys->hConsoleIn = GetStdHandle(STD_INPUT_HANDLE); if( p_intf->p_sys->hConsoleIn == INVALID_HANDLE_VALUE ) @@ -1788,7 +1788,7 @@ static int updateStatistics( intf_thread_t *p_intf, input_item_t *p_item ) return VLC_SUCCESS; } -#ifdef WIN32 +#ifdef _WIN32 static bool ReadWin32( intf_thread_t *p_intf, char *p_buffer, int *pi_size ) { INPUT_RECORD input_record; @@ -1858,7 +1858,7 @@ bool ReadCommand( intf_thread_t *p_intf, char *p_buffer, int *pi_size ) { int i_read = 0; -#ifdef WIN32 +#ifdef _WIN32 if( p_intf->p_sys->i_socket == -1 && !p_intf->p_sys->b_quiet ) return ReadWin32( p_intf, p_buffer, pi_size ); else if( p_intf->p_sys->i_socket == -1 ) diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp index 7238ff251f..88b9d03241 100644 --- a/modules/demux/mkv/mkv.cpp +++ b/modules/demux/mkv/mkv.cpp @@ -173,7 +173,7 @@ static int Open( vlc_object_t * p_this ) { s_filename = s_path + DIR_SEP_CHAR + psz_file; -#if defined(WIN32) || defined(__OS2__) +#if defined(_WIN32) || defined(__OS2__) if (!strcasecmp(s_filename.c_str(), p_demux->psz_file)) #else if (!s_filename.compare(p_demux->psz_file)) diff --git a/modules/demux/playlist/playlist.c b/modules/demux/playlist/playlist.c index 033f55af8e..cae528dba4 100644 --- a/modules/demux/playlist/playlist.c +++ b/modules/demux/playlist/playlist.c @@ -33,7 +33,7 @@ #include #include -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) # include /* isalpha */ #endif #include @@ -203,7 +203,7 @@ char *ProcessMRL( const char *psz_mrl, const char *psz_prefix ) /* FIXME: that's wrong if the playlist is not a local file */ if( *psz_mrl == DIR_SEP_CHAR ) goto uri; -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) /* Drive letter (this assumes URL scheme are not a single character) */ if( isalpha((unsigned char)psz_mrl[0]) && psz_mrl[1] == ':' ) goto uri; diff --git a/modules/gui/eject.c b/modules/gui/eject.c index 5fae5ac7c9..740a15efa5 100644 --- a/modules/gui/eject.c +++ b/modules/gui/eject.c @@ -36,7 +36,7 @@ #include #include -#if defined( WIN32 ) +#if defined( _WIN32 ) # include #elif defined(__linux__) # include @@ -123,7 +123,7 @@ static int intf_Eject( vlc_object_t *p_this, const char *psz_device ) { VLC_UNUSED(p_this); -#if defined(WIN32) +#if defined(_WIN32) MCI_OPEN_PARMS op; DWORD i_flags; TCHAR psz_drive[4]; diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp index 2e9fcb9f4b..0acf518295 100644 --- a/modules/gui/qt4/components/open_panels.cpp +++ b/modules/gui/qt4/components/open_panels.cpp @@ -38,7 +38,7 @@ #include #include #include -#ifdef WIN32 +#ifdef _WIN32 #include /* FromWide for Win32 */ #endif @@ -338,7 +338,7 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ui.deviceCombo->setToolTip( qtr(I_DEVICE_TOOLTIP) ); ui.deviceCombo->setInsertPolicy( QComboBox::InsertAtTop ); -#if !defined( WIN32 ) && !defined( __OS2__ ) +#if !defined( _WIN32 ) && !defined( __OS2__ ) char const * const ppsz_discdevices[] = { "sr*", "sg*", @@ -374,7 +374,7 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : updateButtons(); } -#ifdef WIN32 /* Disc drives probing for Windows */ +#ifdef _WIN32 /* Disc drives probing for Windows */ void DiscOpenPanel::onFocus() { ui.deviceCombo->clear(); @@ -470,7 +470,7 @@ void DiscOpenPanel::clear() m_discType = None; } -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) #define setDrive( psz_name ) {\ int index = ui.deviceCombo->findText( qfu( psz_name ) ); \ if( index != -1 ) ui.deviceCombo->setCurrentIndex( index );} @@ -766,7 +766,7 @@ void CaptureOpenPanel::initialize() #define CuMRL( widget, slot ) CONNECT( widget , slot , this, updateMRL() ); -#ifdef WIN32 +#ifdef _WIN32 /********************* * DirectShow Stuffs * *********************/ @@ -803,7 +803,7 @@ void CaptureOpenPanel::initialize() CuMRL( dshowVSizeLine, textChanged( const QString& ) ); configList << "dshow-vdev" << "dshow-adev" << "dshow-size"; } -#else /* WIN32 */ +#else /* _WIN32 */ /******* * V4L2* *******/ @@ -1026,7 +1026,7 @@ void CaptureOpenPanel::initialize() << "dvb-bandwidth"; } -#ifndef WIN32 +#ifndef _WIN32 /************ * PVR * ************/ @@ -1143,7 +1143,7 @@ void CaptureOpenPanel::updateMRL() ui.deviceCombo->currentIndex() ).toInt(); switch( i_devicetype ) { -#ifdef WIN32 +#ifdef _WIN32 case DSHOW_DEVICE: fileList << "dshow://"; mrl+= " :dshow-vdev=" + diff --git a/modules/gui/qt4/components/open_panels.hpp b/modules/gui/qt4/components/open_panels.hpp index 218c875e35..48eeb6e534 100644 --- a/modules/gui/qt4/components/open_panels.hpp +++ b/modules/gui/qt4/components/open_panels.hpp @@ -174,7 +174,7 @@ public: virtual ~DiscOpenPanel(); virtual void clear() ; virtual void accept() ; -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) virtual void onFocus(); #endif private: @@ -204,7 +204,7 @@ private: QString advMRL; QStringList configList; QDialog *adv; -#ifdef WIN32 +#ifdef _WIN32 StringListConfigControl *vdevDshowW, *adevDshowW; QLineEdit *dshowVSizeLine; #else diff --git a/modules/gui/qt4/components/preferences_widgets.cpp b/modules/gui/qt4/components/preferences_widgets.cpp index bf4e3a9512..1bf57c25ff 100644 --- a/modules/gui/qt4/components/preferences_widgets.cpp +++ b/modules/gui/qt4/components/preferences_widgets.cpp @@ -687,7 +687,7 @@ void ModuleListConfigControl::finish( bool bycat ) { checkbox_lists( "Web", "Lua HTTP", "http" ); checkbox_lists( "Telnet", "Lua Telnet", "telnet" ); -#ifndef WIN32 +#ifndef _WIN32 checkbox_lists( "Console", "Lua CLI", "cli" ); #endif } diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp index 47170c857d..c1ff6ed012 100644 --- a/modules/gui/qt4/components/simple_preferences.cpp +++ b/modules/gui/qt4/components/simple_preferences.cpp @@ -48,7 +48,7 @@ #define ICON_HEIGHT 64 -#ifdef WIN32 +#ifdef _WIN32 # include #endif #include @@ -228,7 +228,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, CONFIG_BOOL( "video-deco", windowDecorations ); CONFIG_GENERIC( "vout", StringList, ui.voutLabel, outputModule ); -#ifdef WIN32 +#ifdef _WIN32 CONFIG_GENERIC( "directx-device", StringList, ui.dxDeviceLabel, dXdisplayDevice ); CONFIG_BOOL( "directx-hw-yuv", hwYUVBox ); @@ -290,7 +290,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, /* Build if necessary */ QGridLayout * outputAudioLayout = qobject_cast(ui.outputAudioBox->layout()); -#ifdef WIN32 +#ifdef _WIN32 audioControl( DirectX ); optionWidgets["directxL" ] = DirectXLabel; optionWidgets["directxW" ] = DirectXDevice; @@ -442,7 +442,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, free( psz_dvddiscpath ); free( psz_vcddiscpath ); } -#ifndef WIN32 +#ifndef _WIN32 QStringList DVDDeviceComboBoxStringList = QStringList(); DVDDeviceComboBoxStringList << "dvd*" << "scd*" << "sr*" << "sg*" << "cd*"; @@ -471,7 +471,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ui.live555TransportLabel->hide(); } CONFIG_GENERIC( "avcodec-hw", StringList, ui.hwAccelLabel, hwAccelModule ); -#ifdef WIN32 +#ifdef _WIN32 HINSTANCE hdxva2_dll = LoadLibrary(TEXT("DXVA2.DLL") ); if( !hdxva2_dll ) ui.hwAccelModule->setEnabled( false ); @@ -526,7 +526,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, + qtr( "VLC skins website" )+ QString( "." ) ); ui.skinsLabel->setFont( italicFont ); -#ifdef WIN32 +#ifdef _WIN32 BUTTONACT( ui.assoButton, assoDialog() ); #else ui.assoButton->hide(); @@ -552,7 +552,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, optionWidgets["skinRB"] = ui.skins; optionWidgets["qtRB"] = ui.qt; -#if !defined( WIN32) +#if !defined( _WIN32) ui.stylesCombo->addItem( qtr("System's default") ); ui.stylesCombo->addItems( QStyleFactory::keys() ); ui.stylesCombo->setCurrentIndex( ui.stylesCombo->findText( @@ -615,7 +615,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ui.updatesDays->hide(); #endif /* ONE INSTANCE options */ -#if !defined( WIN32 ) && !defined(__APPLE__) && !defined(__OS2__) +#if !defined( _WIN32 ) && !defined(__APPLE__) && !defined(__OS2__) if( !module_exists( "dbus" ) ) ui.OneInterfaceBox->hide(); else @@ -704,7 +704,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, control->insertIntoExistingGrid( gLayout, line ); controls.append( control ); -#ifdef WIN32 +#ifdef _WIN32 line++; p_config = config_FindConfig( VLC_OBJECT(p_intf), "qt-disable-volume-keys" ); @@ -750,7 +750,7 @@ void SPrefsPanel::updateAudioOptions( int number) { QString value = qobject_cast(optionWidgets["audioOutCoB"]) ->itemData( number ).toString(); -#ifdef WIN32 +#ifdef _WIN32 optionWidgets["directxW"]->setVisible( ( value == "directsound" ) ); optionWidgets["directxL"]->setVisible( ( value == "directsound" ) ); #elif defined( __OS2__ ) @@ -917,7 +917,7 @@ void SPrefsPanel::configML() #endif } -#ifdef WIN32 +#ifdef _WIN32 #include #include "util/registry.hpp" @@ -1115,5 +1115,5 @@ void SPrefsPanel::saveAsso() delete qvReg; } -#endif /* WIN32 */ +#endif /* _WIN32 */ diff --git a/modules/gui/qt4/components/simple_preferences.hpp b/modules/gui/qt4/components/simple_preferences.hpp index d17249bc76..d6b19a7083 100644 --- a/modules/gui/qt4/components/simple_preferences.hpp +++ b/modules/gui/qt4/components/simple_preferences.hpp @@ -37,7 +37,7 @@ #include "ui/sprefs_subtitles.h" #include "ui/sprefs_interface.h" -#ifdef WIN32 +#ifdef _WIN32 # include "util/registry.hpp" #endif @@ -70,7 +70,7 @@ class QRadioButton; class QCheckBox; class QString; -#ifdef WIN32 +#ifdef _WIN32 class QTreeWidgetItem; #endif @@ -107,7 +107,7 @@ private: QStringList qs_filter; QButtonGroup *radioGroup; -#ifdef WIN32 +#ifdef _WIN32 QList listAsso; bool addType( const char * psz_ext, QTreeWidgetItem*, QTreeWidgetItem*, QVLCRegistry* ); #endif @@ -117,7 +117,7 @@ private slots: void lastfm_Changed( int ); void updateAudioOptions( int ); void updateAudioVolume( int ); -#ifdef WIN32 +#ifdef _WIN32 void assoDialog(); void saveAsso(); #endif diff --git a/modules/gui/qt4/components/sout/profile_selector.cpp b/modules/gui/qt4/components/sout/profile_selector.cpp index 4b79d61d64..5f5756decc 100644 --- a/modules/gui/qt4/components/sout/profile_selector.cpp +++ b/modules/gui/qt4/components/sout/profile_selector.cpp @@ -83,7 +83,7 @@ VLCProfileSelector::VLCProfileSelector( QWidget *_parent ): QWidget( _parent ) inline void VLCProfileSelector::fillProfilesCombo() { QSettings settings( -#ifdef WIN32 +#ifdef _WIN32 QSettings::IniFormat, #else QSettings::NativeFormat, @@ -159,7 +159,7 @@ void VLCProfileSelector::deleteProfile() void VLCProfileSelector::saveProfiles() { QSettings settings( -#ifdef WIN32 +#ifdef _WIN32 QSettings::IniFormat, #else QSettings::NativeFormat, diff --git a/modules/gui/qt4/dialogs/vlm.cpp b/modules/gui/qt4/dialogs/vlm.cpp index fbec457336..47e1b93c16 100644 --- a/modules/gui/qt4/dialogs/vlm.cpp +++ b/modules/gui/qt4/dialogs/vlm.cpp @@ -94,7 +94,7 @@ VLMDialog::VLMDialog( intf_thread_t *_p_intf ) : QVLCDialog( (QWidget*)_p_intf-> date = new QDateTimeEdit( QDate::currentDate() ); date->setAlignment( Qt::AlignRight ); date->setCalendarPopup( true ); -#ifdef WIN32 +#ifdef _WIN32 date->setDisplayFormat( "dd MM yyyy" ); #else date->setDisplayFormat( "dd MMMM yyyy" ); diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp index ad9165305b..3799383155 100644 --- a/modules/gui/qt4/main_interface.cpp +++ b/modules/gui/qt4/main_interface.cpp @@ -134,7 +134,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) /* Set the other interface settings */ settings = getSettings(); -#ifdef WIN32 +#ifdef _WIN32 /* Volume keys */ p_intf->p_sys->disable_volume_keys = var_InheritBool( p_intf, "qt-disable-volume-keys" ); #endif @@ -168,7 +168,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ********************/ MainInputManager::getInstance( p_intf ); -#ifdef WIN32 +#ifdef _WIN32 himl = NULL; p_taskbl = NULL; taskbar_wmsg = RegisterWindowMessage(TEXT("TaskbarButtonCreated")); @@ -269,7 +269,7 @@ MainInterface::~MainInterface() if( videoWidget ) releaseVideoSlot(); -#ifdef WIN32 +#ifdef _WIN32 if( himl ) ImageList_Destroy( himl ); if(p_taskbl) @@ -355,7 +355,7 @@ void MainInterface::reloadPrefs() { i_notificationSetting = var_InheritInteger( p_intf, "qt-notification" ); b_pauseOnMinimize = var_InheritBool( p_intf, "qt-pause-minimized" ); -#ifdef WIN32 +#ifdef _WIN32 p_intf->p_sys->disable_volume_keys = var_InheritBool( p_intf, "qt-disable-volume-keys" ); #endif if( !var_InheritBool( p_intf, "qt-fs-controller" ) && fullscreenControls ) @@ -1092,7 +1092,7 @@ void MainInterface::toggleUpdateSystrayMenu() else { /* Visible (possibly under other windows) */ -#ifdef WIN32 +#ifdef _WIN32 /* check if any visible window is above vlc in the z-order, * but ignore the ones always on top * and the ones which can't be activated */ diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp index 4c5b1fd5ec..bb413fcb08 100644 --- a/modules/gui/qt4/main_interface.hpp +++ b/modules/gui/qt4/main_interface.hpp @@ -29,7 +29,7 @@ #include "util/qvlcframe.hpp" -#ifdef WIN32 +#ifdef _WIN32 #include #endif @@ -93,7 +93,7 @@ public: protected: void dropEventPlay( QDropEvent* event, bool b_play ) { dropEventPlay(event, b_play, true); } void dropEventPlay( QDropEvent *, bool, bool ); -#ifdef WIN32 +#ifdef _WIN32 virtual bool winEvent( MSG *, long * ); #endif virtual void changeEvent( QEvent * ); @@ -174,7 +174,7 @@ private: bool b_hasPausedWhenMinimized; bool b_statusbarVisible; -#ifdef WIN32 +#ifdef _WIN32 HIMAGELIST himl; ITaskbarList3 *p_taskbl; UINT taskbar_wmsg; @@ -199,7 +199,7 @@ public slots: void setPlaylistVisibility(bool b_visible); void popupMenu( const QPoint& ); -#ifdef WIN32 +#ifdef _WIN32 void changeThumbbarButtons( int ); #endif diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp index c8a545d89e..00283d752d 100644 --- a/modules/gui/qt4/qt4.cpp +++ b/modules/gui/qt4/qt4.cpp @@ -50,7 +50,7 @@ #include #include -#ifdef WIN32 /* For static builds */ +#ifdef _WIN32 /* For static builds */ #include Q_IMPORT_PLUGIN(qjpeg) Q_IMPORT_PLUGIN(qtaccessiblewidgets) @@ -235,7 +235,7 @@ vlc_module_begin () UPDATER_DAYS_TEXT, UPDATER_DAYS_TEXT, false ) #endif -#ifdef WIN32 +#ifdef _WIN32 add_bool( "qt-disable-volume-keys" /* name */, true /* default value */, QT_DISABLE_VOLUME_KEYS_TEXT /* text */, @@ -294,7 +294,7 @@ vlc_module_begin () set_capability( "vout window xid", 0 ) set_callbacks( WindowOpen, WindowClose ) #endif -#if defined (Q_WS_WIN) || (defined (Q_WS_QPA) && defined (WIN32)) \ +#if defined (Q_WS_WIN) || (defined (Q_WS_QPA) && defined (_WIN32)) \ || defined (Q_WS_PM) || (defined (Q_WS_QPA) && defined (__OS2__)) add_submodule () set_capability( "vout window hwnd", 0 ) @@ -459,7 +459,7 @@ static void *Thread( void *obj ) /* All the settings are in the .conf/.ini style */ p_intf->p_sys->mainSettings = new QSettings( -#ifdef WIN32 +#ifdef _WIN32 QSettings::IniFormat, #else QSettings::NativeFormat, diff --git a/modules/gui/qt4/qt4.hpp b/modules/gui/qt4/qt4.hpp index aeb95656cf..a07e0839a6 100644 --- a/modules/gui/qt4/qt4.hpp +++ b/modules/gui/qt4/qt4.hpp @@ -78,7 +78,7 @@ struct intf_sys_t int i_screenHeight; /* Detection of Small screens */ unsigned voutWindowType; /* Type of vout_window_t provided */ bool b_isDialogProvider; /* Qt mode or Skins mode */ -#ifdef WIN32 +#ifdef _WIN32 bool disable_volume_keys; #endif }; diff --git a/modules/gui/qt4/recents.cpp b/modules/gui/qt4/recents.cpp index e79299504d..75839e8063 100755 --- a/modules/gui/qt4/recents.cpp +++ b/modules/gui/qt4/recents.cpp @@ -32,7 +32,7 @@ #include #include -#ifdef WIN32 +#ifdef _WIN32 #include /* typedef enum { SHARD_PIDL = 0x00000001, @@ -88,7 +88,7 @@ void RecentsMRL::addRecent( const QString &mrl ) msg_Dbg( p_intf, "Adding a new MRL to recent ones: %s", qtu( mrl ) ); -#ifdef WIN32 +#ifdef _WIN32 /* Add to the Windows 7 default list in taskbar */ char* path = make_path( qtu( mrl ) ); if( path ) diff --git a/modules/gui/qt4/util/registry.cpp b/modules/gui/qt4/util/registry.cpp index b3d05beafc..38166a42bd 100644 --- a/modules/gui/qt4/util/registry.cpp +++ b/modules/gui/qt4/util/registry.cpp @@ -25,7 +25,7 @@ # include "config.h" #endif -#ifdef WIN32 +#ifdef _WIN32 #include #include "registry.hpp" @@ -213,4 +213,4 @@ long QVLCRegistry::DeleteKey( const char *path, const char *keyName ) return result; } -#endif /* WIN32 */ +#endif /* _WIN32 */ diff --git a/modules/gui/skins2/parser/builder.cpp b/modules/gui/skins2/parser/builder.cpp index 260befaeeb..06196f9c35 100644 --- a/modules/gui/skins2/parser/builder.cpp +++ b/modules/gui/skins2/parser/builder.cpp @@ -1251,7 +1251,7 @@ string Builder::getFilePath( const string &rFileName ) const file[pos] = '/'; } -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) string::size_type pos; while( ( pos = file.find( "/" ) ) != string::npos ) file.replace( pos, 1, sep ); diff --git a/modules/gui/skins2/src/skin_common.hpp b/modules/gui/skins2/src/skin_common.hpp index 70cc385bf4..8b880bb1f5 100644 --- a/modules/gui/skins2/src/skin_common.hpp +++ b/modules/gui/skins2/src/skin_common.hpp @@ -76,7 +76,7 @@ static inline string sFromLocale( const string &rLocale ) return res; } -#ifdef WIN32 +#ifdef _WIN32 /// Wrapper around FromWide, to avoid the need to call free() static inline string sFromWide( const wstring &rWide ) { diff --git a/modules/gui/skins2/src/skin_main.cpp b/modules/gui/skins2/src/skin_main.cpp index 52200b1667..caecdff887 100644 --- a/modules/gui/skins2/src/skin_main.cpp +++ b/modules/gui/skins2/src/skin_main.cpp @@ -491,7 +491,7 @@ vlc_module_begin () add_string( "skins2-config", "", SKINS2_CONFIG, SKINS2_CONFIG_LONG, true ) change_private () -#ifdef WIN32 +#ifdef _WIN32 add_bool( "skins2-systray", true, SKINS2_SYSTRAY, SKINS2_SYSTRAY_LONG, false ); add_bool( "skins2-taskbar", true, SKINS2_TASKBAR, @@ -511,7 +511,7 @@ vlc_module_begin () add_shortcut( "skins" ) add_submodule () -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) set_capability( "vout window hwnd", 51 ) #else set_capability( "vout window xid", 51 ) diff --git a/modules/gui/skins2/src/theme_repository.cpp b/modules/gui/skins2/src/theme_repository.cpp index 2f2a640566..7f7dfe6467 100644 --- a/modules/gui/skins2/src/theme_repository.cpp +++ b/modules/gui/skins2/src/theme_repository.cpp @@ -27,7 +27,7 @@ #include "../commands/cmd_dialogs.hpp" #ifdef HAVE_UNISTD_H # include -#elif defined( WIN32 ) +#elif defined( _WIN32 ) # include #endif diff --git a/modules/gui/skins2/src/vout_manager.hpp b/modules/gui/skins2/src/vout_manager.hpp index 615c945c3e..6d01ca0a3b 100644 --- a/modules/gui/skins2/src/vout_manager.hpp +++ b/modules/gui/skins2/src/vout_manager.hpp @@ -71,7 +71,7 @@ public: } virtual ~VoutMainWindow() { } -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) virtual void processEvent( EvtKey &rEvtKey ) { diff --git a/modules/gui/skins2/utils/bezier.cpp b/modules/gui/skins2/utils/bezier.cpp index 089f520111..121cc53b1e 100644 --- a/modules/gui/skins2/utils/bezier.cpp +++ b/modules/gui/skins2/utils/bezier.cpp @@ -34,7 +34,7 @@ #ifndef HAVE_LRINTF # ifdef HAVE_LRINT # define lrintf( x ) (int)rint( x ) -# elif defined WIN32 +# elif defined _WIN32 __inline long int lrintf( float x ) { int i; diff --git a/modules/lua/extension.c b/modules/lua/extension.c index 9e91888531..79843960a9 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) && !VLC_WINSTORE_APP +#if defined(_WIN32) && !VLC_WINSTORE_APP luaopen_win( L ); #endif diff --git a/modules/lua/intf.c b/modules/lua/intf.c index 96db69f72b..2f8d91f6bf 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) && !VLC_WINSTORE_APP +#if defined(_WIN32) && !VLC_WINSTORE_APP luaopen_win( L ); #endif diff --git a/modules/lua/libs.h b/modules/lua/libs.h index 608e124886..a86a7a019d 100644 --- a/modules/lua/libs.h +++ b/modules/lua/libs.h @@ -45,7 +45,7 @@ void luaopen_gettext( lua_State * ); void luaopen_input_item( lua_State *L, input_item_t *item ); void luaopen_xml( lua_State *L ); void luaopen_equalizer( lua_State *L ); -#ifdef WIN32 +#ifdef _WIN32 void luaopen_win( lua_State *L ); #endif diff --git a/modules/lua/libs/equalizer.c b/modules/lua/libs/equalizer.c index d64b17da45..e2e8aa3612 100644 --- a/modules/lua/libs/equalizer.c +++ b/modules/lua/libs/equalizer.c @@ -43,7 +43,7 @@ #include "playlist.h" #include "../../audio_filter/equalizer_presets.h" -#if !defined WIN32 +#if !defined _WIN32 # include #else # include diff --git a/modules/lua/libs/net.c b/modules/lua/libs/net.c index ea6124598c..4c3ee72431 100644 --- a/modules/lua/libs/net.c +++ b/modules/lua/libs/net.c @@ -29,7 +29,7 @@ #endif #include -#ifdef WIN32 +#ifdef _WIN32 #include #endif #ifdef HAVE_POLL diff --git a/modules/lua/vlc.c b/modules/lua/vlc.c index 1da88ced8c..a4b590bea6 100644 --- a/modules/lua/vlc.c +++ b/modules/lua/vlc.c @@ -109,7 +109,7 @@ vlc_module_begin () set_capability( "interface", 25 ) set_description( N_("Command-line interface") ) set_callbacks( Open_LuaCLI, Close_LuaIntf ) -#ifndef WIN32 +#ifndef _WIN32 add_shortcut( "luacli", "luarc", "cli", "rc" ) #else add_shortcut( "luacli", "luarc" ) @@ -215,7 +215,7 @@ int vlclua_dir_list( const char *luadirname, char ***pppsz_dir_list ) i++; free( datadir ); -#if !(defined(__APPLE__) || defined(WIN32) || defined(__OS2__)) +#if !(defined(__APPLE__) || defined(_WIN32) || defined(__OS2__)) char *psz_libpath = config_GetLibDir(); if( likely(psz_libpath != NULL) ) { diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp index 8867514d2e..62c30dd2f9 100644 --- a/modules/meta_engine/taglib.cpp +++ b/modules/meta_engine/taglib.cpp @@ -38,7 +38,7 @@ #include -#ifdef WIN32 +#ifdef _WIN32 # include # include #else @@ -47,7 +47,7 @@ // Taglib headers -#ifdef WIN32 +#ifdef _WIN32 # define TAGLIB_STATIC #endif #include @@ -542,7 +542,7 @@ static int ReadMeta( vlc_object_t* p_this) if( !psz_path ) return VLC_ENOMEM; -#if defined(WIN32) +#if defined(_WIN32) wchar_t *wpath = ToWide( psz_path ); if( wpath == NULL ) { @@ -863,7 +863,7 @@ static int WriteMeta( vlc_object_t *p_this ) return VLC_EGENERIC; } -#if defined(WIN32) +#if defined(_WIN32) wchar_t *wpath = ToWide( p_export->psz_file ); if( wpath == NULL ) return VLC_EGENERIC; diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c index b3227c48be..4a6056abe1 100644 --- a/modules/misc/gnutls.c +++ b/modules/misc/gnutls.c @@ -139,7 +139,7 @@ static int gnutls_Error (vlc_object_t *obj, int val) switch (val) { case GNUTLS_E_AGAIN: -#ifdef WIN32 +#ifdef _WIN32 WSASetLastError (WSAEWOULDBLOCK); #else errno = EAGAIN; @@ -147,7 +147,7 @@ static int gnutls_Error (vlc_object_t *obj, int val) break; case GNUTLS_E_INTERRUPTED: -#ifdef WIN32 +#ifdef _WIN32 WSASetLastError (WSAEINTR); #else errno = EINTR; @@ -160,7 +160,7 @@ static int gnutls_Error (vlc_object_t *obj, int val) if (!gnutls_error_is_fatal (val)) msg_Err (obj, "Error above should be handled"); #endif -#ifdef WIN32 +#ifdef _WIN32 WSASetLastError (WSAECONNRESET); #else errno = ECONNRESET; @@ -216,7 +216,7 @@ static int gnutls_ContinueHandshake (vlc_tls_t *session, const char *host, vlc_tls_sys_t *sys = session->sys; int val; -#ifdef WIN32 +#ifdef _WIN32 WSASetLastError (0); #endif do @@ -232,7 +232,7 @@ static int gnutls_ContinueHandshake (vlc_tls_t *session, const char *host, if (val < 0) { -#ifdef WIN32 +#ifdef _WIN32 msg_Dbg (session, "Winsock error %d", WSAGetLastError ()); #endif msg_Err (session, "TLS handshake error: %s", gnutls_strerror (val)); diff --git a/modules/misc/rtsp.c b/modules/misc/rtsp.c index 061ca154a0..333d449d8d 100644 --- a/modules/misc/rtsp.c +++ b/modules/misc/rtsp.c @@ -44,7 +44,7 @@ #include #include -#ifndef WIN32 +#ifndef _WIN32 # include #endif diff --git a/modules/misc/xml/libxml.c b/modules/misc/xml/libxml.c index 8570950bd8..b9834a7577 100644 --- a/modules/misc/xml/libxml.c +++ b/modules/misc/xml/libxml.c @@ -50,7 +50,7 @@ vlc_module_begin () set_capability( "xml", 10 ) set_callbacks( Open, Close ) -#ifdef WIN32 +#ifdef _WIN32 cannot_unload_broken_library() #endif diff --git a/modules/services_discovery/sap.c b/modules/services_discovery/sap.c index faf5b229a1..07003240c8 100644 --- a/modules/services_discovery/sap.c +++ b/modules/services_discovery/sap.c @@ -54,7 +54,7 @@ # include #endif -#ifndef WIN32 +#ifndef _WIN32 # include #endif @@ -473,7 +473,7 @@ static void *Run( void *data ) InitSocket( p_sd, SAP_V4_LINK_ADDRESS, SAP_PORT ); char psz_address[NI_MAXNUMERICHOST] = "ff02::2:7ffe%"; -#ifndef WIN32 +#ifndef _WIN32 struct if_nameindex *l = if_nameindex (); if (l != NULL) { diff --git a/modules/stream_out/chromaprint.c b/modules/stream_out/chromaprint.c index 0b47951a5a..197e4cd8ec 100644 --- a/modules/stream_out/chromaprint.c +++ b/modules/stream_out/chromaprint.c @@ -34,7 +34,7 @@ #include -#ifdef WIN32 +#ifdef _WIN32 # define CHROMAPRINT_NODLL #endif diff --git a/modules/stream_out/rtcp.c b/modules/stream_out/rtcp.c index fdd04c9763..46289db5a8 100644 --- a/modules/stream_out/rtcp.c +++ b/modules/stream_out/rtcp.c @@ -82,7 +82,7 @@ rtcp_sender_t *OpenRTCP (vlc_object_t *obj, int rtp_fd, int proto, if (mux) { /* RTP/RTCP mux: duplicate the socket */ -#ifndef WIN32 +#ifndef _WIN32 fd = vlc_dup (rtp_fd); #else WSAPROTOCOL_INFO info; diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c index 25ac644a12..62c89b7baf 100644 --- a/modules/stream_out/rtp.c +++ b/modules/stream_out/rtp.c @@ -1396,7 +1396,7 @@ static int HttpCallback( httpd_file_sys_t *p_args, ****************************************************************************/ static void* ThreadSend( void *data ) { -#ifdef WIN32 +#ifdef _WIN32 # define ENOBUFS WSAENOBUFS # define EAGAIN WSAEWOULDBLOCK # define EWOULDBLOCK WSAEWOULDBLOCK diff --git a/modules/stream_out/rtsp.c b/modules/stream_out/rtsp.c index cece5bc85e..da781594c5 100644 --- a/modules/stream_out/rtsp.c +++ b/modules/stream_out/rtsp.c @@ -45,7 +45,7 @@ #include #include -#ifndef WIN32 +#ifndef _WIN32 # include #endif #ifdef HAVE_XLOCALE_H @@ -422,7 +422,7 @@ static void RtspClientAlive( rtsp_session_t *session ) static int dup_socket(int oldfd) { int newfd; -#ifndef WIN32 +#ifndef _WIN32 newfd = vlc_dup(oldfd); #else WSAPROTOCOL_INFO info; diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c index 5d7ca655a8..ad27b6ef42 100644 --- a/modules/text_renderer/freetype.c +++ b/modules/text_renderer/freetype.c @@ -51,7 +51,7 @@ # define SYSTEM_DEFAULT_FAMILY "Arial Unicode MS" # define SYSTEM_DEFAULT_MONOSPACE_FONT_FILE "/System/Library/Fonts/Monaco.dfont" # define SYSTEM_DEFAULT_MONOSPACE_FAMILY "Monaco" -#elif defined( WIN32 ) +#elif defined( _WIN32 ) # define SYSTEM_DEFAULT_FONT_FILE "arial.ttf" /* Default path font found at run-time */ # define SYSTEM_DEFAULT_FAMILY "Arial" # define SYSTEM_DEFAULT_MONOSPACE_FONT_FILE "cour.ttf" @@ -118,7 +118,7 @@ #endif /* Win32 GDI */ -#ifdef WIN32 +#ifdef _WIN32 # include # include # define HAVE_STYLES @@ -361,7 +361,7 @@ struct filter_sys_t char* psz_fontfamily; char* psz_monofontfamily; xml_reader_t *p_xml; -#ifdef WIN32 +#ifdef _WIN32 char* psz_win_fonts_path; #endif @@ -490,7 +490,7 @@ static void FontConfig_BuildCache( filter_t *p_filter ) FcInit(); #endif -#if defined( WIN32 ) || defined( __APPLE__ ) +#if defined( _WIN32 ) || defined( __APPLE__ ) dialog_progress_bar_t *p_dialog = NULL; FcConfig *fcConfig = FcInitLoadConfig(); @@ -598,7 +598,7 @@ static char* FontConfig_Select( FcConfig* config, const char* family, } #endif -#ifdef WIN32 +#ifdef _WIN32 #define FONT_DIR_NT _T("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts") static int GetFileFontByName( LPCTSTR font_name, char **psz_filename ) @@ -725,7 +725,7 @@ fail: return psz_tmp; } } -#endif /* HAVE_WIN32 */ +#endif /* _WIN32 */ #ifdef __APPLE__ #if !TARGET_OS_IPHONE @@ -1989,7 +1989,7 @@ static FT_Face LoadFace( filter_t *p_filter, #if !TARGET_OS_IPHONE psz_fontfile = MacLegacy_Select( p_filter, p_style->psz_fontname, false, false, -1, &i_idx ); #endif -#elif defined( WIN32 ) +#elif defined( _WIN32 ) psz_fontfile = Win32_Select( p_filter, p_style->psz_fontname, (p_style->i_style_flags & STYLE_BOLD) != 0, @@ -2843,7 +2843,7 @@ static int Create( vlc_object_t *p_this ) p_sys->f_shadow_vector_x = f_shadow_distance * cos(2 * M_PI * f_shadow_angle / 360); p_sys->f_shadow_vector_y = f_shadow_distance * sin(2 * M_PI * f_shadow_angle / 360); -#ifdef WIN32 +#ifdef _WIN32 /* Get Windows Font folder */ wchar_t wdir[MAX_PATH]; if( S_OK != SHGetFolderPathW( NULL, CSIDL_FONTS, NULL, SHGFP_TYPE_CURRENT, wdir ) ) @@ -2861,7 +2861,7 @@ static int Create( vlc_object_t *p_this ) #ifdef HAVE_STYLES psz_fontfamily = strdup( DEFAULT_FAMILY ); #else -# ifdef WIN32 +# ifdef _WIN32 if( asprintf( &psz_fontfamily, "%s"DEFAULT_FONT_FILE, p_sys->psz_win_fonts_path ) == -1 ) goto error; # else @@ -2887,7 +2887,7 @@ static int Create( vlc_object_t *p_this ) #if !TARGET_OS_IPHONE psz_fontfile = MacLegacy_Select( p_filter, psz_fontfamily, false, false, 0, &fontindex ); #endif -#elif defined(WIN32) +#elif defined(_WIN32) psz_fontfile = Win32_Select( p_filter, psz_fontfamily, false, false, p_sys->i_default_font_size, &fontindex ); @@ -2997,7 +2997,7 @@ static void Destroy( vlc_object_t *p_this ) if( p_sys->p_xml ) xml_ReaderDelete( p_sys->p_xml ); free( p_sys->psz_fontfamily ); -#ifdef WIN32 +#ifdef _WIN32 free( p_sys->psz_win_fonts_path ); #endif diff --git a/modules/text_renderer/svg.c b/modules/text_renderer/svg.c index cdb57b47a2..c30223fd8e 100644 --- a/modules/text_renderer/svg.c +++ b/modules/text_renderer/svg.c @@ -38,7 +38,7 @@ #ifdef HAVE_UNISTD_H # include -#elif defined( WIN32 ) +#elif defined( _WIN32 ) # include #endif diff --git a/modules/video_filter/atmo/AtmoCalculations.cpp b/modules/video_filter/atmo/AtmoCalculations.cpp index 604fa08b9b..9829f952f0 100644 --- a/modules/video_filter/atmo/AtmoCalculations.cpp +++ b/modules/video_filter/atmo/AtmoCalculations.cpp @@ -16,7 +16,7 @@ #include "AtmoDefs.h" -#if defined(WIN32) +#if defined(_WIN32) # include #endif diff --git a/modules/video_filter/atmo/AtmoClassicConnection.cpp b/modules/video_filter/atmo/AtmoClassicConnection.cpp index eb34582ab2..486a0c2c26 100644 --- a/modules/video_filter/atmo/AtmoClassicConnection.cpp +++ b/modules/video_filter/atmo/AtmoClassicConnection.cpp @@ -21,7 +21,7 @@ #include #include -#if !defined(WIN32) +#if !defined(_WIN32) #include #include #endif @@ -52,7 +52,7 @@ ATMO_BOOL CAtmoClassicConnection::OpenConnection() { sprintf(serdevice,"com%d",portNummer); #endif -#if defined(WIN32) +#if defined(_WIN32) m_hComport = CreateFileA(serdevice, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); if(m_hComport == INVALID_HANDLE_VALUE) { @@ -100,7 +100,7 @@ ATMO_BOOL CAtmoClassicConnection::OpenConnection() { void CAtmoClassicConnection::CloseConnection() { if(m_hComport!=INVALID_HANDLE_VALUE) { -#if defined(WIN32) +#if defined(_WIN32) CloseHandle(m_hComport); #else close(m_hComport); @@ -170,7 +170,7 @@ ATMO_BOOL CAtmoClassicConnection::HardwareWhiteAdjust(int global_gamma, else sendBuffer[12] = 0; -#if defined(WIN32) +#if defined(_WIN32) WriteFile(m_hComport, sendBuffer, 13, &iBytesWritten, NULL); // send to COM-Port #else iBytesWritten = write(m_hComport, sendBuffer, 13); @@ -213,7 +213,7 @@ ATMO_BOOL CAtmoClassicConnection::SendData(pColorPacket data) { } } -#if defined(WIN32) +#if defined(_WIN32) WriteFile(m_hComport, buffer, 19, &iBytesWritten, NULL); // send to COM-Port #else iBytesWritten = write(m_hComport, buffer, 19); diff --git a/modules/video_filter/atmo/AtmoClassicConnection.h b/modules/video_filter/atmo/AtmoClassicConnection.h index 9b684e1be7..2b37900e28 100644 --- a/modules/video_filter/atmo/AtmoClassicConnection.h +++ b/modules/video_filter/atmo/AtmoClassicConnection.h @@ -13,7 +13,7 @@ #include "AtmoConnection.h" #include "AtmoConfig.h" -#if defined(WIN32) +#if defined(_WIN32) # include #endif @@ -22,7 +22,7 @@ class CAtmoClassicConnection : public CAtmoConnection { private: HANDLE m_hComport; -#if defined(WIN32) +#if defined(_WIN32) DWORD m_dwLastWin32Error; public: DWORD getLastError() { return m_dwLastWin32Error; } diff --git a/modules/video_filter/atmo/AtmoDefs.h b/modules/video_filter/atmo/AtmoDefs.h index 06c16c9b76..9c39a3bddd 100644 --- a/modules/video_filter/atmo/AtmoDefs.h +++ b/modules/video_filter/atmo/AtmoDefs.h @@ -52,7 +52,7 @@ #define ATMO_MAX(X, Y) ((X) > (Y) ? (X) : (Y)) -#if !defined(WIN32) +#if !defined(_WIN32) #define INVALID_HANDLE_VALUE -1 typedef int HANDLE; diff --git a/modules/video_filter/atmo/AtmoDmxSerialConnection.cpp b/modules/video_filter/atmo/AtmoDmxSerialConnection.cpp index b1bbb77475..41581f481f 100644 --- a/modules/video_filter/atmo/AtmoDmxSerialConnection.cpp +++ b/modules/video_filter/atmo/AtmoDmxSerialConnection.cpp @@ -24,7 +24,7 @@ #include #include -#if !defined(WIN32) +#if !defined(_WIN32) #include #include #endif @@ -67,7 +67,7 @@ ATMO_BOOL CAtmoDmxSerialConnection::OpenConnection() { sprintf(serdevice,"com%d",portNummer); #endif -#if defined(WIN32) +#if defined(_WIN32) m_hComport = CreateFileA(serdevice, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); if(m_hComport == INVALID_HANDLE_VALUE) { @@ -115,7 +115,7 @@ ATMO_BOOL CAtmoDmxSerialConnection::OpenConnection() { void CAtmoDmxSerialConnection::CloseConnection() { if(m_hComport!=INVALID_HANDLE_VALUE) { -#if defined(WIN32) +#if defined(_WIN32) CloseHandle(m_hComport); #else close(m_hComport); @@ -160,7 +160,7 @@ ATMO_BOOL CAtmoDmxSerialConnection::SendData(pColorPacket data) { z++; } -#if defined(WIN32) +#if defined(_WIN32) WriteFile(m_hComport, DMXout, 259, &iBytesWritten, NULL); // send to COM-Port #else iBytesWritten = write(m_hComport, DMXout, 259); @@ -189,7 +189,7 @@ ATMO_BOOL CAtmoDmxSerialConnection::setChannelValues(int numValues,unsigned char dmxIndex = ((int)channel_values[i]) + 2; DMXout[dmxIndex] = channel_values[i+1]; } -#if defined(WIN32) +#if defined(_WIN32) WriteFile(m_hComport, DMXout, 259, &iBytesWritten, NULL); #else iBytesWritten = write(m_hComport, DMXout, 259); @@ -212,7 +212,7 @@ ATMO_BOOL CAtmoDmxSerialConnection::setChannelColor(int channel, tRGBColor color DMXout[channel+1+2]=color.g; DMXout[channel+2+2]=color.b; -#if defined(WIN32) +#if defined(_WIN32) WriteFile(m_hComport, DMXout, 259, &iBytesWritten, NULL); #else iBytesWritten = write(m_hComport, DMXout, 259); diff --git a/modules/video_filter/atmo/AtmoDmxSerialConnection.h b/modules/video_filter/atmo/AtmoDmxSerialConnection.h index 02103c01f8..1224fdf5e9 100644 --- a/modules/video_filter/atmo/AtmoDmxSerialConnection.h +++ b/modules/video_filter/atmo/AtmoDmxSerialConnection.h @@ -14,7 +14,7 @@ #include "AtmoConnection.h" #include "AtmoConfig.h" -#if defined(WIN32) +#if defined(_WIN32) # include #endif @@ -26,7 +26,7 @@ class CAtmoDmxSerialConnection : public CAtmoConnection { // contains the DMX Start Adress of each Atmo-Dmx-Channel int *m_dmx_channels_base; -#if defined(WIN32) +#if defined(_WIN32) DWORD m_dwLastWin32Error; public: DWORD getLastError() { return m_dwLastWin32Error; } diff --git a/modules/video_filter/atmo/AtmoExternalCaptureInput.h b/modules/video_filter/atmo/AtmoExternalCaptureInput.h index a229e9a4d9..765177f33a 100644 --- a/modules/video_filter/atmo/AtmoExternalCaptureInput.h +++ b/modules/video_filter/atmo/AtmoExternalCaptureInput.h @@ -3,7 +3,7 @@ #include "AtmoDefs.h" -#if defined(WIN32) +#if defined(_WIN32) # include # else # if defined(_ATMO_VLC_PLUGIN_) diff --git a/modules/video_filter/atmo/AtmoMultiConnection.cpp b/modules/video_filter/atmo/AtmoMultiConnection.cpp index 4da3bb3fe2..aac26265e3 100644 --- a/modules/video_filter/atmo/AtmoMultiConnection.cpp +++ b/modules/video_filter/atmo/AtmoMultiConnection.cpp @@ -21,7 +21,7 @@ #include #include -#if !defined(WIN32) +#if !defined(_WIN32) #include #include #endif @@ -49,7 +49,7 @@ HANDLE CAtmoMultiConnection::OpenDevice(char *devName) m_dwLastWin32Error = 0; #endif -#if defined(WIN32) +#if defined(_WIN32) hComport = CreateFileA(devName, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); if(hComport == INVALID_HANDLE_VALUE) { #if !defined(_ATMO_VLC_PLUGIN_) @@ -105,7 +105,7 @@ ATMO_BOOL CAtmoMultiConnection::OpenConnection() if(m_hComports[z] == INVALID_HANDLE_VALUE) { while(z) { z--; -#if defined(WIN32) +#if defined(_WIN32) CloseHandle( m_hComports[z] ); #else close( m_hComports[z] ); @@ -147,7 +147,7 @@ ATMO_BOOL CAtmoMultiConnection::OpenConnection() void CAtmoMultiConnection::CloseConnection() { for(int i = 0; i < 4; i++ ) { if(m_hComports[i] != INVALID_HANDLE_VALUE) { -#if defined(WIN32) +#if defined(_WIN32) CloseHandle( m_hComports[i] ); #else close( m_hComports[i] ); @@ -254,7 +254,7 @@ ATMO_BOOL CAtmoMultiConnection::internal_HardwareWhiteAdjust(HANDLE hComport, else sendBuffer[12] = 0; -#if defined(WIN32) +#if defined(_WIN32) WriteFile(hComport, sendBuffer, 13, &iBytesWritten, NULL); // send to COM-Port #else iBytesWritten = write(hComport, sendBuffer, 13); @@ -303,7 +303,7 @@ ATMO_BOOL CAtmoMultiConnection::internal_SendData(HANDLE hComport, unsigned char buffer[6] = 0; // Summe Blue memcpy(&buffer[7], colorData, 4 * 3); -#if defined(WIN32) +#if defined(_WIN32) WriteFile(hComport, buffer, 19, &iBytesWritten, NULL); // send to COM-Port #else iBytesWritten = write(hComport, buffer, 19); diff --git a/modules/video_filter/atmo/AtmoMultiConnection.h b/modules/video_filter/atmo/AtmoMultiConnection.h index 0ffd754fa9..dfbeaf3510 100644 --- a/modules/video_filter/atmo/AtmoMultiConnection.h +++ b/modules/video_filter/atmo/AtmoMultiConnection.h @@ -15,7 +15,7 @@ #include "AtmoConnection.h" #include "AtmoConfig.h" -#if defined(WIN32) +#if defined(_WIN32) # include #endif @@ -26,7 +26,7 @@ class CAtmoMultiConnection : public CAtmoConnection HANDLE m_hComports[4]; unsigned char m_output[4 * 4 * 3]; -#if defined(WIN32) +#if defined(_WIN32) DWORD m_dwLastWin32Error; public: DWORD getLastError() { return m_dwLastWin32Error; } diff --git a/modules/video_filter/atmo/AtmoZoneDefinition.cpp b/modules/video_filter/atmo/AtmoZoneDefinition.cpp index f5bfef3376..4cfb432151 100644 --- a/modules/video_filter/atmo/AtmoZoneDefinition.cpp +++ b/modules/video_filter/atmo/AtmoZoneDefinition.cpp @@ -5,7 +5,7 @@ #include "AtmoDefs.h" -#if defined (WIN32) +#if defined (_WIN32) # include #else # include diff --git a/modules/video_filter/atmo/FnordlichtConnection.cpp b/modules/video_filter/atmo/FnordlichtConnection.cpp index 8c670fcbde..799bdf2ba8 100644 --- a/modules/video_filter/atmo/FnordlichtConnection.cpp +++ b/modules/video_filter/atmo/FnordlichtConnection.cpp @@ -36,7 +36,7 @@ #include #include -#if !defined(WIN32) +#if !defined(_WIN32) #include #include #endif @@ -71,7 +71,7 @@ ATMO_BOOL CFnordlichtConnection::OpenConnection() sprintf(serdevice,"com%d",portNummer); #endif -#if defined(WIN32) +#if defined(_WIN32) m_hComport = CreateFileA(serdevice, GENERIC_WRITE, 0, NULL, @@ -132,7 +132,7 @@ void CFnordlichtConnection::CloseConnection() { reset(255); -#if defined(WIN32) +#if defined(_WIN32) CloseHandle(m_hComport); #else close(m_hComport); @@ -194,7 +194,7 @@ ATMO_BOOL CFnordlichtConnection::SendData(pColorPacket data) buffer[6] = data->zone[idx].b; } -#if defined(WIN32) +#if defined(_WIN32) // send to COM-Port WriteFile( m_hComport, buffer, sizeof(buffer), (DWORD*)&iBytesWritten, NULL ); @@ -260,7 +260,7 @@ ATMO_BOOL CFnordlichtConnection::sync(void) buffer[sizeof(buffer)-1] = 0x00; // append one zero byte -#if defined(WIN32) +#if defined(_WIN32) // send to COM-Port WriteFile( m_hComport, buffer, sizeof(buffer), (DWORD*)&iBytesWritten, NULL ); @@ -302,7 +302,7 @@ ATMO_BOOL CFnordlichtConnection::stop(unsigned char addr) buffer[1] = 0x08; // stop command buffer[2] = 1; // fading -#if defined(WIN32) +#if defined(_WIN32) // send to COM-Port WriteFile( m_hComport, buffer, sizeof(buffer), (DWORD*)&iBytesWritten, NULL ); @@ -367,7 +367,7 @@ ATMO_BOOL CFnordlichtConnection::start_bootloader(unsigned char addr) buffer[4] = 0x27; buffer[5] = 0xfc; -#if defined(WIN32) +#if defined(_WIN32) // send to COM-Port WriteFile( m_hComport, buffer, sizeof(buffer), (DWORD*)&iBytesWritten, NULL ); @@ -404,7 +404,7 @@ ATMO_BOOL CFnordlichtConnection::boot_enter_application(unsigned char addr) buffer[0] = addr; // fnordlicht address (255 = broadcast) buffer[1] = 0x87; // boot_ender_application command -#if defined(WIN32) +#if defined(_WIN32) // send to COM-Port WriteFile( m_hComport, buffer, sizeof(buffer), (DWORD*)&iBytesWritten, NULL ); diff --git a/modules/video_filter/atmo/FnordlichtConnection.h b/modules/video_filter/atmo/FnordlichtConnection.h index 152ad6b6f0..e3452e8efb 100644 --- a/modules/video_filter/atmo/FnordlichtConnection.h +++ b/modules/video_filter/atmo/FnordlichtConnection.h @@ -28,7 +28,7 @@ #include "AtmoConnection.h" #include "AtmoConfig.h" -#if defined(WIN32) +#if defined(_WIN32) # include #endif @@ -44,7 +44,7 @@ class CFnordlichtConnection : public CAtmoConnection ATMO_BOOL start_bootloader(unsigned char addr); ATMO_BOOL boot_enter_application(unsigned char addr); -#if defined(WIN32) +#if defined(_WIN32) DWORD m_dwLastWin32Error; public: DWORD getLastError() { return m_dwLastWin32Error; } diff --git a/modules/video_filter/atmo/MoMoConnection.cpp b/modules/video_filter/atmo/MoMoConnection.cpp index 4bb7199b30..c2a0a7af50 100644 --- a/modules/video_filter/atmo/MoMoConnection.cpp +++ b/modules/video_filter/atmo/MoMoConnection.cpp @@ -21,7 +21,7 @@ #include #include -#if !defined(WIN32) +#if !defined(_WIN32) #include #include #endif @@ -52,7 +52,7 @@ ATMO_BOOL CMoMoConnection::OpenConnection() { sprintf(serdevice,"com%d",portNummer); #endif -#if defined(WIN32) +#if defined(_WIN32) m_hComport = CreateFileA(serdevice, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); if(m_hComport == INVALID_HANDLE_VALUE) { @@ -100,7 +100,7 @@ ATMO_BOOL CMoMoConnection::OpenConnection() { void CMoMoConnection::CloseConnection() { if(m_hComport!=INVALID_HANDLE_VALUE) { -#if defined(WIN32) +#if defined(_WIN32) CloseHandle(m_hComport); #else close(m_hComport); @@ -150,7 +150,7 @@ ATMO_BOOL CMoMoConnection::SendData(pColorPacket data) { } } -#if defined(WIN32) +#if defined(_WIN32) WriteFile(m_hComport, buffer, bufSize, &iBytesWritten, NULL); // send to COM-Port #else iBytesWritten = write(m_hComport, buffer, bufSize); diff --git a/modules/video_filter/atmo/MoMoConnection.h b/modules/video_filter/atmo/MoMoConnection.h index b742e48bbb..5fd094194b 100644 --- a/modules/video_filter/atmo/MoMoConnection.h +++ b/modules/video_filter/atmo/MoMoConnection.h @@ -13,7 +13,7 @@ #include "AtmoConnection.h" #include "AtmoConfig.h" -#if defined(WIN32) +#if defined(_WIN32) # include #endif @@ -22,7 +22,7 @@ class CMoMoConnection : public CAtmoConnection { private: HANDLE m_hComport; -#if defined(WIN32) +#if defined(_WIN32) DWORD m_dwLastWin32Error; public: DWORD getLastError() { return m_dwLastWin32Error; } diff --git a/modules/video_filter/atmo/atmo.cpp b/modules/video_filter/atmo/atmo.cpp index 27e0f867bd..cbcbec1d27 100644 --- a/modules/video_filter/atmo/atmo.cpp +++ b/modules/video_filter/atmo/atmo.cpp @@ -138,7 +138,7 @@ strings for settings menus and hints "process - with more options") static const int pi_device_type_values[] = { -#if defined( WIN32 ) +#if defined( _WIN32 ) 0, /* use AtmoWinA.exe userspace driver */ #endif 1, /* AtmoLight classic */ @@ -148,7 +148,7 @@ static const int pi_device_type_values[] = { 5 /* fnordlicht */ }; static const char *const ppsz_device_type_descriptions[] = { -#if defined( WIN32 ) +#if defined( _WIN32 ) N_("AtmoWin Software"), #endif N_("Classic AtmoLight"), @@ -174,7 +174,7 @@ static const char *const ppsz_device_type_descriptions[] = { "fnordlicht hardware " \ "choose 1 to 254 channels") -#if defined( WIN32 ) +#if defined( _WIN32 ) # define DEFAULT_DEVICE 0 #else # define DEFAULT_DEVICE 1 @@ -349,7 +349,7 @@ static const char *const ppsz_zone_assignment_descriptions[] = { "bitmaps, put them as zone_0.bmp, zone_1.bmp etc. into one folder and "\ "set the foldername here") -#if defined( WIN32 ) +#if defined( _WIN32 ) # define ATMOWINEXE_TEXT N_("Filename of AtmoWin*.exe") # define ATMOWINEXE_LONGTEXT N_("if you want the AtmoLight control "\ "software to be launched by VLC, enter the "\ @@ -378,7 +378,7 @@ add_integer( CFG_PREFIX "device", DEFAULT_DEVICE, change_integer_list( pi_device_type_values, ppsz_device_type_descriptions ) -#if defined(WIN32) +#if defined(_WIN32) add_string(CFG_PREFIX "serialdev", "COM1", SERIALDEV_TEXT, SERIALDEV_LONGTEXT, false ) /* @@ -673,7 +673,7 @@ static const char *const ppsz_filter_options[] = { "momo-channels", "fnordlicht-amount", -#if defined(WIN32 ) +#if defined(_WIN32 ) "atmowinexe", #endif #if defined(__ATMO_DEBUG__) @@ -793,7 +793,7 @@ struct filter_sys_t picture_t *p_inpic, uint8_t *p_transfer_dest); -#if defined( WIN32 ) +#if defined( _WIN32 ) /* External Library as wrapper arround COM Stuff */ HINSTANCE h_AtmoCtrl; int32_t (*pf_ctrl_atmo_initialize) (void); @@ -836,7 +836,7 @@ static int32_t AtmoInitialize(filter_t *p_filter, bool b_for_thread) "some other software/driver may use it?"); } } -#if defined(WIN32) +#if defined(_WIN32) } else if(p_sys->pf_ctrl_atmo_initialize) { /* on win32 with active ctrl dll */ @@ -908,7 +908,7 @@ static void AtmoFinalize(filter_t *p_filter, int32_t what) p_atmo_dyndata->UnLockCriticalSection(); } } -#if defined(WIN32) +#if defined(_WIN32) } else if(p_sys->pf_ctrl_atmo_finalize) { /* on win32 with active ctrl dll */ @@ -929,7 +929,7 @@ static int32_t AtmoSwitchEffect(filter_t *p_filter, int32_t newMode) if(p_sys->p_atmo_config) { return CAtmoTools::SwitchEffect(p_sys->p_atmo_dyndata, emLivePicture); -#if defined(WIN32) +#if defined(_WIN32) } else if(p_sys->pf_ctrl_atmo_switch_effect) { /* on win32 with active ctrl dll */ @@ -959,7 +959,7 @@ static int32_t AtmoSetLiveSource(filter_t *p_filter, int32_t newSource) function call would just do nothing special in this case */ -#if defined(WIN32) +#if defined(_WIN32) } else if(p_sys->pf_ctrl_atmo_set_live_source) { /* on win32 with active ctrl dll */ @@ -1000,7 +1000,7 @@ static void AtmoCreateTransferBuffers(filter_t *p_filter, p_sys->mini_image_format.biBitCount = bytePerPixel*8; p_sys->mini_image_format.biCompression = FourCC; -#if defined(WIN32) +#if defined(_WIN32) } else if(p_sys->pf_ctrl_atmo_create_transfer_buffers) { /* on win32 with active ctrl dll */ @@ -1024,7 +1024,7 @@ static uint8_t* AtmoLockTransferBuffer(filter_t *p_filter) if(p_sys->p_atmo_config) { return p_sys->p_atmo_transfer_buffer; -#if defined(WIN32) +#if defined(_WIN32) } else if(p_sys->pf_ctrl_atmo_lock_transfer_buffer) { /* on win32 with active ctrl dll */ @@ -1071,7 +1071,7 @@ static void AtmoSendPixelData(filter_t *p_filter) p_sys->p_atmo_transfer_buffer); } } -#if defined(WIN32) +#if defined(_WIN32) } else if(p_sys->pf_ctrl_atmo_send_pixel_data) { /* on win32 with active ctrl dll */ @@ -1182,7 +1182,7 @@ static void Atmo_SetupImageSize(filter_t *p_filter) if(p_sys->p_atmo_config) { -#if defined(WIN32) +#if defined(_WIN32) } else if(p_sys->pf_ctrl_atmo_get_image_size) { /* on win32 with active ctrl dll */ @@ -1586,9 +1586,9 @@ static void Atmo_SetupParameters(filter_t *p_filter) */ -#if defined(WIN32) +#if defined(_WIN32) /* - only on WIN32 the user has the choice between + only on _WIN32 the user has the choice between internal driver and external */ @@ -1776,7 +1776,7 @@ static void Atmo_SetupParameters(filter_t *p_filter) if(psz_path != NULL) { strcpy(p_sys->sz_framepath, psz_path); -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) size_t i_strlen = strlen(p_sys->sz_framepath); if((i_strlen>0) && (p_sys->sz_framepath[i_strlen-1] != '\\')) { @@ -1843,7 +1843,7 @@ static void Atmo_SetupParameters(filter_t *p_filter) */ int i = AtmoInitialize(p_filter, false); -#if defined( WIN32 ) +#if defined( _WIN32 ) if((i != 1) && (p_sys->i_device_type == 0)) { /* @@ -1986,7 +1986,7 @@ static void DestroyFilter( vlc_object_t *p_this ) Atmo_Shutdown(p_filter); -#if defined( WIN32 ) +#if defined( _WIN32 ) if(p_sys->h_AtmoCtrl != NULL) { FreeLibrary(p_sys->h_AtmoCtrl); diff --git a/modules/video_filter/deinterlace/yadif_template.h b/modules/video_filter/deinterlace/yadif_template.h index 87679c9c4f..df4897db35 100644 --- a/modules/video_filter/deinterlace/yadif_template.h +++ b/modules/video_filter/deinterlace/yadif_template.h @@ -118,7 +118,7 @@ "por "MM"5, "MM"3 \n\t"\ MOVQ" "MM"3, "MM"1 \n\t" -#if defined(__MINGW32__) && defined(WIN32) && !defined(WIN64) +#if defined(__MINGW32__) && defined(_WIN32) && !defined(_WIN64) __attribute__((__force_align_arg_pointer__)) #endif VLC_TARGET static void RENAME(yadif_filter_line)(uint8_t *dst, diff --git a/modules/video_filter/panoramix.c b/modules/video_filter/panoramix.c index 77801a5c41..e876942f62 100644 --- a/modules/video_filter/panoramix.c +++ b/modules/video_filter/panoramix.c @@ -43,7 +43,7 @@ #ifdef OVERLAP /* OS CODE DEPENDENT to get display dimensions */ -# ifdef WIN32 +# ifdef _WIN32 # include # else # include @@ -169,7 +169,7 @@ vlc_module_begin() add_integer_with_range( CFG_PREFIX "bz-whitelevel-red", 0, 0, 255, RGAMMA_WL_TEXT, RGAMMA_WL_LONGTEXT, true ) add_integer_with_range( CFG_PREFIX "bz-whitelevel-green", 0, 0, 255, GGAMMA_WL_TEXT, GGAMMA_WL_LONGTEXT, true ) add_integer_with_range( CFG_PREFIX "bz-whitelevel-blue", 0, 0, 255, BGAMMA_WL_TEXT, BGAMMA_WL_LONGTEXT, true ) -#ifndef WIN32 +#ifndef _WIN32 add_obsolete_bool( CFG_PREFIX "xinerama" ); #endif add_obsolete_bool( CFG_PREFIX "offset-x" ) @@ -343,7 +343,7 @@ static const panoramix_chroma_t p_chroma_array[] = { { 0, {0, }, { 0, }, { 0, 0, 0 }, false } }; -#ifndef WIN32 +#ifndef _WIN32 /* Get the number of outputs */ static unsigned CountMonitors( vlc_object_t *obj ) { @@ -454,7 +454,7 @@ static int Open( vlc_object_t *p_this ) /* Autodetect number of displays */ if( p_sys->i_col < 0 || p_sys->i_row < 0 ) { -#ifdef WIN32 +#ifdef _WIN32 const int i_monitor_count = GetSystemMetrics(SM_CMONITORS); if( i_monitor_count > 1 ) { diff --git a/modules/video_filter/scene.c b/modules/video_filter/scene.c index 9d0dc75e0c..3f71aaa918 100644 --- a/modules/video_filter/scene.c +++ b/modules/video_filter/scene.c @@ -319,7 +319,7 @@ static void SavePicture( filter_t *p_filter, picture_t *p_pic ) else { /* switch to the final destination */ -#if defined (WIN32) || defined(__OS2__) +#if defined (_WIN32) || defined(__OS2__) vlc_unlink( psz_filename ); #endif i_ret = vlc_rename( psz_temp, psz_filename ); diff --git a/modules/video_output/aa.c b/modules/video_output/aa.c index f4eca6a404..5a848cf6b5 100644 --- a/modules/video_output/aa.c +++ b/modules/video_output/aa.c @@ -36,7 +36,7 @@ #include #include -#ifndef WIN32 +#ifndef _WIN32 # ifdef X_DISPLAY_MISSING # error Xlib required due to XInitThreads # endif @@ -90,7 +90,7 @@ static int Open(vlc_object_t *object) vout_display_t *vd = (vout_display_t *)object; vout_display_sys_t *sys; -#ifndef WIN32 +#ifndef _WIN32 if (!vlc_xlib_init (object)) return VLC_EGENERIC; #endif diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c index 27de0f14bf..2958abd9a6 100644 --- a/modules/video_output/caca.c +++ b/modules/video_output/caca.c @@ -34,7 +34,7 @@ #include #include #include -#if !defined(WIN32) && !defined(__APPLE__) +#if !defined(_WIN32) && !defined(__APPLE__) # ifdef X_DISPLAY_MISSING # error Xlib required due to XInitThreads # endif @@ -88,14 +88,14 @@ static int Open(vlc_object_t *object) vout_display_t *vd = (vout_display_t *)object; vout_display_sys_t *sys; -#if !defined(__APPLE__) && !defined(WIN32) +#if !defined(__APPLE__) && !defined(_WIN32) # ifndef X_DISPLAY_MISSING if (!vlc_xlib_init(object)) return VLC_EGENERIC; # endif #endif -#if defined(WIN32) +#if defined(_WIN32) CONSOLE_SCREEN_BUFFER_INFO csbiInfo; SMALL_RECT rect; COORD coord; @@ -216,7 +216,7 @@ error: free(sys); } -#if defined(WIN32) +#if defined(_WIN32) FreeConsole(); #endif return VLC_EGENERIC; @@ -237,7 +237,7 @@ static void Close(vlc_object_t *object) caca_free_display(sys->dp); cucul_free_canvas(sys->cv); -#if defined(WIN32) +#if defined(_WIN32) FreeConsole(); #endif diff --git a/modules/video_output/fb.c b/modules/video_output/fb.c index 399cedaf8e..d09f1c4989 100644 --- a/modules/video_output/fb.c +++ b/modules/video_output/fb.c @@ -190,7 +190,7 @@ static int Open(vlc_object_t *object) /* Set tty and fb devices */ sys->tty = 0; /* 0 == /dev/tty0 == current console */ sys->is_tty = var_InheritBool(vd, "fb-tty"); -#if !defined(WIN32) && defined(HAVE_ISATTY) +#if !defined(_WIN32) && defined(HAVE_ISATTY) /* Check that stdin is a TTY */ if (sys->is_tty && !isatty(0)) { msg_Warn(vd, "standard input is not a TTY"); diff --git a/modules/video_output/opengl.h b/modules/video_output/opengl.h index a3f27f791c..55705d1383 100644 --- a/modules/video_output/opengl.h +++ b/modules/video_output/opengl.h @@ -53,7 +53,7 @@ # elif USE_OPENGL_ES == 1 # include # else -# ifdef WIN32 +# ifdef _WIN32 # include # undef glClientActiveTexture # undef glActiveTexture diff --git a/modules/video_output/sdl.c b/modules/video_output/sdl.c index aae949a657..5520bb24ae 100644 --- a/modules/video_output/sdl.c +++ b/modules/video_output/sdl.c @@ -40,7 +40,7 @@ #include -#if !defined(WIN32) && !defined(__OS2__) +#if !defined(_WIN32) && !defined(__OS2__) # ifdef X_DISPLAY_MISSING # error Xlib required due to XInitThreads # endif @@ -116,7 +116,7 @@ static int Open(vlc_object_t *object) vout_display_t *vd = (vout_display_t *)object; vout_display_sys_t *sys; -#if !defined(WIN32) && !defined(__OS2__) +#if !defined(_WIN32) && !defined(__OS2__) if (!vlc_xlib_init (object)) return VLC_EGENERIC; #endif @@ -138,7 +138,7 @@ static int Open(vlc_object_t *object) /* */ int sdl_flags = SDL_INIT_VIDEO; -#ifndef WIN32 +#ifndef _WIN32 /* Win32 SDL implementation doesn't support SDL_INIT_EVENTTHREAD yet*/ sdl_flags |= SDL_INIT_EVENTTHREAD; #endif diff --git a/modules/visualization/projectm.cpp b/modules/visualization/projectm.cpp index 40a53ebc83..fcb3059d7b 100644 --- a/modules/visualization/projectm.cpp +++ b/modules/visualization/projectm.cpp @@ -74,7 +74,7 @@ static void Close ( vlc_object_t * ); #define TEXTURE_TEXT N_("Texture size") #define TEXTURE_LONGTEXT N_("The size of the texture, in pixels.") -#ifdef WIN32 +#ifdef _WIN32 # define FONT_PATH "C:\\WINDOWS\\Fonts\\arial.ttf" # define FONT_PATH_MENU "C:\\WINDOWS\\Fonts\\arial.ttf" # define PRESET_PATH NULL @@ -362,7 +362,7 @@ static void *Thread( void *p_data ) free( psz_config ); #else psz_preset_path = var_InheritString( p_filter, "projectm-preset-path" ); -#ifdef WIN32 +#ifdef _WIN32 if ( psz_preset_path == NULL ) { char *psz_data_path = config_GetDataDir(); diff --git a/src/config/file.c b/src/config/file.c index 8f422bf2a7..1c0b876883 100644 --- a/src/config/file.c +++ b/src/config/file.c @@ -88,7 +88,7 @@ static FILE *config_OpenConfigFile( vlc_object_t *p_obj ) psz_filename ); } -#if !( defined(WIN32) || defined(__APPLE__) || defined(__OS2__) ) +#if !( defined(_WIN32) || defined(__APPLE__) || defined(__OS2__) ) else if( p_stream == NULL && errno == ENOENT ) { /* This is the fallback for pre XDG Base Directory @@ -508,7 +508,7 @@ int config_SaveConfigFile (vlc_object_t *p_this) #else fdatasync (fd); /* Flush from OS */ #endif -#if defined (WIN32) || defined (__OS2__) +#if defined (_WIN32) || defined (__OS2__) /* Windows cannot (re)move open files nor overwrite existing ones */ fclose (file); vlc_unlink (permanent); @@ -519,7 +519,7 @@ int config_SaveConfigFile (vlc_object_t *p_this) /* (...then synchronize the directory, err, TODO...) */ /* ...and finally close the file */ vlc_mutex_unlock (&lock); -#if !defined (WIN32) && !defined (__OS2__) +#if !defined (_WIN32) && !defined (__OS2__) fclose (file); #endif diff --git a/src/config/help.c b/src/config/help.c index 5cb7b7bb31..b9541ecda9 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 ) && !VLC_WINSTORE_APP +#if defined( _WIN32 ) && !VLC_WINSTORE_APP static void ShowConsole (void); static void PauseConsole (void); #else @@ -248,7 +248,7 @@ static void Usage (vlc_object_t *p_this, char const *psz_search) #define LINE_START 8 #define PADDING_SPACES 25 -#ifdef WIN32 +#ifdef _WIN32 # define OPTION_VALUE_SEP "=" #else # define OPTION_VALUE_SEP " " @@ -276,7 +276,7 @@ static void Usage (vlc_object_t *p_this, char const *psz_search) psz_spaces_text[PADDING_SPACES+LINE_START] = '\0'; memset( psz_spaces_longtext, ' ', LINE_START+2 ); psz_spaces_longtext[LINE_START+2] = '\0'; -#ifndef WIN32 +#ifndef _WIN32 if( !isatty( 1 ) ) #endif b_color = false; // don't put color control codes in a .txt file @@ -724,7 +724,7 @@ static void ListModules (vlc_object_t *p_this, bool b_verbose) bool b_color = var_InheritBool( p_this, "color" ); ShowConsole(); -#ifdef WIN32 +#ifdef _WIN32 b_color = false; // don't put color control codes in a .txt file #else if( !isatty( 1 ) ) @@ -796,7 +796,7 @@ static void Version( void ) PauseConsole(); } -#if defined( WIN32 ) && !VLC_WINSTORE_APP +#if defined( _WIN32 ) && !VLC_WINSTORE_APP /***************************************************************************** * ShowConsole: On Win32, create an output console for debug messages ***************************************************************************** @@ -854,7 +854,7 @@ static int ConsoleWidth( void ) { unsigned i_width = 80; -#ifndef WIN32 +#ifndef _WIN32 FILE *file = popen( "stty size 2>/dev/null", "r" ); if (file != NULL) { diff --git a/src/input/es_out_timeshift.c b/src/input/es_out_timeshift.c index 561c87b4df..0864efb97a 100644 --- a/src/input/es_out_timeshift.c +++ b/src/input/es_out_timeshift.c @@ -31,7 +31,7 @@ #include #include #include -#if defined (WIN32) +#if defined (_WIN32) # include #endif #include @@ -41,7 +41,7 @@ #include #include -#ifdef WIN32 +#ifdef _WIN32 # include #endif #include @@ -1553,7 +1553,7 @@ static char *GetTmpPath( char *psz_path ) free( psz_path ); /* Create a suitable path */ -#if defined (WIN32) && !VLC_WINSTORE_APP +#if defined (_WIN32) && !VLC_WINSTORE_APP const DWORD dwCount = GetTempPathW( 0, NULL ); wchar_t *psw_path = calloc( dwCount + 1, sizeof(wchar_t) ); if( psw_path ) diff --git a/src/interface/interface.c b/src/interface/interface.c index a6a9938f8d..2350538433 100644 --- a/src/interface/interface.c +++ b/src/interface/interface.c @@ -80,7 +80,7 @@ int intf_Create( vlc_object_t *p_this, const char *chain ) VLC_VAR_HASCHOICE | VLC_VAR_ISCOMMAND ); text.psz_string = _("Add Interface"); var_Change( p_intf, "intf-add", VLC_VAR_SETTEXT, &text, NULL ); -#if !defined(WIN32) && defined(HAVE_ISATTY) +#if !defined(_WIN32) && defined(HAVE_ISATTY) if( isatty( 0 ) ) #endif { diff --git a/src/libvlc-module.c b/src/libvlc-module.c index 33affa65c8..94faf8e41a 100644 --- a/src/libvlc-module.c +++ b/src/libvlc-module.c @@ -749,7 +749,7 @@ static const char *const ppsz_prefres[] = { #define VCD_DEV_TEXT N_("VCD device") #define CDAUDIO_DEV_TEXT N_("Audio CD device") -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) # define DVD_DEV_LONGTEXT N_( \ "This is the default DVD drive (or file) to use. Don't forget the colon " \ "after the drive letter (e.g. D:)") @@ -1059,7 +1059,7 @@ static const char *const ppsz_prefres[] = { "Log all VLC messages to syslog (UNIX systems)." ) #define ONEINSTANCE_TEXT N_("Allow only one running instance") -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) #define ONEINSTANCE_LONGTEXT N_( \ "Allowing only one running instance of VLC can sometimes be useful, " \ "for example if you associated VLC with some media types and you " \ @@ -1648,7 +1648,7 @@ vlc_module_begin () SUB_AUTO_TEXT, SUB_AUTO_LONGTEXT, false ) add_integer( "sub-autodetect-fuzzy", 3, SUB_FUZZY_TEXT, SUB_FUZZY_LONGTEXT, true ) -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) # define SUB_PATH ".\\subtitles, .\\subs" #else # define SUB_PATH "./Subtitles, ./subtitles, ./Subs, ./subs" @@ -1985,13 +1985,13 @@ vlc_module_begin () INHIBIT_LONGTEXT, true ) #endif -#if defined(WIN32) || defined(__OS2__) +#if defined(_WIN32) || defined(__OS2__) add_bool( "high-priority", 0, HPRIORITY_TEXT, HPRIORITY_LONGTEXT, false ) #endif #define CLOCK_SOURCE_TEXT N_("Clock source") -#ifdef WIN32 +#ifdef _WIN32 add_string( "clock-source", NULL, CLOCK_SOURCE_TEXT, CLOCK_SOURCE_TEXT, true ) change_string_cb( EnumClockSource ) #endif @@ -2017,7 +2017,7 @@ vlc_module_begin () add_bool( "playlist-autostart", true, AUTOSTART_TEXT, AUTOSTART_LONGTEXT, false ) add_bool( "playlist-cork", true, CORK_TEXT, CORK_LONGTEXT, false ) -#if defined(WIN32) || defined(HAVE_DBUS) || defined(__OS2__) +#if defined(_WIN32) || defined(HAVE_DBUS) || defined(__OS2__) add_bool( "one-instance", 0, ONEINSTANCE_TEXT, ONEINSTANCE_LONGTEXT, true ) add_bool( "started-from-file", 0, STARTEDFROMFILE_TEXT, @@ -2058,7 +2058,7 @@ vlc_module_begin () change_short('q') change_volatile () -#if !defined(WIN32) && !defined(__OS2__) +#if !defined(_WIN32) && !defined(__OS2__) add_bool( "daemon", 0, DAEMON_TEXT, DAEMON_LONGTEXT, true ) change_short('d') @@ -2073,7 +2073,7 @@ vlc_module_begin () true ) #endif -#if defined (WIN32) || defined (__APPLE__) +#if defined (_WIN32) || defined (__APPLE__) add_obsolete_string( "language" ) /* since 2.1.0 */ #endif diff --git a/src/libvlc.c b/src/libvlc.c index ced65b0115..88f1562661 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -80,7 +80,7 @@ * The evil global variables. We handle them with care, don't worry. *****************************************************************************/ -#if !defined(WIN32) && !defined(__OS2__) +#if !defined(_WIN32) && !defined(__OS2__) static bool b_daemon = false; #endif @@ -484,7 +484,7 @@ dbus_out: var_Create( p_libvlc, "drawable-clip-right", VLC_VAR_INTEGER ); var_Create( p_libvlc, "drawable-nsobject", VLC_VAR_ADDRESS ); #endif -#if defined (WIN32) || defined (__OS2__) +#if defined (_WIN32) || defined (__OS2__) var_Create( p_libvlc, "drawable-hwnd", VLC_VAR_INTEGER ); #endif @@ -537,7 +537,7 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc ) msg_Dbg( p_libvlc, "removing stats" ); -#if !defined( WIN32 ) && !defined( __OS2__ ) +#if !defined( _WIN32 ) && !defined( __OS2__ ) char* psz_pidfile = NULL; if( b_daemon ) @@ -565,7 +565,7 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc ) /* Free module bank. It is refcounted, so we call this each time */ module_EndBank (true); vlc_LogDeinit (p_libvlc); -#if defined(WIN32) || defined(__OS2__) +#if defined(_WIN32) || defined(__OS2__) system_End( ); #endif } @@ -600,7 +600,7 @@ int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc, char const *psz_module ) char *psz_interface = var_CreateGetNonEmptyString( p_libvlc, "intf" ); if( !psz_interface ) /* "intf" has not been set */ { -#if !defined( WIN32 ) && !defined( __OS2__ ) +#if !defined( _WIN32 ) && !defined( __OS2__ ) if( b_daemon ) /* Daemon mode hack. * We prefer the dummy interface if none is specified. */ diff --git a/src/libvlc.h b/src/libvlc.h index f6185c9efc..65f0d6d985 100644 --- a/src/libvlc.h +++ b/src/libvlc.h @@ -41,7 +41,7 @@ size_t vlc_towc (const char *str, uint32_t *restrict pwc); */ void system_Init ( void ); void system_Configure ( libvlc_int_t *, int, const char *const [] ); -#if defined(WIN32) || defined(__OS2__) +#if defined(_WIN32) || defined(__OS2__) void system_End(void); #ifndef __OS2__ size_t EnumClockSource( vlc_object_t *, const char *, char ***, char *** ); diff --git a/src/misc/block.c b/src/misc/block.c index acf1e64ed3..a7dfed914e 100644 --- a/src/misc/block.c +++ b/src/misc/block.c @@ -389,7 +389,7 @@ block_t *block_shm_Alloc (void *addr, size_t length) #endif -#ifdef WIN32 +#ifdef _WIN32 # include static diff --git a/src/misc/cpu.c b/src/misc/cpu.c index 77691dd281..eca79b5911 100644 --- a/src/misc/cpu.c +++ b/src/misc/cpu.c @@ -38,7 +38,7 @@ #ifndef __linux__ #include -#ifndef WIN32 +#ifndef _WIN32 #include #include #include @@ -63,7 +63,7 @@ static uint32_t cpu_flags; #if defined (__i386__) || defined (__x86_64__) || defined (__powerpc__) \ || defined (__ppc__) || defined (__ppc64__) || defined (__powerpc64__) -# if !defined (WIN32) && !defined (__OS2__) +# if !defined (_WIN32) && !defined (__OS2__) static bool vlc_CPU_check (const char *name, void (*func) (void)) { pid_t pid = fork(); @@ -113,7 +113,7 @@ static void Altivec_test (void) } #endif -#else /* WIN32 || __OS2__ */ +#else /* _WIN32 || __OS2__ */ # define vlc_CPU_check(name, func) (1) #endif #endif @@ -271,7 +271,7 @@ unsigned vlc_CPU (void) { /* On Windows and OS/2, * initialized from DllMain() and _DLL_InitTerm() respectively, instead */ -#if !defined(WIN32) && !defined(__OS2__) +#if !defined(_WIN32) && !defined(__OS2__) static pthread_once_t once = PTHREAD_ONCE_INIT; pthread_once (&once, vlc_CPU_init); #endif diff --git a/src/misc/messages.c b/src/misc/messages.c index 0b5a3fd147..cc91a662fa 100644 --- a/src/misc/messages.c +++ b/src/misc/messages.c @@ -45,7 +45,7 @@ #include #include -#ifdef WIN32 +#ifdef _WIN32 # include /* 'net_strerror' and 'WSAGetLastError' */ #endif #include @@ -69,7 +69,7 @@ void vlc_Log (vlc_object_t *obj, int type, const char *module, va_end (args); } -#ifdef WIN32 +#ifdef _WIN32 static void Win32DebugOutputMsg (void *, int , const vlc_log_t *, const char *, va_list); #endif @@ -106,7 +106,7 @@ void vlc_vaLog (vlc_object_t *obj, int type, const char *module, char errbuf[2001]; size_t errlen; -#ifndef WIN32 +#ifndef _WIN32 strerror_r( errno, errbuf, 1001 ); #else int sockerr = WSAGetLastError( ); @@ -162,7 +162,7 @@ void vlc_vaLog (vlc_object_t *obj, int type, const char *module, /* Pass message to the callback */ libvlc_priv_t *priv = obj ? libvlc_priv (obj->p_libvlc) : NULL; -#ifdef WIN32 +#ifdef _WIN32 va_list ap; va_copy (ap, args); @@ -208,7 +208,7 @@ static void PrintColorMsg (void *d, int type, const vlc_log_t *p_item, p_item->psz_object_type, msg_type[type], msg_color[type]); utf8_vfprintf (stream, format, ap); fputs (GRAY"\n", stream); -#if defined (WIN32) || defined (__OS2__) +#if defined (_WIN32) || defined (__OS2__) fflush (stream); #endif funlockfile (stream); @@ -234,14 +234,14 @@ static void PrintMsg (void *d, int type, const vlc_log_t *p_item, p_item->psz_object_type, msg_type[type]); utf8_vfprintf (stream, format, ap); putc_unlocked ('\n', stream); -#if defined (WIN32) || defined (__OS2__) +#if defined (_WIN32) || defined (__OS2__) fflush (stream); #endif funlockfile (stream); vlc_restorecancel (canc); } -#ifdef WIN32 +#ifdef _WIN32 static void Win32DebugOutputMsg (void* d, int type, const vlc_log_t *p_item, const char *format, va_list dol) { @@ -293,7 +293,7 @@ void vlc_LogSet (libvlc_int_t *vlc, vlc_log_cb cb, void *opaque) if (cb == NULL) { -#if defined (HAVE_ISATTY) && !defined (WIN32) +#if defined (HAVE_ISATTY) && !defined (_WIN32) if (isatty (STDERR_FILENO) && var_InheritBool (vlc, "color")) cb = PrintColorMsg; else diff --git a/src/misc/objects.c b/src/misc/objects.c index 49974c6618..8e75313257 100644 --- a/src/misc/objects.c +++ b/src/misc/objects.c @@ -56,7 +56,7 @@ # include # include # include // close(), write() -#elif defined(WIN32) +#elif defined(_WIN32) # include # include # include @@ -287,7 +287,7 @@ static void vlc_object_destroy( vlc_object_t *p_this ) } -#if defined(WIN32) || defined(__OS2__) +#if defined(_WIN32) || defined(__OS2__) /** * select()-able pipes emulated using Winsock */ @@ -329,7 +329,7 @@ error: close (c); return -1; } -#endif /* WIN32 || __OS2__ */ +#endif /* _WIN32 || __OS2__ */ static vlc_mutex_t pipe_lock = VLC_STATIC_MUTEX; diff --git a/src/misc/update.c b/src/misc/update.c index c4fde538cf..600e900262 100644 --- a/src/misc/update.c +++ b/src/misc/update.c @@ -52,7 +52,7 @@ #include #include -#ifdef WIN32 +#ifdef _WIN32 #include #endif #include "update.h" @@ -74,9 +74,9 @@ * Remaining text is a required description of the update */ -#if defined( WIN64 ) +#if defined( _WIN64 ) # define UPDATE_OS_SUFFIX "-win-x64" -#elif defined( WIN32 ) +#elif defined( _WIN32 ) # define UPDATE_OS_SUFFIX "-win-x86" #else # define UPDATE_OS_SUFFIX "" @@ -706,7 +706,7 @@ static void* update_DownloadReal( void *obj ) msg_Info( p_udt, "%s authenticated", psz_destfile ); free( p_hash ); -#ifdef WIN32 +#ifdef _WIN32 int answer = dialog_Question( p_udt, _("Update VLC media player"), _("The new version was successfully downloaded. Do you want to close VLC and install it now?"), _("Install"), _("Cancel"), NULL); diff --git a/src/modules/cache.c b/src/modules/cache.c index 27f89b4f0e..6b5d247dfc 100644 --- a/src/modules/cache.c +++ b/src/modules/cache.c @@ -512,7 +512,7 @@ void CacheSave (vlc_object_t *p_this, const char *dir, goto out; } -#if !defined( WIN32 ) && !defined( __OS2__ ) +#if !defined( _WIN32 ) && !defined( __OS2__ ) vlc_rename (tmpname, filename); /* atomically replace old cache */ fclose (file); #else diff --git a/src/modules/textdomain.c b/src/modules/textdomain.c index 77b83de80d..05c9d293d5 100644 --- a/src/modules/textdomain.c +++ b/src/modules/textdomain.c @@ -27,7 +27,7 @@ #ifdef ENABLE_NLS # include -# if defined (__APPLE__) || defined (WIN32) || defined(__OS2__) +# if defined (__APPLE__) || defined (_WIN32) || defined(__OS2__) # include # endif #endif @@ -36,7 +36,7 @@ int vlc_bindtextdomain (const char *domain) { #if defined (ENABLE_NLS) /* Specify where to find the locales for current domain */ -# if !defined (__APPLE__) && !defined (WIN32) && !defined(__OS2__) +# if !defined (__APPLE__) && !defined (_WIN32) && !defined(__OS2__) static const char path[] = LOCALEDIR; if (bindtextdomain (domain, path) == NULL) diff --git a/src/network/httpd.c b/src/network/httpd.c index f76c47ce05..bbfbd18981 100644 --- a/src/network/httpd.c +++ b/src/network/httpd.c @@ -52,13 +52,13 @@ # include #endif -#if defined( WIN32 ) +#if defined( _WIN32 ) # include #else # include #endif -#if defined( WIN32 ) +#if defined( _WIN32 ) /* We need HUGE buffer otherwise TCP throughput is very limited */ #define HTTPD_CL_BUFSIZE 1000000 #else @@ -1727,7 +1727,7 @@ static void httpd_ClientRecv( httpd_client_t *cl ) } /* check if the client is to be set to dead */ -#if defined( WIN32 ) +#if defined( _WIN32 ) if( ( i_len < 0 && WSAGetLastError() != WSAEWOULDBLOCK ) || ( i_len == 0 ) ) #else if( ( i_len < 0 && errno != EAGAIN ) || ( i_len == 0 ) ) @@ -1866,7 +1866,7 @@ static void httpd_ClientSend( httpd_client_t *cl ) } else { -#if defined( WIN32 ) +#if defined( _WIN32 ) if( ( i_len < 0 && WSAGetLastError() != WSAEWOULDBLOCK ) || ( i_len == 0 ) ) #else if( ( i_len < 0 && errno != EAGAIN ) || ( i_len == 0 ) ) diff --git a/src/network/io.c b/src/network/io.c index 7cc9764ad4..040e1e927e 100644 --- a/src/network/io.c +++ b/src/network/io.c @@ -58,7 +58,7 @@ # define INADDR_NONE 0xFFFFFFFF #endif -#if defined(WIN32) +#if defined(_WIN32) # undef EAFNOSUPPORT # define EAFNOSUPPORT WSAEAFNOSUPPORT #endif @@ -96,7 +96,7 @@ int net_Socket (vlc_object_t *p_this, int family, int socktype, setsockopt (fd, IPPROTO_IPV6, IPV6_V6ONLY, &(int){ 1 }, sizeof (int)); #endif -#if defined (WIN32) +#if defined (_WIN32) # ifndef IPV6_PROTECTION_LEVEL # warning Please update your C library headers. # define IPV6_PROTECTION_LEVEL 23 @@ -159,7 +159,7 @@ int *net_Listen (vlc_object_t *p_this, const char *psz_host, } /* Bind the socket */ -#if defined (WIN32) +#if defined (_WIN32) /* * Under Win32 and for multicasting, we bind to INADDR_ANY. * This is of course a severe bug, since the socket would logically @@ -183,7 +183,7 @@ int *net_Listen (vlc_object_t *p_this, const char *psz_host, if (bind (fd, ptr->ai_addr, ptr->ai_addrlen)) { net_Close (fd); -#if !defined(WIN32) +#if !defined(_WIN32) fd = rootwrap_bind (ptr->ai_family, ptr->ai_socktype, ptr->ai_protocol, ptr->ai_addr, ptr->ai_addrlen); @@ -289,7 +289,7 @@ net_Read (vlc_object_t *restrict p_this, int fd, const v_socket_t *vs, if (ufd[1].revents) { msg_Dbg (p_this, "socket %d polling interrupted", fd); -#if defined(WIN32) +#if defined(_WIN32) WSASetLastError (WSAEINTR); #else errno = EINTR; @@ -301,14 +301,14 @@ net_Read (vlc_object_t *restrict p_this, int fd, const v_socket_t *vs, assert (ufd[0].revents); ssize_t n; -#if defined(WIN32) +#if defined(_WIN32) int error; #endif if (vs != NULL) { int canc = vlc_savecancel (); n = vs->pf_recv (vs->p_sys, p_buf, i_buflen); -#if defined(WIN32) +#if defined(_WIN32) /* We must read last error immediately, because vlc_restorecancel() * access thread local storage, and TlsGetValue() will call * SetLastError() to indicate that the function succeeded, thus @@ -321,7 +321,7 @@ net_Read (vlc_object_t *restrict p_this, int fd, const v_socket_t *vs, } else { -#ifdef WIN32 +#ifdef _WIN32 n = recv (fd, p_buf, i_buflen, 0); error = WSAGetLastError(); #else @@ -331,7 +331,7 @@ net_Read (vlc_object_t *restrict p_this, int fd, const v_socket_t *vs, if (n == -1) { -#if defined(WIN32) +#if defined(_WIN32) switch (error) { case WSAEWOULDBLOCK: @@ -449,7 +449,7 @@ ssize_t net_Write( vlc_object_t *p_this, int fd, const v_socket_t *p_vs, if (p_vs != NULL) val = p_vs->pf_send (p_vs->p_sys, p_data, i_data); else -#ifdef WIN32 +#ifdef _WIN32 val = send (fd, p_data, i_data, 0); #else val = write (fd, p_data, i_data); diff --git a/src/network/rootbind.c b/src/network/rootbind.c index 3d3229fb7f..f04bd82cce 100644 --- a/src/network/rootbind.c +++ b/src/network/rootbind.c @@ -24,7 +24,7 @@ #define _XPG4_2 /* ancilliary data on Solaris */ -#if !defined (WIN32) && !defined (__OS2__) +#if !defined (_WIN32) && !defined (__OS2__) # define ENABLE_ROOTWRAP 1 #endif diff --git a/src/network/tcp.c b/src/network/tcp.c index fd8f738bb0..61159e0fd2 100644 --- a/src/network/tcp.c +++ b/src/network/tcp.c @@ -43,7 +43,7 @@ #endif #include -#if defined (WIN32) +#if defined (_WIN32) # undef EINPROGRESS # define EINPROGRESS WSAEWOULDBLOCK # undef EWOULDBLOCK diff --git a/src/network/udp.c b/src/network/udp.c index 6763f10a39..c83145f478 100644 --- a/src/network/udp.c +++ b/src/network/udp.c @@ -38,7 +38,7 @@ #include -#ifdef WIN32 +#ifdef _WIN32 # define EAFNOSUPPORT WSAEAFNOSUPPORT #else # include @@ -104,7 +104,7 @@ static int net_SetupDgramSocket (vlc_object_t *p_obj, int fd, (void *)&(int){ 0x80000 }, sizeof (int)); #endif -#if defined (WIN32) +#if defined (_WIN32) if (net_SockAddrIsMulticast (ptr->ai_addr, ptr->ai_addrlen) && (sizeof (struct sockaddr_storage) >= ptr->ai_addrlen)) { @@ -553,7 +553,7 @@ int net_ConnectDgram( vlc_object_t *p_this, const char *psz_host, int i_port, break; } -#if defined( WIN32 ) +#if defined( _WIN32 ) if( WSAGetLastError () == WSAENETUNREACH ) #else if( errno == ENETUNREACH ) diff --git a/src/stream_output/sap.c b/src/stream_output/sap.c index aa4ded33a0..a9eb65b5d6 100644 --- a/src/stream_output/sap.c +++ b/src/stream_output/sap.c @@ -232,7 +232,7 @@ int SAP_Add (sap_handler_t *p_sap, session_descriptor_t *p_session) switch (addr.a.sa_family) { -#if defined (HAVE_INET_PTON) || defined (WIN32) +#if defined (HAVE_INET_PTON) || defined (_WIN32) case AF_INET6: { /* See RFC3513 for list of valid IPv6 scopes */ diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c index 25e5fab380..3f653f1ff9 100644 --- a/src/stream_output/stream_output.c +++ b/src/stream_output/stream_output.c @@ -609,7 +609,7 @@ static int mrl_Parse( mrl_t *p_mrl, const char *psz_mrl ) psz_parser++; } } -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) if( psz_parser - psz_dup == 1 ) { /* msg_Warn( p_sout, "drive letter %c: found in source string", diff --git a/src/text/charset.c b/src/text/charset.c index 5b643145d1..0cb2322654 100644 --- a/src/text/charset.c +++ b/src/text/charset.c @@ -29,7 +29,7 @@ #include -#if !defined WIN32 +#if !defined _WIN32 # include #else # include diff --git a/src/text/strings.c b/src/text/strings.c index d5d02f4521..d7db759a4e 100644 --- a/src/text/strings.c +++ b/src/text/strings.c @@ -907,7 +907,7 @@ void filename_sanitize( char *str ) */ void path_sanitize( char *str ) { -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) /* check drive prefix if path is absolute */ if( (((unsigned char)(str[0] - 'A') < 26) || ((unsigned char)(str[0] - 'a') < 26)) && (':' == str[1]) ) @@ -918,7 +918,7 @@ void path_sanitize( char *str ) #if defined( __APPLE__ ) if( *str == ':' ) *str = '_'; -#elif defined( WIN32 ) || defined( __OS2__ ) +#elif defined( _WIN32 ) || defined( __OS2__ ) if( strchr( "*\"?:|<>", *str ) ) *str = '_'; if( *str == '/' ) diff --git a/src/text/unicode.c b/src/text/unicode.c index d1de73918a..25215d7ffc 100644 --- a/src/text/unicode.c +++ b/src/text/unicode.c @@ -39,7 +39,7 @@ #include #include #include -#if defined(WIN32) +#if defined(_WIN32) # include #endif #include @@ -51,7 +51,7 @@ */ int utf8_vfprintf( FILE *stream, const char *fmt, va_list ap ) { -#ifndef WIN32 +#ifndef _WIN32 return vfprintf (stream, fmt, ap); #else char *str; diff --git a/src/text/url.c b/src/text/url.c index d564811f04..06fb817757 100644 --- a/src/text/url.c +++ b/src/text/url.c @@ -26,7 +26,7 @@ #include #include #include -#ifdef WIN32 +#ifdef _WIN32 # include #endif @@ -170,7 +170,7 @@ char *vlc_path2uri (const char *path, const char *scheme) path = p; #endif -#if defined( WIN32 ) || defined( __OS2__ ) +#if defined( _WIN32 ) || defined( __OS2__ ) /* Drive letter */ if (isalpha ((unsigned char)path[0]) && (path[1] == ':')) { @@ -186,7 +186,7 @@ char *vlc_path2uri (const char *path, const char *scheme) #endif if (!strncmp (path, "\\\\", 2)) { /* Windows UNC paths */ -#if !defined( WIN32 ) && !defined( __OS2__ ) +#if !defined( _WIN32 ) && !defined( __OS2__ ) if (scheme != NULL) return NULL; /* remote files not supported */ @@ -302,7 +302,7 @@ char *make_path (const char *url) if (schemelen == 4 && !strncasecmp (url, "file", 4)) { -#if !defined (WIN32) && !defined (__OS2__) +#if !defined (_WIN32) && !defined (__OS2__) /* Leading slash => local path */ if (*path == '/') return path; @@ -336,7 +336,7 @@ char *make_path (const char *url) if (*end) goto out; -#if !defined( WIN32 ) && !defined( __OS2__ ) +#if !defined( _WIN32 ) && !defined( __OS2__ ) switch (fd) { case 0: @@ -490,7 +490,7 @@ void vlc_UrlClean (vlc_url_t *restrict url) #if defined (HAVE_IDN) # include -#elif defined (WIN32) +#elif defined (_WIN32) # include # include #endif @@ -509,7 +509,7 @@ static char *vlc_idna_to_ascii (const char *idn) return NULL; return adn; -#elif defined (WIN32) && (_WIN32_WINNT >= 0x0601) +#elif defined (_WIN32) && (_WIN32_WINNT >= 0x0601) char *ret = NULL; wchar_t *wide = ToWide (idn); diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c index d6f86d9c2b..8bcb118fed 100644 --- a/src/video_output/vout_wrapper.c +++ b/src/video_output/vout_wrapper.c @@ -39,7 +39,7 @@ /***************************************************************************** * Local prototypes *****************************************************************************/ -#ifdef WIN32 +#ifdef _WIN32 static int Forward(vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *); #endif @@ -73,7 +73,7 @@ int vout_OpenWrapper(vout_thread_t *vout, } /* */ -#ifdef WIN32 +#ifdef _WIN32 var_Create(vout, "video-wallpaper", VLC_VAR_BOOL|VLC_VAR_DOINHERIT); var_AddCallback(vout, "video-wallpaper", Forward, NULL); #endif @@ -91,7 +91,7 @@ void vout_CloseWrapper(vout_thread_t *vout, vout_display_state_t *state) { vout_thread_sys_t *sys = vout->p; -#ifdef WIN32 +#ifdef _WIN32 var_DelCallback(vout, "video-wallpaper", Forward, NULL); #endif sys->decoder_pool = NULL; /* FIXME remove */ @@ -201,7 +201,7 @@ void vout_ManageWrapper(vout_thread_t *vout) } } -#ifdef WIN32 +#ifdef _WIN32 static int Forward(vlc_object_t *object, char const *var, vlc_value_t oldval, vlc_value_t newval, void *data) { diff --git a/src/video_output/window.c b/src/video_output/window.c index 4f1951fea4..b351936e98 100644 --- a/src/video_output/window.c +++ b/src/video_output/window.c @@ -64,7 +64,7 @@ vout_window_t *vout_window_New(vlc_object_t *obj, const char *type; switch (cfg->type) { -#if defined(WIN32) || defined(__OS2__) +#if defined(_WIN32) || defined(__OS2__) case VOUT_WINDOW_TYPE_HWND: type = "vout window hwnd"; window->handle.hwnd = NULL;