diff options
author | Pete Batard <pete@akeo.ie> | 2011-09-09 12:44:05 +0100 |
---|---|---|
committer | Pete Batard <pete@akeo.ie> | 2011-09-09 12:44:05 +0100 |
commit | 845f55c90b0e28b822424956d5df0976cf0f7075 (patch) | |
tree | 97e905161ebd920a66809feef797231ed73154e4 | |
parent | 6cc15eda2ccf61ec9cbb01185d1a37dd05ab488a (diff) | |
download | libusb-845f55c90b0e28b822424956d5df0976cf0f7075.tar.gz |
merge -> pbr341
-rw-r--r-- | .gitattributes | 2 | ||||
-rw-r--r-- | _libusb_2010.sln (renamed from _libusb_2008.sln) | 18 | ||||
-rw-r--r-- | _libusb_dll_2008.vcproj | 378 | ||||
-rw-r--r-- | _libusb_dll_2010.vcxproj | 166 | ||||
-rw-r--r-- | _libusb_dll_2010.vcxproj.filters | 69 | ||||
-rw-r--r-- | _libusb_static_2008.vcproj | 332 | ||||
-rw-r--r-- | _libusb_static_2010.vcxproj | 150 | ||||
-rw-r--r-- | _libusb_static_2010.vcxproj.filters | 56 | ||||
-rw-r--r-- | configure.ac | 31 | ||||
-rw-r--r-- | examples/_lsusb_2008.vcproj | 321 | ||||
-rw-r--r-- | examples/_lsusb_2010.vcxproj | 165 | ||||
-rw-r--r-- | examples/_lsusb_2010.vcxproj.filters | 14 | ||||
-rw-r--r-- | examples/_xusb_2008.vcproj | 319 | ||||
-rw-r--r-- | examples/_xusb_2010.vcxproj | 163 | ||||
-rw-r--r-- | examples/_xusb_2010.vcxproj.filters | 14 | ||||
-rw-r--r-- | examples/xusb.c | 24 | ||||
-rw-r--r-- | libusb/core.c | 3 | ||||
-rw-r--r-- | libusb/libusb-1.0.rc | 24 | ||||
-rw-r--r-- | libusb/libusb_version.h.in | 29 | ||||
-rw-r--r-- | libusb/libusbi.h | 2 | ||||
-rw-r--r-- | libusb/os/linux_usbfs.c | 69 | ||||
-rw-r--r-- | libusb/os/poll_windows.c | 2 | ||||
-rw-r--r-- | libusb/os/threads_windows.c | 2 | ||||
-rw-r--r-- | libusb/os/windows_usb.c | 208 | ||||
-rw-r--r-- | libusb/version.h | 13 | ||||
-rw-r--r-- | msvc/libusb_sources | 2 |
26 files changed, 1121 insertions, 1455 deletions
diff --git a/.gitattributes b/.gitattributes index 12a3a6d..57af597 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,4 +4,4 @@ *.dsw eol=crlf *.dsp eol=crlf *.sln eol=crlf -*.vcproj eol=crlf +*.vcxproj* eol=crlf diff --git a/_libusb_2008.sln b/_libusb_2010.sln index e3f7b48..15a6130 100644 --- a/_libusb_2008.sln +++ b/_libusb_2010.sln @@ -1,18 +1,12 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libusb-1.0 (static)", "_libusb_static_2008.vcproj", "{349EE8F9-7D25-4909-AAF5-FF3FADE72187}" +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libusb-1.0 (static)", "_libusb_static_2010.vcxproj", "{349EE8F9-7D25-4909-AAF5-FF3FADE72187}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libusb-1.0 (dll)", "_libusb_dll_2008.vcproj", "{349EE8FA-7D25-4909-AAF5-FF3FADE72187}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libusb-1.0 (dll)", "_libusb_dll_2010.vcxproj", "{349EE8FA-7D25-4909-AAF5-FF3FADE72187}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lsusb", "examples\_lsusb_2008.vcproj", "{F4938DB0-3DE7-4737-9C5A-EAD1BE819F87}" - ProjectSection(ProjectDependencies) = postProject - {349EE8F9-7D25-4909-AAF5-FF3FADE72187} = {349EE8F9-7D25-4909-AAF5-FF3FADE72187} - EndProjectSection +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lsusb", "examples\_lsusb_2010.vcxproj", "{F4938DB0-3DE7-4737-9C5A-EAD1BE819F87}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xusb", "examples\_xusb_2008.vcproj", "{3F3138D0-7AB7-4268-9BF3-1A3EA5503A11}" - ProjectSection(ProjectDependencies) = postProject - {349EE8F9-7D25-4909-AAF5-FF3FADE72187} = {349EE8F9-7D25-4909-AAF5-FF3FADE72187} - EndProjectSection +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xusb", "examples\_xusb_2010.vcxproj", "{3F3138D0-7AB7-4268-9BF3-1A3EA5503A11}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/_libusb_dll_2008.vcproj b/_libusb_dll_2008.vcproj deleted file mode 100644 index 766fa7c..0000000 --- a/_libusb_dll_2008.vcproj +++ /dev/null @@ -1,378 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="libusb-1.0 (dll)" - ProjectGUID="{349EE8FA-7D25-4909-AAF5-FF3FADE72187}" - RootNamespace="libusbdll" - TargetFrameworkVersion="196613" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll" - IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll\libusb-1.0" - ConfigurationType="2" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories=".\msvc;.\libusb" - PreprocessorDefinitions="_WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS" - RuntimeLibrary="3" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - OutputFile="$(OutDir)\libusb-1.0.dll" - ModuleDefinitionFile="libusb\libusb-1.0.def" - EmbedManagedResourceFile="libusb-1.0.rc" - GenerateDebugInformation="true" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll" - IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll\libusb-1.0" - ConfigurationType="2" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories=".\msvc;.\libusb" - PreprocessorDefinitions="_WIN32;_WIN64;_DEBUG;_CRT_SECURE_NO_WARNINGS" - RuntimeLibrary="3" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - OutputFile="$(OutDir)\libusb-1.0.dll" - ModuleDefinitionFile="libusb\libusb-1.0.def" - EmbedManagedResourceFile="libusb-1.0.rc" - GenerateDebugInformation="true" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll" - IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll\libusb-1.0" - ConfigurationType="2" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories=".\msvc;.\libusb" - PreprocessorDefinitions="_WIN32;_LIB;_CRT_SECURE_NO_WARNINGS" - RuntimeLibrary="2" - WarningLevel="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - OutputFile="$(OutDir)\libusb-1.0.dll" - ModuleDefinitionFile="libusb\libusb-1.0.def" - EmbedManagedResourceFile="libusb-1.0.rc" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|x64" - OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll" - IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll\libusb-1.0" - ConfigurationType="2" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories=".\msvc;.\libusb" - PreprocessorDefinitions="_WIN32;_WIN64;_LIB;_CRT_SECURE_NO_WARNINGS" - RuntimeLibrary="2" - WarningLevel="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - OutputFile="$(OutDir)\libusb-1.0.dll" - ModuleDefinitionFile="libusb\libusb-1.0.def" - EmbedManagedResourceFile="libusb-1.0.rc" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\libusb\core.c" - > - </File> - <File - RelativePath=".\libusb\descriptor.c" - > - </File> - <File - RelativePath=".\libusb\io.c" - > - </File> - <File - RelativePath=".\libusb\os\poll_windows.c" - > - </File> - <File - RelativePath=".\libusb\sync.c" - > - </File> - <File - RelativePath=".\libusb\os\threads_windows.c" - > - </File> - <File - RelativePath=".\libusb\os\windows_usb.c" - > - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath=".\msvc\config.h" - > - </File> - <File - RelativePath=".\libusb\libusb.h" - > - </File> - <File - RelativePath=".\libusb\libusbi.h" - > - </File> - <File - RelativePath=".\libusb\os\poll_windows.h" - > - </File> - <File - RelativePath=".\libusb\os\threads_windows.h" - > - </File> - <File - RelativePath=".\libusb\os\windows_usb.h" - > - </File> - </Filter> - <Filter - Name="Resource Files" - > - <File - RelativePath=".\libusb\libusb-1.0.def" - > - </File> - <File - RelativePath=".\libusb\libusb-1.0.rc" - > - </File> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/_libusb_dll_2010.vcxproj b/_libusb_dll_2010.vcxproj new file mode 100644 index 0000000..1c72d6a --- /dev/null +++ b/_libusb_dll_2010.vcxproj @@ -0,0 +1,166 @@ +<?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="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectName>libusb-1.0 (dll)</ProjectName> + <ProjectGuid>{349EE8FA-7D25-4909-AAF5-FF3FADE72187}</ProjectGuid> + <RootNamespace>libusbdll</RootNamespace> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>Unicode</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> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" 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|x64'" 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>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\dll\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\dll\libusb-1.0\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\dll\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\dll\libusb-1.0\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\dll\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\dll\libusb-1.0\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\dll\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\dll\libusb-1.0\</IntDir> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">libusb-1.0</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">libusb-1.0</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">libusb-1.0</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">libusb-1.0</TargetName> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>.\msvc;.\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>$(OutDir)libusb-1.0.dll</OutputFile> + <ModuleDefinitionFile>libusb\libusb-1.0.def</ModuleDefinitionFile> + <EmbedManagedResourceFile>libusb-1.0.rc;%(EmbedManagedResourceFile)</EmbedManagedResourceFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>.\msvc;.\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_WIN32;_WIN64;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>$(OutDir)libusb-1.0.dll</OutputFile> + <ModuleDefinitionFile>libusb\libusb-1.0.def</ModuleDefinitionFile> + <EmbedManagedResourceFile>libusb-1.0.rc;%(EmbedManagedResourceFile)</EmbedManagedResourceFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>.\msvc;.\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <Link> + <OutputFile>$(OutDir)libusb-1.0.dll</OutputFile> + <ModuleDefinitionFile>libusb\libusb-1.0.def</ModuleDefinitionFile> + <EmbedManagedResourceFile>libusb-1.0.rc;%(EmbedManagedResourceFile)</EmbedManagedResourceFile> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <AdditionalIncludeDirectories>.\msvc;.\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_WIN32;_WIN64;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <Link> + <OutputFile>$(OutDir)libusb-1.0.dll</OutputFile> + <ModuleDefinitionFile>libusb\libusb-1.0.def</ModuleDefinitionFile> + <EmbedManagedResourceFile>libusb-1.0.rc;%(EmbedManagedResourceFile)</EmbedManagedResourceFile> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="libusb\core.c" /> + <ClCompile Include="libusb\descriptor.c" /> + <ClCompile Include="libusb\io.c" /> + <ClCompile Include="libusb\os\poll_windows.c" /> + <ClCompile Include="libusb\sync.c" /> + <ClCompile Include="libusb\os\threads_windows.c" /> + <ClCompile Include="libusb\os\windows_usb.c" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="msvc\config.h" /> + <ClInclude Include="libusb\libusb.h" /> + <ClInclude Include="libusb\libusbi.h" /> + <ClInclude Include="libusb\os\poll_windows.h" /> + <ClInclude Include="libusb\os\threads_windows.h" /> + <ClInclude Include="libusb\os\windows_usb.h" /> + </ItemGroup> + <ItemGroup> + <None Include="libusb\libusb-1.0.def" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="libusb\libusb-1.0.rc" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/_libusb_dll_2010.vcxproj.filters b/_libusb_dll_2010.vcxproj.filters new file mode 100644 index 0000000..c719271 --- /dev/null +++ b/_libusb_dll_2010.vcxproj.filters @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{d81e81ca-b13e-4a15-b54b-b12b41361e6b}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="libusb\core.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="libusb\descriptor.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="libusb\io.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="libusb\os\poll_windows.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="libusb\sync.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="libusb\os\threads_windows.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="libusb\os\windows_usb.c"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="msvc\config.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="libusb\libusb.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="libusb\libusbi.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="libusb\os\poll_windows.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="libusb\os\threads_windows.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="libusb\os\windows_usb.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <None Include="libusb\libusb-1.0.def"> + <Filter>Resource Files</Filter> + </None> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="libusb\libusb-1.0.rc"> + <Filter>Resource Files</Filter> + </ResourceCompile> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/_libusb_static_2008.vcproj b/_libusb_static_2008.vcproj deleted file mode 100644 index 0230312..0000000 --- a/_libusb_static_2008.vcproj +++ /dev/null @@ -1,332 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="libusb-1.0 (static)" - ProjectGUID="{349EE8F9-7D25-4909-AAF5-FF3FADE72187}" - RootNamespace="libusb" - TargetFrameworkVersion="196613" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib" - IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib\libusb-1.0" - ConfigurationType="4" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories=".\msvc;.\libusb" - PreprocessorDefinitions="_WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS" - RuntimeLibrary="1" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)\libusb-1.0.lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib" - IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib\libusb-1.0" - ConfigurationType="4" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories=".\msvc;.\libusb" - PreprocessorDefinitions="_WIN32;_WIN64;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS" - RuntimeLibrary="1" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)\libusb-1.0.lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib" - IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib\libusb-1.0" - ConfigurationType="4" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories=".\msvc;.\libusb" - PreprocessorDefinitions="_WIN32;_LIB;_CRT_SECURE_NO_WARNINGS" - RuntimeLibrary="0" - WarningLevel="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)\libusb-1.0.lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|x64" - OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib" - IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib\libusb-1.0" - ConfigurationType="4" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories=".\msvc;.\libusb" - PreprocessorDefinitions="_WIN32;_WIN64;_LIB;_CRT_SECURE_NO_WARNINGS" - RuntimeLibrary="0" - WarningLevel="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)\libusb-1.0.lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\libusb\core.c" - > - </File> - <File - RelativePath=".\libusb\descriptor.c" - > - </File> - <File - RelativePath=".\libusb\io.c" - > - </File> - <File - RelativePath=".\libusb\os\poll_windows.c" - > - </File> - <File - RelativePath=".\libusb\sync.c" - > - </File> - <File - RelativePath=".\libusb\os\threads_windows.c" - > - </File> - <File - RelativePath=".\libusb\os\windows_usb.c" - > - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath=".\msvc\config.h" - > - </File> - <File - RelativePath=".\libusb\libusb.h" - > - </File> - <File - RelativePath=".\libusb\libusbi.h" - > - </File> - <File - RelativePath=".\libusb\os\poll_windows.h" - > - </File> - <File - RelativePath=".\libusb\os\threads_windows.h" - > - </File> - <File - RelativePath=".\libusb\os\windows_usb.h" - > - </File> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/_libusb_static_2010.vcxproj b/_libusb_static_2010.vcxproj new file mode 100644 index 0000000..ef90f48 --- /dev/null +++ b/_libusb_static_2010.vcxproj @@ -0,0 +1,150 @@ +<?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="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectName>libusb-1.0 (static)</ProjectName> + <ProjectGuid>{349EE8F9-7D25-4909-AAF5-FF3FADE72187}</ProjectGuid> + <RootNamespace>libusb</RootNamespace> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>Unicode</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> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" 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|x64'" 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>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\lib\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\lib\libusb-1.0\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\lib\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\lib\libusb-1.0\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\lib\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\lib\libusb-1.0\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\lib\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\lib\libusb-1.0\</IntDir> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">libusb-1.0</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">libusb-1.0</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">libusb-1.0</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">libusb-1.0</TargetName> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>.\msvc;.\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Lib> + <OutputFile>$(OutDir)libusb-1.0.lib</OutputFile> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>.\msvc;.\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_WIN32;_WIN64;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Lib> + <OutputFile>$(OutDir)libusb-1.0.lib</OutputFile> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>.\msvc;.\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <Lib> + <OutputFile>$(OutDir)libusb-1.0.lib</OutputFile> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <AdditionalIncludeDirectories>.\msvc;.\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_WIN32;_WIN64;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <Lib> + <OutputFile>$(OutDir)libusb-1.0.lib</OutputFile> + </Lib> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="libusb\core.c" /> + <ClCompile Include="libusb\descriptor.c" /> + <ClCompile Include="libusb\io.c" /> + <ClCompile Include="libusb\os\poll_windows.c" /> + <ClCompile Include="libusb\sync.c" /> + <ClCompile Include="libusb\os\threads_windows.c" /> + <ClCompile Include="libusb\os\windows_usb.c" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="msvc\config.h" /> + <ClInclude Include="libusb\libusb.h" /> + <ClInclude Include="libusb\libusbi.h" /> + <ClInclude Include="libusb\os\poll_windows.h" /> + <ClInclude Include="libusb\os\threads_windows.h" /> + <ClInclude Include="libusb\os\windows_usb.h" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/_libusb_static_2010.vcxproj.filters b/_libusb_static_2010.vcxproj.filters new file mode 100644 index 0000000..84a76c2 --- /dev/null +++ b/_libusb_static_2010.vcxproj.filters @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="libusb\core.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="libusb\descriptor.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="libusb\io.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="libusb\os\poll_windows.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="libusb\sync.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="libusb\os\threads_windows.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="libusb\os\windows_usb.c"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="msvc\config.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="libusb\libusb.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="libusb\libusbi.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="libusb\os\poll_windows.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="libusb\os\threads_windows.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="libusb\os\windows_usb.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/configure.ac b/configure.ac index 5841032..1aa606b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,14 +1,18 @@ -m4_define(LIBUSB_MAJOR, [1]) -m4_define(LIBUSB_MINOR, [0]) -m4_define(LIBUSB_MICRO, [8]) -m4_define(LIBUSB_NANO, [9318]) +dnl These m4 macros are whitespace sensitive and break if moved around much. +m4_define([LU_VERSION_H], m4_include([libusb/version.h])) +m4_define([LU_DEFINE_VERSION_ATOM], + [m4_define([$1], m4_bregexp(LU_VERSION_H, + [^#define\s*$1\s*\([0-9]*\).*], [\1]))]) +dnl The m4_bregexp() returns (only) the numbers following the #define named +dnl in the first macro parameter. m4_define() then defines the name for use +dnl in AC_INIT(). -AC_INIT([libusb], LIBUSB_MAJOR.LIBUSB_MINOR.LIBUSB_MICRO, [libusb-devel@lists.sourceforge.net], [libusb], [http://www.libusb.org/]) -AC_SUBST([LIBUSB_VERSION_MAJOR], [LIBUSB_MAJOR]) -AC_SUBST([LIBUSB_VERSION_MINOR], [LIBUSB_MINOR]) -AC_SUBST([LIBUSB_VERSION_MICRO], [LIBUSB_MICRO]) -AC_SUBST([LIBUSB_VERSION_NANO], [LIBUSB_NANO]) +LU_DEFINE_VERSION_ATOM([LIBUSB_MAJOR]) +LU_DEFINE_VERSION_ATOM([LIBUSB_MINOR]) +LU_DEFINE_VERSION_ATOM([LIBUSB_MICRO]) + +AC_INIT([libusb], LIBUSB_MAJOR[.]LIBUSB_MINOR[.]LIBUSB_MICRO, [libusb-devel@lists.sourceforge.net], [libusb], [http://www.libusb.org/]) # Library versioning # These numbers should be tweaked on every release. Read carefully: @@ -47,7 +51,6 @@ case $host in threads="posix" THREAD_CFLAGS="-pthread" PC_LIBS_PRIVATE="${PC_LIBS_PRIVATE} -pthread" - AM_LDFLAGS="-ludev" AC_CHECK_HEADERS([poll.h]) AC_DEFINE([POLL_NFDS_TYPE],[nfds_t],[type of second poll() argument]) ;; @@ -68,13 +71,6 @@ case $host in *-mingw*) AC_MSG_RESULT([Windows]) backend="windows" - threads="windows" - create_import_lib="yes" - LIBS="${LIBS} ${PC_LIBS_PRIVATE}" - # -avoid-version to avoid a naming scheme such as libusb-0.dll - AM_LDFLAGS="-no-undefined -avoid-version -Wl,--add-stdcall-alias" - AM_CFLAGS="-std=gnu99 -DWINVER=0x500" - AC_CHECK_TOOL(RC, windres, no) AC_CHECK_TOOL(DLLTOOL, dlltool, false) ;; *-cygwin*) @@ -210,7 +206,6 @@ AC_SUBST(LTLDFLAGS) AC_CONFIG_FILES([libusb-1.0.pc]) AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([libusb/Makefile]) -AC_CONFIG_FILES([libusb/libusb_version.h]) AC_CONFIG_FILES([examples/Makefile]) AC_CONFIG_FILES([doc/Makefile]) AC_CONFIG_FILES([doc/doxygen.cfg]) diff --git a/examples/_lsusb_2008.vcproj b/examples/_lsusb_2008.vcproj deleted file mode 100644 index b902db2..0000000 --- a/examples/_lsusb_2008.vcproj +++ /dev/null @@ -1,321 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="lsusb" - ProjectGUID="{F4938DB0-3DE7-4737-9C5A-EAD1BE819F87}" - RootNamespace="examples" - Keyword="Win32Proj" - TargetFrameworkVersion="196613" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples" - IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples\$(ProjectName)" - ConfigurationType="1" - CharacterSet="1" - BuildLogFile="$(IntDir)\$(ProjectName).htm" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\libusb" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" - RuntimeLibrary="1" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalLibraryDirectories="" - GenerateDebugInformation="true" - ProgramDatabaseFile="$(TargetDir)$(ProjectName).pdb" - SubSystem="1" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples" - IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples\$(ProjectName)" - ConfigurationType="1" - CharacterSet="1" - BuildLogFile="$(IntDir)\$(ProjectName).htm" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\libusb" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" - RuntimeLibrary="1" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalLibraryDirectories="" - GenerateDebugInformation="true" - ProgramDatabaseFile="$(TargetDir)$(ProjectName).pdb" - SubSystem="1" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples" - IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples\$(ProjectName)" - ConfigurationType="1" - CharacterSet="1" - WholeProgramOptimization="1" - BuildLogFile="$(IntDir)\$(ProjectName).htm" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="..\libusb" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="0" - WarningLevel="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalLibraryDirectories="" - ProgramDatabaseFile="$(TargetDir)$(ProjectName).pdb" - SubSystem="1" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|x64" - OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples" - IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples\$(ProjectName)" - ConfigurationType="1" - CharacterSet="1" - WholeProgramOptimization="1" - BuildLogFile="$(IntDir)\$(ProjectName).htm" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="..\libusb" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="0" - WarningLevel="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalLibraryDirectories="" - ProgramDatabaseFile="$(TargetDir)$(ProjectName).pdb" - SubSystem="1" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\lsusb.c" - > - </File> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/examples/_lsusb_2010.vcxproj b/examples/_lsusb_2010.vcxproj new file mode 100644 index 0000000..308ad1f --- /dev/null +++ b/examples/_lsusb_2010.vcxproj @@ -0,0 +1,165 @@ +<?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="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectName>lsusb</ProjectName> + <ProjectGuid>{F4938DB0-3DE7-4737-9C5A-EAD1BE819F87}</ProjectGuid> + <RootNamespace>examples</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</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> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" 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|x64'" 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>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\examples\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\examples\$(ProjectName)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\examples\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\examples\$(ProjectName)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\examples\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\examples\$(ProjectName)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\examples\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\examples\$(ProjectName)\</IntDir> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <BuildLog> + <Path>$(IntDir)$(ProjectName).htm</Path> + </BuildLog> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(TargetDir)$(ProjectName).pdb</ProgramDatabaseFile> + <SubSystem>Console</SubSystem> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <BuildLog> + <Path>$(IntDir)$(ProjectName).htm</Path> + </BuildLog> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(TargetDir)$(ProjectName).pdb</ProgramDatabaseFile> + <SubSystem>Console</SubSystem> + <TargetMachine>MachineX64</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <BuildLog> + <Path>$(IntDir)$(ProjectName).htm</Path> + </BuildLog> + <ClCompile> + <AdditionalIncludeDirectories>..\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <ProgramDatabaseFile>$(TargetDir)$(ProjectName).pdb</ProgramDatabaseFile> + <SubSystem>Console</SubSystem> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <BuildLog> + <Path>$(IntDir)$(ProjectName).htm</Path> + </BuildLog> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <AdditionalIncludeDirectories>..\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <ProgramDatabaseFile>$(TargetDir)$(ProjectName).pdb</ProgramDatabaseFile> + <SubSystem>Console</SubSystem> + <TargetMachine>MachineX64</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="lsusb.c" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\_libusb_static_2010.vcxproj"> + <Project>{349ee8f9-7d25-4909-aaf5-ff3fade72187}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/examples/_lsusb_2010.vcxproj.filters b/examples/_lsusb_2010.vcxproj.filters new file mode 100644 index 0000000..32baa25 --- /dev/null +++ b/examples/_lsusb_2010.vcxproj.filters @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="lsusb.c"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/examples/_xusb_2008.vcproj b/examples/_xusb_2008.vcproj deleted file mode 100644 index 4772e55..0000000 --- a/examples/_xusb_2008.vcproj +++ /dev/null @@ -1,319 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="xusb" - ProjectGUID="{3F3138D0-7AB7-4268-9BF3-1A3EA5503A11}" - RootNamespace="examples" - Keyword="Win32Proj" - TargetFrameworkVersion="196613" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples" - IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples\$(ProjectName)" - ConfigurationType="1" - CharacterSet="1" - BuildLogFile="$(IntDir)\$(ProjectName).htm" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\msvc;..\libusb" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS" - MinimalRebuild="true" - RuntimeLibrary="1" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalLibraryDirectories="" - GenerateDebugInformation="true" - SubSystem="1" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples" - IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples\$(ProjectName)" - ConfigurationType="1" - CharacterSet="1" - BuildLogFile="$(IntDir)\$(ProjectName).htm" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\msvc;..\libusb" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS" - MinimalRebuild="true" - RuntimeLibrary="1" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalLibraryDirectories="" - GenerateDebugInformation="true" - SubSystem="1" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples" - IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples\$(ProjectName)" - ConfigurationType="1" - CharacterSet="1" - WholeProgramOptimization="1" - BuildLogFile="$(IntDir)\$(ProjectName).htm" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="..\msvc;..\libusb" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS" - RuntimeLibrary="0" - WarningLevel="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalLibraryDirectories="" - SubSystem="1" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|x64" - OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples" - IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples\$(ProjectName)" - ConfigurationType="1" - CharacterSet="1" - WholeProgramOptimization="1" - BuildLogFile="$(IntDir)\$(ProjectName).htm" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="..\msvc;..\libusb" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS" - RuntimeLibrary="0" - WarningLevel="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalLibraryDirectories="" - SubSystem="1" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\xusb.c" - > - </File> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/examples/_xusb_2010.vcxproj b/examples/_xusb_2010.vcxproj new file mode 100644 index 0000000..7bfcbf8 --- /dev/null +++ b/examples/_xusb_2010.vcxproj @@ -0,0 +1,163 @@ +<?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="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectName>xusb</ProjectName> + <ProjectGuid>{3F3138D0-7AB7-4268-9BF3-1A3EA5503A11}</ProjectGuid> + <RootNamespace>examples</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</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> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" 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|x64'" 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>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\examples\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\examples\$(ProjectName)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\examples\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\examples\$(ProjectName)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\examples\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\examples\$(ProjectName)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\examples\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\examples\$(ProjectName)\</IntDir> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <BuildLog> + <Path>$(IntDir)$(ProjectName).htm</Path> + </BuildLog> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\msvc;..\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <BuildLog> + <Path>$(IntDir)$(ProjectName).htm</Path> + </BuildLog> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\msvc;..\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <TargetMachine>MachineX64</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <BuildLog> + <Path>$(IntDir)$(ProjectName).htm</Path> + </BuildLog> + <ClCompile> + <AdditionalIncludeDirectories>..\msvc;..\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <SubSystem>Console</SubSystem> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <BuildLog> + <Path>$(IntDir)$(ProjectName).htm</Path> + </BuildLog> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <AdditionalIncludeDirectories>..\msvc;..\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <SubSystem>Console</SubSystem> + <TargetMachine>MachineX64</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="xusb.c" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\_libusb_static_2010.vcxproj"> + <Project>{349ee8f9-7d25-4909-aaf5-ff3fade72187}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/examples/_xusb_2010.vcxproj.filters b/examples/_xusb_2010.vcxproj.filters new file mode 100644 index 0000000..76cc6d3 --- /dev/null +++ b/examples/_xusb_2010.vcxproj.filters @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="xusb.c"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/examples/xusb.c b/examples/xusb.c index 9f900db..de23cdd 100644 --- a/examples/xusb.c +++ b/examples/xusb.c @@ -535,7 +535,7 @@ int test_device(uint16_t vid, uint16_t pid) const struct libusb_endpoint_descriptor *endpoint; int i, j, k, r; int iface, nb_ifaces; -#ifdef OS_LINUX +#if defined(__linux) // Attaching/detaching the kernel driver is only relevant for Linux int iface_detached = -1; #endif @@ -599,11 +599,15 @@ int test_device(uint16_t vid, uint16_t pid) for (k=0; k<conf_desc->usb_interface[i].altsetting[j].bNumEndpoints; k++) { endpoint = &conf_desc->usb_interface[i].altsetting[j].endpoint[k]; printf(" endpoint[%d].address: %02X\n", k, endpoint->bEndpointAddress); - // Use the last IN/OUT endpoints found as default for testing - if (endpoint->bEndpointAddress & LIBUSB_ENDPOINT_IN) { - endpoint_in = endpoint->bEndpointAddress; - } else { - endpoint_out = endpoint->bEndpointAddress; + // Use the first bulk IN/OUT endpoints found as default for testing + if ((endpoint->bmAttributes & LIBUSB_TRANSFER_TYPE_MASK) == LIBUSB_TRANSFER_TYPE_BULK) { + if (endpoint->bEndpointAddress & LIBUSB_ENDPOINT_IN) { + if (!endpoint_in) + endpoint_in = endpoint->bEndpointAddress; + } else { + if (!endpoint_out) + endpoint_out = endpoint->bEndpointAddress; + } } printf(" max packet size: %04X\n", endpoint->wMaxPacketSize); printf(" polling interval: %02X\n", endpoint->bInterval); @@ -616,7 +620,7 @@ int test_device(uint16_t vid, uint16_t pid) { printf("\nClaiming interface %d...\n", iface); r = libusb_claim_interface(handle, iface); -#ifdef OS_LINUX +#if defined(__linux) if ((r != LIBUSB_SUCCESS) && (iface == 0)) { // Maybe we need to detach the driver perr(" Failed. Trying to detach driver...\n"); @@ -663,7 +667,7 @@ int test_device(uint16_t vid, uint16_t pid) libusb_release_interface(handle, iface); } -#ifdef OS_LINUX +#if defined(__linux) if (iface_detached >= 0) { printf("Re-attaching kernel driver...\n"); libusb_attach_kernel_driver(handle, iface_detached); @@ -791,8 +795,8 @@ int main(int argc, char** argv) if (r < 0) return r; - // Warnings = 2, Debug = 4 - libusb_set_debug(NULL, debug_mode?4:2); + // Info = 3, Debug = 4 + libusb_set_debug(NULL, debug_mode?4:3); test_device(VID, PID); diff --git a/libusb/core.c b/libusb/core.c index b7cd40a..4c299c8 100644 --- a/libusb/core.c +++ b/libusb/core.c @@ -40,8 +40,7 @@ const struct usbi_os_backend * const usbi_backend = &windows_backend; #endif struct libusb_context *usbi_default_context = NULL; -const struct libusb_version libusb_version_internal = { LIBUSB_VERSION_MAJOR, -LIBUSB_VERSION_MINOR, LIBUSB_VERSION_MICRO, LIBUSB_VERSION_NANO}; +const struct libusb_version libusb_version_internal = { LIBUSB_MAJOR, LIBUSB_MINOR, LIBUSB_MICRO, LIBUSB_NANO}; static int default_context_refcnt = 0; static usbi_mutex_static_t default_context_lock = USBI_MUTEX_INITIALIZER; diff --git a/libusb/libusb-1.0.rc b/libusb/libusb-1.0.rc index d579653..6072159 100644 --- a/libusb/libusb-1.0.rc +++ b/libusb/libusb-1.0.rc @@ -6,15 +6,19 @@ * viewed with utilities such as Windows Explorer. */ #include "winresrc.h" -#include "libusb_version.h" -#define __DEFTOSTR(x) #x -#define _DEFTOSTR(x) __DEFTOSTR(x) -#define LIBUSB_PACKAGE_VERSION _DEFTOSTR(LIBUSB_VERSION_MAJOR.LIBUSB_VERSION_MINOR.LIBUSB_VERSION_MICRO.LIBUSB_VERSION_NANO) +#include "version.h" +#ifndef LIBUSB_VERSIONSTRING +#define LU_STR(s) #s +#define LU_XSTR(s) LU_STR(s) +#define LIBUSB_VERSIONSTRING \ + LU_XSTR(LIBUSB_MAJOR) "." LU_XSTR(LIBUSB_MINOR) "." \ + LU_XSTR(LIBUSB_MICRO) "." LU_XSTR(LIBUSB_NANO) +#endif VS_VERSION_INFO VERSIONINFO - FILEVERSION LIBUSB_VERSION_MAJOR,LIBUSB_VERSION_MINOR,LIBUSB_VERSION_MICRO,LIBUSB_VERSION_NANO - PRODUCTVERSION LIBUSB_VERSION_MAJOR,LIBUSB_VERSION_MINOR,LIBUSB_VERSION_MICRO,LIBUSB_VERSION_NANO + FILEVERSION LIBUSB_MAJOR,LIBUSB_MINOR,LIBUSB_MICRO,LIBUSB_NANO + PRODUCTVERSION LIBUSB_MAJOR,LIBUSB_MINOR,LIBUSB_MICRO,LIBUSB_NANO FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -31,15 +35,15 @@ BEGIN BEGIN VALUE "Comments", "http://libusb.org/\0" VALUE "CompanyName", "libusb.org\0" - VALUE "FileDescription", "libusb-1\0" - VALUE "FileVersion", LIBUSB_PACKAGE_VERSION "\0" + VALUE "FileDescription", "C library for writing portable USB drivers in userspace\0" + VALUE "FileVersion", LIBUSB_VERSIONSTRING VALUE "InternalName", "libusb\0" VALUE "LegalCopyright", "See individual source files, GNU LGPL v2.1 or later.\0" VALUE "LegalTrademarks", "http://www.gnu.org/licenses/lgpl-2.1.html\0" VALUE "OriginalFilename", "libusb-1.0.dll\0" VALUE "PrivateBuild", "\0" - VALUE "ProductName", "libusb-1\0" - VALUE "ProductVersion", LIBUSB_PACKAGE_VERSION "\0" + VALUE "ProductName", "libusb-1.0\0" + VALUE "ProductVersion", LIBUSB_VERSIONSTRING VALUE "SpecialBuild", "\0" END END diff --git a/libusb/libusb_version.h.in b/libusb/libusb_version.h.in deleted file mode 100644 index f27a59a..0000000 --- a/libusb/libusb_version.h.in +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Version header for libusb - * Copyright (C) 2007-2009 Daniel Drake <dsd@gentoo.org> - * Copyright (c) 2001 Johannes Erdfelt <johannes@erdfelt.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __LIBUSB_VERSION_H__ -#define __LIBUSB_VERSION_H__ - -#define LIBUSB_VERSION_MAJOR @LIBUSB_VERSION_MAJOR@ -#define LIBUSB_VERSION_MINOR @LIBUSB_VERSION_MINOR@ -#define LIBUSB_VERSION_MICRO @LIBUSB_VERSION_MICRO@ -#define LIBUSB_VERSION_NANO @LIBUSB_VERSION_NANO@ - -#endif diff --git a/libusb/libusbi.h b/libusb/libusbi.h index a1c910c..9cf8aa3 100644 --- a/libusb/libusbi.h +++ b/libusb/libusbi.h @@ -31,7 +31,7 @@ #endif #include <libusb.h> -#include "libusb_version.h" +#include "version.h" /* Inside the libusb code, mark all public functions as follows: * return_type API_EXPORTED function_name(params) { ... } diff --git a/libusb/os/linux_usbfs.c b/libusb/os/linux_usbfs.c index d6b3761..9bf49d2 100644 --- a/libusb/os/linux_usbfs.c +++ b/libusb/os/linux_usbfs.c @@ -1056,6 +1056,74 @@ static int sysfs_scan_device(struct libusb_context *ctx, devname); } +static void sysfs_analyze_topology(struct discovered_devs *discdevs) +{ + struct linux_device_priv *priv; + int i, j; + struct libusb_device *dev1, *dev2; + const char *sysfs_dir1, *sysfs_dir2; + const char *p; + int n, boundary_char; + + /* Fill in the port_number and parent_dev fields for each device */ + + for (i = 0; i < discdevs->len; ++i) { + dev1 = discdevs->devices[i]; + priv = __device_priv(dev1); + if (!priv) + continue; + sysfs_dir1 = priv->sysfs_dir; + + /* Root hubs have sysfs_dir names of the form "usbB", + * where B is the bus number. All other devices have + * sysfs_dir names of the form "B-P[.P ...]", where the + * P values are port numbers leading from the root hub + * to the device. + */ + + /* Root hubs don't have parents or port numbers */ + if (sysfs_dir1[0] == 'u') + continue; + + /* The rightmost component is the device's port number */ + p = strrchr(sysfs_dir1, '.'); + if (!p) { + p = strchr(sysfs_dir1, '-'); + if (!p) + continue; /* Should never happen */ + } + dev1->port_number = atoi(p + 1); + + /* Search for the parent device */ + boundary_char = *p; + n = p - sysfs_dir1; + for (j = 0; j < discdevs->len; ++j) { + dev2 = discdevs->devices[j]; + priv = __device_priv(dev2); + if (!priv) + continue; + sysfs_dir2 = priv->sysfs_dir; + + if (boundary_char == '-') { + /* The parent's name must begin with 'usb'; + * skip past that part of sysfs_dir2. + */ + if (sysfs_dir2[0] != 'u') + continue; + sysfs_dir2 += 3; + } + + /* The remainder of the parent's name must be equal to + * the first n bytes of sysfs_dir1. + */ + if (memcmp(sysfs_dir1, sysfs_dir2, n) == 0 && !sysfs_dir2[n]) { + dev1->parent_dev = dev2; + break; + } + } + } +} + static int sysfs_get_device_list(struct libusb_context *ctx, struct discovered_devs **_discdevs, int *usbfs_fallback) { @@ -1086,6 +1154,7 @@ static int sysfs_get_device_list(struct libusb_context *ctx, out: closedir(devices); *_discdevs = discdevs; + sysfs_analyze_topology(discdevs); return r; } diff --git a/libusb/os/poll_windows.c b/libusb/os/poll_windows.c index 55dbc18..9d6cea1 100644 --- a/libusb/os/poll_windows.c +++ b/libusb/os/poll_windows.c @@ -85,7 +85,7 @@ extern int _snprintf(char *buffer, size_t count, const char *format, ...); static LONG (WINAPI *pInterlockedExchange)(LONG volatile *, LONG) = NULL; #define INIT_INTERLOCKEDEXCHANGE if (pInterlockedExchange == NULL) { \ pInterlockedExchange = (LONG (WINAPI *)(LONG volatile *, LONG)) \ - GetProcAddress(GetModuleHandle("KERNEL32"), "InterlockedExchange"); \ + GetProcAddress(GetModuleHandleA("KERNEL32"), "InterlockedExchange");\ if (pInterlockedExchange == NULL) { \ usbi_err(NULL, "InterlockedExchange is unavailable"); \ return; \ diff --git a/libusb/os/threads_windows.c b/libusb/os/threads_windows.c index fe84ec0..0edd6d1 100644 --- a/libusb/os/threads_windows.c +++ b/libusb/os/threads_windows.c @@ -33,7 +33,7 @@ static LONG (WINAPI *pInterlockedExchange)(LONG volatile *, LONG) = NULL; #define INIT_INTERLOCKEDEXCHANGE if (pInterlockedExchange == NULL) { \ pInterlockedExchange = (LONG (WINAPI *)(LONG volatile *, LONG)) \ - GetProcAddress(GetModuleHandle("KERNEL32"), "InterlockedExchange"); \ + GetProcAddress(GetModuleHandleA("KERNEL32"), "InterlockedExchange");\ if (pInterlockedExchange == NULL) return ((errno=ENOENT)); \ } #endif diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c index 49a5d16..9bd6924 100644 --- a/libusb/os/windows_usb.c +++ b/libusb/os/windows_usb.c @@ -109,7 +109,7 @@ static int composite_copy_transfer_data(struct usbi_transfer *itransfer, uint32_ static LONG (WINAPI *pInterlockedExchange)(LONG volatile *, LONG) = NULL; #define INIT_INTERLOCKEDEXCHANGE if (pInterlockedExchange == NULL) { \ pInterlockedExchange = (LONG (WINAPI *)(LONG volatile *, LONG)) \ - GetProcAddress(GetModuleHandle("KERNEL32"), "InterlockedExchange"); \ + GetProcAddress(GetModuleHandleA("KERNEL32"), "InterlockedExchange");\ if (pInterlockedExchange == NULL) { \ usbi_err(NULL, "InterlockedExchange is unavailable"); \ return 1; \ @@ -118,7 +118,7 @@ static LONG (WINAPI *pInterlockedExchange)(LONG volatile *, LONG) = NULL; static LONG (WINAPI *pInterlockedIncrement)(LONG volatile *) = NULL; #define INIT_INTERLOCKEDINCREMENT if (pInterlockedIncrement == NULL) { \ pInterlockedIncrement = (LONG (WINAPI *)(LONG volatile *)) \ - GetProcAddress(GetModuleHandle("KERNEL32"), "InterlockedIncrement");\ + GetProcAddress(GetModuleHandleA("KERNEL32"), "InterlockedIncrement");\ if (pInterlockedIncrement == NULL) { \ usbi_err(NULL, "IInterlockedIncrement is unavailable"); \ return LIBUSB_ERROR_NOT_FOUND; \ @@ -276,18 +276,18 @@ static int init_dlls(void) * Parameters: * dev_info: a pointer to a dev_info list * dev_info_data: a pointer to an SP_DEVINFO_DATA to be filled (or NULL if not needed) - * guid: the GUID for which to retrieve interface details + * usb_class: the generic USB class for which to retrieve interface details * index: zero based index of the interface in the device info list * * Note: it is the responsibility of the caller to free the DEVICE_INTERFACE_DETAIL_DATA * structure returned and call this function repeatedly using the same guid (with an * incremented index starting at zero) until all interfaces have been returned. */ -bool get_devinfo_data(struct libusb_context *ctx, - HDEVINFO *dev_info, SP_DEVINFO_DATA *dev_info_data, unsigned _index) +static bool get_devinfo_data(struct libusb_context *ctx, + HDEVINFO *dev_info, SP_DEVINFO_DATA *dev_info_data, char* usb_class, unsigned _index) { if (_index <= 0) { - *dev_info = pSetupDiGetClassDevsA(NULL, "USB", NULL, DIGCF_PRESENT|DIGCF_ALLCLASSES); + *dev_info = pSetupDiGetClassDevsA(NULL, usb_class, NULL, DIGCF_PRESENT|DIGCF_ALLCLASSES); if (*dev_info == INVALID_HANDLE_VALUE) { return false; } @@ -319,7 +319,7 @@ bool get_devinfo_data(struct libusb_context *ctx, * structure returned and call this function repeatedly using the same guid (with an * incremented index starting at zero) until all interfaces have been returned. */ -SP_DEVICE_INTERFACE_DETAIL_DATA_A *get_interface_details(struct libusb_context *ctx, +static SP_DEVICE_INTERFACE_DETAIL_DATA_A *get_interface_details(struct libusb_context *ctx, HDEVINFO *dev_info, SP_DEVINFO_DATA *dev_info_data, const GUID* guid, unsigned _index) { SP_DEVICE_INTERFACE_DATA dev_interface_data; @@ -390,6 +390,173 @@ err_exit: return NULL; } +/* Hash table functions - modified From glibc 2.3.2: + [Aho,Sethi,Ullman] Compilers: Principles, Techniques and Tools, 1986 + [Knuth] The Art of Computer Programming, part 3 (6.4) */ +typedef struct htab_entry { + unsigned long used; + char* str; +} htab_entry; +htab_entry* htab_table = NULL; +usbi_mutex_t htab_write_mutex = NULL; +unsigned long htab_size, htab_filled; + +/* For the used double hash method the table size has to be a prime. To + correct the user given table size we need a prime test. This trivial + algorithm is adequate because the code is called only during init and + the number is likely to be small */ +static int isprime(unsigned long number) +{ + // no even number will be passed + unsigned int divider = 3; + + while((divider * divider < number) && (number % divider != 0)) + divider += 2; + + return (number % divider != 0); +} + +/* Before using the hash table we must allocate memory for it. + We allocate one element more as the found prime number says. + This is done for more effective indexing as explained in the + comment for the hash function. */ +static int htab_create(struct libusb_context *ctx, unsigned long nel) +{ + if (htab_table != NULL) { + usbi_err(ctx, "hash table already allocated"); + } + + // Create a mutex + usbi_mutex_init(&htab_write_mutex, NULL); + + // Change nel to the first prime number not smaller as nel. + nel |= 1; + while(!isprime(nel)) + nel += 2; + + htab_size = nel; + usbi_dbg("using %d entries hash table", nel); + htab_filled = 0; + + // allocate memory and zero out. + htab_table = (htab_entry*)calloc(htab_size + 1, sizeof(htab_entry)); + if (htab_table == NULL) { + usbi_err(ctx, "could not allocate space for hash table"); + return 0; + } + + return 1; +} + +/* After using the hash table it has to be destroyed. */ +static void htab_destroy(void) +{ + size_t i; + if (htab_table == NULL) { + return; + } + + for (i=0; i<htab_size; i++) { + if (htab_table[i].used) { + safe_free(htab_table[i].str); + } + } + usbi_mutex_destroy(&htab_write_mutex); + safe_free(htab_table); +} + +/* This is the search function. It uses double hashing with open addressing. + We use an trick to speed up the lookup. The table is created with one + more element available. This enables us to use the index zero special. + This index will never be used because we store the first hash index in + the field used where zero means not used. Every other value means used. + The used field can be used as a first fast comparison for equality of + the stored and the parameter value. This helps to prevent unnecessary + expensive calls of strcmp. */ +static unsigned long htab_hash(char* str) +{ + unsigned long hval, hval2; + unsigned long idx; + unsigned long r = 5381; + int c; + char* sz = str; + + // Compute main hash value (algorithm suggested by Nokia) + while ((c = *sz++)) + r = ((r << 5) + r) + c; + if (r == 0) + ++r; + + // compute table hash: simply take the modulus + hval = r % htab_size; + if (hval == 0) + ++hval; + + // Try the first index + idx = hval; + + if (htab_table[idx].used) { + if ( (htab_table[idx].used == hval) + && (safe_strcmp(str, htab_table[idx].str) == 0) ) { + // existing hash + return idx; + } + usbi_dbg("hash collision ('%s' vs '%s')", str, htab_table[idx].str); + + // Second hash function, as suggested in [Knuth] + hval2 = 1 + hval % (htab_size - 2); + + do { + // Because size is prime this guarantees to step through all available indexes + if (idx <= hval2) { + idx = htab_size + idx - hval2; + } else { + idx -= hval2; + } + + // If we visited all entries leave the loop unsuccessfully + if (idx == hval) { + break; + } + + // If entry is found use it. + if ( (htab_table[idx].used == hval) + && (safe_strcmp(str, htab_table[idx].str) == 0) ) { + return idx; + } + } + while (htab_table[idx].used); + } + + // Not found => New entry + + // If the table is full return an error + if (htab_filled >= htab_size) { + usbi_err(NULL, "hash table is full (%d entries)", htab_size); + return 0; + } + + // Concurrent threads might be storing the same entry at the same time + // (eg. "simultaneous" enums from different threads) => use a mutex + usbi_mutex_lock(&htab_write_mutex); + // Just free any previously allocated string (which should be the same as + // new one). The possibility of concurrent threads storing a collision + // string (same hash, different string) at the same time is extremely low + safe_free(htab_table[idx].str); + htab_table[idx].used = hval; + htab_table[idx].str = malloc(safe_strlen(str)+1); + if (htab_table[idx].str == NULL) { + usbi_err(NULL, "could not duplicate string for hash table"); + usbi_mutex_unlock(&htab_write_mutex); + return 0; + } + memcpy(htab_table[idx].str, str, safe_strlen(str)+1); + ++htab_filled; + usbi_mutex_unlock(&htab_write_mutex); + + return idx; +} + /* * Returns the session ID of a device's nth level ancestor * If there's no device at the nth level, return 0 @@ -468,7 +635,7 @@ static int windows_assign_endpoints(struct libusb_device_handle *dev_handle, int } // Lookup for a match in the list of API driver names -bool is_api_driver(char* driver, uint8_t api) +static bool is_api_driver(char* driver, uint8_t api) { uint8_t i; const char sep_str[2] = {LIST_SEPARATOR, 0}; @@ -1068,7 +1235,6 @@ static int init_device(struct libusb_device* dev, struct libusb_device* parent_d if (conn_info.DeviceAddress > UINT8_MAX) { usbi_err(ctx, "program assertion failed: device address overflow"); } - dev->device_address = (uint8_t)conn_info.DeviceAddress; } else { dev->device_address = UINT8_MAX; // Hubs from HCD have a devaddr of 255 force_hcd_device_descriptor(dev); @@ -1183,7 +1349,8 @@ static int set_composite_interface(struct libusb_context* ctx, struct libusb_dev static int windows_get_device_list(struct libusb_context *ctx, struct discovered_devs **_discdevs) { struct discovered_devs *discdevs = *_discdevs; - HDEVINFO dev_info; + HDEVINFO dev_info = { 0 }; + char* usb_class[2] = {"USB", "NUSB3"}; SP_DEVINFO_DATA dev_info_data; SP_DEVICE_INTERFACE_DETAIL_DATA_A *dev_interface_details = NULL; #define MAX_ENUM_GUIDS 64 @@ -1193,6 +1360,7 @@ static int windows_get_device_list(struct libusb_context *ctx, struct discovered #define GEN_PASS 2 #define DEV_PASS 3 int r = LIBUSB_SUCCESS; + int class_index = 0; unsigned int nb_guids, pass, i, j, ancestor; char path[MAX_PATH_LENGTH]; char strbuf[MAX_PATH_LENGTH]; @@ -1202,6 +1370,7 @@ static int windows_get_device_list(struct libusb_context *ctx, struct discovered char* dev_id_path = NULL; unsigned long session_id; DWORD size, reg_type, port_nr, install_state; + BOOL b = FALSE; HKEY key; WCHAR guid_string_w[MAX_GUID_STRING_LENGTH]; GUID* if_guid; @@ -1283,9 +1452,14 @@ static int windows_get_device_list(struct libusb_context *ctx, struct discovered } } } else { - if (!get_devinfo_data(ctx, &dev_info, &dev_info_data, i)) { - break; + // Workaround for a Nec/Renesas USB 3.0 driver bug where root hubs are + // being listed under the "NUSB3" PnP Symbolic Name rather than "USB" + while ( (class_index < 2) && + (!(b = get_devinfo_data(ctx, &dev_info, &dev_info_data, usb_class[class_index], i))) ) { + class_index++; + i = 0; } + if (!b) break; } // Read the Device ID path. This is what we'll use as UID @@ -1438,6 +1612,7 @@ static int windows_get_device_list(struct libusb_context *ctx, struct discovered priv->depth = UINT8_MAX; // Overflow to 0 for HCD Hubs priv->path = dev_interface_path; dev_interface_path = NULL; break; + case HUB_PASS: case DEV_PASS: // If the device has already been setup, don't do it again if (priv->path != NULL) @@ -1447,6 +1622,7 @@ static int windows_get_device_list(struct libusb_context *ctx, struct discovered priv->apib = &usb_api_backend[api]; switch(api) { case USB_API_COMPOSITE: + case USB_API_HUB: break; default: // For other devices, the first interface is the same as the device @@ -1462,10 +1638,6 @@ static int windows_get_device_list(struct libusb_context *ctx, struct discovered break; } break; - case HUB_PASS: - priv->apib = &usb_api_backend[api]; - priv->path = dev_interface_path; dev_interface_path = NULL; - break; case GEN_PASS: r = init_device(dev, parent_dev, (uint8_t)port_nr, dev_id_path, dev_info_data.DevInst); if (r == LIBUSB_SUCCESS) { @@ -1725,7 +1897,6 @@ static int windows_release_interface(struct libusb_device_handle *dev_handle, in { struct windows_device_priv *priv = __device_priv(dev_handle->dev); - windows_set_interface_altsetting(dev_handle, iface, 0); return priv->apib->release_interface(dev_handle, iface); } @@ -2222,7 +2393,7 @@ static int unsupported_copy_transfer_data(struct usbi_transfer *itransfer, uint3 } // These names must be uppercase -const char* hub_driver_names[] = {"USBHUB"}; +const char* hub_driver_names[] = {"USBHUB", "NUSB3HUB", "FLXHCIH", "TIHUB3", "ETRONHUB3", "VIAHUB3", "ASMTHUB3"}; const char* composite_driver_names[] = {"USBCCGP"}; const char* winusb_driver_names[] = {"WINUSB"}; const struct windows_usb_api_backend usb_api_backend[USB_API_MAX] = { @@ -2462,7 +2633,6 @@ static int winusb_claim_interface(struct libusb_device_handle *dev_handle, int i // or if it's the first WinUSB interface, we get a handle through WinUsb_Initialize(). if ((is_using_usbccgp) || (iface == 0)) { // composite device (independent interfaces) or interface 0 - winusb_handle = handle_priv->interface_handle[iface].api_handle; file_handle = handle_priv->interface_handle[iface].dev_handle; if ((file_handle == 0) || (file_handle == INVALID_HANDLE_VALUE)) { return LIBUSB_ERROR_NOT_FOUND; diff --git a/libusb/version.h b/libusb/version.h new file mode 100644 index 0000000..d8334ec --- /dev/null +++ b/libusb/version.h @@ -0,0 +1,13 @@ +/* This file is parsed by m4 and windres and RC.EXE so please keep it simple. */ +#ifndef LIBUSB_MAJOR +#define LIBUSB_MAJOR 1 +#endif +#ifndef LIBUSB_MINOR +#define LIBUSB_MINOR 0 +#endif +#ifndef LIBUSB_MICRO +#define LIBUSB_MICRO 8 +#endif +#ifndef LIBUSB_NANO +#define LIBUSB_NANO 0 +#endif diff --git a/msvc/libusb_sources b/msvc/libusb_sources index 0f38ddb..8e8e65c 100644 --- a/msvc/libusb_sources +++ b/msvc/libusb_sources @@ -33,4 +33,4 @@ SOURCES=..\core.c \ threads_windows.c \ poll_windows.c \ windows_usb.c \ - libusb-1.0.rc + ..\libusb-1.0.rc |