+2025-03-21 Bruno Haible <bruno@clisp.org>
+
+ mountlist: Replace a configure-time error with a compile-time error.
+ Reported by Yury V. Zaytsev <yury@shurup.com> in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2025-03/msg00080.html>.
+ * m4/mountlist.m4 (gl_MOUNTLIST): Instead of aborting the configuration,
+ define MOUNTED_NOT_PORTED.
+ * lib/mountlist.c (read_file_system_list): Err out if MOUNTED_NOT_PORTED
+ is defined.
+ * modules/mountlist (configure.ac, Makefile.am): Compile mountlist.c on
+ all platforms.
+
2025-03-21 Bruno Haible <bruno@clisp.org>
setlocale-null: Fix autoconf warning.
}
#endif /* MOUNTED_INTERIX_STATVFS */
-#if defined _WIN32 && !defined __CYGWIN__
+#if defined _WIN32 && !defined __CYGWIN__ /* native Windows */
/* Don't assume that UNICODE is not defined. */
# undef GetDriveType
# define GetDriveType GetDriveTypeA
}
#endif
+#if MOUNTED_NOT_PORTED
+# error "Please port gnulib mountlist.c to your platform!"
+#endif
+
*mtail = NULL;
return mount_list;
# mountlist.m4
-# serial 17
+# serial 18
dnl Copyright (C) 2002-2006, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
fi
if test -z "$ac_list_mounted_fs"; then
- AC_MSG_ERROR([could not determine how to read list of mounted file systems])
- # FIXME -- no need to abort building the whole package
- # Can't build mountlist.c or anything that needs its functions
+ AC_DEFINE([MOUNTED_NOT_PORTED], [1],
+ [Define if we don't know how to determine the list of mounted file systems.])
fi
- if test $ac_list_mounted_fs = found; then
+ if test "$ac_list_mounted_fs" = found; then
gl_cv_list_mounted_fs=yes
else
gl_cv_list_mounted_fs=no
configure.ac:
gl_MOUNTLIST
-gl_CONDITIONAL([GL_COND_OBJ_MOUNTLIST], [test $gl_cv_list_mounted_fs = yes])
-AM_COND_IF([GL_COND_OBJ_MOUNTLIST], [
- gl_PREREQ_MOUNTLIST_EXTRA
-])
+gl_PREREQ_MOUNTLIST_EXTRA
Makefile.am:
-if GL_COND_OBJ_MOUNTLIST
lib_SOURCES += mountlist.c
-endif
Include:
"mountlist.h"