diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:11:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:11:47 +0000 |
commit | 758f820bcc0f68aeebac1717e537ca13a320b909 (patch) | |
tree | 48111ece75cf4f98316848b37a7e26356e00669e /m4/fts.m4 | |
parent | Initial commit. (diff) | |
download | coreutils-758f820bcc0f68aeebac1717e537ca13a320b909.tar.xz coreutils-758f820bcc0f68aeebac1717e537ca13a320b909.zip |
Adding upstream version 9.1.upstream/9.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'm4/fts.m4')
-rw-r--r-- | m4/fts.m4 | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/m4/fts.m4 b/m4/fts.m4 new file mode 100644 index 0000000..c722fe3 --- /dev/null +++ b/m4/fts.m4 @@ -0,0 +1,49 @@ +#serial 22 +dnl Copyright (C) 2005-2022 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_FTS], +[ + gl_FUNC_FTS_CORE +]) + +AC_DEFUN([gl_FUNC_FTS_CORE], +[ + dnl Prerequisites of lib/fts.c. + gl_FUNC_OPENAT + + AC_CHECK_FUNCS_ONCE([fstatfs]) + AC_CHECK_HEADERS_ONCE([sys/param.h sys/vfs.h])dnl + if test "$ac_cv_func_fstatfs,$ac_cv_header_sys_vfs_h" = yes,yes; then + AC_CHECK_MEMBERS([struct statfs.f_type], [], [], + [[$ac_includes_default + #include <sys/vfs.h> + ]]) + if test "$ac_cv_member_struct_statfs_f_type" = yes; then + AC_CHECK_TYPES([__fsword_t], [], [], + [[$ac_includes_default + #include <sys/vfs.h> + ]]) + fi + fi + + AC_CHECK_FUNC([fts_open]) + if test $ac_cv_func_fts_open = yes; then + dnl The system already has the symbols fts_open, etc. + dnl Avoid conflicts between these symbols and ours at the linker level. + AC_DEFINE([fts_open], [rpl_fts_open], + [Define to the overridden function name]) + AC_DEFINE([fts_close], [rpl_fts_close], + [Define to the overridden function name]) + AC_DEFINE([fts_read], [rpl_fts_read], + [Define to the overridden function name]) + AC_DEFINE([fts_set], [rpl_fts_set], + [Define to the overridden function name]) + AC_DEFINE([fts_children], [rpl_fts_children], + [Define to the overridden function name]) + AC_DEFINE([fts_cross_check], [rpl_fts_cross_check], + [Define to the overridden function name]) + fi +]) |