diff --git a/msvc/config.h b/msvc/config.h new file mode 100644 index 0000000..5525981 --- /dev/null +++ b/msvc/config.h @@ -0,0 +1,43 @@ +/* + * zzuf - general purpose fuzzer + * Copyright (c) 2006, 2007 Sam Hocevar + * All Rights Reserved + * + * $Id: timer.h 192 2007-01-12 15:47:48Z sam $ + * + * This program is free software. It comes without any warranty, to + * the extent permitted by applicable law. You can redistribute it + * and/or modify it under the terms of the Do What The Fuck You Want + * To Public License, Version 2, as published by Sam Hocevar. See + * http://sam.zoy.org/wtfpl/COPYING for more details. + */ + +/* + * config.h: MSVC-specific configuration file + */ + +#define VERSION "0.7 (msvc)" + +#define HAVE_WINDOWS_H 1 +#define HAVE_WINSOCK2_H 1 +#define HAVE_IO_H 1 + +/* Win32-specific, of course. */ +typedef signed long long int int64_t; +typedef unsigned long long int uint64_t; +typedef signed int int32_t; +typedef unsigned int uint32_t; +typedef signed short int16_t; +typedef unsigned short uint16_t; +typedef signed char int8_t; +typedef unsigned char uint8_t; + +typedef unsigned long int uintptr_t; +typedef long int intptr_t; +typedef int pid_t; + +#define inline /* undefined */ +#define __attribute__(x) /* undefined */ + +#define STDOUT_FILENO 1 +#define STDERR_FILENO 2 \ No newline at end of file diff --git a/msvc/libzzuf.vcproj b/msvc/libzzuf.vcproj new file mode 100644 index 0000000..e9141de --- /dev/null +++ b/msvc/libzzuf.vcproj @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/msvc/zzuf.sln b/msvc/zzuf.sln new file mode 100644 index 0000000..fac0bd1 --- /dev/null +++ b/msvc/zzuf.sln @@ -0,0 +1,29 @@ +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 +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libzzuf", "libzzuf.vcproj", "{E658DCE5-E1E5-41C8-910B-1CC2D73C435C}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + 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 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/msvc/zzuf.vcproj b/msvc/zzuf.vcproj new file mode 100644 index 0000000..f37fb90 --- /dev/null +++ b/msvc/zzuf.vcproj @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/zzuf.c b/src/zzuf.c index c72c4c9..e7a590a 100644 --- a/src/zzuf.c +++ b/src/zzuf.c @@ -34,12 +34,12 @@ #if defined HAVE_REGEX_H # include #endif -#if defined HAVE_WINDOWS_H -# include -#endif #if defined HAVE_WINSOCK2_H # include #endif +#if defined HAVE_WINDOWS_H +# include +#endif #if defined HAVE_IO_H # include #endif @@ -124,6 +124,10 @@ int main(int argc, char *argv[]) int cmdline = 0; #endif int i; +#if !defined HAVE_GETOPT_H +# define MOREINFO "Usage: %s message...\n" + int optind = 1; +#endif _zz_opts_init(opts); @@ -299,9 +303,6 @@ int main(int argc, char *argv[]) return EXIT_FAILURE; } } -#else -# define MOREINFO "Usage: %s message...\n" - int optind = 1; #endif _zz_setratio(opts->minratio, opts->maxratio);