summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-03-16 12:08:24 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-03-16 12:08:24 -0400
commite31eb441717c0cc4a4b690108c3ce858cae7c692 (patch)
treee184603d279842241589cdce50b483b362ad7644
parent5eb76d2b033436973e0732215fa9d0227a2187bf (diff)
parent0855d7783211ed7dd5e745724e1898cba0494f7d (diff)
Merge branch 'master' into reorg
-rw-r--r--Touch.hsc4
-rw-r--r--doc/bugs/touch.hsc_has_problems_on_non-linux_based_systems.mdwn17
2 files changed, 21 insertions, 0 deletions
diff --git a/Touch.hsc b/Touch.hsc
index 689c58765..f0c4debb3 100644
--- a/Touch.hsc
+++ b/Touch.hsc
@@ -22,6 +22,10 @@ import Foreign.C
#include <sys/stat.h>
#include <fcntl.h>
+#ifndef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE >= 200809L
+#endif
+
data TimeSpec = TimeSpec CTime CLong
instance Storable TimeSpec where
diff --git a/doc/bugs/touch.hsc_has_problems_on_non-linux_based_systems.mdwn b/doc/bugs/touch.hsc_has_problems_on_non-linux_based_systems.mdwn
new file mode 100644
index 000000000..20c16e3cf
--- /dev/null
+++ b/doc/bugs/touch.hsc_has_problems_on_non-linux_based_systems.mdwn
@@ -0,0 +1,17 @@
+It seems that commit bc5c54c987f548505a3877e8a0e460abe0b2a081 introduced some linux specific things...
+
+<pre>
+hsc2hs Touch.hsc
+Touch.hsc: In function ‘main’:
+Touch.hsc:46: error: ‘UTIME_OMIT’ undeclared (first use in this function)
+Touch.hsc:46: error: (Each undeclared identifier is reported only once
+Touch.hsc:46: error: for each function it appears in.)
+Touch.hsc:48: error: ‘UTIME_NOW’ undeclared (first use in this function)
+Touch.hsc:67: error: ‘AT_FDCWD’ undeclared (first use in this function)
+Touch.hsc:68: error: ‘AT_SYMLINK_NOFOLLOW’ undeclared (first use in this function)
+compiling Touch_hsc_make.c failed
+command was: /usr/bin/gcc -c -m32 -I/Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.3/include/ Touch_hsc_make.c -o Touch_hsc_make.o
+make: *** [Touch.hs] Error 1
+</pre>
+
+I dug around the OSX documentation and fcntl.h header file and it seems that UTIME_OMIT, UTIME_NOW, AT_FDCWD and AT_SYMLINK_NOFOLLOW aren't defined (at least on OSX). I suspect the BSD's in general will have problems compiling git-annex.