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.
This commit is contained in:
Rafaël Carré 2013-06-05 15:41:18 +02:00
parent 8f9168d79c
commit 6d53362001
141 changed files with 401 additions and 401 deletions

View File

@ -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

View File

@ -24,7 +24,7 @@
#include <stdio.h>
#ifdef WIN32
#ifdef _WIN32
# ifndef HAVE__LOCK_FILE
# warning Broken SDK: VLC logs will be garbage.
# define _lock_file(s) ((void)(s))

View File

@ -22,13 +22,13 @@
# include <config.h>
#endif
#ifdef WIN32
#ifdef _WIN32
# include <io.h>
#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

View File

@ -23,13 +23,13 @@
#endif
#include <sys/types.h>
#ifdef WIN32
#ifdef _WIN32
# include <windows.h>
#endif
pid_t getpid (void)
{
#if defined (WIN32)
#if defined (_WIN32)
return (pid_t) GetCurrentProcessId ();
#elif defined (__native_client__)
return 1;

View File

@ -26,7 +26,7 @@
#include <errno.h>
#include <sys/types.h>
#ifndef WIN32
#ifndef _WIN32
# include <sys/socket.h>
#else
# include <winsock2.h>

View File

@ -26,7 +26,7 @@
#include <string.h>
#include <errno.h>
#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);

View File

@ -33,7 +33,7 @@ static int check_align (size_t align)
return EINVAL;
}
#if !defined (WIN32) && !defined (__APPLE__)
#if !defined (_WIN32) && !defined (__APPLE__)
#include <malloc.h>
int posix_memalign (void **ptr, size_t align, size_t size)

View File

@ -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 <sys/types.h>
#if HAVE_POLL
# include <poll.h>
#elif defined (WIN32)
#elif defined (_WIN32)
# include <winsock2.h>
#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 <sys/types.h>
#ifdef WIN32
#ifdef _WIN32
# include <winsock2.h>
# include <ws2tcpip.h>
#else
@ -633,7 +633,7 @@ AH_TEMPLATE(ss_family, [Define to `sa_family' if <sys/socket.h> does not define.
AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_struct_sockaddr_storage,
[AC_TRY_COMPILE(
[#include <sys/types.h>
#if defined( WIN32 )
#if defined( _WIN32 )
# include <winsock2.h>
#else
# include <sys/socket.h>

View File

@ -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

View File

@ -5,7 +5,7 @@ diff -ruN zvbi/src/conv.c zvbi.new/src/conv.c
#endif
#include <errno.h>
+#ifndef WIN32
+#ifndef _WIN32
#include <langinfo.h>
+#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 <fcntl.h>
#include <time.h>
#include <errno.h>
+#ifndef WIN32
+#ifndef _WIN32
#include <sys/ioctl.h>
+#endif
@ -75,7 +75,7 @@ diff -ruN zvbi/src/proxy-msg.c zvbi.new/src/proxy-msg.c
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
+#ifndef WIN32
+#ifndef _WIN32
#include <syslog.h>
+#endif
#include <assert.h>
@ -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 <sys/syslog.h>
+#endif
@ -101,7 +101,7 @@ diff -ruN zvbi/src/vbi.c zvbi.new/src/vbi.c
#include <fcntl.h>
#include <time.h>
#include <errno.h>
+#ifndef WIN32
+#ifndef _WIN32
#include <sys/ioctl.h>
+#endif
#include <sys/time.h>
@ -138,7 +138,7 @@ diff -ruN zvbi/src/vbi.c zvbi.new/src/vbi.c
#include <fcntl.h> /* open() */
#include <unistd.h> /* close(), mmap(), munmap(), gettimeofday() */
+#ifndef WIN32
+#ifndef _WIN32
#include <sys/ioctl.h> /* ioctl() */
#include <sys/mman.h> /* 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.

View File

@ -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")))

View File

@ -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)
{

View File

@ -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 <malloc.h>
# 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 <tchar.h>
#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 <AvailabilityMacros.h>
#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 ';'

View File

@ -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;

View File

@ -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 */ \
{ \

View File

@ -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

View File

@ -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 <io.h>
# include <winsock2.h>
@ -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

View File

@ -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

View File

@ -34,7 +34,7 @@
*
*/
#if defined (WIN32)
#if defined (_WIN32)
# include <process.h>
# ifndef ETIMEDOUT
# define ETIMEDOUT 10060 /* This is the value in winsock.h. */

View File

@ -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;

View File

@ -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

View File

@ -40,7 +40,7 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
# include <fcntl.h>
#elif defined( WIN32 )
#elif defined( _WIN32 )
# include <io.h>
#endif

View File

@ -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)

View File

@ -36,7 +36,7 @@
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#elif defined( WIN32 )
#elif defined( _WIN32 )
# include <io.h>
#endif

View File

@ -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 */

View File

@ -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 );

View File

@ -44,7 +44,7 @@
# include <linux/magic.h>
#endif
#if defined( WIN32 )
#if defined( _WIN32 )
# include <io.h>
# include <ctype.h>
# include <shlwapi.h>
@ -58,7 +58,7 @@
#include <vlc_input.h>
#include <vlc_access.h>
#include <vlc_dialog.h>
#ifdef WIN32
#ifdef _WIN32
# include <vlc_charset.h>
#endif
#include <vlc_fs.h>
@ -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);

View File

@ -52,7 +52,7 @@
#include <assert.h>
#if defined( WIN32 )
#if defined( _WIN32 )
# include <winsock2.h>
#endif

View File

@ -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;

View File

@ -39,7 +39,7 @@
#include <gcrypt.h>
#ifdef WIN32
#ifdef _WIN32
# include <winsock2.h>
#else
# include <netinet/in.h>

View File

@ -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

View File

@ -29,7 +29,7 @@
#endif
#include <errno.h>
#ifdef WIN32
#ifdef _WIN32
# include <fcntl.h>
# include <sys/stat.h>
# include <io.h>
@ -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

View File

@ -73,7 +73,7 @@
#elif defined( HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H )
# include <sys/cdio.h>
# include <sys/cdrio.h>
#elif defined( WIN32 )
#elif defined( _WIN32 )
# include <windows.h>
# include <winioctl.h>
#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 )
{

View File

@ -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__ )

View File

@ -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

View File

@ -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;

View File

@ -50,7 +50,7 @@ See http://www.vdr-wiki.de/ and http://www.tvdr.de/ for more information.
#include <fcntl.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#elif defined( WIN32 )
#elif defined( _WIN32 )
# include <io.h>
#endif

View File

@ -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

View File

@ -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;

View File

@ -43,11 +43,11 @@
#include <vlc_strings.h>
#include <vlc_dialog.h>
#if defined( WIN32 ) || defined( __OS2__ )
#if defined( _WIN32 ) || defined( __OS2__ )
# include <io.h>
#endif
#ifndef WIN32
#ifndef _WIN32
# include <unistd.h>
#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);

View File

@ -42,7 +42,7 @@
# include <unistd.h>
#endif
#ifdef WIN32
#ifdef _WIN32
# include <winsock2.h>
# include <ws2tcpip.h>
#else

View File

@ -32,7 +32,7 @@
#include <vlc_common.h>
#include <vlc_codec.h>
#ifndef WIN32
#ifndef _WIN32
# define LOADER
#else
# include <objbase.h>

View File

@ -34,7 +34,7 @@
#include <vlc_codec.h>
#include <vlc_codecs.h>
#ifdef WIN32
#ifdef _WIN32
# include <objbase.h>
# include <vlc_charset.h>
#endif

View File

@ -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

View File

@ -36,7 +36,7 @@
#endif
/* On Win32, we link statically */
#ifdef WIN32
#ifdef _WIN32
# define FLUIDSYNTH_NOT_A_DLL
#endif

View File

@ -42,7 +42,7 @@
#include <ass/ass.h>
#if defined(WIN32)
#if defined(_WIN32)
# include <vlc_charset.h>
#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 );

View File

@ -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

View File

@ -34,7 +34,7 @@
#include <vlc_plugin.h>
#include <vlc_codec.h>
#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 */

View File

@ -33,7 +33,7 @@
#include <vlc_plugin.h>
#include <vlc_interface.h>
#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 )

View File

@ -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
*

View File

@ -58,7 +58,7 @@
# define PF_LOCAL PF_UNIX
#endif
#if defined(AF_LOCAL) && ! defined(WIN32)
#if defined(AF_LOCAL) && ! defined(_WIN32)
# include <sys/un.h>
#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 )

View File

@ -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))

View File

@ -33,7 +33,7 @@
#include <vlc_demux.h>
#include <vlc_url.h>
#if defined( WIN32 ) || defined( __OS2__ )
#if defined( _WIN32 ) || defined( __OS2__ )
# include <ctype.h> /* isalpha */
#endif
#include <assert.h>
@ -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;

View File

@ -36,7 +36,7 @@
#include <vlc_fs.h>
#include <vlc_charset.h>
#if defined( WIN32 )
#if defined( _WIN32 )
# include <mmsystem.h>
#elif defined(__linux__)
# include <sys/types.h>
@ -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];

View File

@ -38,7 +38,7 @@
#include <vlc_intf_strings.h>
#include <vlc_modules.h>
#include <vlc_plugin.h>
#ifdef WIN32
#ifdef _WIN32
#include <vlc_charset.h> /* 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=" +

View File

@ -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

View File

@ -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
}

View File

@ -48,7 +48,7 @@
#define ICON_HEIGHT 64
#ifdef WIN32
#ifdef _WIN32
# include <vlc_windows_interfaces.h>
#endif
#include <vlc_modules.h>
@ -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<QGridLayout *>(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( "</a>." ) );
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<QComboBox *>(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 <QDialogButtonBox>
#include "util/registry.hpp"
@ -1115,5 +1115,5 @@ void SPrefsPanel::saveAsso()
delete qvReg;
}
#endif /* WIN32 */
#endif /* _WIN32 */

View File

@ -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<QTreeWidgetItem *> 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

View File

@ -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,

View File

@ -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" );

View File

@ -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 */

View File

@ -29,7 +29,7 @@
#include "util/qvlcframe.hpp"
#ifdef WIN32
#ifdef _WIN32
#include <vlc_windows_interfaces.h>
#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

View File

@ -50,7 +50,7 @@
#include <vlc_plugin.h>
#include <vlc_vout_window.h>
#ifdef WIN32 /* For static builds */
#ifdef _WIN32 /* For static builds */
#include <QtPlugin>
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,

View File

@ -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
};

View File

@ -32,7 +32,7 @@
#include <QRegExp>
#include <QSignalMapper>
#ifdef WIN32
#ifdef _WIN32
#include <shlobj.h>
/* 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 )

View File

@ -25,7 +25,7 @@
# include "config.h"
#endif
#ifdef WIN32
#ifdef _WIN32
#include <stdlib.h>
#include "registry.hpp"
@ -213,4 +213,4 @@ long QVLCRegistry::DeleteKey( const char *path, const char *keyName )
return result;
}
#endif /* WIN32 */
#endif /* _WIN32 */

View File

@ -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 );

View File

@ -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 )
{

View File

@ -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 )

View File

@ -27,7 +27,7 @@
#include "../commands/cmd_dialogs.hpp"
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#elif defined( WIN32 )
#elif defined( _WIN32 )
# include <direct.h>
#endif

View File

@ -71,7 +71,7 @@ public:
}
virtual ~VoutMainWindow() { }
#if defined( WIN32 ) || defined( __OS2__ )
#if defined( _WIN32 ) || defined( __OS2__ )
virtual void processEvent( EvtKey &rEvtKey )
{

View File

@ -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;

View File

@ -833,7 +833,7 @@ static lua_State* GetLuaState( extensions_manager_t *p_mgr,
luaopen_vlm( L );
luaopen_volume( L );
luaopen_xml( L );
#if defined(WIN32) && !VLC_WINSTORE_APP
#if defined(_WIN32) && !VLC_WINSTORE_APP
luaopen_win( L );
#endif

View File

@ -266,7 +266,7 @@ static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
luaopen_gettext( L );
luaopen_xml( L );
luaopen_equalizer( L );
#if defined(WIN32) && !VLC_WINSTORE_APP
#if defined(_WIN32) && !VLC_WINSTORE_APP
luaopen_win( L );
#endif

View File

@ -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

View File

@ -43,7 +43,7 @@
#include "playlist.h"
#include "../../audio_filter/equalizer_presets.h"
#if !defined WIN32
#if !defined _WIN32
# include <locale.h>
#else
# include <windows.h>

View File

@ -29,7 +29,7 @@
#endif
#include <errno.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#endif
#ifdef HAVE_POLL

View File

@ -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) )
{

View File

@ -38,7 +38,7 @@
#include <sys/stat.h>
#ifdef WIN32
#ifdef _WIN32
# include <vlc_charset.h>
# include <io.h>
#else
@ -47,7 +47,7 @@
// Taglib headers
#ifdef WIN32
#ifdef _WIN32
# define TAGLIB_STATIC
#endif
#include <taglib.h>
@ -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;

View File

@ -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));

View File

@ -44,7 +44,7 @@
#include <vlc_strings.h>
#include <vlc_rand.h>
#ifndef WIN32
#ifndef _WIN32
# include <locale.h>
#endif

View File

@ -50,7 +50,7 @@ vlc_module_begin ()
set_capability( "xml", 10 )
set_callbacks( Open, Close )
#ifdef WIN32
#ifdef _WIN32
cannot_unload_broken_library()
#endif

View File

@ -54,7 +54,7 @@
# include <zlib.h>
#endif
#ifndef WIN32
#ifndef _WIN32
# include <net/if.h>
#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)
{

View File

@ -34,7 +34,7 @@
#include <assert.h>
#ifdef WIN32
#ifdef _WIN32
# define CHROMAPRINT_NODLL
#endif

View File

@ -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;

View File

@ -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

View File

@ -45,7 +45,7 @@
#include <stdlib.h>
#include <time.h>
#ifndef WIN32
#ifndef _WIN32
# include <locale.h>
#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;

View File

@ -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 <windows.h>
# include <shlobj.h>
# 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

View File

@ -38,7 +38,7 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#elif defined( WIN32 )
#elif defined( _WIN32 )
# include <io.h>
#endif

View File

@ -16,7 +16,7 @@
#include "AtmoDefs.h"
#if defined(WIN32)
#if defined(_WIN32)
# include <windows.h>
#endif

View File

@ -21,7 +21,7 @@
#include <stdio.h>
#include <fcntl.h>
#if !defined(WIN32)
#if !defined(_WIN32)
#include <termios.h>
#include <unistd.h>
#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);

View File

@ -13,7 +13,7 @@
#include "AtmoConnection.h"
#include "AtmoConfig.h"
#if defined(WIN32)
#if defined(_WIN32)
# include <windows.h>
#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; }

View File

@ -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;

View File

@ -24,7 +24,7 @@
#include <stdio.h>
#include <fcntl.h>
#if !defined(WIN32)
#if !defined(_WIN32)
#include <termios.h>
#include <unistd.h>
#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);

View File

@ -14,7 +14,7 @@
#include "AtmoConnection.h"
#include "AtmoConfig.h"
#if defined(WIN32)
#if defined(_WIN32)
# include <windows.h>
#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; }

View File

@ -3,7 +3,7 @@
#include "AtmoDefs.h"
#if defined(WIN32)
#if defined(_WIN32)
# include <windows.h>
# else
# if defined(_ATMO_VLC_PLUGIN_)

View File

@ -21,7 +21,7 @@
#include <stdio.h>
#include <fcntl.h>
#if !defined(WIN32)
#if !defined(_WIN32)
#include <termios.h>
#include <unistd.h>
#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);

View File

@ -15,7 +15,7 @@
#include "AtmoConnection.h"
#include "AtmoConfig.h"
#if defined(WIN32)
#if defined(_WIN32)
# include <windows.h>
#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; }

View File

@ -5,7 +5,7 @@
#include "AtmoDefs.h"
#if defined (WIN32)
#if defined (_WIN32)
# include <windows.h>
#else
# include <vlc_codecs.h>

Some files were not shown because too many files have changed in this diff Show More