#include <afsconfig.h>
#include <afs/param.h>
+#ifdef AFS_HPUX_ENV
+/* We need the old directory type headers (included below), so don't include
+ * the normal dirent.h, or it will conflict. */
+# undef HAVE_DIRENT_H
+# include <sys/inode.h>
+# define LONGFILENAMES 1
+# include <sys/sysmacros.h>
+# include <sys/ino.h>
+# define DIRSIZ_MACRO
+# ifdef HAVE_USR_OLD_USR_INCLUDE_NDIR_H
+# include </usr/old/usr/include/ndir.h>
+# else
+# include <ndir.h>
+# endif
+#endif
+
#include <roken.h>
#include <ctype.h>
#else /* AFS_VFSINCL_ENV */
#include <sys/inode.h>
-#ifdef AFS_HPUX_ENV
-#define LONGFILENAMES 1
-#include <sys/sysmacros.h>
-#include <sys/ino.h>
-#define DIRSIZ_MACRO
-#ifdef HAVE_USR_OLD_USR_INCLUDE_NDIR_H
-#include </usr/old/usr/include/ndir.h>
-#else
-#include <ndir.h>
-#endif
-#else
+#ifndef AFS_HPUX_ENV
#define KERNEL
#include <sys/dir.h>
#undef KERNEL
#include <afsconfig.h>
#include <afs/param.h>
+#ifdef AFS_HPUX_ENV
+/* We need the old directory type headers (included below), so don't include
+ * the normal dirent.h, or it will conflict. */
+# undef HAVE_DIRENT_H
+# include <sys/inode.h>
+# define LONGFILENAMES 1
+# include <sys/sysmacros.h>
+# include <sys/ino.h>
+# define DIRSIZ_MACRO
+# ifdef HAVE_USR_OLD_USR_INCLUDE_NDIR_H
+# include </usr/old/usr/include/ndir.h>
+# else
+# include <ndir.h>
+# endif
+#endif
+
#include <roken.h>
#include <ctype.h>
#endif
#else /* AFS_VFSINCL_ENV */
#include <sys/inode.h>
-#ifdef AFS_HPUX_ENV
-#define LONGFILENAMES 1
-#include <sys/sysmacros.h>
-#include <sys/ino.h>
-#define DIRSIZ_MACRO
-#ifdef HAVE_USR_OLD_USR_INCLUDE_NDIR_H
-#include </usr/old/usr/include/ndir.h>
-#else
-#include <ndir.h>
-#endif
-#else
+#ifndef AFS_HPUX_ENV
#include <sys/dir.h>
#endif
#include <sys/fs.h>
#include <afsconfig.h>
#include <afs/param.h>
+#ifdef AFS_HPUX_ENV
+/* We need the old directory type headers (included below), so don't include
+ * the normal dirent.h, or it will conflict. */
+# undef HAVE_DIRENT_H
+# include <sys/inode.h>
+# define LONGFILENAMES 1
+# include <sys/sysmacros.h>
+# include <sys/ino.h>
+# define DIRSIZ_MACRO
+# ifdef HAVE_USR_OLD_USR_INCLUDE_NDIR_H
+# include </usr/old/usr/include/ndir.h>
+# else
+# include <ndir.h>
+# endif
+#endif
+
#include <roken.h>
#include <ctype.h>
#else /* AFS_VFSINCL_ENV */
#include <sys/inode.h>
-#ifdef AFS_HPUX_ENV
-#define LONGFILENAMES 1
-#include <sys/sysmacros.h>
-#include <sys/ino.h>
-#define DIRSIZ_MACRO
-#ifdef HAVE_USR_OLD_USR_INCLUDE_NDIR_H
-#include </usr/old/usr/include/ndir.h>
-#else
-#include <ndir.h>
-#endif
-#else
+#ifndef AFS_HPUX_ENV
#define KERNEL
#include <sys/dir.h>
#undef KERNEL
#include "fsck.h"
#include <sys/signal.h>
-char *rawname(), *unrawname(), *blockcheck(), *malloc();
+char *rawname(), *unrawname(), *blockcheck();
void catch(), catchquit(), voidquit();
static int tryForce;
int returntosingle;
#include <afsconfig.h>
#include <afs/param.h>
+#ifdef AFS_HPUX_ENV
+/* We need the old directory type headers (included below), so don't include
+ * the normal dirent.h, or it will conflict. */
+# undef HAVE_DIRENT_H
+# include <sys/inode.h>
+# define LONGFILENAMES 1
+# include <sys/sysmacros.h>
+# include <sys/ino.h>
+# define DIRSIZ_MACRO
+# ifdef HAVE_USR_OLD_USR_INCLUDE_NDIR_H
+# include </usr/old/usr/include/ndir.h>
+# else
+# include <ndir.h>
+# endif
+#endif
+
#include <roken.h>
#include <ctype.h>
#endif
#else /* AFS_VFSINCL_ENV */
#include <sys/inode.h>
-#ifdef AFS_HPUX_ENV
-#define LONGFILENAMES 1
-#include <sys/sysmacros.h>
-#include <sys/ino.h>
-#define DIRSIZ_MACRO
-#ifdef HAVE_USR_OLD_USR_INCLUDE_NDIR_H
-#include </usr/old/usr/include/ndir.h>
-#else
-#include <ndir.h>
-#endif
-#else
+#ifndef AFS_HPUX_ENV
#include <sys/dir.h>
#endif
#include <sys/fs.h>
|| ((statemap[dp->di_contin] & STATE) != CSTATE)) {
/* this is an error which must be cleared by hand. */
pfatal("BAD CONTINUATION INODE NUMBER ");
-#ifdef VICE
- vprintf(" I=%u ", inumber);
-#else
printf(" I=%u ", inumber);
-#endif /* VICE */
if (reply("CLEAR") == 1) {
dp->di_contin = 0;
inodirty();
pwarn("I=%u (%ld should be %ld)", inumber, dp->di_nlink,
1);
if (preen)
-#ifdef VICE
- vprintf(" (CORRECTED)\n");
-#else
printf(" (CORRECTED)\n");
-#endif /* VICE */
else {
if (reply("CORRECT") == 0)
continue;
/* inode map */ howmany((fs)->fs_ipg, NBBY) + \
/* block map */ howmany((fs)->fs_cpg * (fs)->fs_spc / NSPF(fs), NBBY))
-char *malloc(), *calloc();
struct disklabel *getdisklabel();
setup(dev)
#include <afsconfig.h>
#include <afs/param.h>
+#ifdef AFS_HPUX_ENV
+/* We need the old directory type headers (included below), so don't include
+ * the normal dirent.h, or it will conflict. */
+# undef HAVE_DIRENT_H
+# include <sys/inode.h>
+# define LONGFILENAMES 1
+# include <sys/sysmacros.h>
+# include <sys/ino.h>
+# include <sys/signal.h>
+# define DIRSIZ_MACRO
+# ifdef HAVE_USR_OLD_USR_INCLUDE_NDIR_H
+# include </usr/old/usr/include/ndir.h>
+# else
+# include <ndir.h>
+# endif
+#endif
+
#include <roken.h>
#include <ctype.h>
#endif
#else /* AFS_VFSINCL_ENV */
#include <sys/inode.h>
-#ifdef AFS_HPUX_ENV
-#define LONGFILENAMES 1
-#include <sys/sysmacros.h>
-#include <sys/ino.h>
-#include <sys/signal.h>
-#define DIRSIZ_MACRO
-#ifdef HAVE_USR_OLD_USR_INCLUDE_NDIR_H
-#include </usr/old/usr/include/ndir.h>
-#else
-#include <ndir.h>
-#endif
-#else
+#ifndef AFS_HPUX_ENV
#include <sys/dir.h>
#endif
#include <sys/fs.h>
#if !defined(AFS_HPUX101_ENV)
long lseek();
#endif
-char *malloc();
#if defined(AFS_SUN_ENV)
extern int iscorrupt;
#endif
#include <afsconfig.h>
#include <afs/param.h>
+#ifdef AFS_HPUX_ENV
+/* We need the old directory type headers (included below), so don't include
+ * the normal dirent.h, or it will conflict. */
+# undef HAVE_DIRENT_H
+# include <sys/inode.h>
+# define LONGFILENAMES 1
+# include <sys/sysmacros.h>
+# include <sys/ino.h>
+# define DIRSIZ_MACRO
+# ifdef HAVE_USR_OLD_USR_INCLUDE_NDIR_H
+# include </usr/old/usr/include/ndir.h>
+# else
+# include <ndir.h>
+# endif
+#endif
+
#include <roken.h>
#include <ctype.h>
#else /* AFS_VFSINCL_ENV */
#include <sys/inode.h>
-#ifdef AFS_HPUX_ENV
-#define LONGFILENAMES 1
-#include <sys/sysmacros.h>
-#include <sys/ino.h>
-#define DIRSIZ_MACRO
-#ifdef HAVE_USR_OLD_USR_INCLUDE_NDIR_H
-#include </usr/old/usr/include/ndir.h>
-#else
-#include <ndir.h>
-#endif
-#else
+#ifndef AFS_HPUX_ENV
#define KERNEL
#include <sys/dir.h>
#undef KERNEL