1 /******************************************************************** 2 * $Author: jgoerzen $ 3 * $Revision: 1.1 $ 4 * $Date: 2000/08/19 00:28:56 $ 5 * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/Dirent.h,v $ 6 * $State: Exp $ 7 * 8 * Paul Lindner, University of Minnesota CIS. 9 * 10 * Copyright 1991, 1992 by the Regents of the University of Minnesota 11 * see the file "Copyright" in the distribution for conditions of use. 12 ********************************************************************* 13 * MODULE: Dirent.h 14 * Portably include dir.h dirent.h, etc. 15 ********************************************************************* 16 * Revision History: 17 * $Log: Dirent.h,v $ 18 * Revision 1.1 2000/08/19 00:28:56 jgoerzen 19 * Initial revision 20 * 21 * Revision 3.10 1996/01/04 18:25:27 lindner 22 * Updates for autoconf 23 * 24 * Revision 3.9 1995/02/01 21:43:13 lindner 25 * Put back an AIX dirent fix.. 26 * 27 * Revision 3.8 1994/12/12 17:43:27 lindner 28 * Hack around AIX 29 * 30 * Revision 3.7 1994/11/18 21:43:35 lindner 31 * Fix error msgs on NeXTstep 32 * 33 * Revision 3.6 1994/03/17 04:37:12 lindner 34 * Lame VMS port 35 * 36 * Revision 3.5 1993/12/27 16:12:07 lindner 37 * Mods for Apollo Domain systems 38 * 39 * Revision 3.4 1993/09/30 23:18:25 lindner 40 * pl8 41 * 42 * Revision 3.3 1993/07/13 04:03:59 lindner 43 * added 386BSD 44 * 45 * Revision 3.2 1993/05/25 22:02:10 lindner 46 * Fix problems with CDC epix systems 47 * 48 * Revision 3.1.1.1 1993/02/11 18:03:02 lindner 49 * Gopher+1.2beta release 50 * 51 * Revision 1.1 1992/12/10 23:27:52 lindner 52 * gopher 1.1 release 53 * 54 * 55 *********************************************************************/ 56 57 #if !defined(GDIRENT_H) && !defined(VMS) 58 #define GDIRENT_H 59 60 #include <sys/types.h> 61 62 #if HAVE_DIRENT_H 63 # include <dirent.h> 64 # define NAMLEN(dirent) strlen((dirent)->d_name) 65 #else 66 # define dirent direct 67 # define NAMLEN(dirent) (dirent)->d_namlen 68 # if HAVE_SYS_NDIR_H 69 # include <sys/ndir.h> 70 # endif 71 # if HAVE_SYS_DIR_H 72 # include <sys/dir.h> 73 # endif 74 # if HAVE_NDIR_H 75 # include <ndir.h> 76 # endif 77 #endif 78 79 #include "Stat.h" 80 81 #ifndef S_ISDIR 82 # define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) 83 #endif 84 85 #ifndef S_ISREG 86 # define S_ISREG(m) (((m)&S_IFMT) == S_IFREG) 87 #endif 88 89 90 #endif /* GDIRENT_H */ 91