Update.
authorUlrich Drepper <drepper@redhat.com>
Fri, 8 May 1998 23:54:11 +0000 (23:54 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 8 May 1998 23:54:11 +0000 (23:54 +0000)
1998-05-08 23:49  Ulrich Drepper  <drepper@cygnus.com>

* misc/Makefile (tests): Add tst-mntent.
* misc/tst-mntent.c: New file.

ChangeLog
configure
misc/Makefile
misc/tst-mntent.c [new file with mode: 0644]

index e30e66e..b570cce 100644 (file)
--- 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.
index 3ef6e6b..66db82f 100755 (executable)
--- 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=
index c8b2302..52bf339 100644 (file)
@@ -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 (file)
index 0000000..cd67c98
--- /dev/null
@@ -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; 
+}