streamly-fsevents 0.1.0 → 0.1.1
raw patch · 8 files changed
+611/−353 lines, 8 filesdep ~basedep ~containersdep ~streamlynew-uploaderPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, containers, streamly, streamly-core
API changes (from Hackage documentation)
Files
- Changelog.md +5/−0
- README.md +21/−2
- configure +502/−295
- configure.ac +30/−6
- src/Streamly/FileSystem/Event.hs +22/−7
- src/Streamly/Internal/FS/Event.hs +0/−13
- src/config.h.in +6/−10
- streamly-fsevents.cabal +25/−20
Changelog.md view
@@ -1,5 +1,10 @@ # Changelog +## 0.1.1++- Fix a build issue due to configure script on macOS + nix+- Allow GHC-9.14+ ## 0.1.0 - Initial release
README.md view
@@ -1,2 +1,21 @@-Please refer to the [streamly](https://github.com/composewell/streamly/blob/master/docs/User/Project/README.md)-package for tutorials and other documentation.+# File System Event Notification (fsnotify)++A **portable, robust, and stream-based file system event notification API** for+**Linux, macOS, and Windows**. This library provides a streaming alternative to+the [`fsnotify`](https://github.com/fsnotify/fsnotify) package.++The portable module in this package offers a consistent, cross-platform,+common denominator API across all supported systems whereas+platform-specific modules expose more extensive APIs that allow you to+make full use of each operating system’s native capabilities.++## Contributing++We welcome contributions of all kinds, bug reports, feature requests, and pull+requests. If you’d like to get involved, please open an issue or start a+discussion.++## Getting Support++* 💬 Join our [community chat](https://gitter.im/composewell/streamly).+* 📧 For dedicated support and feature requests, contact us at [support@composewell.com](mailto:support@composewell.com).
configure view
@@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles.-# Generated by GNU Autoconf 2.71 for streamly 0.11.0.+# Generated by GNU Autoconf 2.72 for streamly-fsevents 0.1.1. # # Report bugs to <streamly@composewell.com>. # #-# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,+# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, # Inc. # #@@ -17,7 +17,6 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh-as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh@@ -26,12 +25,13 @@ # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST-else $as_nop- case `(set -o) 2>/dev/null` in #(+else case e in #(+ e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;;+esac ;; esac fi @@ -103,7 +103,7 @@ ;; esac-# We did not find ourselves, most probably we were run as `sh COMMAND'+# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0@@ -133,15 +133,14 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail-# out after a failed `exec'.+# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then- as_bourne_compatible="as_nop=:-if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1+ as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=:@@ -149,12 +148,13 @@ # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST-else \$as_nop- case \`(set -o) 2>/dev/null\` in #(+else case e in #(+ e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;;+esac ;; esac fi "@@ -172,8 +172,9 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : -else \$as_nop- exitcode=1; echo positional parameters were not saved.+else case e in #(+ e) exitcode=1; echo positional parameters were not saved. ;;+esac fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah))@@ -186,14 +187,15 @@ if (eval "$as_required") 2>/dev/null then : as_have_required=yes-else $as_nop- as_have_required=no+else case e in #(+ e) as_have_required=no ;;+esac fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : -else $as_nop- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR+else case e in #(+ e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do@@ -226,12 +228,13 @@ if $as_found then : -else $as_nop- if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&+else case e in #(+ e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes-fi+fi ;;+esac fi @@ -253,7 +256,7 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail-# out after a failed `exec'.+# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi@@ -273,7 +276,8 @@ $0: under such a shell if you do have one." fi exit 1-fi+fi ;;+esac fi fi SHELL=${CONFIG_SHELL-/bin/sh}@@ -312,14 +316,6 @@ as_fn_set_status $1 exit $1 } # as_fn_exit-# as_fn_nop-# ----------# Do nothing but, unlike ":", preserve the value of $?.-as_fn_nop ()-{- return $?-}-as_nop=as_fn_nop # as_fn_mkdir_p # -------------@@ -388,11 +384,12 @@ { eval $1+=\$2 }'-else $as_nop- as_fn_append ()+else case e in #(+ e) as_fn_append () { eval $1=\$$1\$2- }+ } ;;+esac fi # as_fn_append # as_fn_arith ARG...@@ -406,21 +403,14 @@ { as_val=$(( $* )) }'-else $as_nop- as_fn_arith ()+else case e in #(+ e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1`- }+ } ;;+esac fi # as_fn_arith -# as_fn_nop-# ----------# Do nothing but, unlike ":", preserve the value of $?.-as_fn_nop ()-{- return $?-}-as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ----------------------------------------@@ -494,6 +484,8 @@ /[$]LINENO/= ' <$as_myself | sed '+ t clear+ :clear s/[$]LINENO.*/&-/ t lineno b@@ -542,7 +534,6 @@ as_echo='printf %s\n' as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file@@ -554,9 +545,9 @@ if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas:- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.- # In both cases, we have to default to `cp -pR'.+ # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.+ # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.+ # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then@@ -581,10 +572,12 @@ as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name.-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"+as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"+as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name.-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"+as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"+as_tr_sh="eval sed '$as_sed_sh'" # deprecated test -n "$DJDIR" || exec 7<&0 </dev/null@@ -608,10 +601,10 @@ MAKEFLAGS= # Identity of this package.-PACKAGE_NAME='streamly'-PACKAGE_TARNAME='streamly'-PACKAGE_VERSION='0.11.0'-PACKAGE_STRING='streamly 0.11.0'+PACKAGE_NAME='streamly-fsevents'+PACKAGE_TARNAME='streamly-fsevents'+PACKAGE_VERSION='0.1.1'+PACKAGE_STRING='streamly-fsevents 0.1.1' PACKAGE_BUGREPORT='streamly@composewell.com' PACKAGE_URL='https://streamly.composewell.com' @@ -784,7 +777,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&- as_fn_error $? "invalid feature name: \`$ac_useropt'"+ as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in@@ -810,7 +803,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&- as_fn_error $? "invalid feature name: \`$ac_useropt'"+ as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in@@ -1023,7 +1016,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&- as_fn_error $? "invalid package name: \`$ac_useropt'"+ as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in@@ -1039,7 +1032,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&- as_fn_error $? "invalid package name: \`$ac_useropt'"+ as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in@@ -1069,8 +1062,8 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: \`$ac_option'-Try \`$0 --help' for more information"+ -*) as_fn_error $? "unrecognized option: '$ac_option'+Try '$0 --help' for more information" ;; *=*)@@ -1078,7 +1071,7 @@ # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* )- as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;+ as_fn_error $? "invalid variable name: '$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;;@@ -1128,7 +1121,7 @@ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done -# There might be people who depend on the old broken behavior: `$host'+# There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias@@ -1196,7 +1189,7 @@ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"+ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)`@@ -1224,7 +1217,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF-\`configure' configures streamly 0.11.0 to adapt to many kinds of systems.+'configure' configures streamly-fsevents 0.1.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1238,11 +1231,11 @@ --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit- -q, --quiet, --silent do not print \`checking ...' messages+ -q, --quiet, --silent do not print 'checking ...' messages --cache-file=FILE cache test results in FILE [disabled]- -C, --config-cache alias for \`--cache-file=config.cache'+ -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files- --srcdir=DIR find the sources in DIR [configure dir or \`..']+ --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX@@ -1250,10 +1243,10 @@ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] -By default, \`make install' will install all the files in-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify-an installation prefix other than \`$ac_default_prefix' using \`--prefix',-for instance \`--prefix=\$HOME'.+By default, 'make install' will install all the files in+'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify+an installation prefix other than '$ac_default_prefix' using '--prefix',+for instance '--prefix=\$HOME'. For better control, use the options below. @@ -1273,7 +1266,8 @@ --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man]- --docdir=DIR documentation root [DATAROOTDIR/doc/streamly]+ --docdir=DIR documentation root+ [DATAROOTDIR/doc/streamly-fsevents] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR]@@ -1286,7 +1280,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in- short | recursive ) echo "Configuration of streamly 0.11.0:";;+ short | recursive ) echo "Configuration of streamly-fsevents 0.1.1:";; esac cat <<\_ACEOF @@ -1304,11 +1298,11 @@ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> -Use these variables to override the choices made by `configure' or to help+Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to <streamly@composewell.com>.-streamly home page: <https://streamly.composewell.com>.+streamly-fsevents home page: <https://streamly.composewell.com>. _ACEOF ac_status=$? fi@@ -1372,10 +1366,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF-streamly configure 0.11.0-generated by GNU Autoconf 2.71+streamly-fsevents configure 0.1.1+generated by GNU Autoconf 2.72 -Copyright (C) 2021 Free Software Foundation, Inc.+Copyright (C) 2023 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF@@ -1414,11 +1408,12 @@ } && test -s conftest.$ac_objext then : ac_retval=0-else $as_nop- printf "%s\n" "$as_me: failed program was:" >&5+else case e in #(+ e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1+ ac_retval=1 ;;+esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval@@ -1438,8 +1433,8 @@ if eval test \${$3+y} then : printf %s "(cached) " >&6-else $as_nop- as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`+else case e in #(+ e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` eval ac_save_FLAGS=\$$6 as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext@@ -1463,12 +1458,14 @@ if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes"-else $as_nop- eval "$3=no"+else case e in #(+ e) eval "$3=no" ;;+esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext eval $6=\$ac_save_FLAGS-+ ;;+esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5@@ -1476,6 +1473,54 @@ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_check_decl++# ac_fn_c_try_link LINENO+# -----------------------+# Try to link conftest.$ac_ext, and return whether this succeeded.+ac_fn_c_try_link ()+{+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack+ rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext+ if { { ac_try="$ac_link"+case "(($ac_try" in+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;+ *) ac_try_echo=$ac_try;;+esac+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""+printf "%s\n" "$ac_try_echo"; } >&5+ (eval "$ac_link") 2>conftest.err+ ac_status=$?+ if test -s conftest.err; then+ grep -v '^ *+' conftest.err >conftest.er1+ cat conftest.er1 >&5+ mv -f conftest.er1 conftest.err+ fi+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5+ test $ac_status = 0; } && {+ test -z "$ac_c_werror_flag" ||+ test ! -s conftest.err+ } && test -s conftest$ac_exeext && {+ test "$cross_compiling" = yes ||+ test -x conftest$ac_exeext+ }+then :+ ac_retval=0+else case e in #(+ e) printf "%s\n" "$as_me: failed program was:" >&5+sed 's/^/| /' conftest.$ac_ext >&5++ ac_retval=1 ;;+esac+fi+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would+ # interfere with the next link command; also delete a directory that is+ # left behind by Apple's compiler. We do this before executing the actions.+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno+ as_fn_set_status $ac_retval++} # ac_fn_c_try_link ac_configure_args_raw= for ac_arg do@@ -1500,8 +1545,8 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by streamly $as_me 0.11.0, which was-generated by GNU Autoconf 2.71. Invocation command line was+It was created by streamly-fsevents $as_me 0.1.1, which was+generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -1747,10 +1792,10 @@ printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \- || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file-See \`config.log' for more details" "$LINENO" 5; }+See 'config.log' for more details" "$LINENO" 5; } fi done @@ -1786,9 +1831,7 @@ /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int);-static char *e (p, i)- char **p;- int i;+static char *e (char **p, int i) { return p[i]; }@@ -1802,6 +1845,21 @@ return s; } +/* C89 style stringification. */+#define noexpand_stringify(a) #a+const char *stringified = noexpand_stringify(arbitrary+token=sequence);++/* C89 style token pasting. Exercises some of the corner cases that+ e.g. old MSVC gets wrong, but not very hard. */+#define noexpand_concat(a,b) a##b+#define expand_concat(a,b) noexpand_concat(a,b)+extern int vA;+extern int vbee;+#define aye A+#define bee B+int *pvA = &expand_concat(v,aye);+int *pvbee = &noexpand_concat(v,bee);+ /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated@@ -1829,16 +1887,19 @@ # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals='-// Does the compiler advertise C99 conformance?+/* Does the compiler advertise C99 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif +// See if C++-style comments work.+ #include <stdbool.h> extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t);+extern void free (void *); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare@@ -1888,7 +1949,6 @@ static inline int test_restrict (ccp restrict text) {- // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)@@ -1954,6 +2014,8 @@ ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234;+ // Work around memory leak warnings.+ free (ia); // Check named initializers. struct named_init ni = {@@ -1975,7 +2037,7 @@ # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals='-// Does the compiler advertise C11 conformance?+/* Does the compiler advertise C11 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif@@ -2089,12 +2151,12 @@ eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,)- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5-printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5+printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set)- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5-printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5+printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *)@@ -2103,18 +2165,18 @@ ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5-printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5+printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5-printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5+printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5-printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5-printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5+printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;}+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5+printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status.@@ -2130,11 +2192,11 @@ fi done if $ac_cache_corrupted; then- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}- as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'+ as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ##@@ -2158,6 +2220,10 @@ fi +# -----------------------------------------------------------------------------+# Linux: check for inotify constants+# -----------------------------------------------------------------------------+ # XXX Do this only for linux @@ -2181,8 +2247,8 @@ if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6-else $as_nop- if test -n "$CC"; then+else case e in #(+ e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR@@ -2204,7 +2270,8 @@ done IFS=$as_save_IFS -fi+fi ;;+esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then@@ -2226,8 +2293,8 @@ if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6-else $as_nop- if test -n "$ac_ct_CC"; then+else case e in #(+ e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR@@ -2249,7 +2316,8 @@ done IFS=$as_save_IFS -fi+fi ;;+esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then@@ -2284,8 +2352,8 @@ if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6-else $as_nop- if test -n "$CC"; then+else case e in #(+ e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR@@ -2307,7 +2375,8 @@ done IFS=$as_save_IFS -fi+fi ;;+esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then@@ -2329,8 +2398,8 @@ if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6-else $as_nop- if test -n "$CC"; then+else case e in #(+ e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no@@ -2369,7 +2438,8 @@ ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi-fi+fi ;;+esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then@@ -2393,8 +2463,8 @@ if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6-else $as_nop- if test -n "$CC"; then+else case e in #(+ e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR@@ -2416,7 +2486,8 @@ done IFS=$as_save_IFS -fi+fi ;;+esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then@@ -2442,8 +2513,8 @@ if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6-else $as_nop- if test -n "$ac_ct_CC"; then+else case e in #(+ e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR@@ -2465,7 +2536,8 @@ done IFS=$as_save_IFS -fi+fi ;;+esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then@@ -2503,8 +2575,8 @@ if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6-else $as_nop- if test -n "$CC"; then+else case e in #(+ e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR@@ -2526,7 +2598,8 @@ done IFS=$as_save_IFS -fi+fi ;;+esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then@@ -2548,8 +2621,8 @@ if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6-else $as_nop- if test -n "$ac_ct_CC"; then+else case e in #(+ e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR@@ -2571,7 +2644,8 @@ done IFS=$as_save_IFS -fi+fi ;;+esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then@@ -2600,10 +2674,10 @@ fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH-See \`config.log' for more details" "$LINENO" 5; }+See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5@@ -2675,8 +2749,8 @@ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then :- # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'+ # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'.+# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf.@@ -2696,7 +2770,7 @@ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not- # safe: cross compilers may not add the suffix if given an `-o'+ # safe: cross compilers may not add the suffix if given an '-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working.@@ -2707,8 +2781,9 @@ done test "$ac_cv_exeext" = no && ac_cv_exeext= -else $as_nop- ac_file=''+else case e in #(+ e) ac_file='' ;;+esac fi if test -z "$ac_file" then :@@ -2717,13 +2792,14 @@ printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables-See \`config.log' for more details" "$LINENO" 5; }-else $as_nop- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5-printf "%s\n" "yes" >&6; }+See 'config.log' for more details" "$LINENO" 5; }+else case e in #(+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5+printf "%s\n" "yes" >&6; } ;;+esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; }@@ -2747,10 +2823,10 @@ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then :- # If both `conftest.exe' and `conftest' are `present' (well, observable)-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will-# work properly (i.e., refer to `conftest.exe'), while it won't with-# `rm'.+ # If both 'conftest.exe' and 'conftest' are 'present' (well, observable)+# catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will+# work properly (i.e., refer to 'conftest.exe'), while it won't with+# 'rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in@@ -2760,11 +2836,12 @@ * ) break;; esac done-else $as_nop- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}+else case e in #(+ e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link-See \`config.log' for more details" "$LINENO" 5; }+See 'config.log' for more details" "$LINENO" 5; } ;;+esac fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5@@ -2780,6 +2857,8 @@ main (void) { FILE *f = fopen ("conftest.out", "w");+ if (!f)+ return 1; return ferror (f) || fclose (f) != 0; ;@@ -2819,26 +2898,27 @@ if test "$cross_compiling" = maybe; then cross_compiling=yes else- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs.-If you meant to cross compile, use \`--host'.-See \`config.log' for more details" "$LINENO" 5; }+If you meant to cross compile, use '--host'.+See 'config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out+rm -f conftest.$ac_ext conftest$ac_cv_exeext \+ conftest.o conftest.obj conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6-else $as_nop- cat confdefs.h - <<_ACEOF >conftest.$ac_ext+else case e in #(+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int@@ -2870,16 +2950,18 @@ break;; esac done-else $as_nop- printf "%s\n" "$as_me: failed program was:" >&5+else case e in #(+ e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile-See \`config.log' for more details" "$LINENO" 5; }+See 'config.log' for more details" "$LINENO" 5; } ;;+esac fi-rm -f conftest.$ac_cv_objext conftest.$ac_ext+rm -f conftest.$ac_cv_objext conftest.$ac_ext ;;+esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; }@@ -2890,8 +2972,8 @@ if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6-else $as_nop- cat confdefs.h - <<_ACEOF >conftest.$ac_ext+else case e in #(+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int@@ -2908,12 +2990,14 @@ if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes-else $as_nop- ac_compiler_gnu=no+else case e in #(+ e) ac_compiler_gnu=no ;;+esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu-+ ;;+esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }@@ -2931,8 +3015,8 @@ if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6-else $as_nop- ac_save_c_werror_flag=$ac_c_werror_flag+else case e in #(+ e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g"@@ -2950,8 +3034,8 @@ if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes-else $as_nop- CFLAGS=""+else case e in #(+ e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -2966,8 +3050,8 @@ if ac_fn_c_try_compile "$LINENO" then : -else $as_nop- ac_c_werror_flag=$ac_save_c_werror_flag+else case e in #(+ e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */@@ -2984,12 +3068,15 @@ then : ac_cv_prog_cc_g=yes fi-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;+esac fi-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;+esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext- ac_c_werror_flag=$ac_save_c_werror_flag+ ac_c_werror_flag=$ac_save_c_werror_flag ;;+esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }@@ -3016,8 +3103,8 @@ if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6-else $as_nop- ac_cv_prog_cc_c11=no+else case e in #(+ e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */@@ -3034,25 +3121,28 @@ test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext-CC=$ac_save_CC+CC=$ac_save_CC ;;+esac fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; }-else $as_nop- if test "x$ac_cv_prog_cc_c11" = x+else case e in #(+ e) if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; }-else $as_nop- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5+else case e in #(+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }- CC="$CC $ac_cv_prog_cc_c11"+ CC="$CC $ac_cv_prog_cc_c11" ;;+esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11- ac_prog_cc_stdc=c11+ ac_prog_cc_stdc=c11 ;;+esac fi fi if test x$ac_prog_cc_stdc = xno@@ -3062,8 +3152,8 @@ if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6-else $as_nop- ac_cv_prog_cc_c99=no+else case e in #(+ e) ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */@@ -3080,25 +3170,28 @@ test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext-CC=$ac_save_CC+CC=$ac_save_CC ;;+esac fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; }-else $as_nop- if test "x$ac_cv_prog_cc_c99" = x+else case e in #(+ e) if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; }-else $as_nop- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5+else case e in #(+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }- CC="$CC $ac_cv_prog_cc_c99"+ CC="$CC $ac_cv_prog_cc_c99" ;;+esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99- ac_prog_cc_stdc=c99+ ac_prog_cc_stdc=c99 ;;+esac fi fi if test x$ac_prog_cc_stdc = xno@@ -3108,8 +3201,8 @@ if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6-else $as_nop- ac_cv_prog_cc_c89=no+else case e in #(+ e) ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */@@ -3126,25 +3219,28 @@ test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext-CC=$ac_save_CC+CC=$ac_save_CC ;;+esac fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; }-else $as_nop- if test "x$ac_cv_prog_cc_c89" = x+else case e in #(+ e) if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; }-else $as_nop- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5+else case e in #(+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }- CC="$CC $ac_cv_prog_cc_c89"+ CC="$CC $ac_cv_prog_cc_c89" ;;+esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89- ac_prog_cc_stdc=c89+ ac_prog_cc_stdc=c89 ;;+esac fi fi @@ -3160,8 +3256,8 @@ if test ${ac_cv_c_undeclared_builtin_options+y} then : printf %s "(cached) " >&6-else $as_nop- ac_save_CFLAGS=$CFLAGS+else case e in #(+ e) ac_save_CFLAGS=$CFLAGS ac_cv_c_undeclared_builtin_options='cannot detect' for ac_arg in '' -fno-builtin; do CFLAGS="$ac_save_CFLAGS $ac_arg"@@ -3180,8 +3276,8 @@ if ac_fn_c_try_compile "$LINENO" then : -else $as_nop- # This test program should compile successfully.+else case e in #(+ e) # This test program should compile successfully. # No library function is consistently available on # freestanding implementations, so test against a dummy # declaration. Include always-available headers on the@@ -3209,26 +3305,29 @@ if test x"$ac_arg" = x then : ac_cv_c_undeclared_builtin_options='none needed'-else $as_nop- ac_cv_c_undeclared_builtin_options=$ac_arg+else case e in #(+ e) ac_cv_c_undeclared_builtin_options=$ac_arg ;;+esac fi break fi-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;+esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CFLAGS=$ac_save_CFLAGS-+ ;;+esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } case $ac_cv_c_undeclared_builtin_options in #( 'cannot detect') :- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot make $CC report undeclared builtins-See \`config.log' for more details" "$LINENO" 5; } ;; #(+See 'config.log' for more details" "$LINENO" 5; } ;; #( 'none needed') : ac_c_undeclared_builtin_options='' ;; #( *) :@@ -3240,8 +3339,9 @@ if test "x$ac_cv_have_decl_IN_MASK_CREATE" = xyes then : ac_have_decl=1-else $as_nop- ac_have_decl=0+else case e in #(+ e) ac_have_decl=0 ;;+esac fi printf "%s\n" "#define HAVE_DECL_IN_MASK_CREATE $ac_have_decl" >>confdefs.h @@ -3250,55 +3350,159 @@ if test "x$ac_cv_have_decl_IN_EXCL_UNLINK" = xyes then : ac_have_decl=1-else $as_nop- ac_have_decl=0+else case e in #(+ e) ac_have_decl=0 ;;+esac fi printf "%s\n" "#define HAVE_DECL_IN_EXCL_UNLINK $ac_have_decl" >>confdefs.h -# XXX Do this only for macOS-ac_fn_check_decl "$LINENO" "kFSEventStreamCreateFlagFileEvents" "ac_cv_have_decl_kFSEventStreamCreateFlagFileEvents" "#include <CoreServices/CoreServices.h>-" "$ac_c_undeclared_builtin_options" "CFLAGS"-if test "x$ac_cv_have_decl_kFSEventStreamCreateFlagFileEvents" = xyes+# -----------------------------------------------------------------------------+# macOS: check for FSEvents constants+# -----------------------------------------------------------------------------+++++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kFSEventStreamCreateFlagFileEvents usability" >&5+printf %s "checking for kFSEventStreamCreateFlagFileEvents usability... " >&6; }+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext+/* end confdefs.h. */+#include <CoreServices/CoreServices.h>+int+main (void)+{+unsigned int x = kFSEventStreamCreateFlagFileEvents; return (x == 0);++ ;+ return 0;+}+_ACEOF+if ac_fn_c_try_link "$LINENO" then :- ac_have_decl=1-else $as_nop- ac_have_decl=0++printf "%s\n" "#define HAVE_DECL_KFSEVENTSTREAMCREATEFLAGFILEEVENTS 1" >>confdefs.h++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5+printf "%s\n" "yes" >&6; }+else case e in #(+ e)+printf "%s\n" "#define HAVE_DECL_KFSEVENTSTREAMCREATEFLAGFILEEVENTS 0" >>confdefs.h++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5+printf "%s\n" "no" >&6; }+ ;;+esac fi-printf "%s\n" "#define HAVE_DECL_KFSEVENTSTREAMCREATEFLAGFILEEVENTS $ac_have_decl" >>confdefs.h+rm -f core conftest.err conftest.$ac_objext conftest.beam \+ conftest$ac_exeext conftest.$ac_ext -ac_fn_check_decl "$LINENO" "kFSEventStreamCreateFlagFullHistory" "ac_cv_have_decl_kFSEventStreamCreateFlagFullHistory" "#include <CoreServices/CoreServices.h>-" "$ac_c_undeclared_builtin_options" "CFLAGS"-if test "x$ac_cv_have_decl_kFSEventStreamCreateFlagFullHistory" = xyes++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kFSEventStreamCreateFlagFullHistory usability" >&5+printf %s "checking for kFSEventStreamCreateFlagFullHistory usability... " >&6; }+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext+/* end confdefs.h. */+#include <CoreServices/CoreServices.h>+int+main (void)+{+unsigned int x = kFSEventStreamCreateFlagFullHistory; return (x == 0);++ ;+ return 0;+}+_ACEOF+if ac_fn_c_try_link "$LINENO" then :- ac_have_decl=1-else $as_nop- ac_have_decl=0++printf "%s\n" "#define HAVE_DECL_KFSEVENTSTREAMCREATEFLAGFULLHISTORY 1" >>confdefs.h++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5+printf "%s\n" "yes" >&6; }+else case e in #(+ e)+printf "%s\n" "#define HAVE_DECL_KFSEVENTSTREAMCREATEFLAGFULLHISTORY 0" >>confdefs.h++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5+printf "%s\n" "no" >&6; }+ ;;+esac fi-printf "%s\n" "#define HAVE_DECL_KFSEVENTSTREAMCREATEFLAGFULLHISTORY $ac_have_decl" >>confdefs.h+rm -f core conftest.err conftest.$ac_objext conftest.beam \+ conftest$ac_exeext conftest.$ac_ext -ac_fn_check_decl "$LINENO" "kFSEventStreamEventFlagItemCloned" "ac_cv_have_decl_kFSEventStreamEventFlagItemCloned" "#include <CoreServices/CoreServices.h>-" "$ac_c_undeclared_builtin_options" "CFLAGS"-if test "x$ac_cv_have_decl_kFSEventStreamEventFlagItemCloned" = xyes++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kFSEventStreamEventFlagItemCloned usability" >&5+printf %s "checking for kFSEventStreamEventFlagItemCloned usability... " >&6; }+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext+/* end confdefs.h. */+#include <CoreServices/CoreServices.h>+int+main (void)+{+unsigned int x = kFSEventStreamEventFlagItemCloned; return (x == 0);++ ;+ return 0;+}+_ACEOF+if ac_fn_c_try_link "$LINENO" then :- ac_have_decl=1-else $as_nop- ac_have_decl=0++printf "%s\n" "#define HAVE_DECL_KFSEVENTSTREAMEVENTFLAGITEMCLONED 1" >>confdefs.h++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5+printf "%s\n" "yes" >&6; }+else case e in #(+ e)+printf "%s\n" "#define HAVE_DECL_KFSEVENTSTREAMEVENTFLAGITEMCLONED 0" >>confdefs.h++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5+printf "%s\n" "no" >&6; }+ ;;+esac fi-printf "%s\n" "#define HAVE_DECL_KFSEVENTSTREAMEVENTFLAGITEMCLONED $ac_have_decl" >>confdefs.h+rm -f core conftest.err conftest.$ac_objext conftest.beam \+ conftest$ac_exeext conftest.$ac_ext -ac_fn_check_decl "$LINENO" "kFSEventStreamEventFlagItemIsHardlink" "ac_cv_have_decl_kFSEventStreamEventFlagItemIsHardlink" "#include <CoreServices/CoreServices.h>-" "$ac_c_undeclared_builtin_options" "CFLAGS"-if test "x$ac_cv_have_decl_kFSEventStreamEventFlagItemIsHardlink" = xyes++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kFSEventStreamEventFlagItemIsHardlink usability" >&5+printf %s "checking for kFSEventStreamEventFlagItemIsHardlink usability... " >&6; }+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext+/* end confdefs.h. */+#include <CoreServices/CoreServices.h>+int+main (void)+{+unsigned int x = kFSEventStreamEventFlagItemIsHardlink; return (x == 0);++ ;+ return 0;+}+_ACEOF+if ac_fn_c_try_link "$LINENO" then :- ac_have_decl=1-else $as_nop- ac_have_decl=0++printf "%s\n" "#define HAVE_DECL_KFSEVENTSTREAMEVENTFLAGITEMISHARDLINK 1" >>confdefs.h++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5+printf "%s\n" "yes" >&6; }+else case e in #(+ e)+printf "%s\n" "#define HAVE_DECL_KFSEVENTSTREAMEVENTFLAGITEMISHARDLINK 0" >>confdefs.h++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5+printf "%s\n" "no" >&6; }+ ;;+esac fi-printf "%s\n" "#define HAVE_DECL_KFSEVENTSTREAMEVENTFLAGITEMISHARDLINK $ac_have_decl" >>confdefs.h+rm -f core conftest.err conftest.$ac_objext conftest.beam \+ conftest$ac_exeext conftest.$ac_ext +# ----------------------------------------------------------------------------- # Output+# ----------------------------------------------------------------------------- ac_config_headers="$ac_config_headers src/config.h" cat >confcache <<\_ACEOF@@ -3311,8 +3515,8 @@ # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. #-# `ac_cv_env_foo' variables (set or unset) will be overridden when-# loading this file, other *unset* `ac_cv_foo' will be assigned the+# 'ac_cv_env_foo' variables (set or unset) will be overridden when+# loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF@@ -3342,14 +3546,14 @@ (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *)- # `set' does not quote correctly, so add quotes: double-quote+ # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *)- # `set' quotes correctly as required by POSIX, so do not add quotes.+ # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac |@@ -3439,7 +3643,6 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh-as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh@@ -3448,12 +3651,13 @@ # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST-else $as_nop- case `(set -o) 2>/dev/null` in #(+else case e in #(+ e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;;+esac ;; esac fi @@ -3525,7 +3729,7 @@ ;; esac-# We did not find ourselves, most probably we were run as `sh COMMAND'+# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0@@ -3554,7 +3758,6 @@ } # as_fn_error - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking.@@ -3594,11 +3797,12 @@ { eval $1+=\$2 }'-else $as_nop- as_fn_append ()+else case e in #(+ e) as_fn_append () { eval $1=\$$1\$2- }+ } ;;+esac fi # as_fn_append # as_fn_arith ARG...@@ -3612,11 +3816,12 @@ { as_val=$(( $* )) }'-else $as_nop- as_fn_arith ()+else case e in #(+ e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1`- }+ } ;;+esac fi # as_fn_arith @@ -3699,9 +3904,9 @@ if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas:- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.- # In both cases, we have to default to `cp -pR'.+ # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.+ # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.+ # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then@@ -3782,10 +3987,12 @@ as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name.-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"+as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"+as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name.-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"+as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"+as_tr_sh="eval sed '$as_sed_sh'" # deprecated exec 6>&1@@ -3800,8 +4007,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log="-This file was extended by streamly $as_me 0.11.0, which was-generated by GNU Autoconf 2.71. Invocation command line was+This file was extended by streamly-fsevents $as_me 0.1.1, which was+generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS@@ -3828,7 +4035,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\-\`$as_me' instantiates files and other configuration actions+'$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. @@ -3848,7 +4055,7 @@ $config_headers Report bugs to <streamly@composewell.com>.-streamly home page: <https://streamly.composewell.com>."+streamly-fsevents home page: <https://streamly.composewell.com>." _ACEOF ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`@@ -3856,11 +4063,11 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\-streamly config.status 0.11.0-configured by $0, generated by GNU Autoconf 2.71,+streamly-fsevents config.status 0.1.1+configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" -Copyright (C) 2021 Free Software Foundation, Inc.+Copyright (C) 2023 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -3911,8 +4118,8 @@ ac_need_defaults=false;; --he | --h) # Conflict between --help and --header- as_fn_error $? "ambiguous option: \`$1'-Try \`$0 --help' for more information.";;+ as_fn_error $? "ambiguous option: '$1'+Try '$0 --help' for more information.";; --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \@@ -3920,8 +4127,8 @@ ac_cs_silent=: ;; # This is an error.- -*) as_fn_error $? "unrecognized option: \`$1'-Try \`$0 --help' for more information." ;;+ -*) as_fn_error $? "unrecognized option: '$1'+Try '$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;;@@ -3971,7 +4178,7 @@ case $ac_config_target in "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;+ *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; esac done @@ -3989,7 +4196,7 @@ # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned:-# after its creation but before its name has been assigned to `$tmp'.+# after its creation but before its name has been assigned to '$tmp'. $debug || { tmp= ac_tmp=@@ -4013,13 +4220,13 @@ # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS.-# This happens for instance with `./config.status Makefile'.+# This happens for instance with './config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF -# Transform confdefs.h into an awk script `defines.awk', embedded as+# Transform confdefs.h into an awk script 'defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. @@ -4129,7 +4336,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);;- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;+ :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac@@ -4151,19 +4358,19 @@ -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style,- # because $ac_f cannot contain `:'.+ # because $ac_f cannot contain ':'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac ||- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;+ as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done - # Let's still pretend it is `configure' which instantiates (i.e., don't+ # Let's still pretend it is 'configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '`
configure.ac view
@@ -3,21 +3,45 @@ # See https://www.gnu.org/software/autoconf/manual/autoconf.html for help on # the macros used in this file. -AC_INIT([streamly], [0.11.0], [streamly@composewell.com], [streamly], [https://streamly.composewell.com])+AC_INIT([streamly-fsevents], [0.1.1], [streamly@composewell.com], [streamly-fsevents], [https://streamly.composewell.com]) # To suppress "WARNING: unrecognized options: --with-compiler" AC_ARG_WITH([compiler], [GHC]) +# -----------------------------------------------------------------------------+# Linux: check for inotify constants+# -----------------------------------------------------------------------------+ # XXX Do this only for linux AC_CHECK_DECLS([IN_MASK_CREATE],[],[],[#include <sys/inotify.h>]) AC_CHECK_DECLS([IN_EXCL_UNLINK],[],[],[#include <sys/inotify.h>]) -# XXX Do this only for macOS-AC_CHECK_DECLS([kFSEventStreamCreateFlagFileEvents],[],[],[#include <CoreServices/CoreServices.h>])-AC_CHECK_DECLS([kFSEventStreamCreateFlagFullHistory],[],[],[#include <CoreServices/CoreServices.h>])-AC_CHECK_DECLS([kFSEventStreamEventFlagItemCloned],[],[],[#include <CoreServices/CoreServices.h>])-AC_CHECK_DECLS([kFSEventStreamEventFlagItemIsHardlink],[],[],[#include <CoreServices/CoreServices.h>])+# -----------------------------------------------------------------------------+# macOS: check for FSEvents constants+# ----------------------------------------------------------------------------- +AC_DEFUN([AC_CHECK_FSEVENT_CONST],+[+ AC_MSG_CHECKING([for $1 usability])+ AC_LINK_IFELSE(+ [AC_LANG_PROGRAM(+ [[#include <CoreServices/CoreServices.h>]],+ [[unsigned int x = $1; return (x == 0);]]+ )],+ [AC_DEFINE([HAVE_DECL_]m4_toupper([$1]), [1], [Define to 1 if $1 is usable])+ AC_MSG_RESULT([yes])],+ [AC_DEFINE([HAVE_DECL_]m4_toupper([$1]), [0], [Define to 0 if $1 is unusable])+ AC_MSG_RESULT([no])]+ )+])++AC_CHECK_FSEVENT_CONST([kFSEventStreamCreateFlagFileEvents])+AC_CHECK_FSEVENT_CONST([kFSEventStreamCreateFlagFullHistory])+AC_CHECK_FSEVENT_CONST([kFSEventStreamEventFlagItemCloned])+AC_CHECK_FSEVENT_CONST([kFSEventStreamEventFlagItemIsHardlink])++# ----------------------------------------------------------------------------- # Output+# ----------------------------------------------------------------------------- AC_CONFIG_HEADERS([src/config.h]) AC_OUTPUT
src/Streamly/FileSystem/Event.hs view
@@ -6,15 +6,30 @@ -- Stability : pre-release -- Portability : GHC ----- File system event notification API portable across Linux, macOS and Windows--- platforms.+-- Portable file system event notification API for Linux, macOS, and Windows. ----- Note that recursive directory tree watch does not work reliably on Linux--- (see notes in the Linux module), therefore, recursive watch API is not--- provided in this module. However, you can use it from the platform specific--- modules.+-- This module provides a common interface for file system event monitoring+-- across major platforms. In most cases, behavior is consistent across+-- operating systems, but certain platform-specific idiosyncrasies remain. ----- For platform specific APIs please see the following modules:+-- Compared to Linux inotify, the kernel event notification APIs on macOS and+-- Windows are more robust. In particular, recursive directory watching on+-- Linux must be emulated in user space, which introduces unavoidable race+-- conditions.+--+-- For this reason, this portable module does not expose a recursive watch API.+-- If you need recursive monitoring, you can use the platform-specific modules,+-- which provide their own recursive APIs. Recursive watches for macOS and+-- windows are robust.+--+-- On Linux, watches are tied to file handles. As a result:+--+-- * If a watched file is deleted and recreated, the new file is not watched.+-- * If a watched file is renamed, we can continue to monitor it.+--+-- On macOS, by contrast, watches are path-based.+--+-- For platform-specific APIs, see: -- -- * "Streamly.Internal.FS.Event.Darwin" -- * "Streamly.Internal.FS.Event.Linux"
src/Streamly/Internal/FS/Event.hs view
@@ -6,19 +6,6 @@ -- Stability : pre-release -- Portability : GHC ----- File system event notification API portable across Linux, macOS and Windows--- platforms.------ Note that recursive directory tree watch does not work reliably on Linux--- (see notes in the Linux module), therefore, recursive watch API is not--- provided in this module. However, you can use it from the platform specific--- modules.------ For platform specific APIs please see the following modules:------ * "Streamly.Internal.FS.Event.Darwin"--- * "Streamly.Internal.FS.Event.Linux"--- * "Streamly.Internal.FS.Event.Windows" -- XXX Need to ensure that the signatures of the exported APIs are same on all -- platforms.
src/config.h.in view
@@ -1,27 +1,23 @@ /* src/config.h.in. Generated from configure.ac by autoheader. */ -/* Define to 1 if you have the declaration of `IN_EXCL_UNLINK', and to 0 if+/* Define to 1 if you have the declaration of 'IN_EXCL_UNLINK', and to 0 if you don't. */ #undef HAVE_DECL_IN_EXCL_UNLINK -/* Define to 1 if you have the declaration of `IN_MASK_CREATE', and to 0 if+/* Define to 1 if you have the declaration of 'IN_MASK_CREATE', and to 0 if you don't. */ #undef HAVE_DECL_IN_MASK_CREATE -/* Define to 1 if you have the declaration of- `kFSEventStreamCreateFlagFileEvents', and to 0 if you don't. */+/* Define to 0 if kFSEventStreamCreateFlagFileEvents is unusable */ #undef HAVE_DECL_KFSEVENTSTREAMCREATEFLAGFILEEVENTS -/* Define to 1 if you have the declaration of- `kFSEventStreamCreateFlagFullHistory', and to 0 if you don't. */+/* Define to 0 if kFSEventStreamCreateFlagFullHistory is unusable */ #undef HAVE_DECL_KFSEVENTSTREAMCREATEFLAGFULLHISTORY -/* Define to 1 if you have the declaration of- `kFSEventStreamEventFlagItemCloned', and to 0 if you don't. */+/* Define to 0 if kFSEventStreamEventFlagItemCloned is unusable */ #undef HAVE_DECL_KFSEVENTSTREAMEVENTFLAGITEMCLONED -/* Define to 1 if you have the declaration of- `kFSEventStreamEventFlagItemIsHardlink', and to 0 if you don't. */+/* Define to 0 if kFSEventStreamEventFlagItemIsHardlink is unusable */ #undef HAVE_DECL_KFSEVENTSTREAMEVENTFLAGITEMISHARDLINK /* Define to the address where bug reports for this package should be sent. */
streamly-fsevents.cabal view
@@ -1,33 +1,37 @@ cabal-version: 2.2 name: streamly-fsevents-version: 0.1.0-synopsis: File system event notification API-description: File system event notification API+version: 0.1.1+synopsis: File system event notification streams+description:+ A portable, robust, and stream-based file system event notification API for+ Linux, macOS, and Windows. This library provides a streaming alternative to+ the fsnotify package.+ .+ The portable module in this package offers a consistent,+ cross-platform, common denominator API across all supported systems+ whereas platform-specific modules expose more extensive APIs that+ allow you to make full use of each operating system’s native+ capabilities. homepage: https://streamly.composewell.com-bug-reports: https://github.com/composewell/streamly/issues+bug-reports: https://github.com/composewell/streamly-fsevents/issues license: BSD-3-Clause license-file: LICENSE-tested-with: GHC==8.6.5- , GHC==8.8.4- , GHC==8.10.7- , GHC==9.0.2- , GHC==9.2.8- , GHC==9.4.7- , GHC==9.6.3- , GHC==9.8.1+tested-with:+ GHC==9.14.1+ , GHC==9.12.4+ , GHC==9.10.3+ , GHC==9.8.4+ , GHC==9.6.3 author: Composewell Technologies maintainer: streamly@composewell.com-copyright: 2017 Composewell Technologies+copyright: 2025 Composewell Technologies category:- Streamly, Concurrency, Streaming, Dataflow, Pipes, Reactivity, List,- Logic, Non-determinism, Parsing, Array, Time, Unicode, Filesystem,- Network+ Streamly, Streaming, Filesystem stability: Stable build-type: Configure extra-source-files:- README.md configure configure.ac src/Streamly/Internal/FS/Event/Darwin.h@@ -35,6 +39,7 @@ extra-doc-files: Changelog.md+ README.md extra-tmp-files: config.log@@ -44,7 +49,7 @@ source-repository head type: git- location: https://github.com/composewell/streamly+ location: https://github.com/composewell/streamly-fsevents flag fusion-plugin description: Enable fusion plugin@@ -227,7 +232,7 @@ Streamly.Internal.FS.Event build-depends:- base >= 4.12 && < 4.22+ base >= 4.12 && < 4.23 , streamly-core == 0.3.0 if flag(fusion-plugin)@@ -237,7 +242,7 @@ -- For FS.Event module if os(linux) build-depends: directory >= 1.2.2 && < 1.4- , containers >= 0.6.0 && < 0.8+ , containers >= 0.6.0 && < 0.9 if os(windows) build-depends: Win32 >= 2.6 && < 2.15