From: Evgeny Grin Date: Fri, 9 Nov 2012 15:40:19 +0000 (+0400) Subject: [Win32] Add windows x64 builds, use some win defines from header if available X-Git-Tag: upstream/1.9.6^2~245^2^2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=178e092acab7fcd2a8025257e219060f285a3c0f;p=deb_libnfs.git [Win32] Add windows x64 builds, use some win defines from header if available --- diff --git a/win32/libnfs/libnfs.sln b/win32/libnfs/libnfs.sln index f7b925f..aa62eac 100644 --- a/win32/libnfs/libnfs.sln +++ b/win32/libnfs/libnfs.sln @@ -1,6 +1,6 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual C++ Express 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnfs", "libnfs.vcxproj", "{7CAB9B67-6AA9-497F-A900-20D9D05049F5}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nfsclient-sync", "..\nfsclient-sync\nfsclient-sync.vcxproj", "{B907AC9A-50C5-4E43-97C3-27DC7241F6C5}" @@ -11,17 +11,27 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {7CAB9B67-6AA9-497F-A900-20D9D05049F5}.Debug|Win32.ActiveCfg = Debug|Win32 {7CAB9B67-6AA9-497F-A900-20D9D05049F5}.Debug|Win32.Build.0 = Debug|Win32 + {7CAB9B67-6AA9-497F-A900-20D9D05049F5}.Debug|x64.ActiveCfg = Debug|x64 + {7CAB9B67-6AA9-497F-A900-20D9D05049F5}.Debug|x64.Build.0 = Debug|x64 {7CAB9B67-6AA9-497F-A900-20D9D05049F5}.Release|Win32.ActiveCfg = Release|Win32 {7CAB9B67-6AA9-497F-A900-20D9D05049F5}.Release|Win32.Build.0 = Release|Win32 + {7CAB9B67-6AA9-497F-A900-20D9D05049F5}.Release|x64.ActiveCfg = Release|x64 + {7CAB9B67-6AA9-497F-A900-20D9D05049F5}.Release|x64.Build.0 = Release|x64 {B907AC9A-50C5-4E43-97C3-27DC7241F6C5}.Debug|Win32.ActiveCfg = Debug|Win32 {B907AC9A-50C5-4E43-97C3-27DC7241F6C5}.Debug|Win32.Build.0 = Debug|Win32 + {B907AC9A-50C5-4E43-97C3-27DC7241F6C5}.Debug|x64.ActiveCfg = Debug|x64 + {B907AC9A-50C5-4E43-97C3-27DC7241F6C5}.Debug|x64.Build.0 = Debug|x64 {B907AC9A-50C5-4E43-97C3-27DC7241F6C5}.Release|Win32.ActiveCfg = Release|Win32 {B907AC9A-50C5-4E43-97C3-27DC7241F6C5}.Release|Win32.Build.0 = Release|Win32 + {B907AC9A-50C5-4E43-97C3-27DC7241F6C5}.Release|x64.ActiveCfg = Release|x64 + {B907AC9A-50C5-4E43-97C3-27DC7241F6C5}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/win32/libnfs/libnfs.vcxproj b/win32/libnfs/libnfs.vcxproj index e46c074..f157748 100644 --- a/win32/libnfs/libnfs.vcxproj +++ b/win32/libnfs/libnfs.vcxproj @@ -5,10 +5,18 @@ Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + {7CAB9B67-6AA9-497F-A900-20D9D05049F5} @@ -21,31 +29,58 @@ true MultiByte + + DynamicLibrary + true + MultiByte + DynamicLibrary false true MultiByte + + DynamicLibrary + false + true + MultiByte + + + + + + + true - ..\..\..\oncrpc-win32\win32\bin;$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib - ..\..\..\oncrpc-win32\win32\bin;$(VCInstallDir)bin;$(WindowsSdkDir)bin\NETFX 4.0 Tools;$(WindowsSdkDir)bin;$(VSInstallDir)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)\bin;$(MSBuildToolsPath32);$(VSInstallDir);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + ..\..\..\oncrpc-win32\win32\bin;$(LibraryPath) + ..\..\..\oncrpc-win32\win32\bin;$(ExecutablePath) + + + true + ..\..\..\oncrpc-win32\win32\bin;$(LibraryPath) + ..\..\..\oncrpc-win32\win32\bin;$(ExecutablePath) false - ..\..\..\oncrpc-win32\win32\bin;$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib - ..\..\..\oncrpc-win32\win32\bin;$(VCInstallDir)bin;$(WindowsSdkDir)bin\NETFX 4.0 Tools;$(WindowsSdkDir)bin;$(VSInstallDir)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)\bin;$(MSBuildToolsPath32);$(VSInstallDir);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + ..\..\..\oncrpc-win32\win32\bin;$(LibraryPath) + ..\..\..\oncrpc-win32\win32\bin;$(ExecutablePath) + + + false + ..\..\..\oncrpc-win32\win32\bin;$(LibraryPath) + ..\..\..\oncrpc-win32\win32\bin;$(ExecutablePath) @@ -53,7 +88,43 @@ Level3 Disabled - WIN32;NDEBUG;_WINDOWS;_USRDLL;_WIN32_WINNT=0x0501;_U_=;_USE_32BIT_TIME_T;__STDC_CONSTANT_MACROS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;_U_=;_USE_32BIT_TIME_T;__STDC_CONSTANT_MACROS;%(PreprocessorDefinitions) + ..\..\..\oncrpc-win32\win32\include;..\..\include;..\..\.;..\..\win32;..\..\mount;..\..\nfs;..\..\lib + Default + 4996 + + + Windows + true + ..\..\lib\libnfs-win32.def + oncrpc.lib;ws2_32.lib;%(AdditionalDependencies) + MSVCRT + + + copy $(ProjectDir)..\..\nfs\nfs.x $(ProjectDir)..\..\nfs\libnfs-raw-nfs.x +rpcgen.exe -h $(ProjectDir)..\..\nfs\libnfs-raw-nfs.x > $(ProjectDir)..\..\nfs\libnfs-raw-nfs.h +rpcgen.exe -c $(ProjectDir)..\..\nfs\libnfs-raw-nfs.x > $(ProjectDir)..\..\nfs\libnfs-raw-nfs.c + +copy $(ProjectDir)..\..\rquota\rquota.x $(ProjectDir)..\..\rquota\libnfs-raw-rquota.x +rpcgen.exe -h $(ProjectDir)..\..\rquota\libnfs-raw-rquota.x > $(ProjectDir)..\..\rquota\libnfs-raw-rquota.h +rpcgen.exe -c $(ProjectDir)..\..\rquota\libnfs-raw-rquota.x > $(ProjectDir)..\..\rquota\libnfs-raw-rquota.c + +copy $(ProjectDir)..\..\portmap\portmap.x $(ProjectDir)..\..\portmap\libnfs-raw-portmap.x +rpcgen.exe -h $(ProjectDir)..\..\portmap\libnfs-raw-portmap.x > $(ProjectDir)..\..\portmap\libnfs-raw-portmap.h +rpcgen.exe -c $(ProjectDir)..\..\portmap\libnfs-raw-portmap.x > $(ProjectDir)..\..\portmap\libnfs-raw-portmap.c + +copy $(ProjectDir)..\..\mount\mount.x $(ProjectDir)..\..\mount\libnfs-raw-mount.x +rpcgen.exe -h $(ProjectDir)..\..\mount\libnfs-raw-mount.x > $(ProjectDir)..\..\mount\libnfs-raw-mount.h +rpcgen.exe -c $(ProjectDir)..\..\mount\libnfs-raw-mount.x > $(ProjectDir)..\..\mount\libnfs-raw-mount.c + + + + + + + Level3 + Disabled + WIN32;NDEBUG;_WINDOWS;_USRDLL;_U_=;__STDC_CONSTANT_MACROS;%(PreprocessorDefinitions) ..\..\..\oncrpc-win32\win32\include;..\..\include;..\..\.;..\..\win32;..\..\mount;..\..\nfs;..\..\lib Default 4996 @@ -91,9 +162,49 @@ rpcgen.exe -c $(ProjectDir)..\..\mount\libnfs-raw-mount.x > $(ProjectDir)..\ MaxSpeed true true - WIN32;NDEBUG;_WINDOWS;_USRDLL;_WIN32_WINNT=0x0501;_U_=;_USE_32BIT_TIME_T;__STDC_CONSTANT_MACROS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;_U_=;__STDC_CONSTANT_MACROS;ONCRPC_STATIC;%(PreprocessorDefinitions) + ..\..\..\oncrpc-win32\win32\include;..\..\include;..\..\.;..\..\win32;..\..\mount;..\..\nfs;..\..\lib + 4996 + + + Windows + true + true + true + oncrpc.lib;ws2_32.lib;%(AdditionalDependencies) + ..\..\lib\libnfs-win32.def + + + copy $(ProjectDir)..\..\nfs\nfs.x $(ProjectDir)..\..\nfs\libnfs-raw-nfs.x +rpcgen.exe -h $(ProjectDir)..\..\nfs\libnfs-raw-nfs.x > $(ProjectDir)..\..\nfs\libnfs-raw-nfs.h +rpcgen.exe -c $(ProjectDir)..\..\nfs\libnfs-raw-nfs.x > $(ProjectDir)..\..\nfs\libnfs-raw-nfs.c + +copy $(ProjectDir)..\..\rquota\rquota.x $(ProjectDir)..\..\rquota\libnfs-raw-rquota.x +rpcgen.exe -h $(ProjectDir)..\..\rquota\libnfs-raw-rquota.x > $(ProjectDir)..\..\rquota\libnfs-raw-rquota.h +rpcgen.exe -c $(ProjectDir)..\..\rquota\libnfs-raw-rquota.x > $(ProjectDir)..\..\rquota\libnfs-raw-rquota.c + +copy $(ProjectDir)..\..\portmap\portmap.x $(ProjectDir)..\..\portmap\libnfs-raw-portmap.x +rpcgen.exe -h $(ProjectDir)..\..\portmap\libnfs-raw-portmap.x > $(ProjectDir)..\..\portmap\libnfs-raw-portmap.h +rpcgen.exe -c $(ProjectDir)..\..\portmap\libnfs-raw-portmap.x > $(ProjectDir)..\..\portmap\libnfs-raw-portmap.c + +copy $(ProjectDir)..\..\mount\mount.x $(ProjectDir)..\..\mount\libnfs-raw-mount.x +rpcgen.exe -h $(ProjectDir)..\..\mount\libnfs-raw-mount.x > $(ProjectDir)..\..\mount\libnfs-raw-mount.h +rpcgen.exe -c $(ProjectDir)..\..\mount\libnfs-raw-mount.x > $(ProjectDir)..\..\mount\libnfs-raw-mount.c + + + + + Level3 + + + Full + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;_U_=;__STDC_CONSTANT_MACROS;ONCRPC_STATIC;%(PreprocessorDefinitions) ..\..\..\oncrpc-win32\win32\include;..\..\include;..\..\.;..\..\win32;..\..\mount;..\..\nfs;..\..\lib 4996 + AnySuitable + Speed Windows diff --git a/win32/nfsclient-sync/nfsclient-sync.vcxproj b/win32/nfsclient-sync/nfsclient-sync.vcxproj index b72672e..c5a0e90 100644 --- a/win32/nfsclient-sync/nfsclient-sync.vcxproj +++ b/win32/nfsclient-sync/nfsclient-sync.vcxproj @@ -5,10 +5,18 @@ Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + {B907AC9A-50C5-4E43-97C3-27DC7241F6C5} @@ -21,29 +29,54 @@ true Unicode + + Application + true + Unicode + Application false true Unicode + + Application + false + true + Unicode + + + + + + + true - ..\libnfs\Debug;..\..\..\oncrpc-win32\win32\bin;$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib + ..\libnfs\Release;..\..\..\oncrpc-win32\win32\bin;..\..\bin;$(LibraryPath) + + + true + ..\libnfs\Release;..\..\..\oncrpc-win32\win32\bin;..\..\bin;$(LibraryPath) false - ..\libnfs\Release;..\..\..\oncrpc-win32\win32\bin;$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib + ..\libnfs\Release;..\..\..\oncrpc-win32\win32\bin;..\..\bin;$(LibraryPath) + + + false + ..\libnfs\Release;..\..\..\oncrpc-win32\win32\bin;..\..\bin;$(LibraryPath) @@ -64,6 +97,25 @@ true + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_U_=;%(PreprocessorDefinitions) + ..\..\..\oncrpc-win32\win32\include;..\..\include;..\..\.;..\..\win32;..\..\mount;..\..\nfs + + + Console + true + libnfs.lib;oncrpc.lib;WS2_32.lib;%(AdditionalDependencies) + + + false + true + + Level3 @@ -72,7 +124,26 @@ MaxSpeed true true - WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_U_=;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_U_=;ONCRPC_STATIC;%(PreprocessorDefinitions) + ..\..\..\oncrpc-win32\win32\include;..\..\include;..\..\.;..\..\win32;..\..\mount;..\..\nfs + + + Console + true + true + true + libnfs.lib;oncrpc.lib;WS2_32.lib;%(AdditionalDependencies) + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_U_=;ONCRPC_STATIC;%(PreprocessorDefinitions) ..\..\..\oncrpc-win32\win32\include;..\..\include;..\..\.;..\..\win32;..\..\mount;..\..\nfs diff --git a/win32/win32_compat.h b/win32/win32_compat.h index 43f518e..f15a606 100644 --- a/win32/win32_compat.h +++ b/win32/win32_compat.h @@ -79,6 +79,8 @@ typedef int socklen_t; #define MSG_DONTWAIT 0 #define ssize_t SSIZE_T +#if(_WIN32_WINNT < 0x0600) + #define POLLIN 0x0001 /* There is data to read */ #define POLLPRI 0x0002 /* There is urgent data to read */ #define POLLOUT 0x0004 /* Writing now will not block */ @@ -91,6 +93,7 @@ struct pollfd { short events; /* requested events */ short revents; /* returned events */ }; +#endif /* Wrapper macros to call misc. functions win32 is missing */ #define poll(x, y, z) win32_poll(x, y, z)