Commit 6d533620 authored by Rafaël Carré's avatar Rafaël Carré

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.
parent 8f9168d7
......@@ -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
......
......@@ -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))
......
......@@ -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
......
......@@ -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;
......
......@@ -26,7 +26,7 @@
#include <errno.h>
#include <sys/types.h>
#ifndef WIN32
#ifndef _WIN32
# include <sys/socket.h>
#else
# include <winsock2.h>
......
......@@ -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);
......
......@@ -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)
......
......@@ -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>
......
......@@ -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
......
......@@ -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.
......
......@@ -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")))
......
......@@ -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)
{
......
......@@ -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 ';'
......
......@@ -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;
......
......@@ -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 */ \
{ \
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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. */
......
......@@ -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;
......
......@@ -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
......
......@@ -40,7 +40,7 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
# include <fcntl.h>
#elif defined( WIN32 )
#elif defined( _WIN32 )
# include <io.h>
#endif
......
......@@ -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)
......
......@@ -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
......
......@@ -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 */
......
......@@ -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 );
......
......@@ -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);
......
......@@ -52,7 +52,7 @@
#include <assert.h>
#if defined( WIN32 )
#if defined( _WIN32 )
# include <winsock2.h>
#endif
......
......@@ -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;
......
......@@ -39,7 +39,7 @@
#include <gcrypt.h>
#ifdef WIN32
#ifdef _WIN32
# include <winsock2.h>
#else
# include <netinet/in.h>
......
......@@ -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
......
......@@ -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
......@@ -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;
}