summaryrefslogtreecommitdiffstats
path: root/src/osxsupport.c
diff options
context:
space:
mode:
authorJérôme Vouillon <vouillon@pps.jussieu.fr>2010-01-22 09:52:57 +0000
committerJérôme Vouillon <vouillon@pps.jussieu.fr>2010-01-22 09:52:57 +0000
commitd254ca65f6f848e9380e69ebc4ae6ba3dfc657a8 (patch)
tree3927e737983ffe8af36f0f71fc37e811a2878dcd /src/osxsupport.c
parent30136136909f9ce07dc376ebed9ff12c8da4135b (diff)
downloadunison-d254ca65f6f848e9380e69ebc4ae6ba3dfc657a8.zip
unison-d254ca65f6f848e9380e69ebc4ae6ba3dfc657a8.tar.gz
unison-d254ca65f6f848e9380e69ebc4ae6ba3dfc657a8.tar.bz2
* Fixed bug which made Unison ignore finder information and resource
fork when compiled to 64bit on Mac OSX. * Use asynchronous I/O under Windows
Diffstat (limited to 'src/osxsupport.c')
-rw-r--r--src/osxsupport.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/osxsupport.c b/src/osxsupport.c
index 2a1f638..95e818f 100644
--- a/src/osxsupport.c
+++ b/src/osxsupport.c
@@ -33,12 +33,12 @@ CAMLprim value getFileInfos (value path, value need_size) {
CAMLlocal3(res, fInfo, length);
int retcode;
struct attrlist attrList;
- unsigned long options = 0;
+ unsigned long options = FSOPT_REPORT_FULLSIZE;
struct {
- unsigned long length;
- char finderInfo [32];
- off_t rsrcLength;
- } attrBuf;
+ u_int32_t length;
+ char finderInfo [32];
+ off_t rsrcLength;
+ } __attribute__ ((packed)) attrBuf;
attrList.bitmapcount = ATTR_BIT_MAP_COUNT;
attrList.reserved = 0;
@@ -58,10 +58,10 @@ CAMLprim value getFileInfos (value path, value need_size) {
if (Bool_val (need_size)) {
if (attrBuf.length != sizeof attrBuf)
- unix_error (EOPNOTSUPP, "getattrlist", path);
+ unix_error (EINVAL, "getattrlist", path);
} else {
- if (attrBuf.length < sizeof (unsigned long) + 32)
- unix_error (EOPNOTSUPP, "getattrlist", path);
+ if (attrBuf.length != sizeof (u_int32_t) + 32)
+ unix_error (EINVAL, "getattrlist", path);
}
fInfo = alloc_string (32);
@@ -92,9 +92,9 @@ CAMLprim value setFileInfos (value path, value fInfo) {
struct attrlist attrList;
unsigned long options = 0;
struct {
- unsigned long length;
- char finderInfo [32];
- } attrBuf;
+ u_int32_t length;
+ char finderInfo [32];
+ } __attribute__ ((packed)) attrBuf;
attrList.bitmapcount = ATTR_BIT_MAP_COUNT;
attrList.reserved = 0;