Skip to content

Commit

Permalink
Merging changes from my vc2008-testing branch. This moves Windows dev…
Browse files Browse the repository at this point in the history
…elopment

to VC++2008.
  • Loading branch information
kris committed Jun 13, 2008
1 parent 2e48dde commit 44f6087
Show file tree
Hide file tree
Showing 19 changed files with 47 additions and 48 deletions.
1 change: 0 additions & 1 deletion libdnet-stripped/include/dnet/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#if !defined(__GNUC__)
typedef unsigned int ssize_t;
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#endif
#else
# include <sys/param.h>
Expand Down
8 changes: 2 additions & 6 deletions libdnet-stripped/include/dnet_winconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
#define HAVE_UNISTD_H 1

/* Define if you have the <winsock2.h> header file. */
/* #undef HAVE_WINSOCK2_H */
#define HAVE_WINSOCK2_H

/* Name of package */
#define PACKAGE "libdnet"
Expand All @@ -228,7 +228,7 @@
#define VERSION "1.10"

/* Define for faster code generation. */
/* #undef WIN32_LEAN_AND_MEAN */
#define WIN32_LEAN_AND_MEAN

/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
Expand Down Expand Up @@ -261,10 +261,6 @@
# define _SOCKADDR_LEN 1
#endif

#ifndef HAVE_INET_PTON
int inet_pton(int, const char *, void *);
#endif

#ifndef HAVE_STRLCAT
int strlcat(char *, const char *, int);
#endif
Expand Down
3 changes: 2 additions & 1 deletion libdnet-stripped/libdnet-stripped.vcproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Version="9.00"
Name="dnet"
ProjectGUID="{5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}"
RootNamespace="dnet"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Expand Down
1 change: 0 additions & 1 deletion libdnet-stripped/src/arp-win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#endif

#include <winsock2.h>
#include <ws2tcpip.h>
#include <iphlpapi.h>

#include <errno.h>
Expand Down
8 changes: 4 additions & 4 deletions libdnet-stripped/src/ip-win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* $Id: ip-win32.c,v 1.5 2005/01/25 21:30:40 dugsong Exp $
*/

#ifdef _WIN32
#include "dnet_winconfig.h"
#else
#include "config.h"
#ifdef _WIN32
#include "dnet_winconfig.h"
#else
#include "config.h"
#endif

#include <winsock2.h>
Expand Down
1 change: 0 additions & 1 deletion libdnet-stripped/src/route-win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#include <winsock2.h>
#include <windows.h>
#include <ws2tcpip.h>
#include <iphlpapi.h>

#include <errno.h>
Expand Down
3 changes: 2 additions & 1 deletion liblua/liblua.vcproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Version="9.00"
Name="liblua"
ProjectGUID="{31FB0767-A71F-4575-8379-002D72B8AF86}"
RootNamespace="liblua"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Expand Down
3 changes: 2 additions & 1 deletion libpcre/libpcre.vcproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Version="9.00"
Name="libpcre"
ProjectGUID="{5DE86C7A-DE72-4265-8807-4CA38F94F22A}"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Expand Down
2 changes: 1 addition & 1 deletion mswin32/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MAKENSIS="/c/apps/NSIS/makensis.exe"
VCEXPRESS="/c/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"
VCEXPRESS="/c/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"
export NMAP_VERSION := $(shell grep '^\#[ \t]*define[ \t]\+NMAP_VERSION' ../nmap.h | sed -e 's/.*"\(.*\)".*/\1/' -e 'q')
export NMAP_NUM_VERSION := $(shell grep '^\#[ \t]*define[ \t]\+NMAP_NUM_VERSION' ../nmap.h | sed -e 's/.*"\(.*\)".*/\1/' -e 'q')
COMMA_VERSION=$(shell echo $(NMAP_NUM_VERSION) | tr '.' ',')
Expand Down
1 change: 1 addition & 0 deletions mswin32/OpenSSL/include/openssl/ossl_typ.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ typedef int ASN1_NULL;
#undef X509_EXTENSIONS
#undef X509_CERT_PAIR
#undef PKCS7_ISSUER_AND_SERIAL
#undef OCSP_RESPONSE
#endif

#ifdef BIGNUM
Expand Down
4 changes: 2 additions & 2 deletions mswin32/nmap.rc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,62,0,0
FILEVERSION 4,65,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x21L
Expand All @@ -29,7 +29,7 @@ BEGIN
BEGIN
VALUE "CompanyName", "Insecure.Org\0"
VALUE "FileDescription", "Nmap\0"
VALUE "FileVersion", "4.62\0"
VALUE "FileVersion", "4.65\0"
VALUE "InternalName", "Nmap\0"
VALUE "LegalCopyright", "Copyright (c) Insecure.Com LLC ([email protected])\0"
VALUE "LegalTrademarks", "NMAP\0"
Expand Down
4 changes: 2 additions & 2 deletions mswin32/nmap.sln
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C++ Express 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nmap", "nmap.vcproj", "{361719F0-AB42-4C93-9DE8-7D2144B96625}"
ProjectSection(ProjectDependencies) = postProject
{FB7F6FD2-A39D-40A1-86DD-9B08370BDEA6} = {FB7F6FD2-A39D-40A1-86DD-9B08370BDEA6}
Expand Down
29 changes: 18 additions & 11 deletions mswin32/nmap.vcproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Version="9.00"
Name="nmap"
ProjectGUID="{361719F0-AB42-4C93-9DE8-7D2144B96625}"
RootNamespace="nmap"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Expand Down Expand Up @@ -46,6 +47,8 @@
Optimization="0"
AdditionalIncludeDirectories="..\liblua;.;..;../nbase;../libpcre;winip;..\nsock\include;&quot;pcap-include&quot;;&quot;..\libdnet-stripped\include&quot;;OpenSSL\include;"
PreprocessorDefinitions="WIN32;_CONSOLE"
GeneratePreprocessedFile="0"
KeepComments="false"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
Expand All @@ -61,6 +64,9 @@
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
Expand All @@ -77,6 +83,8 @@
ProgramDatabaseFile=".\Debug/nmap.pdb"
SubSystem="1"
OptimizeForWindows98="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Expand All @@ -97,9 +105,6 @@
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)..\scripts&quot; &quot;.\$(ConfigurationName)\scripts\&quot; /e /y &amp;&amp; xcopy &quot;$(SolutionDir)..\nselib\*.lua&quot; &quot;$(SolutionDir)\$(ConfigurationName)\nselib\&quot; /y &amp;&amp; xcopy &quot;$(SolutionDir)\OpenSSL\bin\*.dll&quot; &quot;$(SolutionDir)\$(ConfigurationName)\&quot; /y"
Expand Down Expand Up @@ -152,6 +157,9 @@
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
Expand All @@ -167,6 +175,8 @@
ProgramDatabaseFile=".\Release/nmap.pdb"
SubSystem="1"
OptimizeForWindows98="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Expand All @@ -187,9 +197,6 @@
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)..\scripts&quot; &quot;.\$(ConfigurationName)\scripts\&quot; /e /y &amp;&amp; xcopy &quot;$(SolutionDir)..\nselib\*.lua&quot; &quot;$(SolutionDir)\$(ConfigurationName)\nselib\&quot; /y &amp;&amp; xcopy &quot;$(SolutionDir)\OpenSSL\bin\*.dll&quot; &quot;$(SolutionDir)\$(ConfigurationName)\&quot; /y"
Expand Down Expand Up @@ -256,11 +263,11 @@
>
</File>
<File
RelativePath="..\nse_init.cc"
RelativePath="..\nse_fs.cc"
>
</File>
<File
RelativePath="..\nse_fs.cc"
RelativePath="..\nse_init.cc"
>
</File>
<File
Expand Down Expand Up @@ -441,11 +448,11 @@
>
</File>
<File
RelativePath="..\nse_init.h"
RelativePath="..\nse_fs.h"
>
</File>
<File
RelativePath="..\nse_fs.h"
RelativePath="..\nse_init.h"
>
</File>
<File
Expand Down
4 changes: 2 additions & 2 deletions mswin32/nsis/Nmap.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
;Get installation folder from registry if available
InstallDirRegKey HKCU "Software\Nmap" ""

!define VERSION "4.62"
VIProductVersion "4.62.0.0"
!define VERSION "4.65"
VIProductVersion "4.65.0.0"
VIAddVersionKey /LANG=1033 "FileVersion" "${VERSION}"
VIAddVersionKey /LANG=1033 "ProductName" "Nmap"
VIAddVersionKey /LANG=1033 "CompanyName" "Insecure.org"
Expand Down
4 changes: 0 additions & 4 deletions mswin32/pcap-include/ip6_misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@

#include <winsock2.h>

#ifndef __MINGW32__
#include <ws2tcpip.h>
#endif /* __MINGW32__ */

#define IN_MULTICAST(a) IN_CLASSD(a)

#define IN_EXPERIMENTAL(a) ((((u_int32_t) (a)) & 0xf0000000) == 0xf0000000)
Expand Down
1 change: 0 additions & 1 deletion mswin32/pcap-include/pcap-stdinc.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,4 @@
#define caddr_t char*

#define snprintf _snprintf
#define vsnprintf _vsnprintf
#define inline __inline
3 changes: 2 additions & 1 deletion mswin32/winfix.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include <winsock2.h>
#include <windows.h>
#include <ws2tcpip.h>
#include <iphlpapi.h>

#ifndef EXTERNC
Expand Down Expand Up @@ -34,3 +33,5 @@ EXTERNC void win_barf(const char *msg);
#endif




13 changes: 6 additions & 7 deletions nselib-bin/nse_bitlib.vcproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Version="9.00"
Name="nse_bitlib"
ProjectGUID="{FB7F6FD2-A39D-40A1-86DD-9B08370BDEA6}"
RootNamespace="nse_bitlib"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Expand Down Expand Up @@ -68,6 +69,8 @@
AdditionalLibraryDirectories="..\liblua"
GenerateDebugInformation="true"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Expand All @@ -88,9 +91,6 @@
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)..\nselib-bin\*.dll&quot; &quot;$(SolutionDir)\$(ConfigurationName)\nselib-bin\&quot; /y"
Expand Down Expand Up @@ -147,6 +147,8 @@
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Expand All @@ -167,9 +169,6 @@
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)..\nselib-bin\*.dll&quot; &quot;$(SolutionDir)\$(ConfigurationName)\nselib-bin\&quot; /y"
Expand Down
2 changes: 1 addition & 1 deletion traceroute.cc
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ Traceroute::getTracePort (u8 proto, Target * t) {
u16 filtered_port = 1;
u16 port = 0;
int state = -1;
struct Port *np;
Port *np;

/* Use the first specified port for ping traceroutes */
if (o.pingscan) {
Expand Down

0 comments on commit 44f6087

Please sign in to comment.