Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoff Norton <grompf@sublimeintervention.com>2005-05-04 07:16:49 +0400
committerGeoff Norton <grompf@sublimeintervention.com>2005-05-04 07:16:49 +0400
commitd88512893f61df99c52068dc53fc37bc3d21ad6e (patch)
tree8a8bd4d94fa43907c658aaa37d9166d82aed7a5b /support
parentf0a394ae0de2c51d4095e102432601d08e7d240c (diff)
2005-05-03 Geoff Norton <gnorton@customerdna.com>
* sys-xattr.c: Mac OS/X Tiger supports xattr but has a different API for supporting resource forks. Allow mono to build on Tiger. svn path=/trunk/mono/; revision=43995
Diffstat (limited to 'support')
-rw-r--r--support/ChangeLog5
-rw-r--r--support/sys-xattr.c31
2 files changed, 36 insertions, 0 deletions
diff --git a/support/ChangeLog b/support/ChangeLog
index 4ba890bdf9d..31180e095b9 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -1,3 +1,8 @@
+2005-05-03 Geoff Norton <gnorton@customerdna.com>
+
+ * sys-xattr.c: Mac OS/X Tiger supports xattr but has a different API for supporting
+ resource forks. Allow mono to build on Tiger.
+
2005-04-30 Jonathan Pryor <jonpryor@vt.edu>
* stdio.c: Add Mono_Posix_Stdlib_DumpFilePosition, which create a hex string
diff --git a/support/sys-xattr.c b/support/sys-xattr.c
index a5729a86921..4462c29ee8a 100644
--- a/support/sys-xattr.c
+++ b/support/sys-xattr.c
@@ -31,9 +31,14 @@ Mono_Posix_Syscall_setxattr (const char *path, const char *name, char *value, mp
if (Mono_Posix_FromXattrFlags (flags, &_flags) == -1)
return -1;
+#if __APPLE__
+ return setxattr (path, name, value, size, 0, _flags);
+#else
return setxattr (path, name, value, size, _flags);
+#endif
}
+#if !__APPLE__
gint32
Mono_Posix_Syscall_lsetxattr (const char *path, const char *name, char *value, mph_size_t size, gint32 flags)
{
@@ -45,6 +50,7 @@ Mono_Posix_Syscall_lsetxattr (const char *path, const char *name, char *value, m
return lsetxattr (path, name, value, size, _flags);
}
+#endif
gint32
Mono_Posix_Syscall_fsetxattr (int fd, const char *name, char *value, mph_size_t size, gint32 flags)
@@ -55,49 +61,74 @@ Mono_Posix_Syscall_fsetxattr (int fd, const char *name, char *value, mph_size_t
if (Mono_Posix_FromXattrFlags (flags, &_flags) == -1)
return -1;
+#if __APPLE__
+ return fsetxattr (fd, name, value, (size_t) size, 0, _flags);
+#else
return lsetxattr (fd, name, value, (size_t) size, _flags);
+#endif
+
}
mph_ssize_t
Mono_Posix_Syscall_getxattr (const char *path, const char *name, void *value, mph_size_t size)
{
mph_return_if_size_t_overflow (size);
+#if __APPLE__
+ return getxattr (path, name, value, (size_t) size, 0, 0);
+#else
return getxattr (path, name, value, (size_t) size);
+#endif
}
+#if !__APPLE__
mph_ssize_t
Mono_Posix_Syscall_lgetxattr (const char *path, const char *name, void *value, mph_size_t size)
{
mph_return_if_size_t_overflow (size);
return lgetxattr (path, name, value, (size_t) size);
}
+#endif
mph_ssize_t
Mono_Posix_Syscall_fgetxattr (int fd, const char *name, void *value, mph_size_t size)
{
mph_return_if_size_t_overflow (size);
+#if __APPLE__
+ return fgetxattr (fd, name, value, (size_t) size, 0, 0);
+#else
return fgetxattr (fd, name, value, (size_t) size);
+#endif
}
mph_ssize_t
Mono_Posix_Syscall_listxattr (const char *path, char *list, mph_size_t size)
{
mph_return_if_size_t_overflow (size);
+#if __APPLE__
+ return listxattr (path, list, (size_t) size, 0);
+#else
return listxattr (path, list, (size_t) size);
+#endif
}
+#if !__APPLE__
mph_ssize_t
Mono_Posix_Syscall_llistxattr (const char *path, char *list, mph_size_t size)
{
mph_return_if_size_t_overflow (size);
return llistxattr (path, list, (size_t) size);
}
+#endif
mph_ssize_t
Mono_Posix_Syscall_flistxattr (int fd, char *list, mph_size_t size)
{
mph_return_if_size_t_overflow (size);
+#if __APPLE__
+ return flistxattr (fd, list, (size_t) size, 0);
+#else
return flistxattr (fd, list, (size_t) size);
+#endif
}
G_END_DECLS