Ignore Release and Debug folders.
Windows SDK does have fcntl.h, snprintf, sys/stat.h, vsnprintf, windows.h and lseek64. Does not have inttypes.h. Modify config.h to reflect this. Windows 8 WDK requires us to specify ddk headers will be used usermode. __PRETTY_FUNCTION__ is defined in MingW but not in VS. Equal to __FUNCSIG__ DDK headers are not longer in a folder (as of Win8 WDK) Windows SDK defines _snprintf, same as snprintf. VS didn't like bool declarations to be inline to function return. Also, it's BOOL in Windows SDK. Specific VS version.h should be used when using VS. DOES COMPILE
This commit is contained in:
4
MSVC/.gitignore
vendored
4
MSVC/.gitignore
vendored
@@ -6,4 +6,6 @@ Backup
|
||||
*.user
|
||||
UpgradeLog.*
|
||||
*.sdf
|
||||
*.suo
|
||||
*.suo
|
||||
[Rr]elease
|
||||
[Dd]ebug
|
||||
@@ -37,7 +37,7 @@
|
||||
#define HAVE_ERRNO_H 1
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define 1 if you have FreeBSD CD-ROM support */
|
||||
#undef HAVE_FREEBSD_CDROM
|
||||
@@ -49,7 +49,7 @@
|
||||
#undef HAVE_ICONV
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <IOKit/IOKitLib.h> header file. */
|
||||
#undef HAVE_IOKIT_IOKITLIB_H
|
||||
@@ -92,7 +92,7 @@
|
||||
#define HAVE_MEMSET 1
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#undef HAVE_SNPRINTF
|
||||
#define HAVE_SNPRINTF 1
|
||||
|
||||
/* Define 1 if you have Solaris CD-ROM support */
|
||||
#undef HAVE_SOLARIS_CDROM
|
||||
@@ -119,7 +119,7 @@
|
||||
#undef HAVE_SYS_CDIO_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
@@ -140,11 +140,18 @@
|
||||
#undef HAVE_VCDINFO
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#undef HAVE_VSNPRINTF
|
||||
#define HAVE_VSNPRINTF 1
|
||||
|
||||
/* Define 1 if you have MinGW CD-ROM support */
|
||||
#define HAVE_WIN32_CDROM 1
|
||||
|
||||
/* Define 1 if you have Windows SDK */
|
||||
#define HAVE_WINDOWS_H 1
|
||||
|
||||
/* Windows SDK includes seek64 */
|
||||
#define HAVE_LSEEK64 1
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
|
||||
/* Define as const if the declaration of iconv() needs const. */
|
||||
#undef ICONV_CONST
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\MSVC;..\include;..\lib\driver;..\lib\driver\MSWindows;..\lib\driver\mmc;..\lib\driver\image;..\lib\driver\FreeBSD;..\lib\iso9660;..\lib\udf;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\include\cdio\msvc;..\MSVC;..\include;..\lib\driver;..\lib\driver\MSWindows;..\lib\driver\mmc;..\lib\driver\image;..\lib\driver\FreeBSD;..\lib\iso9660;..\lib\udf;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H;HAVE_WINDOWS_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
@@ -91,7 +91,7 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\MSVC;..\include;..\lib\driver;..\lib\driver\MSWindows;..\lib\driver\mmc;..\lib\driver\image;..\lib\driver\FreeBSD;..\lib\iso9660;..\lib\udf;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\include\cdio\msvc;..\MSVC;..\include;..\lib\driver;..\lib\driver\MSWindows;..\lib\driver\mmc;..\lib\driver\image;..\lib\driver\FreeBSD;..\lib\iso9660;..\lib\udf;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H;HAVE_WINDOWS_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
@@ -106,7 +106,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\MSVC;..\include;..\lib\driver;..\lib\driver\MSWindows;..\lib\driver\mmc;..\lib\driver\image;..\lib\driver\FreeBSD;..\lib\iso9660;..\lib\udf;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\include\cdio\msvc;..\MSVC;..\include;..\lib\driver;..\lib\driver\MSWindows;..\lib\driver\mmc;..\lib\driver\image;..\lib\driver\FreeBSD;..\lib\iso9660;..\lib\udf;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H;HAVE_WINDOWS_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
@@ -116,7 +116,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\MSVC;..\include;..\lib\driver;..\lib\driver\MSWindows;..\lib\driver\mmc;..\lib\driver\image;..\lib\driver\FreeBSD;..\lib\iso9660;..\lib\udf;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\include\cdio\msvc;..\MSVC;..\include;..\lib\driver;..\lib\driver\MSWindows;..\lib\driver\mmc;..\lib\driver\image;..\lib\driver\FreeBSD;..\lib\iso9660;..\lib\udf;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
@@ -169,6 +169,7 @@
|
||||
<ClCompile Include="..\lib\iso9660\iso9660_fs.c" />
|
||||
<ClCompile Include="..\lib\iso9660\rock.c" />
|
||||
<ClCompile Include="..\lib\iso9660\xa.c" />
|
||||
<ClInclude Include="..\include\cdio\msvc\unistd.h" />
|
||||
<ClInclude Include="..\lib\driver\filemode.h" />
|
||||
<ClInclude Include="..\lib\udf\filemode.c" />
|
||||
<ClInclude Include="..\lib\udf\udf.c" />
|
||||
|
||||
@@ -145,9 +145,6 @@
|
||||
<ClCompile Include="..\lib\driver\netbsd.c">
|
||||
<Filter>Source Files\driver</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\lib\driver\image\nrg.c">
|
||||
<Filter>Source Files\driver</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\lib\driver\os2.c">
|
||||
<Filter>Source Files\driver</Filter>
|
||||
</ClCompile>
|
||||
@@ -190,6 +187,9 @@
|
||||
<ClCompile Include="..\lib\driver\MSWindows\aspi32.c">
|
||||
<Filter>Source Files\driver\MSWindows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\lib\driver\image\nrg.c">
|
||||
<Filter>Source Files\driver\image</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\lib\udf\filemode.c">
|
||||
@@ -363,5 +363,8 @@
|
||||
<ClInclude Include="config.h">
|
||||
<Filter>Include Files\cdio\msvc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\cdio\msvc\unistd.h">
|
||||
<Filter>Include Files\cdio\msvc</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
30
include/cdio/msvc/unistd.h
Normal file
30
include/cdio/msvc/unistd.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/* -*- c -*-
|
||||
Copyright (C) Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if defined (_MSC_VER) || defined (_XBOX)
|
||||
#ifndef _UNISTD_H_
|
||||
#define _UNISTD_H_
|
||||
|
||||
#ifndef _WINDOWS_H_
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
typedef SSIZE_T ssize_t;
|
||||
typedef unsigned int mode_t;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -8,13 +8,13 @@
|
||||
/*! CDIO_VERSION is a C-Preprocessor macro of a string that shows what
|
||||
version is used. cdio_version_string has the same value, but it is a
|
||||
constant variable that can be accessed at run time. */
|
||||
#define CDIO_VERSION "@VERSION@ @build@"
|
||||
#define CDIO_VERSION "0.90 pc-windows-visualstudio"
|
||||
extern const char *cdio_version_string; /**< = CDIO_VERSION */
|
||||
|
||||
/*! LIBCDIO_VERSION_NUM is a C-Preprocessor macro that can be used for
|
||||
testing in the C preprocessor. libcdio_version_num has the same
|
||||
value, but it is a constant variable that can be accessed at run
|
||||
time. */
|
||||
#define LIBCDIO_VERSION_NUM @LIBCDIO_VERSION_NUM@
|
||||
#define LIBCDIO_VERSION_NUM 90
|
||||
|
||||
extern const unsigned int libcdio_version_num; /**< = LIBCDIO_VERSION_NUM */
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
Copyright (C) 2004, 2005, 2008, 2010, 2011, 2012
|
||||
Rocky Bernstein <rocky@gnu.org>
|
||||
Copyright (C) 2013 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -26,6 +27,13 @@
|
||||
|
||||
#ifdef HAVE_WIN32_CDROM
|
||||
|
||||
/* Windows 8 WDK says this is needed for user mode applications */
|
||||
#define _NTSCSI_USER_MODE_ 1
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# define __PRETTY_FUNCTION__ __FUNCSIG__
|
||||
#endif
|
||||
|
||||
#if defined (_XBOX)
|
||||
# include "inttypes.h"
|
||||
# include "NtScsi.h"
|
||||
@@ -33,18 +41,11 @@
|
||||
#else
|
||||
#if defined (__MINGW64__)
|
||||
# define _NTSRB_ /* Bad things happen if srb.h gets included */
|
||||
# include <windows.h>
|
||||
# include <ntddcdrm.h>
|
||||
# include <ntddscsi.h>
|
||||
#else
|
||||
# include <ddk/ntddcdrm.h>
|
||||
# include <ddk/ntddscsi.h>
|
||||
#endif
|
||||
# include <ddk/scsi.h>
|
||||
#endif
|
||||
|
||||
#if defined (_WIN32)
|
||||
#include <windows.h>
|
||||
#include <ntddcdrm.h>
|
||||
#include <ntddscsi.h>
|
||||
#include <scsi.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -60,6 +61,8 @@
|
||||
#include <cdio/mmc.h>
|
||||
#include "cdio/logging.h"
|
||||
|
||||
#define snprintf _snprintf; // Windows prepends with underscore.
|
||||
|
||||
#if defined (_XBOX)
|
||||
#define windows_error(loglevel,i_err) { \
|
||||
cdio_log(loglevel, "Error: file %s: line %d (%s) %ld\n", \
|
||||
@@ -161,6 +164,7 @@ audio_play_msf_win32ioctl (void *p_user_data, msf_t *p_start_msf,
|
||||
const _img_private_t *p_env = p_user_data;
|
||||
CDROM_PLAY_AUDIO_MSF play;
|
||||
DWORD dw_bytes_returned;
|
||||
BOOL b_success;
|
||||
|
||||
play.StartingM = cdio_from_bcd8(p_start_msf->m);
|
||||
play.StartingS = cdio_from_bcd8(p_start_msf->s);
|
||||
@@ -170,7 +174,7 @@ audio_play_msf_win32ioctl (void *p_user_data, msf_t *p_start_msf,
|
||||
play.EndingS = cdio_from_bcd8(p_end_msf->s);
|
||||
play.EndingF = cdio_from_bcd8(p_end_msf->f);
|
||||
|
||||
bool b_success =
|
||||
b_success =
|
||||
DeviceIoControl(p_env->h_device_handle, IOCTL_CDROM_PLAY_AUDIO_MSF,
|
||||
&play, sizeof(play), NULL, 0, &dw_bytes_returned, NULL);
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
cue parsing routine adapted from cuetools
|
||||
Copyright (C) 2003 Svend Sanjay Sorensen <ssorensen@fastmail.fm>
|
||||
Copyright (C) 2013 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -32,7 +33,11 @@
|
||||
|
||||
#include <cdio/logging.h>
|
||||
#include <cdio/util.h>
|
||||
#if defined (_MSC_VER) || defined (_XBOX)
|
||||
#include <cdio/msvc/version.h>
|
||||
#else
|
||||
#include <cdio/version.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
@@ -66,7 +71,11 @@
|
||||
#include <cdio/logging.h>
|
||||
#include <cdio/util.h>
|
||||
#include <cdio/utf8.h>
|
||||
#if defined (_MSC_VER) || defined (_XBOX)
|
||||
#include <cdio/msvc/version.h>
|
||||
#else
|
||||
#include <cdio/version.h>
|
||||
#endif
|
||||
|
||||
#include "image.h"
|
||||
#include "cdio_assert.h"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
Rocky Bernstein <rocky@gnu.org>
|
||||
toc reading routine adapted from cuetools
|
||||
Copyright (C) 2003 Svend Sanjay Sorensen <ssorensen@fastmail.fm>
|
||||
Copyright (C) 2013 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -58,7 +59,11 @@
|
||||
#include <cdio/util.h>
|
||||
#include <stdio.h>
|
||||
#include <cdio/utf8.h>
|
||||
#if defined (_MSC_VER) || defined (_XBOX)
|
||||
#include <cdio/msvc/version.h>
|
||||
#else
|
||||
#include <cdio/version.h>
|
||||
#endif
|
||||
|
||||
#include "image.h"
|
||||
#include "cdio_assert.h"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2011, 2012
|
||||
Rocky Bernstein <rocky@gnu.org>
|
||||
Copyright (C) 2001, 2003 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2013 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -42,7 +43,11 @@
|
||||
#include <cdio/ds.h>
|
||||
#include <cdio/logging.h>
|
||||
#include <cdio/util.h>
|
||||
#if defined (_MSC_VER) || defined (_XBOX)
|
||||
#include <cdio/msvc/version.h>
|
||||
#else
|
||||
#include <cdio/version.h>
|
||||
#endif
|
||||
#include "cdio_assert.h"
|
||||
#include "_cdio_stdio.h"
|
||||
#include "nrg.h"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Copyright (C) 2003, 2004, 2005, 2008, 2009, 2010, 2011
|
||||
Rocky Bernstein <rocky@gnu.org>
|
||||
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2013 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -43,7 +44,11 @@
|
||||
#include "cdio_assert.h"
|
||||
#include <cdio/types.h>
|
||||
#include <cdio/util.h>
|
||||
#if defined (_MSC_VER) || defined (_XBOX)
|
||||
#include <cdio/msvc/version.h>
|
||||
#else
|
||||
#include <cdio/version.h>
|
||||
#endif
|
||||
|
||||
size_t
|
||||
_cdio_strlenv(char **str_array)
|
||||
|
||||
Reference in New Issue
Block a user