From abd4c9df92260a8d6973564135d39650d3547aab Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 7 Dec 2009 12:36:15 +0000 Subject: [PATCH] Synchronise Win32 port with recent config.h changes. --- msvc/config.h | 20 ++++++++++++-------- msvc/libzzuf.vcxproj | 4 ++-- msvc/zzuf.sln | 40 ++++++++++++++++++---------------------- src/debug.c | 2 +- src/zzuf.c | 2 +- 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/msvc/config.h b/msvc/config.h index b942e5e..e7192ec 100644 --- a/msvc/config.h +++ b/msvc/config.h @@ -40,24 +40,24 @@ /* #undef HAVE_FREAD_UNLOCKED */ /* #undef HAVE_FREOPEN64 */ /* #undef HAVE_FSEEKO */ -#define HAVE_FSEEKO64 1 +/* #undef HAVE_FSEEKO64 */ /* #undef HAVE_FSETPOS64 */ /* #undef HAVE_FTELLO */ -#define HAVE_FTELLO64 1 +/* #undef HAVE_FTELLO64 */ /* #undef HAVE_GETCHAR_UNLOCKED */ /* #undef HAVE_GETC_UNLOCKED */ /* #undef HAVE_GETDELIM */ /* #undef HAVE_GETLINE */ -#define HAVE_GETOPT_H 1 -#define HAVE_GETOPT_LONG 1 +/* #undef HAVE_GETOPT_H */ +/* #undef HAVE_GETOPT_LONG */ #define HAVE_GETPAGESIZE 1 -#define HAVE_GETTIMEOFDAY 1 +/* #undef HAVE_GETTIMEOFDAY */ /* #undef HAVE_GLIBC_FP */ #define HAVE_INTTYPES_H 1 #define HAVE_IO_H 1 /* #undef HAVE_KILL */ /* #undef HAVE_LIBC_H */ -#define HAVE_LSEEK64 1 +/* #undef HAVE_LSEEK64 */ #define HAVE_MALLOC_H 1 /* #undef HAVE_MAP_FD */ /* #undef HAVE_MEMALIGN */ @@ -92,11 +92,11 @@ /* #undef HAVE_SYS_RESOURCE_H */ /* #undef HAVE_SYS_SOCKET_H */ #define HAVE_SYS_STAT_H 1 -#define HAVE_SYS_TIME_H 1 +/* #undef HAVE_SYS_TIME_H */ #define HAVE_SYS_TYPES_H 1 /* #undef HAVE_SYS_UIO_H */ /* #undef HAVE_SYS_WAIT_H */ -#define HAVE_UNISTD_H 1 +/* #undef HAVE_UNISTD_H */ /* #undef HAVE_VALLOC */ /* #undef HAVE_WAITPID */ #define HAVE_WINDOWS_H 1 @@ -129,6 +129,10 @@ #define STDC_HEADERS 1 /* #undef __func__ */ +/* Fucking Visual Studio should just shut the fuck up with this fucking + * warning about fucking ISO C++ when we fucking compile fucking C. */ +#pragma warning(disable: 4996) + /* Win32-specific, of course. */ typedef signed long long int int64_t; typedef unsigned long long int uint64_t; diff --git a/msvc/libzzuf.vcxproj b/msvc/libzzuf.vcxproj index 25a1e71..2ffa6f2 100644 --- a/msvc/libzzuf.vcxproj +++ b/msvc/libzzuf.vcxproj @@ -62,7 +62,7 @@ CompileAsC - imagehlp.lib;%(AdditionalDependencies) + imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) true Windows MachineX86 @@ -87,7 +87,7 @@ CompileAsC - imagehlp.lib;%(AdditionalDependencies) + imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) true Windows true diff --git a/msvc/zzuf.sln b/msvc/zzuf.sln index fac0bd1..d053236 100644 --- a/msvc/zzuf.sln +++ b/msvc/zzuf.sln @@ -1,29 +1,25 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zzuf", "zzuf.vcproj", "{2E5723ED-A886-45A9-AAAC-3D02F2EFC358}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zzuf", "zzuf.vcxproj", "{2E5723ED-A886-45A9-AAAC-3D02F2EFC358}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libzzuf", "libzzuf.vcproj", "{E658DCE5-E1E5-41C8-910B-1CC2D73C435C}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libzzuf", "libzzuf.vcxproj", "{E658DCE5-E1E5-41C8-910B-1CC2D73C435C}" EndProject Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {2E5723ED-A886-45A9-AAAC-3D02F2EFC358}.Debug.ActiveCfg = Debug|Win32 - {2E5723ED-A886-45A9-AAAC-3D02F2EFC358}.Debug.Build.0 = Debug|Win32 - {2E5723ED-A886-45A9-AAAC-3D02F2EFC358}.Release.ActiveCfg = Release|Win32 - {2E5723ED-A886-45A9-AAAC-3D02F2EFC358}.Release.Build.0 = Release|Win32 - {E658DCE5-E1E5-41C8-910B-1CC2D73C435C}.Debug.ActiveCfg = Debug|Win32 - {E658DCE5-E1E5-41C8-910B-1CC2D73C435C}.Debug.Build.0 = Debug|Win32 - {E658DCE5-E1E5-41C8-910B-1CC2D73C435C}.Release.ActiveCfg = Release|Win32 - {E658DCE5-E1E5-41C8-910B-1CC2D73C435C}.Release.Build.0 = Release|Win32 + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2E5723ED-A886-45A9-AAAC-3D02F2EFC358}.Debug|Win32.ActiveCfg = Debug|Win32 + {2E5723ED-A886-45A9-AAAC-3D02F2EFC358}.Debug|Win32.Build.0 = Debug|Win32 + {2E5723ED-A886-45A9-AAAC-3D02F2EFC358}.Release|Win32.ActiveCfg = Release|Win32 + {2E5723ED-A886-45A9-AAAC-3D02F2EFC358}.Release|Win32.Build.0 = Release|Win32 + {E658DCE5-E1E5-41C8-910B-1CC2D73C435C}.Debug|Win32.ActiveCfg = Debug|Win32 + {E658DCE5-E1E5-41C8-910B-1CC2D73C435C}.Debug|Win32.Build.0 = Debug|Win32 + {E658DCE5-E1E5-41C8-910B-1CC2D73C435C}.Release|Win32.ActiveCfg = Release|Win32 + {E658DCE5-E1E5-41C8-910B-1CC2D73C435C}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection EndGlobal diff --git a/src/debug.c b/src/debug.c index be343b2..42115f1 100644 --- a/src/debug.c +++ b/src/debug.c @@ -152,7 +152,7 @@ static void mydebug(char const *format, va_list args) else if(f[0] == 'g') { double g = va_arg(args, double), h = 0.0000001; - int i = g; + int i = (int)g; WRITE_INT(_zz_debugfd, i, 10); for(i = 0; i < 7; i++) { diff --git a/src/zzuf.c b/src/zzuf.c index e37fa14..f289498 100644 --- a/src/zzuf.c +++ b/src/zzuf.c @@ -350,7 +350,7 @@ int main(int argc, char *argv[]) tmp = strchr(myoptarg, ':'); opts->seed = atol(myoptarg); opts->endseed = tmp ? tmp[1] ? (uint32_t)atol(tmp + 1) - : (uint32_t)-1UL + : (uint32_t)-1L : opts->seed + 1; break; case 'S': /* --signal */