+1998-05-08 23:49 Ulrich Drepper <drepper@cygnus.com>
+
+ * misc/Makefile (tests): Add tst-mntent.
+ * misc/tst-mntent.c: New file.
+
1998-05-08 21:56 Zack Weinberg <zack@rabi.phys.columbia.edu>
* autolock.sh: Removed.
+ac_aux_dir=
+for ac_dir in scripts $srcdir/scripts; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in scripts $srcdir/scripts" 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
# This will get text that should go into config.make.
config_vars=
fi
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
subdirs="$add_ons"
add_ons_pfx=
install-lib := libbsd-compat.a libg.a
gpl2lgpl := error.c error.h
-tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt
+tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent
include ../Rules
--- /dev/null
+/* Test case by Horst von Brand <vonbrand@sleipnir.valparaiso.cl>. */
+#include <stdio.h>
+#include <mntent.h>
+
+int
+main (int argc, char *argv[])
+{
+ int result = 0;
+ struct mntent mef =
+ {
+ "/dev/hda1", "/", "ext2", "defaults", 1, 1
+ };
+ struct mntent *mnt = &mef;
+
+ if (hasmntopt (mnt, "defaults"))
+ printf("Found!\n");
+ else
+ {
+ printf("Didn't find it\n");
+ result = 1;
+ }
+
+ return result;
+}