hpux-build-updates-20051002
[openafs.git] / src / vfsck / vprintf.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 /* I don't really need all thes, but I can't tell which ones I need 
11  * and which I don't.
12  */
13 #include <afsconfig.h>
14 #include <afs/param.h>
15
16 RCSID
17     ("$Header$");
18
19 #define VICE                    /* allow us to put our changes in at will */
20 #include <stdio.h>
21
22 #include <sys/param.h>
23 #include <sys/time.h>
24
25 #ifdef AFS_SUN_ENV
26 #define KERNEL
27 #endif
28 #include <sys/mount.h>
29 #ifdef AFS_SUN_ENV
30 #undef KERNEL
31 #endif /* AFS_SUN_ENV */
32
33 #include <sys/file.h>
34
35 #ifdef  AFS_OSF_ENV
36 #include <sys/vnode.h>
37 #include <sys/mount.h>
38 #include <ufs/inode.h>
39 #include <ufs/fs.h>
40 #define _BSD
41 #define _KERNEL
42 #include <ufs/dir.h>
43 #undef  _KERNEL
44 #undef  _BSD
45 #else /* AFS_OSF_ENV */
46 #ifdef AFS_VFSINCL_ENV
47 #define VFS
48 #include <sys/vnode.h>
49 #ifdef    AFS_SUN5_ENV
50 #include <stdio.h>
51 #include <unistd.h>
52 #include <sys/fs/ufs_inode.h>
53 #include <sys/fs/ufs_fs.h>
54 #define _KERNEL
55 #include <sys/fs/ufs_fsdir.h>
56 #undef _KERNEL
57 #include <sys/fs/ufs_mount.h>
58 #else
59 #include <ufs/inode.h>
60 #include <ufs/fs.h>
61 #define KERNEL
62 #include <ufs/fsdir.h>
63 #undef KERNEL
64 #endif
65 #else /* AFS_VFSINCL_ENV */
66
67 #include <sys/inode.h>
68 #ifdef  AFS_HPUX_ENV
69 #include <ctype.h>
70 #define LONGFILENAMES   1
71 #include <sys/sysmacros.h>
72 #include <sys/ino.h>
73 #define DIRSIZ_MACRO
74 #ifdef HAVE_USR_OLD_USR_INCLUDE_NDIR_H
75 #include </usr/old/usr/include/ndir.h>
76 #else
77 #include <ndir.h>
78 #endif
79 #else
80 #define KERNEL
81 #include <sys/dir.h>
82 #undef KERNEL
83 #endif
84 #include <sys/fs.h>
85 #endif /* AFS_VFSINCL_ENV */
86 #endif /* AFS_OSF_ENV */
87
88 #include <sys/stat.h>
89 #include <sys/wait.h>
90 #ifdef AFS_SUN5_ENV
91 #include <string.h>
92 #else
93 #include <strings.h>
94 #endif
95 #include <ctype.h>
96 #include "fsck.h"
97 #include <errno.h>
98
99 /* Vice printf:  lob the message into /vice/file/vfsck.log if it isn't the root */
100 /* If we're salvaging the root, it wouldn't be such a good idea to lob stuff there */
101 vfscklogprintf(s, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
102      char *s;
103      long a1, a2, a3, a4, a5, a6, a7, a8, a9, a10;
104 {
105     printf(s, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
106     if (logfile) {
107         fprintf(logfile, s, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
108         fflush(logfile);
109     }
110 }