Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
71afae90
Commit
71afae90
authored
Oct 06, 2014
by
Erich E. Hoover
Committed by
Alexandre Julliard
Nov 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add support for FreeBSD style extended attributes.
Signed-off-by:
Joel Holdsworth
<
joel@airwebreathe.org.uk
>
parent
282120a9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
1 deletion
+33
-1
configure
configure
+6
-0
configure.ac
configure.ac
+1
-0
file.c
dlls/ntdll/unix/file.c
+23
-1
config.h.in
include/config.h.in
+3
-0
No files found.
configure
View file @
71afae90
...
...
@@ -8195,6 +8195,12 @@ then :
printf
"%s
\n
"
"#define HAVE_SYS_EVENT_H 1"
>>
confdefs.h
fi
ac_fn_c_check_header_compile
"
$LINENO
"
"sys/extattr.h"
"ac_cv_header_sys_extattr_h"
"
$ac_includes_default
"
if
test
"x
$ac_cv_header_sys_extattr_h
"
=
xyes
then
:
printf
"%s
\n
"
"#define HAVE_SYS_EXTATTR_H 1"
>>
confdefs.h
fi
ac_fn_c_check_header_compile
"
$LINENO
"
"sys/filio.h"
"ac_cv_header_sys_filio_h"
"
$ac_includes_default
"
if
test
"x
$ac_cv_header_sys_filio_h
"
=
xyes
then
:
...
...
configure.ac
View file @
71afae90
...
...
@@ -467,6 +467,7 @@ AC_CHECK_HEADERS(\
sys/cdio.h \
sys/epoll.h \
sys/event.h \
sys/extattr.h \
sys/filio.h \
sys/ipc.h \
sys/link.h \
...
...
dlls/ntdll/unix/file.c
View file @
71afae90
...
...
@@ -102,6 +102,10 @@
#ifdef HAVE_SYS_XATTR_H
#include <sys/xattr.h>
#endif
#ifdef HAVE_SYS_EXTATTR_H
#undef XATTR_ADDITIONAL_OPTIONS
#include <sys/extattr.h>
#endif
#include <time.h>
#include <unistd.h>
...
...
@@ -171,7 +175,14 @@ typedef struct
#define MAX_IGNORED_FILES 4
#define SAMBA_XATTR_DOS_ATTRIB "user.DOSATTRIB"
#ifndef XATTR_USER_PREFIX
# define XATTR_USER_PREFIX "user."
#endif
#ifndef XATTR_USER_PREFIX_LEN
# define XATTR_USER_PREFIX_LEN (sizeof(XATTR_USER_PREFIX) - 1)
#endif
#define SAMBA_XATTR_DOS_ATTRIB XATTR_USER_PREFIX "DOSATTRIB"
#define XATTR_ATTRIBS_MASK (FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM)
struct
file_identity
...
...
@@ -371,6 +382,8 @@ static int xattr_fremove( int filedes, const char *name )
# else
return
fremovexattr
(
filedes
,
name
);
# endif
#elif defined(HAVE_SYS_EXTATTR_H)
return
extattr_delete_fd
(
filedes
,
EXTATTR_NAMESPACE_USER
,
&
name
[
XATTR_USER_PREFIX_LEN
]
);
#else
errno
=
ENOSYS
;
return
-
1
;
...
...
@@ -386,6 +399,9 @@ static int xattr_fset( int filedes, const char *name, const void *value, size_t
# else
return
fsetxattr
(
filedes
,
name
,
value
,
size
,
0
);
# endif
#elif defined(HAVE_SYS_EXTATTR_H)
return
extattr_set_fd
(
filedes
,
EXTATTR_NAMESPACE_USER
,
&
name
[
XATTR_USER_PREFIX_LEN
],
value
,
size
);
#else
errno
=
ENOSYS
;
return
-
1
;
...
...
@@ -401,6 +417,9 @@ static int xattr_get( const char *path, const char *name, void *value, size_t si
# else
return
getxattr
(
path
,
name
,
value
,
size
);
# endif
#elif defined(HAVE_SYS_EXTATTR_H)
return
extattr_get_file
(
path
,
EXTATTR_NAMESPACE_USER
,
&
name
[
XATTR_USER_PREFIX_LEN
],
value
,
size
);
#else
errno
=
ENOSYS
;
return
-
1
;
...
...
@@ -416,6 +435,9 @@ static int xattr_fget( int filedes, const char *name, void *value, size_t size )
# else
return
fgetxattr
(
filedes
,
name
,
value
,
size
);
# endif
#elif defined(HAVE_SYS_EXTATTR_H)
return
extattr_get_fd
(
filedes
,
EXTATTR_NAMESPACE_USER
,
&
name
[
XATTR_USER_PREFIX_LEN
],
value
,
size
);
#else
errno
=
ENOSYS
;
return
-
1
;
...
...
include/config.h.in
View file @
71afae90
...
...
@@ -568,6 +568,9 @@
/* Define to 1 if you have the <sys/event.h> header file. */
#undef HAVE_SYS_EVENT_H
/* Define to 1 if you have the <sys/extattr.h> header file. */
#undef HAVE_SYS_EXTATTR_H
/* Define to 1 if you have the <sys/filio.h> header file. */
#undef HAVE_SYS_FILIO_H
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment