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" \
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
#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))
# 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
#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;
#include <errno.h>
#include <sys/types.h>
-#ifndef WIN32
+#ifndef _WIN32
# include <sys/socket.h>
#else
# include <winsock2.h>
#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!
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);
* 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;
| (FD_ISSET (fd, wrset) ? POLLOUT : 0)
| (FD_ISSET (fd, exset) ? POLLPRI : 0);
}
-#ifdef WIN32
+#ifdef _WIN32
free (exset);
free (wrset);
free (rdset);
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)
*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.])
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]))
[#include <sys/types.h>
#if HAVE_POLL
# include <poll.h>
-#elif defined (WIN32)
+#elif defined (_WIN32)
# include <winsock2.h>
#endif
])
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
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
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>
# define FORCEINLINE __forceinline
# endif
# endif
-+#elif defined (WIN32)
++#elif defined (_WIN32)
+# define VOLATILE
+/* Make sure FORCEINLINE does not include "extern" */
+# undef FORCEINLINE
#endif
#include <errno.h>
-+#ifndef WIN32
++#ifndef _WIN32
#include <langinfo.h>
+#endif
dst_format = bind_textdomain_codeset (vbi_intl_domainname, NULL);
-
-+#ifdef WIN32
++#ifdef _WIN32
+#warning this is wrong
+#else
if (NULL == dst_format)
#include <fcntl.h>
#include <time.h>
#include <errno.h>
-+#ifndef WIN32
++#ifndef _WIN32
#include <sys/ioctl.h>
+#endif
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
-+#ifndef WIN32
++#ifndef _WIN32
#include <syslog.h>
+#endif
#include <assert.h>
#ifndef PROXY_MSG_H
#define PROXY_MSG_H
-+#ifndef WIN32
++#ifndef _WIN32
#include <sys/syslog.h>
+#endif
#include <fcntl.h>
#include <time.h>
#include <errno.h>
-+#ifndef WIN32
++#ifndef _WIN32
#include <sys/ioctl.h>
+#endif
#include <sys/time.h>
#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
}
-
-+#ifndef WIN32
++#ifndef _WIN32
/**
* @internal
*
"EXCL", O_EXCL,
"TRUNC", O_TRUNC,
"APPEND", O_APPEND,
-+#ifndef WIN32
++#ifndef _WIN32
"NONBLOCK", O_NONBLOCK,
+#endif
0);
return err;
}
-+#ifndef WIN32
++#ifndef _WIN32
/**
* @internal
* Drop-in for mmap(). Logs the request on fp if not NULL.
#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")))
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)
{
# 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")))
/*****************************************************************************
* OS-specific headers and thread types
*****************************************************************************/
-#if defined( WIN32 )
+#if defined( _WIN32 )
# include <malloc.h>
# ifndef PATH_MAX
# define PATH_MAX MAX_PATH
/* Stuff defined in src/extras/libc.c */
-#if defined(WIN32)
+#if defined(_WIN32)
/* several type definitions */
# if defined( __MINGW32__ )
# if !defined( _OFF_T_ )
# endif
# include <tchar.h>
-#endif /* WIN32 */
+#endif /* _WIN32 */
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)
#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 ';'
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;
/*@}*/
-#if defined( WIN32 ) && !VLC_WINSTORE_APP
+#if defined( _WIN32 ) && !VLC_WINSTORE_APP
# define CONSOLE_INTRO_MSG \
if( !getenv( "PWD" ) ) /* detect Cygwin shell or Wine */ \
{ \
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
* 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>
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
# define AI_IDN 0 /* GNU/libc extension */
#endif
-#ifdef WIN32
+#ifdef _WIN32
# undef gai_strerror
# define gai_strerror gai_strerrorA
#endif
#define CDECL_SYMBOL
#if defined (__PLUGIN__)
-# if defined (WIN32)
+# if defined (_WIN32)
# define DLL_SYMBOL __declspec(dllexport)
# undef CDECL_SYMBOL
# define CDECL_SYMBOL __cdecl
*
*/
-#if defined (WIN32)
+#if defined (_WIN32)
# include <process.h>
# ifndef ETIMEDOUT
# define ETIMEDOUT 10060 /* This is the value in winsock.h. */
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__
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);
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;
}
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
#ifdef HAVE_UNISTD_H
# include <unistd.h>
# include <fcntl.h>
-#elif defined( WIN32 )
+#elif defined( _WIN32 )
# include <io.h>
#endif
"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
)
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)
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)
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
-#elif defined( WIN32 )
+#elif defined( _WIN32 )
# include <io.h>
#endif
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 */
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 );
# include <linux/magic.h>
#endif
-#if defined( WIN32 )
+#if defined( _WIN32 )
# include <io.h>
# include <ctype.h>
# include <shlwapi.h>
#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>
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)
}
# define IsRemote(fd,path) IsRemote(fd)
-#else /* WIN32 || __OS2__ */
+#else /* _WIN32 || __OS2__ */
static bool IsRemote (const char *path)
{
# if !defined(__OS2__) && !VLC_WINSTORE_APP
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);
#include <assert.h>
-#if defined( WIN32 )
+#if defined( _WIN32 )
# include <winsock2.h>
#endif
*/
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;
#include <gcrypt.h>
-#ifdef WIN32
+#ifdef _WIN32
# include <winsock2.h>
#else
# include <netinet/in.h>
#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 " \
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
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
#endif
#include <errno.h>
-#ifdef WIN32
+#ifdef _WIN32
# include <fcntl.h>
# include <sys/stat.h>
# include <io.h>
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,
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 );
if( i_ret == -1 )
return VLC_ENOMEM;
-#ifndef WIN32
+#ifndef _WIN32
if( smbc_init( smb_auth, 0 ) )
{
free( psz_uri );
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 )
msg_Dbg( p_access, "failed to connect to %s", psz_remote );
}
}
-#endif // WIN32
+#endif // _WIN32
#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__)
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
/*
* 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;
* 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 );
* vcd device mode
*/
-#ifdef WIN32
+#ifdef _WIN32
if( p_vcddev->h_device_handle )
CloseHandle( p_vcddev->h_device_handle );
#elif defined( __OS2__ )
darwin_freeTOC( pTOC );
-#elif defined( WIN32 )
+#elif defined( _WIN32 )
DWORD dwBytesReturned;
CDROM_TOC cdrom_toc;
goto error;
}
-#elif defined( WIN32 )
+#elif defined( _WIN32 )
DWORD dwBytesReturned;
RAW_READ_INFO cdrom_raw;
}
#endif /* __APPLE__ */
-#if defined( WIN32 )
+#if defined( _WIN32 )
/*****************************************************************************
* win32_vcd_open: open vcd drive
*****************************************************************************
return (p_vcddev->h_device_handle == NULL) ? -1 : 0;
}
-#endif /* WIN32 */
+#endif /* _WIN32 */
#ifdef __OS2__
/*****************************************************************************
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 )
{
/* 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 */
#define CD_MAX_TRACK_NO 99
#endif
-#if defined( WIN32 )
+#if defined( _WIN32 )
/* Win32 DeviceIoControl specifics */
#ifndef MAXIMUM_NUMBER_TRACKS
#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 )
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__ )
}
}
-#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
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;
#include <fcntl.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
-#elif defined( WIN32 )
+#elif defined( _WIN32 )
# include <io.h>
#endif
#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
#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;
#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
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);
# include <unistd.h>
#endif
-#ifdef WIN32
+#ifdef _WIN32
# include <winsock2.h>
# include <ws2tcpip.h>
#else
#include <vlc_common.h>
#include <vlc_codec.h>
-#ifndef WIN32
+#ifndef _WIN32
# define LOADER
#else
# include <objbase.h>
#include <vlc_codec.h>
#include <vlc_codecs.h>
-#ifdef WIN32
+#ifdef _WIN32
# include <objbase.h>
# include <vlc_charset.h>
#endif
const GUID MEDIASUBTYPE_RGB565;
-#ifndef WIN32
+#ifndef _WIN32
void* CoTaskMemAlloc(unsigned long cb);
void CoTaskMemFree(void* cb);
#endif
#endif
/* On Win32, we link statically */
-#ifdef WIN32
+#ifdef _WIN32
# define FLUIDSYNTH_NOT_A_DLL
#endif
#include <ass/ass.h>
-#if defined(WIN32)
+#if defined(_WIN32)
# include <vlc_charset.h>
#endif
#endif
#ifdef HAVE_FONTCONFIG
-#if defined(WIN32)
+#if defined(_WIN32)
dialog_progress_bar_t *p_dialog =
dialog_ProgressCreate( p_dec,
_("Building font cache"),
"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 );
/** 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;
/** 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;
/** 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
#include <vlc_plugin.h>
#include <vlc_codec.h>
-#if !defined (__APPLE__) && !defined(WIN32)
+#if !defined (__APPLE__) && !defined(_WIN32)
# define LOADER 1
#endif
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
unsigned int InFrameSize;
unsigned int OutFrameSize;
-#ifndef WIN32
+#ifndef _WIN32
/* Video */
Component (*FindNextComponent)
( Component prev, ComponentDescription* desc );
};
static int QTAudioInit( decoder_t * );
-#ifndef WIN32
+#ifndef _WIN32
static int QTVideoInit( decoder_t * );
#endif
*****************************************************************************/
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;
#else
VLC_UNUSED( p_dec );
-#endif /* !WIN32 */
+#endif /* !_WIN32 */
return VLC_EGENERIC;
}
-#ifndef WIN32
+#ifndef _WIN32
/*****************************************************************************
* DecodeVideo:
*****************************************************************************/
block_Release( p_block );
return p_pic;
}
-#endif /* !WIN32 */
+#endif /* !_WIN32 */
/*****************************************************************************
* QTAudioInit:
return VLC_SUCCESS;
}
-#ifndef WIN32
+#ifndef _WIN32
/*****************************************************************************
* QTVideoInit:
*****************************************************************************/
return VLC_SUCCESS;
}
-#endif /* !WIN32 */
+#endif /* !_WIN32 */
#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. " \
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 ()
{
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 )
/*****************************************************************************
- * win32.c: Global-Hotkey WIN32 handling for vlc
+ * win32.c: Global-Hotkey _WIN32 handling for vlc
*****************************************************************************
* Copyright (C) 2008-2009 the VideoLAN team
*
# define PF_LOCAL PF_UNIX
#endif
-#if defined(AF_LOCAL) && ! defined(WIN32)
+#if defined(AF_LOCAL) && ! defined(_WIN32)
# include <sys/un.h>
#endif
input_thread_t *p_input;
bool b_input_buffering;
-#ifdef WIN32
+#ifdef _WIN32
HANDLE hConsoleIn;
bool b_quiet;
#endif
#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. " \
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)
set_capability( "interface", 20 )
set_callbacks( Activate, Deactivate )
-#ifdef WIN32
+#ifdef _WIN32
add_shortcut( "rc" )
#endif
vlc_module_end ()
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 ) )
pi_socket[1] = -1;
#endif /* AF_LOCAL */
}
-#endif /* !WIN32 */
+#endif /* !_WIN32 */
if( ( pi_socket == NULL ) &&
( psz_host = var_InheritString( p_intf, "rc-host" ) ) != NULL )
/* 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
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 );
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 )
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;
{
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 )
{
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))
#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>
/* 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;
#include <vlc_fs.h>
#include <vlc_charset.h>
-#if defined( WIN32 )
+#if defined( _WIN32 )
# include <mmsystem.h>
#elif defined(__linux__)
# include <sys/types.h>
{
VLC_UNUSED(p_this);
-#if defined(WIN32)
+#if defined(_WIN32)
MCI_OPEN_PARMS op;
DWORD i_flags;
TCHAR psz_drive[4];
#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
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*",
updateButtons();
}
-#ifdef WIN32 /* Disc drives probing for Windows */
+#ifdef _WIN32 /* Disc drives probing for Windows */
void DiscOpenPanel::onFocus()
{
ui.deviceCombo->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 );}
#define CuMRL( widget, slot ) CONNECT( widget , slot , this, updateMRL() );
-#ifdef WIN32
+#ifdef _WIN32
/*********************
* DirectShow Stuffs *
*********************/
CuMRL( dshowVSizeLine, textChanged( const QString& ) );
configList << "dshow-vdev" << "dshow-adev" << "dshow-size";
}
-#else /* WIN32 */
+#else /* _WIN32 */
/*******
* V4L2*
*******/
<< "dvb-bandwidth";
}
-#ifndef WIN32
+#ifndef _WIN32
/************
* PVR *
************/
ui.deviceCombo->currentIndex() ).toInt();
switch( i_devicetype )
{
-#ifdef WIN32
+#ifdef _WIN32
case DSHOW_DEVICE:
fileList << "dshow://";
mrl+= " :dshow-vdev=" +
virtual ~DiscOpenPanel();
virtual void clear() ;
virtual void accept() ;
-#if defined( WIN32 ) || defined( __OS2__ )
+#if defined( _WIN32 ) || defined( __OS2__ )
virtual void onFocus();
#endif
private:
QString advMRL;
QStringList configList;
QDialog *adv;
-#ifdef WIN32
+#ifdef _WIN32
StringListConfigControl *vdevDshowW, *adevDshowW;
QLineEdit *dshowVSizeLine;
#else
{
checkbox_lists( "Web", "Lua HTTP", "http" );
checkbox_lists( "Telnet", "Lua Telnet", "telnet" );
-#ifndef WIN32
+#ifndef _WIN32
checkbox_lists( "Console", "Lua CLI", "cli" );
#endif
}
#define ICON_HEIGHT 64
-#ifdef WIN32
+#ifdef _WIN32
# include <vlc_windows_interfaces.h>
#endif
#include <vlc_modules.h>
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 );
/* Build if necessary */
QGridLayout * outputAudioLayout = qobject_cast<QGridLayout *>(ui.outputAudioBox->layout());
-#ifdef WIN32
+#ifdef _WIN32
audioControl( DirectX );
optionWidgets["directxL" ] = DirectXLabel;
optionWidgets["directxW" ] = DirectXDevice;
free( psz_dvddiscpath );
free( psz_vcddiscpath );
}
-#ifndef WIN32
+#ifndef _WIN32
QStringList DVDDeviceComboBoxStringList = QStringList();
DVDDeviceComboBoxStringList
<< "dvd*" << "scd*" << "sr*" << "sg*" << "cd*";
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 );
+ qtr( "VLC skins website" )+ QString( "</a>." ) );
ui.skinsLabel->setFont( italicFont );
-#ifdef WIN32
+#ifdef _WIN32
BUTTONACT( ui.assoButton, assoDialog() );
#else
ui.assoButton->hide();
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(
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
control->insertIntoExistingGrid( gLayout, line );
controls.append( control );
-#ifdef WIN32
+#ifdef _WIN32
line++;
p_config = config_FindConfig( VLC_OBJECT(p_intf), "qt-disable-volume-keys" );
{
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__ )
#endif
}
-#ifdef WIN32
+#ifdef _WIN32
#include <QDialogButtonBox>
#include "util/registry.hpp"
delete qvReg;
}
-#endif /* WIN32 */
+#endif /* _WIN32 */
#include "ui/sprefs_subtitles.h"
#include "ui/sprefs_interface.h"
-#ifdef WIN32
+#ifdef _WIN32
# include "util/registry.hpp"
#endif
class QCheckBox;
class QString;
-#ifdef WIN32
+#ifdef _WIN32
class QTreeWidgetItem;
#endif
QStringList qs_filter;
QButtonGroup *radioGroup;
-#ifdef WIN32
+#ifdef _WIN32
QList<QTreeWidgetItem *> listAsso;
bool addType( const char * psz_ext, QTreeWidgetItem*, QTreeWidgetItem*, QVLCRegistry* );
#endif
void lastfm_Changed( int );
void updateAudioOptions( int );
void updateAudioVolume( int );
-#ifdef WIN32
+#ifdef _WIN32
void assoDialog();
void saveAsso();
#endif
inline void VLCProfileSelector::fillProfilesCombo()
{
QSettings settings(
-#ifdef WIN32
+#ifdef _WIN32
QSettings::IniFormat,
#else
QSettings::NativeFormat,
void VLCProfileSelector::saveProfiles()
{
QSettings settings(
-#ifdef WIN32
+#ifdef _WIN32
QSettings::IniFormat,
#else
QSettings::NativeFormat,
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" );
/* 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
********************/
MainInputManager::getInstance( p_intf );
-#ifdef WIN32
+#ifdef _WIN32
himl = NULL;
p_taskbl = NULL;
taskbar_wmsg = RegisterWindowMessage(TEXT("TaskbarButtonCreated"));
if( videoWidget )
releaseVideoSlot();
-#ifdef WIN32
+#ifdef _WIN32
if( himl )
ImageList_Destroy( himl );
if(p_taskbl)
{
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 )
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 */
#include "util/qvlcframe.hpp"
-#ifdef WIN32
+#ifdef _WIN32
#include <vlc_windows_interfaces.h>
#endif
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 * );
bool b_hasPausedWhenMinimized;
bool b_statusbarVisible;
-#ifdef WIN32
+#ifdef _WIN32
HIMAGELIST himl;
ITaskbarList3 *p_taskbl;
UINT taskbar_wmsg;
void setPlaylistVisibility(bool b_visible);
void popupMenu( const QPoint& );
-#ifdef WIN32
+#ifdef _WIN32
void changeThumbbarButtons( int );
#endif
#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)
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 */,
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 )
/* 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,
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
};
#include <QRegExp>
#include <QSignalMapper>
-#ifdef WIN32
+#ifdef _WIN32
#include <shlobj.h>
/* typedef enum {
SHARD_PIDL = 0x00000001,
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 )
# include "config.h"
#endif
-#ifdef WIN32
+#ifdef _WIN32
#include <stdlib.h>
#include "registry.hpp"
return result;
}
-#endif /* WIN32 */
+#endif /* _WIN32 */
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 );
return res;
}
-#ifdef WIN32
+#ifdef _WIN32
/// Wrapper around FromWide, to avoid the need to call free()
static inline string sFromWide( const wstring &rWide )
{
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,
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 )
#include "../commands/cmd_dialogs.hpp"
#ifdef HAVE_UNISTD_H
# include <unistd.h>
-#elif defined( WIN32 )
+#elif defined( _WIN32 )
# include <direct.h>
#endif
}
virtual ~VoutMainWindow() { }
-#if defined( WIN32 ) || defined( __OS2__ )
+#if defined( _WIN32 ) || defined( __OS2__ )
virtual void processEvent( EvtKey &rEvtKey )
{
#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;
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
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
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
#include "playlist.h"
#include "../../audio_filter/equalizer_presets.h"
-#if !defined WIN32
+#if !defined _WIN32
# include <locale.h>
#else
# include <windows.h>
#endif
#include <errno.h>
-#ifdef WIN32
+#ifdef _WIN32
#include <io.h>
#endif
#ifdef HAVE_POLL
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" )
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) )
{
#include <sys/stat.h>
-#ifdef WIN32
+#ifdef _WIN32
# include <vlc_charset.h>
# include <io.h>
#else
// Taglib headers
-#ifdef WIN32
+#ifdef _WIN32
# define TAGLIB_STATIC
#endif
#include <taglib.h>
if( !psz_path )
return VLC_ENOMEM;
-#if defined(WIN32)
+#if defined(_WIN32)
wchar_t *wpath = ToWide( psz_path );
if( wpath == NULL )
{
return VLC_EGENERIC;
}
-#if defined(WIN32)
+#if defined(_WIN32)
wchar_t *wpath = ToWide( p_export->psz_file );
if( wpath == NULL )
return VLC_EGENERIC;
switch (val)
{
case GNUTLS_E_AGAIN:
-#ifdef WIN32
+#ifdef _WIN32
WSASetLastError (WSAEWOULDBLOCK);
#else
errno = EAGAIN;
break;
case GNUTLS_E_INTERRUPTED:
-#ifdef WIN32
+#ifdef _WIN32
WSASetLastError (WSAEINTR);
#else
errno = EINTR;
if (!gnutls_error_is_fatal (val))
msg_Err (obj, "Error above should be handled");
#endif
-#ifdef WIN32
+#ifdef _WIN32
WSASetLastError (WSAECONNRESET);
#else
errno = ECONNRESET;
vlc_tls_sys_t *sys = session->sys;
int val;
-#ifdef WIN32
+#ifdef _WIN32
WSASetLastError (0);
#endif
do
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));
#include <vlc_strings.h>
#include <vlc_rand.h>
-#ifndef WIN32
+#ifndef _WIN32
# include <locale.h>
#endif
set_capability( "xml", 10 )
set_callbacks( Open, Close )
-#ifdef WIN32
+#ifdef _WIN32
cannot_unload_broken_library()
#endif
# include <zlib.h>
#endif
-#ifndef WIN32
+#ifndef _WIN32
# include <net/if.h>
#endif
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)
{
#include <assert.h>
-#ifdef WIN32
+#ifdef _WIN32
# define CHROMAPRINT_NODLL
#endif
if (mux)
{
/* RTP/RTCP mux: duplicate the socket */
-#ifndef WIN32
+#ifndef _WIN32
fd = vlc_dup (rtp_fd);
#else
WSAPROTOCOL_INFO info;
****************************************************************************/
static void* ThreadSend( void *data )
{
-#ifdef WIN32
+#ifdef _WIN32
# define ENOBUFS WSAENOBUFS
# define EAGAIN WSAEWOULDBLOCK
# define EWOULDBLOCK WSAEWOULDBLOCK
#include <stdlib.h>
#include <time.h>
-#ifndef WIN32
+#ifndef _WIN32
# include <locale.h>
#endif
#ifdef HAVE_XLOCALE_H
static int dup_socket(int oldfd)
{
int newfd;
-#ifndef WIN32
+#ifndef _WIN32
newfd = vlc_dup(oldfd);
#else
WSAPROTOCOL_INFO info;
# 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"
#endif
/* Win32 GDI */
-#ifdef WIN32
+#ifdef _WIN32
# include <windows.h>
# include <shlobj.h>
# define HAVE_STYLES
char* psz_fontfamily;
char* psz_monofontfamily;
xml_reader_t *p_xml;
-#ifdef WIN32
+#ifdef _WIN32
char* psz_win_fonts_path;
#endif
FcInit();
#endif
-#if defined( WIN32 ) || defined( __APPLE__ )
+#if defined( _WIN32 ) || defined( __APPLE__ )
dialog_progress_bar_t *p_dialog = NULL;
FcConfig *fcConfig = FcInitLoadConfig();
}
#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 )
return psz_tmp;
}
}
-#endif /* HAVE_WIN32 */
+#endif /* _WIN32 */
#ifdef __APPLE__
#if !TARGET_OS_IPHONE
#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,
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 ) )
#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
#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 );
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
#ifdef HAVE_UNISTD_H
# include <unistd.h>
-#elif defined( WIN32 )
+#elif defined( _WIN32 )
# include <io.h>
#endif
#include "AtmoDefs.h"
-#if defined(WIN32)
+#if defined(_WIN32)
# include <windows.h>
#endif
#include <stdio.h>
#include <fcntl.h>
-#if !defined(WIN32)
+#if !defined(_WIN32)
#include <termios.h>
#include <unistd.h>
#endif
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) {
void CAtmoClassicConnection::CloseConnection() {
if(m_hComport!=INVALID_HANDLE_VALUE) {
-#if defined(WIN32)
+#if defined(_WIN32)
CloseHandle(m_hComport);
#else
close(m_hComport);
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);
}
}
-#if defined(WIN32)
+#if defined(_WIN32)
WriteFile(m_hComport, buffer, 19, &iBytesWritten, NULL); // send to COM-Port
#else
iBytesWritten = write(m_hComport, buffer, 19);
#include "AtmoConnection.h"
#include "AtmoConfig.h"
-#if defined(WIN32)
+#if defined(_WIN32)
# include <windows.h>
#endif
private:
HANDLE m_hComport;
-#if defined(WIN32)
+#if defined(_WIN32)
DWORD m_dwLastWin32Error;
public:
DWORD getLastError() { return m_dwLastWin32Error; }
#define ATMO_MAX(X, Y) ((X) > (Y) ? (X) : (Y))
-#if !defined(WIN32)
+#if !defined(_WIN32)
#define INVALID_HANDLE_VALUE -1
typedef int HANDLE;
#include <stdio.h>
#include <fcntl.h>
-#if !defined(WIN32)
+#if !defined(_WIN32)
#include <termios.h>
#include <unistd.h>
#endif
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) {
void CAtmoDmxSerialConnection::CloseConnection() {
if(m_hComport!=INVALID_HANDLE_VALUE) {
-#if defined(WIN32)
+#if defined(_WIN32)
CloseHandle(m_hComport);
#else
close(m_hComport);
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);
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);
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);
#include "AtmoConnection.h"
#include "AtmoConfig.h"
-#if defined(WIN32)
+#if defined(_WIN32)
# include <windows.h>
#endif
// 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; }
#include "AtmoDefs.h"
-#if defined(WIN32)
+#if defined(_WIN32)
# include <windows.h>
# else
# if defined(_ATMO_VLC_PLUGIN_)
#include <stdio.h>
#include <fcntl.h>
-#if !defined(WIN32)
+#if !defined(_WIN32)
#include <termios.h>
#include <unistd.h>
#endif
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_)
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] );
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] );
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);
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);
#include "AtmoConnection.h"
#include "AtmoConfig.h"
-#if defined(WIN32)
+#if defined(_WIN32)
# include <windows.h>
#endif
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; }
#include "AtmoDefs.h"
-#if defined (WIN32)
+#if defined (_WIN32)
# include <windows.h>
#else
# include <vlc_codecs.h>
#include <stdio.h>
#include <fcntl.h>
-#if !defined(WIN32)
+#if !defined(_WIN32)
#include <termios.h>
#include <unistd.h>
#endif
sprintf(serdevice,"com%d",portNummer);
#endif
-#if defined(WIN32)
+#if defined(_WIN32)
m_hComport = CreateFileA(serdevice,
GENERIC_WRITE, 0, NULL,
{
reset(255);
-#if defined(WIN32)
+#if defined(_WIN32)
CloseHandle(m_hComport);
#else
close(m_hComport);
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 );
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 );
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 );
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 );
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 );
#include "AtmoConnection.h"
#include "AtmoConfig.h"
-#if defined(WIN32)
+#if defined(_WIN32)
# include <windows.h>
#endif
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; }
#include <stdio.h>
#include <fcntl.h>
-#if !defined(WIN32)
+#if !defined(_WIN32)
#include <termios.h>
#include <unistd.h>
#endif
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) {
void CMoMoConnection::CloseConnection() {
if(m_hComport!=INVALID_HANDLE_VALUE) {
-#if defined(WIN32)
+#if defined(_WIN32)
CloseHandle(m_hComport);
#else
close(m_hComport);
}
}
-#if defined(WIN32)
+#if defined(_WIN32)
WriteFile(m_hComport, buffer, bufSize, &iBytesWritten, NULL); // send to COM-Port
#else
iBytesWritten = write(m_hComport, buffer, bufSize);
#include "AtmoConnection.h"
#include "AtmoConfig.h"
-#if defined(WIN32)
+#if defined(_WIN32)
# include <windows.h>
#endif
private:
HANDLE m_hComport;
-#if defined(WIN32)
+#if defined(_WIN32)
DWORD m_dwLastWin32Error;
public:
DWORD getLastError() { return m_dwLastWin32Error; }
"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 */
5 /* fnordlicht */
};
static const char *const ppsz_device_type_descriptions[] = {
-#if defined( WIN32 )
+#if defined( _WIN32 )
N_("AtmoWin Software"),
#endif
N_("Classic AtmoLight"),
"fnordlicht hardware " \
"choose 1 to 254 channels")
-#if defined( WIN32 )
+#if defined( _WIN32 )
# define DEFAULT_DEVICE 0
#else
# define DEFAULT_DEVICE 1
"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 "\
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 )
/*
"momo-channels",
"fnordlicht-amount",
-#if defined(WIN32 )
+#if defined(_WIN32 )
"atmowinexe",
#endif
#if defined(__ATMO_DEBUG__)
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);
"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 */
p_atmo_dyndata->UnLockCriticalSection();
}
}
-#if defined(WIN32)
+#if defined(_WIN32)
} else if(p_sys->pf_ctrl_atmo_finalize)
{
/* on win32 with active ctrl dll */
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 */
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 */
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 */
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 */
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 */
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 */
*/
-#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
*/
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] != '\\'))
{
*/
int i = AtmoInitialize(p_filter, false);
-#if defined( WIN32 )
+#if defined( _WIN32 )
if((i != 1) && (p_sys->i_device_type == 0))
{
/*
Atmo_Shutdown(p_filter);
-#if defined( WIN32 )
+#if defined( _WIN32 )
if(p_sys->h_AtmoCtrl != NULL)
{
FreeLibrary(p_sys->h_AtmoCtrl);
"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,
#ifdef OVERLAP
/* OS CODE DEPENDENT to get display dimensions */
-# ifdef WIN32
+# ifdef _WIN32
# include <windows.h>
# else
# include <xcb/xcb.h>
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" )
{ 0, {0, }, { 0, }, { 0, 0, 0 }, false }
};
-#ifndef WIN32
+#ifndef _WIN32
/* Get the number of outputs */
static unsigned CountMonitors( vlc_object_t *obj )
{
/* 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 )
{
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 );
#include <assert.h>
#include <aalib.h>
-#ifndef WIN32
+#ifndef _WIN32
# ifdef X_DISPLAY_MISSING
# error Xlib required due to XInitThreads
# endif
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
#include <vlc_plugin.h>
#include <vlc_vout_display.h>
#include <vlc_picture_pool.h>
-#if !defined(WIN32) && !defined(__APPLE__)
+#if !defined(_WIN32) && !defined(__APPLE__)
# ifdef X_DISPLAY_MISSING
# error Xlib required due to XInitThreads
# endif
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;
free(sys);
}
-#if defined(WIN32)
+#if defined(_WIN32)
FreeConsole();
#endif
return VLC_EGENERIC;
caca_free_display(sys->dp);
cucul_free_canvas(sys->cv);
-#if defined(WIN32)
+#if defined(_WIN32)
FreeConsole();
#endif
/* 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");
# elif USE_OPENGL_ES == 1
# include <GLES/gl.h>
# else
-# ifdef WIN32
+# ifdef _WIN32
# include <GL/glew.h>
# undef glClientActiveTexture
# undef glActiveTexture
#include <SDL.h>
-#if !defined(WIN32) && !defined(__OS2__)
+#if !defined(_WIN32) && !defined(__OS2__)
# ifdef X_DISPLAY_MISSING
# error Xlib required due to XInitThreads
# endif
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
/* */
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
#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
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();
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
#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);
/* (...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
#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
#define LINE_START 8
#define PADDING_SPACES 25
-#ifdef WIN32
+#ifdef _WIN32
# define OPTION_VALUE_SEP "="
#else
# define OPTION_VALUE_SEP " "
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
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 ) )
PauseConsole();
}
-#if defined( WIN32 ) && !VLC_WINSTORE_APP
+#if defined( _WIN32 ) && !VLC_WINSTORE_APP
/*****************************************************************************
* ShowConsole: On Win32, create an output console for debug messages
*****************************************************************************
{
unsigned i_width = 80;
-#ifndef WIN32
+#ifndef _WIN32
FILE *file = popen( "stty size 2>/dev/null", "r" );
if (file != NULL)
{
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
-#if defined (WIN32)
+#if defined (_WIN32)
# include <direct.h>
#endif
#include <sys/stat.h>
#include <vlc_common.h>
#include <vlc_fs.h>
-#ifdef WIN32
+#ifdef _WIN32
# include <vlc_charset.h>
#endif
#include <vlc_input.h>
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 )
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
{
#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:)")
"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 " \
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"
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
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,
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')
true )
#endif
-#if defined (WIN32) || defined (__APPLE__)
+#if defined (_WIN32) || defined (__APPLE__)
add_obsolete_string( "language" ) /* since 2.1.0 */
#endif
* 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
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
msg_Dbg( p_libvlc, "removing stats" );
-#if !defined( WIN32 ) && !defined( __OS2__ )
+#if !defined( _WIN32 ) && !defined( __OS2__ )
char* psz_pidfile = NULL;
if( b_daemon )
/* 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
}
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. */
*/
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 *** );
#endif
-#ifdef WIN32
+#ifdef _WIN32
# include <io.h>
static
#ifndef __linux__
#include <sys/types.h>
-#ifndef WIN32
+#ifndef _WIN32
#include <unistd.h>
#include <sys/wait.h>
#include <signal.h>
#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();
}
#endif
-#else /* WIN32 || __OS2__ */
+#else /* _WIN32 || __OS2__ */
# define vlc_CPU_check(name, func) (1)
#endif
#endif
{
/* 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
#include <vlc_common.h>
#include <vlc_interface.h>
-#ifdef WIN32
+#ifdef _WIN32
# include <vlc_network.h> /* 'net_strerror' and 'WSAGetLastError' */
#endif
#include <vlc_charset.h>
va_end (args);
}
-#ifdef WIN32
+#ifdef _WIN32
static void Win32DebugOutputMsg (void *, int , const vlc_log_t *,
const char *, va_list);
#endif
char errbuf[2001];
size_t errlen;
-#ifndef WIN32
+#ifndef _WIN32
strerror_r( errno, errbuf, 1001 );
#else
int sockerr = WSAGetLastError( );
/* 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);
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);
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)
{
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
# include <sys/socket.h>
# include <netinet/in.h>
# include <unistd.h> // close(), write()
-#elif defined(WIN32)
+#elif defined(_WIN32)
# include <io.h>
# include <winsock2.h>
# include <ws2tcpip.h>
}
-#if defined(WIN32) || defined(__OS2__)
+#if defined(_WIN32) || defined(__OS2__)
/**
* select()-able pipes emulated using Winsock
*/
close (c);
return -1;
}
-#endif /* WIN32 || __OS2__ */
+#endif /* _WIN32 || __OS2__ */
static vlc_mutex_t pipe_lock = VLC_STATIC_MUTEX;
#include <gcrypt.h>
#include <vlc_gcrypt.h>
-#ifdef WIN32
+#ifdef _WIN32
#include <shellapi.h>
#endif
#include "update.h"
* 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 ""
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);
goto out;
}
-#if !defined( WIN32 ) && !defined( __OS2__ )
+#if !defined( _WIN32 ) && !defined( __OS2__ )
vlc_rename (tmpname, filename); /* atomically replace old cache */
fclose (file);
#else
#ifdef ENABLE_NLS
# include <libintl.h>
-# if defined (__APPLE__) || defined (WIN32) || defined(__OS2__)
+# if defined (__APPLE__) || defined (_WIN32) || defined(__OS2__)
# include <vlc_charset.h>
# endif
#endif
{
#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)
# include <poll.h>
#endif
-#if defined( WIN32 )
+#if defined( _WIN32 )
# include <winsock2.h>
#else
# include <sys/socket.h>
#endif
-#if defined( WIN32 )
+#if defined( _WIN32 )
/* We need HUGE buffer otherwise TCP throughput is very limited */
#define HTTPD_CL_BUFSIZE 1000000
#else
}
/* 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 ) )
}
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 ) )
# define INADDR_NONE 0xFFFFFFFF
#endif
-#if defined(WIN32)
+#if defined(_WIN32)
# undef EAFNOSUPPORT
# define EAFNOSUPPORT WSAEAFNOSUPPORT
#endif
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
}
/* 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
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);
if (ufd[1].revents)
{
msg_Dbg (p_this, "socket %d polling interrupted", fd);
-#if defined(WIN32)
+#if defined(_WIN32)
WSASetLastError (WSAEINTR);
#else
errno = EINTR;
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
}
else
{
-#ifdef WIN32
+#ifdef _WIN32
n = recv (fd, p_buf, i_buflen, 0);
error = WSAGetLastError();
#else
if (n == -1)
{
-#if defined(WIN32)
+#if defined(_WIN32)
switch (error)
{
case WSAEWOULDBLOCK:
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);
#define _XPG4_2 /* ancilliary data on Solaris */
-#if !defined (WIN32) && !defined (__OS2__)
+#if !defined (_WIN32) && !defined (__OS2__)
# define ENABLE_ROOTWRAP 1
#endif
#endif
#include <vlc_network.h>
-#if defined (WIN32)
+#if defined (_WIN32)
# undef EINPROGRESS
# define EINPROGRESS WSAEWOULDBLOCK
# undef EWOULDBLOCK
#include <vlc_network.h>
-#ifdef WIN32
+#ifdef _WIN32
# define EAFNOSUPPORT WSAEAFNOSUPPORT
#else
# include <unistd.h>
(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))
{
break;
}
-#if defined( WIN32 )
+#if defined( _WIN32 )
if( WSAGetLastError () == WSAENETUNREACH )
#else
if( errno == ENETUNREACH )
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 */
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",
#include <vlc_common.h>
-#if !defined WIN32
+#if !defined _WIN32
# include <locale.h>
#else
# include <windows.h>
*/
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]) )
#if defined( __APPLE__ )
if( *str == ':' )
*str = '_';
-#elif defined( WIN32 ) || defined( __OS2__ )
+#elif defined( _WIN32 ) || defined( __OS2__ )
if( strchr( "*\"?:|<>", *str ) )
*str = '_';
if( *str == '/' )
#include <stdarg.h>
#include <stdlib.h>
#include <sys/types.h>
-#if defined(WIN32)
+#if defined(_WIN32)
# include <io.h>
#endif
#include <errno.h>
*/
int utf8_vfprintf( FILE *stream, const char *fmt, va_list ap )
{
-#ifndef WIN32
+#ifndef _WIN32
return vfprintf (stream, fmt, ap);
#else
char *str;
#include <stdlib.h>
#include <string.h>
#include <assert.h>
-#ifdef WIN32
+#ifdef _WIN32
# include <io.h>
#endif
path = p;
#endif
-#if defined( WIN32 ) || defined( __OS2__ )
+#if defined( _WIN32 ) || defined( __OS2__ )
/* Drive letter */
if (isalpha ((unsigned char)path[0]) && (path[1] == ':'))
{
#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 */
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;
if (*end)
goto out;
-#if !defined( WIN32 ) && !defined( __OS2__ )
+#if !defined( _WIN32 ) && !defined( __OS2__ )
switch (fd)
{
case 0:
#if defined (HAVE_IDN)
# include <idna.h>
-#elif defined (WIN32)
+#elif defined (_WIN32)
# include <windows.h>
# include <vlc_charset.h>
#endif
return NULL;
return adn;
-#elif defined (WIN32) && (_WIN32_WINNT >= 0x0601)
+#elif defined (_WIN32) && (_WIN32_WINNT >= 0x0601)
char *ret = NULL;
wchar_t *wide = ToWide (idn);
/*****************************************************************************
* Local prototypes
*****************************************************************************/
-#ifdef WIN32
+#ifdef _WIN32
static int Forward(vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void *);
#endif
}
/* */
-#ifdef WIN32
+#ifdef _WIN32
var_Create(vout, "video-wallpaper", VLC_VAR_BOOL|VLC_VAR_DOINHERIT);
var_AddCallback(vout, "video-wallpaper", Forward, NULL);
#endif
{
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 */
}
}
-#ifdef WIN32
+#ifdef _WIN32
static int Forward(vlc_object_t *object, char const *var,
vlc_value_t oldval, vlc_value_t newval, void *data)
{
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;