+2006-05-29 Theodore Tso <tytso@mit.edu>
+
+ * util.c (reset_getopt): In order to support ancient Linux header
+ files that don't define __GLIBC__ (but which were using
+ glibc anyway), assume that any system that defines
+ __linux__ should use the glibc method of resetting getopt().
+
2006-05-28 Theodore Tso <tytso@mit.edu>
* unused.c (do_dump_unused): Use EXT2_MAX_BLOCK_SIZE instead of a
* optind be set zero to reset its state. So the unfortunate state of
* affairs is that BSD-derived versions of getopt() misbehave if
* optind is set to 0 in order to reset getopt(), and glibc's getopt()
- * will core ump if optind is set 1 in order to reset getopt().
+ * will core dump if optind is set 1 in order to reset getopt().
*
* More modern versions of BSD require that optreset be set to 1 in
* order to reset getopt(). Sigh. Standards, anyone?
*/
void reset_getopt(void)
{
-#ifdef __GLIBC__
+#if defined(__GLIBC__) || defined(__linux__)
optind = 0;
#else
optind = 1;
+2006-05-29 Theodore Tso <tytso@mit.edu>
+
+ * pass1b.c: Add missing semicolon when HAVE_INTPTR_T is not defined
+
2006-05-22 Theodore Tso <tytso@mit.edu>
* e2fsck.8.in: Fixed spelling mistake. (Addresses Debian Bug:
#endif
#ifndef HAVE_INTPTR_T
-typedef long intptr_t
+typedef long intptr_t;
#endif
/* Needed for architectures where sizeof(int) != sizeof(void *) */
+2006-05-29 Theodore Tso <tytso@mit.edu>
+
+ * filefrag.c: Add support for ancient Linux systems that do not
+ support the LFS api.
+
2006-05-28 Theodore Tso <tytso@mit.edu>
* mke2fs.8.in (types): Clarify -T option description.
static void frag_report(const char *filename)
{
struct statfs fsinfo;
+#ifdef HAVE_FSTAT64
struct stat64 fileinfo;
+#else
+ struct stat fileinfo;
+#endif
int bs;
long i, fd;
unsigned long block, last_block = 0, numblocks;
perror("statfs");
return;
}
+#ifdef HAVE_FSTAT64
if (stat64(filename, &fileinfo) < 0) {
+#else
+ if (stat(filename, &fileinfo) < 0) {
+#endif
perror("stat");
return;
}
printf("Filesystem cylinder groups is approximately %ld\n",
cylgroups);
}
- fd = open(filename, O_RDONLY | O_LARGEFILE);
+#ifdef HAVE_OPEN64
+ fd = open64(filename, O_RDONLY);
+#else
+ fd = open(filename, O_RDONLY);
+#endif
if (fd < 0) {
perror("open");
return;