Commits

Oleg Oshmyan committed 55ec709

Fixed compilation errors under MSVC

Comments (0)

Files changed (4)

 AC_CHECK_HEADERS([\
 fcntl.h \
 inttypes.h \
+io.h \
 getopt.h \
 linux/cdrom.h \
 math.h \
 	memset(cd_device_path, 0, 16);
 	sprintf(cd_device_path, "\\\\.\\%s:", id3args_drive);
 	
-	HANDLE cdrom_device = CreateFile(cd_device_path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+	HANDLE cdrom_device = CreateFileA(cd_device_path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
 	if (cdrom_device != INVALID_HANDLE_VALUE) {
 		Windows_ioctlReadCDTOC(cdrom_device);
 		if (cdTOC != NULL) {
 //==================================================================//
 
 #include "AtomicParsley.h"
+#ifdef HAVE_ZLIB_H
 #include <zlib.h>
+#endif
 
 static void* zalloc(void *opaque, unsigned int items, unsigned int size)
 {
 			FILETIME createTime, accessTime, writeTime;
 			if (preserve_timestamps == true)
 			{
-				hFile = CreateFile(ISObasemediafile, GENERIC_WRITE | GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0);
+				hFile = CreateFileA(ISObasemediafile, GENERIC_WRITE | GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0);
 				if (hFile != INVALID_HANDLE_VALUE)
 					{
 					GetFileTime(hFile,&createTime,&accessTime,&writeTime);
 			if (preserve_timestamps == true)
 			{
 
-				hFileOut = CreateFile(ISObasemediafile, GENERIC_WRITE | GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0);
+				hFileOut = CreateFileA(ISObasemediafile, GENERIC_WRITE | GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0);
 
 				if (hFileOut != INVALID_HANDLE_VALUE)
 					{