nfs-ganesha 1.4

tests.h

Go to the documentation of this file.
00001 /*      @(#)tests.h     1.7 2003/12/01 Connectathon Testsuite   */
00002 /*      1.4 Lachman ONC Test Suite source       */
00003 
00004 #include <errno.h>
00005 
00006 #ifdef WIN32
00007 #define DOSorWIN32
00008 #include <windows.h>
00009 #endif
00010 #ifdef DOS
00011 #define DOSorWIN32
00012 #include <dos.h>
00013 #endif
00014 #ifdef DOSorWIN32
00015 #define ANSI
00016 #include "unixdos.h"
00017 #endif
00018 
00019 #ifndef MAP_FAILED
00020 #define MAP_FAILED ((void *) -1)
00021 #endif
00022 
00023 #ifndef DOSorWIN32
00024 #define CHMOD_MASK      0777
00025 #define CHMOD_NONE      0
00026 #define CHMOD_RW        0666
00027 #else
00028 #define CHMOD_MASK      (S_IREAD | S_IWRITE)
00029 #define CHMOD_NONE      (S_IREAD)
00030 #define CHMOD_RW        CHMOD_MASK
00031 #endif                          /* DOSorWIN32 */
00032 
00033 #ifndef MAXPATHLEN
00034 #define MAXPATHLEN      1024
00035 #endif
00036 
00037 extern char *Myname;            /* name I was invoked with (for error msgs */
00038 
00039 #ifdef STDARG
00040 extern void error(char *, ...);
00041 #endif
00042 
00043 #ifdef __STDC__
00044 #define ARGS_(x) x
00045 #else
00046 #define ARGS_(x) ()
00047 #endif
00048 
00049 extern void starttime ARGS_((void));
00050 extern void endtime ARGS_((struct timeval * tv));
00051 extern long getparm ARGS_((char *parm, long min, char *label));
00052 extern void dirtree ARGS_((int lev, int files, int dirs, char *fname,
00053                            char *dname, int *totfiles, int *totdirs));
00054 extern void rmdirtree ARGS_((int lev, int files, int dirs, char *fname,
00055                              char *dname, int *totfiles, int *totdirs, int ignore));
00056 extern void testdir ARGS_((char *dir));
00057 extern int mtestdir ARGS_((char *dir));
00058 extern void complete ARGS_((void));
00059 
00060 #ifdef NEED_STRERROR
00061 extern char *strerror ARGS_((int));
00062 #endif
00063 
00064 #ifdef DOSorWIN32
00065 extern int unix_chdir(char *path);
00066 
00067 /* These are redfined so stderr and stdout go to the same redirected file */
00068 #define stdin  (&_iob[0])
00069 #define stdout (&_iob[2])
00070 #define stderr (&_iob[2])
00071 #endif                          /* DOSorWIN32 */