Index: libdvdread4/dvd_reader.c
===================================================================
--- libdvdread4/dvd_reader.c	(revision 1219)
+++ libdvdread4/dvd_reader.c	(working copy)
@@ -341,7 +341,7 @@
   char *dev_name = NULL;
   char *path = NULL, *new_path = NULL, *path_copy = NULL;
 
-#if defined(_WIN32) || defined(__OS2__)
+#if defined(WIN32) || defined(__OS2__)
       int len;
 #endif
 
@@ -355,7 +355,7 @@
   /* Try to open libdvdcss or fall back to standard functions */
   have_css = dvdinput_setup();
 
-#if defined(_WIN32) || defined(__OS2__)
+#if defined(WIN32) || defined(__OS2__)
   /* Strip off the trailing \ if it is not a drive */
   len = strlen(path);
   if ((len > 1) &&
@@ -454,7 +454,7 @@
       }
     }
 
-#if defined(_WIN32) || defined(__OS2__)
+#if defined(WIN32) || defined(__OS2__)
     if(strlen(path_copy) > TITLES_MAX) {
       if(!strcasecmp(&(path_copy[strlen( path_copy ) - TITLES_MAX]),
                        "\\video_ts"))
@@ -522,7 +522,7 @@
       }
       fclose( mntfile );
     }
-#elif defined(_WIN32) || defined(__OS2__)
+#elif defined(WIN32) || defined(__OS2__)
 #ifdef __OS2__
     /* Use DVDOpenImageFile() only if it is a drive */
     if(isalpha(path[0]) && path[1] == ':' &&
@@ -532,7 +532,7 @@
     auth_drive = DVDOpenImageFile( path, have_css );
 #endif
 
-#if !defined(_WIN32) && !defined(__OS2__)
+#if !defined(WIN32) && !defined(__OS2__)
     if( !dev_name ) {
       fprintf( stderr, "libdvdread: Couldn't find device name.\n" );
     } else if( !auth_drive ) {
Index: libdvdread4/dvdread_internal.h
===================================================================
--- libdvdread4/dvdread_internal.h	(revision 1219)
+++ libdvdread4/dvdread_internal.h	(working copy)
@@ -20,12 +20,9 @@
 #define LIBDVDREAD_DVDREAD_INTERNAL_H
 
 #include <stdint.h>
+#include <unistd.h>
 #include <sys/types.h>
 
-#ifdef _WIN32
-#include <unistd.h>
-#endif /* _WIN32 */
-
 #include "dvdread/dvd_reader.h"
 
 #define CHECK_VALUE(arg)                                                \
