File tree 2 files changed +10
-0
lines changed
System/Directory/Internal
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,17 @@ c_PATH_MAX | c_PATH_MAX' > toInteger maxValue = Nothing
49
49
c_PATH_MAX = Nothing
50
50
#endif
51
51
52
+ #if !defined(HAVE_REALPATH)
53
+
54
+ c_realpath :: CString -> CString -> IO CString
55
+ c_realpath _ _ = throwIO (mkIOError UnsupportedOperation " platform does not support realpath" Nothing Nothing )
56
+
57
+ #else
58
+
52
59
foreign import ccall " realpath" c_realpath :: CString -> CString -> IO CString
53
60
61
+ #endif
62
+
54
63
withRealpath :: CString -> (CString -> IO a ) -> IO a
55
64
withRealpath path action = case c_PATH_MAX of
56
65
Nothing ->
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ AC_PROG_CC()
30
30
# check for specific header (.h) files that we are interested in
31
31
AC_CHECK_HEADERS ( [ fcntl.h limits.h sys/types.h sys/stat.h time.h] )
32
32
33
+ AC_CHECK_FUNCS ( [ realpath] )
33
34
AC_CHECK_FUNCS ( [ utimensat] )
34
35
AC_CHECK_FUNCS ( [ CreateSymbolicLinkW] )
35
36
AC_CHECK_FUNCS ( [ GetFinalPathNameByHandleW] )
You can’t perform that action at this time.
0 commit comments