Rebase against f69d4a865f926aa5c4a9c55cfe4d2dbc10746e5c.

This commit is contained in:
Alistair Leslie-Hughes
2021-12-10 11:34:32 +11:00
parent 2653c32b45
commit 155e98e765
13 changed files with 148 additions and 160 deletions

View File

@@ -1,4 +1,4 @@
From 88941e9247f9311f978c60c98f93a149aa9bf0e2 Mon Sep 17 00:00:00 2001
From 11107a30f5ddc2065d2b254fad2d10bc158a1ebb Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Tue, 19 Aug 2014 22:10:49 -0600
Subject: [PATCH] ntdll: Implement retrieving DOS attributes in
@@ -10,10 +10,10 @@ Subject: [PATCH] ntdll: Implement retrieving DOS attributes in
2 files changed, 50 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index f0762e107f3..714af889bc6 100644
index d621ae6e712..3ddff238d74 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,6 +90,7 @@ AC_ARG_WITH(usb, AS_HELP_STRING([--without-usb],[do not use the libusb lib
@@ -65,6 +65,7 @@ AC_ARG_WITH(usb, AS_HELP_STRING([--without-usb],[do not use the libusb lib
AC_ARG_WITH(v4l2, AS_HELP_STRING([--without-v4l2],[do not use v4l2 (video capture)]))
AC_ARG_WITH(vkd3d, AS_HELP_STRING([--without-vkd3d],[do not use vkd3d (Direct3D 12 support)]))
AC_ARG_WITH(vulkan, AS_HELP_STRING([--without-vulkan],[do not use Vulkan]))
@@ -21,8 +21,8 @@ index f0762e107f3..714af889bc6 100644
AC_ARG_WITH(xcomposite,AS_HELP_STRING([--without-xcomposite],[do not use the Xcomposite extension]),
[if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_Xcomposite_h=no; fi])
AC_ARG_WITH(xcursor, AS_HELP_STRING([--without-xcursor],[do not use the Xcursor extension]),
@@ -697,6 +698,17 @@ AC_CHECK_HEADERS([libprocstat.h],,,
#include <sys/socket.h>
@@ -642,6 +643,17 @@ AC_CHECK_HEADERS([libprocstat.h],,,
#include <sys/queue.h>
#endif])
+if test "x$with_xattr" != "xno"
@@ -40,10 +40,10 @@ index f0762e107f3..714af889bc6 100644
AC_SUBST(DLLFLAGS,"")
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index e6f813966a5..9addefe92f4 100644
index e459087af76..0b6e5d3b6a7 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -108,6 +108,9 @@
@@ -98,6 +98,9 @@
#ifdef HAVE_SYS_STATFS_H
#include <sys/statfs.h>
#endif
@@ -51,9 +51,9 @@ index e6f813966a5..9addefe92f4 100644
+#include <attr/xattr.h>
+#endif
#include <time.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
@@ -367,6 +370,20 @@ NTSTATUS errno_to_status( int err )
#include <unistd.h>
@@ -355,6 +358,20 @@ NTSTATUS errno_to_status( int err )
}
}
@@ -74,7 +74,7 @@ index e6f813966a5..9addefe92f4 100644
/* get space from the current directory data buffer, allocating a new one if necessary */
static void *get_dir_data_space( struct dir_data *data, unsigned int size )
{
@@ -1448,6 +1465,22 @@ static BOOL append_entry( struct dir_data *data, const char *long_name,
@@ -1436,6 +1453,22 @@ static BOOL append_entry( struct dir_data *data, const char *long_name,
}
@@ -97,7 +97,7 @@ index e6f813966a5..9addefe92f4 100644
/* fetch the attributes of a file */
static inline ULONG get_file_attributes( const struct stat *st )
{
@@ -1491,7 +1524,8 @@ static int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULON
@@ -1479,7 +1512,8 @@ static int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULON
static int get_file_info( const char *path, struct stat *st, ULONG *attr )
{
char *parent_path;
@@ -107,7 +107,7 @@ index e6f813966a5..9addefe92f4 100644
*attr = 0;
ret = lstat( path, st );
@@ -1517,6 +1551,9 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
@@ -1505,6 +1539,9 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
free( parent_path );
}
*attr |= get_file_attributes( st );

View File

@@ -1,4 +1,4 @@
From 65442c83060ee1980900cc5fe38978ef8c29eba4 Mon Sep 17 00:00:00 2001
From c93462e9ca4529f413b82abaa76b593df9947cc6 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Mon, 6 Oct 2014 14:21:11 -0600
Subject: [PATCH] libport: Add support for Mac OS X style extended attributes.
@@ -9,10 +9,10 @@ Subject: [PATCH] libport: Add support for Mac OS X style extended attributes.
2 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index cca97ee403b..5e33bfacf91 100644
index 3ddff238d74..57f76f09b96 100644
--- a/configure.ac
+++ b/configure.ac
@@ -702,6 +702,9 @@ AC_CHECK_HEADERS([libprocstat.h],,,
@@ -646,6 +646,9 @@ AC_CHECK_HEADERS([libprocstat.h],,,
if test "x$with_xattr" != "xno"
then
AC_CHECK_HEADERS(attr/xattr.h, [HAVE_XATTR=1])
@@ -23,10 +23,10 @@ index cca97ee403b..5e33bfacf91 100644
if test "x$with_xattr" = "xyes"
then
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index a72d95f8378..5e0ac914e1c 100644
index 6f33d2c748f..d4cb708336c 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -106,7 +106,10 @@
@@ -99,7 +99,10 @@
#include <sys/statfs.h>
#endif
#ifdef HAVE_ATTR_XATTR_H
@@ -36,8 +36,8 @@ index a72d95f8378..5e0ac914e1c 100644
+#include <sys/xattr.h>
#endif
#include <time.h>
#ifdef HAVE_UNISTD_H
@@ -378,7 +381,9 @@ NTSTATUS errno_to_status( int err )
#include <unistd.h>
@@ -364,7 +367,9 @@ NTSTATUS errno_to_status( int err )
static int xattr_fremove( int filedes, const char *name )
{
@@ -48,7 +48,7 @@ index a72d95f8378..5e0ac914e1c 100644
return fremovexattr( filedes, name );
#else
errno = ENOSYS;
@@ -388,7 +393,9 @@ static int xattr_fremove( int filedes, const char *name )
@@ -374,7 +379,9 @@ static int xattr_fremove( int filedes, const char *name )
static int xattr_fset( int filedes, const char *name, void *value, size_t size )
{
@@ -59,7 +59,7 @@ index a72d95f8378..5e0ac914e1c 100644
return fsetxattr( filedes, name, value, size, 0 );
#else
errno = ENOSYS;
@@ -398,7 +405,9 @@ static int xattr_fset( int filedes, const char *name, void *value, size_t size )
@@ -384,7 +391,9 @@ static int xattr_fset( int filedes, const char *name, void *value, size_t size )
static int xattr_get( const char *path, const char *name, void *value, size_t size )
{
@@ -70,7 +70,7 @@ index a72d95f8378..5e0ac914e1c 100644
return getxattr( path, name, value, size );
#else
errno = ENOSYS;
@@ -408,7 +417,9 @@ static int xattr_get( const char *path, const char *name, void *value, size_t si
@@ -394,7 +403,9 @@ static int xattr_get( const char *path, const char *name, void *value, size_t si
static int xattr_remove( const char *path, const char *name )
{
@@ -81,7 +81,7 @@ index a72d95f8378..5e0ac914e1c 100644
return removexattr( path, name );
#else
errno = ENOSYS;
@@ -418,7 +429,9 @@ static int xattr_remove( const char *path, const char *name )
@@ -404,7 +415,9 @@ static int xattr_remove( const char *path, const char *name )
static int xattr_set( const char *path, const char *name, void *value, size_t size )
{
@@ -93,5 +93,5 @@ index a72d95f8378..5e0ac914e1c 100644
#else
errno = ENOSYS;
--
2.28.0
2.33.0

View File

@@ -1,4 +1,4 @@
From e7dacaafcbdef04a9cabfdb645497f89d19ca781 Mon Sep 17 00:00:00 2001
From 691c8c2dfe1c14d968cf91f2356d4fca0611d579 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Mon, 6 Oct 2014 14:26:24 -0600
Subject: [PATCH] ntdll: Add support for FreeBSD style extended attributes.
@@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Add support for FreeBSD style extended attributes.
2 files changed, 38 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index f964230858e..a37b314a063 100644
index 57f76f09b96..b99be0623b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -689,7 +689,7 @@ AC_CHECK_HEADERS([libprocstat.h],,,
@@ -645,7 +645,7 @@ AC_CHECK_HEADERS([libprocstat.h],,,
if test "x$with_xattr" != "xno"
then
@@ -22,10 +22,10 @@ index f964230858e..a37b314a063 100644
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/xattr.h>]], [[getxattr("", "", "", 0, 0, 0);]])],
[AC_DEFINE(XATTR_ADDITIONAL_OPTIONS, 1, [Define if xattr functions take additional arguments (Mac OS X)])])])
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 301241e2edd..4ccc74c300a 100644
index d4cb708336c..63fff5f7697 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -114,6 +114,10 @@
@@ -104,6 +104,10 @@
#elif defined(HAVE_SYS_XATTR_H)
#include <sys/xattr.h>
#endif
@@ -34,9 +34,9 @@ index 301241e2edd..4ccc74c300a 100644
+#include <sys/extattr.h>
+#endif
#include <time.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
@@ -381,6 +385,21 @@ NTSTATUS errno_to_status( int err )
#include <unistd.h>
@@ -364,6 +368,21 @@ NTSTATUS errno_to_status( int err )
#ifndef XATTR_USER_PREFIX
#define XATTR_USER_PREFIX "user."
#endif
@@ -58,7 +58,7 @@ index 301241e2edd..4ccc74c300a 100644
static int xattr_fremove( int filedes, const char *name )
{
@@ -388,6 +407,9 @@ static int xattr_fremove( int filedes, const char *name )
@@ -371,6 +390,9 @@ static int xattr_fremove( int filedes, const char *name )
return fremovexattr( filedes, name, 0 );
#elif defined(HAVE_SYS_XATTR_H) || defined(HAVE_ATTR_XATTR_H)
return fremovexattr( filedes, name );
@@ -68,7 +68,7 @@ index 301241e2edd..4ccc74c300a 100644
#else
errno = ENOSYS;
return -1;
@@ -400,6 +422,10 @@ static int xattr_fset( int filedes, const char *name, void *value, size_t size )
@@ -383,6 +405,10 @@ static int xattr_fset( int filedes, const char *name, void *value, size_t size )
return fsetxattr( filedes, name, value, size, 0, 0 );
#elif defined(HAVE_SYS_XATTR_H) || defined(HAVE_ATTR_XATTR_H)
return fsetxattr( filedes, name, value, size, 0 );
@@ -79,7 +79,7 @@ index 301241e2edd..4ccc74c300a 100644
#else
errno = ENOSYS;
return -1;
@@ -412,6 +438,10 @@ static int xattr_get( const char *path, const char *name, void *value, size_t si
@@ -395,6 +421,10 @@ static int xattr_get( const char *path, const char *name, void *value, size_t si
return getxattr( path, name, value, size, 0, 0 );
#elif defined(HAVE_SYS_XATTR_H) || defined(HAVE_ATTR_XATTR_H)
return getxattr( path, name, value, size );
@@ -90,7 +90,7 @@ index 301241e2edd..4ccc74c300a 100644
#else
errno = ENOSYS;
return -1;
@@ -424,6 +454,9 @@ static int xattr_remove( const char *path, const char *name )
@@ -407,6 +437,9 @@ static int xattr_remove( const char *path, const char *name )
return removexattr( path, name, 0 );
#elif defined(HAVE_SYS_XATTR_H) || defined(HAVE_ATTR_XATTR_H)
return removexattr( path, name );
@@ -100,7 +100,7 @@ index 301241e2edd..4ccc74c300a 100644
#else
errno = ENOSYS;
return -1;
@@ -436,6 +469,10 @@ static int xattr_set( const char *path, const char *name, void *value, size_t si
@@ -419,6 +452,10 @@ static int xattr_set( const char *path, const char *name, void *value, size_t si
return setxattr( path, name, value, size, 0, 0 );
#elif defined(HAVE_SYS_XATTR_H) || defined(HAVE_ATTR_XATTR_H)
return setxattr( path, name, value, size, 0 );
@@ -112,5 +112,5 @@ index 301241e2edd..4ccc74c300a 100644
errno = ENOSYS;
return -1;
--
2.29.2
2.33.0