Skip to content

Commit

Permalink
Update VS2012 configuration, builds on Win32 again
Browse files Browse the repository at this point in the history
- use ws2tcpip.h, packet.lib to get inet_ntop
- removed support/inet_ntop.[ch] -- no longer necessary
- update gitignore to nuke MSFT turds
  • Loading branch information
jpr5 committed Jul 24, 2014
1 parent d182610 commit d0045cf
Show file tree
Hide file tree
Showing 6 changed files with 137 additions and 205 deletions.
2 changes: 1 addition & 1 deletion ngrep.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
#include <io.h>
#include <getopt.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <types.h>
#include <inet_ntop.h>
#include <config.h>

#define strcasecmp stricmp
Expand Down
6 changes: 6 additions & 0 deletions win32/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.sdf
*.opensdf
*.suo
*.vcxproj.*
Debug/
Release/
28 changes: 13 additions & 15 deletions win32/ngrep.sln
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
Microsoft Visual Studio Solution File, Format Version 7.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ngrep", "ngrep.vcproj", "{CC0C01CE-0AC3-4F93-9DC8-792862344DBA}"
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ngrep", "ngrep.vcxproj", "{CC0C01CE-0AC3-4F93-9DC8-792862344DBA}"
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
ConfigName.0 = Debug
ConfigName.1 = Release
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CC0C01CE-0AC3-4F93-9DC8-792862344DBA}.Debug|Win32.ActiveCfg = Debug|Win32
{CC0C01CE-0AC3-4F93-9DC8-792862344DBA}.Debug|Win32.Build.0 = Debug|Win32
{CC0C01CE-0AC3-4F93-9DC8-792862344DBA}.Release|Win32.ActiveCfg = Release|Win32
{CC0C01CE-0AC3-4F93-9DC8-792862344DBA}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{CC0C01CE-0AC3-4F93-9DC8-792862344DBA}.Debug.ActiveCfg = Debug|Win32
{CC0C01CE-0AC3-4F93-9DC8-792862344DBA}.Debug.Build.0 = Debug|Win32
{CC0C01CE-0AC3-4F93-9DC8-792862344DBA}.Release.ActiveCfg = Release|Win32
{CC0C01CE-0AC3-4F93-9DC8-792862344DBA}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
117 changes: 117 additions & 0 deletions win32/ngrep.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{CC0C01CE-0AC3-4F93-9DC8-792862344DBA}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>Debug\</OutDir>
<IntDir>Debug\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>Release\</OutDir>
<IntDir>Release\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>support;..\regex-0.12;..\..\WpdPack\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>STDC_HEADERS;WPCAP;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;wpcap.lib;packet.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)ngrep.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\WpdPack\Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)ngrep.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>support;..\regex-0.12;..\..\WpdPack\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>STDC_HEADERS;_CRT_SECURE_NO_WARNINGS;WPCAP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;wpcap.lib;packet.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)ngrep.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\WpdPack\Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="support\getopt.c" />
<ClCompile Include="..\ngrep.c" />
<ClCompile Include="..\regex-0.12\regex.c">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">REGEX_MALLOC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">REGEX_MALLOC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="support\config.h" />
<ClInclude Include="support\getopt.h" />
<ClInclude Include="..\ngrep.h" />
<ClInclude Include="..\..\WpdPack\Include\pcap.h" />
<ClInclude Include="..\regex-0.12\regex.h" />
<ClInclude Include="support\types.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
184 changes: 0 additions & 184 deletions win32/support/inet_ntop.c

This file was deleted.

5 changes: 0 additions & 5 deletions win32/support/inet_ntop.h

This file was deleted.

0 comments on commit d0045cf

Please sign in to comment.