+2001-08-27 Theodore Tso <tytso@valinux.com>
+
+ * configure.in: Check for the presence of strnlen. Stop checking
+ for strdup, since we don't actually care about that symbol
+ any more.
+
2001-08-04 Andreas Dilger <root@lynx.adilger.int>
* Makefile.in: Add "*.orig" to "make clean" target, change
fi
fi
-for ac_func in chflags getrusage llseek lseek64 open64 strdup getmntinfo strcasecmp srandom fchown mallinfo fdatasync
+for ac_func in chflags getrusage llseek lseek64 open64 getmntinfo strcasecmp srandom fchown mallinfo fdatasync strnlen
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4627: checking for $ac_func" >&5
AC_DEFINE(HAVE_STAT_FLAGS)
fi
fi
-AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 strdup getmntinfo strcasecmp srandom fchown mallinfo fdatasync)
+AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 getmntinfo strcasecmp srandom fchown mallinfo fdatasync strnlen)
dnl
dnl Check to see if -lsocket is required (solaris) to make something
dnl that uses socket() to compile; this is needed for the UUID library
+2001-08-27 Theodore Tso <tytso@valinux.com>
+
+ * pass1.c (strnlen): Provide strnlen if libc doesn't.
+
2001-08-13 Theodore Tso <tytso@valinux.com>
* super.c (release_orphan_inodes): If the filesystem contains
* If i_blocks is non-zero, then this is a bogus device/fifo/socket
*/
if (inode->i_blocks)
- return 1;
+ return 0;
/*
* We should be able to do the test below all the time, but
* because the kernel doesn't forcibly clear the device
return 1;
}
+#ifndef HAVE_STRNLEN
+/*
+ * Incredibly, libc5 doesn't appear to have strncpy. So we have to
+ * provide our own.
+ */
+static int strnlen(const char * s, int count)
+{
+ const char *cp = s;
+
+ while (count-- && *cp)
+ cp++;
+ return cp - s;
+}
+#endif
+
/*
* Check to make sure a symlink inode is real. Returns 1 if the symlink
* checks out, 0 if not.