File tree Expand file tree Collapse file tree 2 files changed +8
-17
lines changed Expand file tree Collapse file tree 2 files changed +8
-17
lines changed Original file line number Diff line number Diff line change 9
9
* Turn build error into compile warnings for exotic ` struct stat `
10
10
configurations (GHC #8859 ).
11
11
12
+ * Improve detection of ` fdatasync(2) ` (GHC #11137 )
13
+
12
14
## 2.7.1.0 * Dec 2014*
13
15
14
16
* Bundled with GHC 7.10.1
Original file line number Diff line number Diff line change @@ -71,23 +71,12 @@ AC_CHECK_FUNCS([mkstemps mkdtemp])
71
71
# Functions for file synchronization and allocation control
72
72
AC_CHECK_FUNCS ( [ fsync] )
73
73
74
- # A more comprehensive check that fdatasync exits
75
- # Necessary for platforms that have fdatasync in headers but have no
76
- # implementation
77
- dnl Originally provided by user copiousfreetime for the beanstalkd project
78
- dnl {{{ make sure that fdatasync exits
79
- AC_CACHE_CHECK ( [ for fdatasync] ,[ ac_cv_func_fdatasync] ,[
80
- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [
81
- #include <unistd.h>
82
- ] ] ,[ [
83
- fdatasync(4);
84
- ] ] ) ] ,
85
- [ ac_cv_func_fdatasync=yes] ,
86
- [ ac_cv_func_fdatasync=no] )
87
- ] )
88
- AS_IF ( [ test "x${ac_cv_func_fdatasync}" = "xyes"] ,
89
- [ AC_DEFINE ( [ HAVE_FDATASYNC] ,[ 1] ,[ If the system defines fdatasync] ) ] )
90
- dnl }}}
74
+ # On OSX linking against 'fdatasync' succeeds, but that doesn't pick
75
+ # the expected the POSIX 'fdatasync' function. So make sure that we
76
+ # also have a function declaration in scope, in addition to being able
77
+ # to link against 'fdatasync'.
78
+ AC_CHECK_DECLS ( [ fdatasync] ,[ AC_CHECK_FUNCS ( [ fdatasync] ) ] )
79
+
91
80
92
81
AC_CHECK_FUNCS ( [ posix_fadvise posix_fallocate] )
93
82
You can’t perform that action at this time.
0 commit comments