aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rwxr-xr-xconfigure38
-rw-r--r--misc/Makefile2
-rw-r--r--misc/tst-mntent.c24
4 files changed, 49 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index e30e66e34a..b570cced29 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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.
diff --git a/configure b/configure
index 3ef6e6ba82..66db82f857 100755
--- a/configure
+++ b/configure
@@ -581,6 +581,25 @@ fi
+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=
@@ -745,25 +764,6 @@ else
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=
diff --git a/misc/Makefile b/misc/Makefile
index c8b2302c99..52bf339309 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -61,7 +61,7 @@ aux := init-misc
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
diff --git a/misc/tst-mntent.c b/misc/tst-mntent.c
new file mode 100644
index 0000000000..cd67c98fe6
--- /dev/null
+++ b/misc/tst-mntent.c
@@ -0,0 +1,24 @@
+/* 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;
+}