mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
dll: cygwin integration checkpoint
This commit is contained in:
parent
a938cb4fe6
commit
b7665478d9
@ -197,6 +197,17 @@
|
||||
<File Name="winfsp.h" KeyPath="yes" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="INCDIR.fuse" Name="fuse">
|
||||
<Component Id="C.fuse.h">
|
||||
<File Name="fuse.h" KeyPath="yes" />
|
||||
</Component>
|
||||
<Component Id="C.fuse_common.h">
|
||||
<File Name="fuse_common.h" KeyPath="yes" />
|
||||
</Component>
|
||||
<Component Id="C.fuse_opt.h">
|
||||
<File Name="fuse_opt.h" KeyPath="yes" />
|
||||
</Component>
|
||||
</Directory>
|
||||
</DirectoryRef>
|
||||
<DirectoryRef Id="LIBDIR" FileSource="..\build\$(var.Configuration)">
|
||||
<Component Id="C.winfsp_x64.lib">
|
||||
@ -205,6 +216,26 @@
|
||||
<Component Id="C.winfsp_x86.lib">
|
||||
<File Name="winfsp-x86.lib" KeyPath="yes" />
|
||||
</Component>
|
||||
|
||||
<!-- On Win64 copy fuse-x64.pc -->
|
||||
<Component Id="C.fuse_x64.pc" Guid="407395D2-D076-411E-B1D0-D97E21E11A3C">
|
||||
<File
|
||||
Id="FILE.fuse_x64.pc"
|
||||
Name="fuse.pc"
|
||||
Source="..\build\$(var.Configuration)\fuse-x64.pc"
|
||||
KeyPath="yes" />
|
||||
<Condition>VersionNT64</Condition>
|
||||
</Component>
|
||||
|
||||
<!-- On Win32 copy fuse-x86.pc -->
|
||||
<Component Id="C.fuse_x86.pc" Guid="0568EBCB-782E-4C17-9B64-BAFCC43F64ED">
|
||||
<File
|
||||
Id="FILE.fuse_x86.pc"
|
||||
Name="fuse.pc"
|
||||
Source="..\build\$(var.Configuration)\fuse-x86.pc"
|
||||
KeyPath="yes" />
|
||||
<Condition>NOT VersionNT64</Condition>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
<DirectoryRef Id="SMPDIR" FileSource="..\..\..\tst">
|
||||
<Directory Id="SMPDIR.memfs" Name="memfs">
|
||||
@ -237,10 +268,15 @@
|
||||
<ComponentGroup Id="C.WinFsp.inc">
|
||||
<ComponentRef Id="C.fsctl.h" />
|
||||
<ComponentRef Id="C.winfsp.h" />
|
||||
<ComponentRef Id="C.fuse.h" />
|
||||
<ComponentRef Id="C.fuse_common.h" />
|
||||
<ComponentRef Id="C.fuse_opt.h" />
|
||||
</ComponentGroup>
|
||||
<ComponentGroup Id="C.WinFsp.lib">
|
||||
<ComponentRef Id="C.winfsp_x64.lib" />
|
||||
<ComponentRef Id="C.winfsp_x86.lib" />
|
||||
<ComponentRef Id="C.fuse_x64.pc" />
|
||||
<ComponentRef Id="C.fuse_x86.pc" />
|
||||
</ComponentGroup>
|
||||
<ComponentGroup Id="C.WinFsp.smp">
|
||||
<ComponentRef Id="C.memfs_x64.exe" />
|
||||
|
@ -45,6 +45,29 @@
|
||||
<ClCompile Include="..\..\src\dll\util.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\src\dll\fuse\fuse.pc">
|
||||
<FileType>Document</FileType>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo arch=$(PlatformTarget) >$(OutDir)fuse-$(PlatformTarget).pc
|
||||
copy /b $(OutDir)fuse-$(PlatformTarget).pc + %(FullPath) $(OutDir)fuse-$(PlatformTarget).pc >nul</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Writing fuse-$(PlatformTarget).pc</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(OutDir)fuse-$(PlatformTarget).pc</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkObjects>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo arch=$(PlatformTarget) >$(OutDir)fuse-$(PlatformTarget).pc
|
||||
copy /b $(OutDir)fuse-$(PlatformTarget).pc + %(FullPath) $(OutDir)fuse-$(PlatformTarget).pc >nul</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Writing fuse-$(PlatformTarget).pc</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(OutDir)fuse-$(PlatformTarget).pc</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkObjects>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo arch=$(PlatformTarget) >$(OutDir)fuse-$(PlatformTarget).pc
|
||||
copy /b $(OutDir)fuse-$(PlatformTarget).pc + %(FullPath) $(OutDir)fuse-$(PlatformTarget).pc >nul</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Writing fuse-$(PlatformTarget).pc</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)fuse-$(PlatformTarget).pc</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkObjects>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo arch=$(PlatformTarget) >$(OutDir)fuse-$(PlatformTarget).pc
|
||||
copy /b $(OutDir)fuse-$(PlatformTarget).pc + %(FullPath) $(OutDir)fuse-$(PlatformTarget).pc >nul</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Writing fuse-$(PlatformTarget).pc</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)fuse-$(PlatformTarget).pc</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkObjects>
|
||||
</CustomBuild>
|
||||
<None Include="..\..\src\dll\library.def" />
|
||||
<None Include="..\..\src\dll\ntstatus.i" />
|
||||
</ItemGroup>
|
||||
|
@ -96,6 +96,9 @@
|
||||
<None Include="..\..\src\dll\library.def">
|
||||
<Filter>Source</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\dll\fuse\fuse.pc">
|
||||
<Filter>Source\fuse</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\src\dll\version.rc">
|
||||
|
@ -165,6 +165,8 @@ static inline struct fuse_context *fuse_get_context(void)
|
||||
|
||||
static inline int fuse_getgroups(int size, fuse_gid_t list[])
|
||||
{
|
||||
(void)size;
|
||||
(void)list;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -175,15 +177,18 @@ static inline int fuse_interrupted(void)
|
||||
|
||||
static inline int fuse_start_cleanup_thread(struct fuse *fuse)
|
||||
{
|
||||
(void)fuse;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void fuse_stop_cleanup_thread(struct fuse *fuse)
|
||||
{
|
||||
(void)fuse;
|
||||
}
|
||||
|
||||
static inline int fuse_clean_cache(struct fuse *fuse)
|
||||
{
|
||||
(void)fuse;
|
||||
return 60;
|
||||
}
|
||||
|
||||
|
@ -38,16 +38,16 @@ extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define FUSE_MAJOR_VERSION 3
|
||||
#define FUSE_MINOR_VERSION 0
|
||||
#define FUSE_MAJOR_VERSION 2
|
||||
#define FUSE_MINOR_VERSION 9
|
||||
#define FUSE_MAKE_VERSION(maj, min) ((maj) * 10 + (min))
|
||||
#define FUSE_VERSION FUSE_MAKE_VERSION(FUSE_MAJOR_VERSION, FUSE_MINOR_VERSION)
|
||||
|
||||
/*
|
||||
* FUSE uses a number of types (notably: struct stat) that are OS specific.
|
||||
* Furthermore there are even multiple definitions of the same type even
|
||||
* within the same OS. This is certainly true on Windows as well, where
|
||||
* these types are not even native.
|
||||
* Furthermore there are sometimes multiple definitions of the same type even
|
||||
* within the same OS. This is certainly true on Windows, where these types
|
||||
* are not even native.
|
||||
*
|
||||
* For this reason we will define our own fuse_* types which represent the
|
||||
* types as the WinFsp DLL expects to see them. When the file is included
|
||||
@ -113,7 +113,29 @@ struct fuse_statvfs
|
||||
|
||||
#elif defined(__CYGWIN__)
|
||||
|
||||
#error unsupported environment
|
||||
#include <sys/stat.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#define fuse_uid_t uid_t
|
||||
#define fuse_gid_t gid_t
|
||||
#define fuse_pid_t pid_t
|
||||
|
||||
#define fuse_dev_t dev_t
|
||||
#define fuse_ino_t ino_t
|
||||
#define fuse_mode_t mode_t
|
||||
#define fuse_nlink_t nlink_t
|
||||
#define fuse_off_t off_t
|
||||
|
||||
#define fuse_fsblkcnt_t fsblkcnt_t
|
||||
#define fuse_fsfilcnt_t fsfilcnt_t
|
||||
#define fuse_blksize_t blksize_t
|
||||
#define fuse_blkcnt_t blkcnt_t
|
||||
|
||||
#define fuse_timespec timespec
|
||||
|
||||
#define fuse_stat stat
|
||||
#define fuse_statvfs statvfs
|
||||
|
||||
#define FSP_FUSE_ENVIRONMENT 'C'
|
||||
|
||||
@ -190,20 +212,24 @@ static inline int fuse_parse_cmdline(struct fuse_args *args, char **mountpoint,
|
||||
|
||||
static inline void fuse_pollhandle_destroy(struct fuse_pollhandle *ph)
|
||||
{
|
||||
(void)ph;
|
||||
}
|
||||
|
||||
static inline int fuse_daemonize(int foreground)
|
||||
{
|
||||
(void)foreground;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int fuse_set_signal_handlers(struct fuse_session *se)
|
||||
{
|
||||
(void)se;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void fuse_remove_signal_handlers(struct fuse_session *se)
|
||||
{
|
||||
(void)se;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
10
src/dll/fuse/fuse.pc
Normal file
10
src/dll/fuse/fuse.pc
Normal file
@ -0,0 +1,10 @@
|
||||
prefix=${pcfiledir}/..
|
||||
incdir=${prefix}/inc/fuse
|
||||
implib=${prefix}/lib/winfsp-${arch}.lib
|
||||
|
||||
Name: fuse
|
||||
Description: WinFsp FUSE compatible API
|
||||
Version: 2.9
|
||||
URL: http://www.secfs.net/winfsp/
|
||||
Libs: "${implib}"
|
||||
Cflags: -I"${incdir}"
|
Loading…
x
Reference in New Issue
Block a user