1 /* Copyright (C) 2001-2019 Artifex Software, Inc. 2 All Rights Reserved. 3 4 This software is provided AS-IS with no warranty, either express or 5 implied. 6 7 This software is distributed under license and may not be copied, 8 modified or distributed except as expressly authorized under the terms 9 of the license contained in the file LICENSE in this distribution. 10 11 Refer to licensing information at http://www.artifex.com or contact 12 Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato, 13 CA 94945, U.S.A., +1(415)492-9861, for further information. 14 */ 15 16 17 /* Generic substitute for Unix dirent.h */ 18 19 #ifndef dirent__INCLUDED 20 # define dirent__INCLUDED 21 22 /* We must include std.h before any file that includes sys/types.h. */ 23 #include "std.h" 24 25 /* 26 * The location (or existence) of certain system headers is 27 * environment-dependent. We detect this in the makefile 28 * and conditionally define switches in gconfig_.h. 29 */ 30 #include "gconfig_.h" 31 32 /* 33 * Directory entries may be defined in quite a number of different 34 * header files. The following switches are defined in gconfig_.h. 35 */ 36 #if defined(HAVE_DIRENT_H) && HAVE_DIRENT_H == 1 37 # include <dirent.h> 38 typedef struct dirent dir_entry; 39 40 #else /* sys/ndir or ndir or sys/dir, i.e., no dirent */ 41 # if defined(HAVE_SYS_DIR_H) && HAVE_SYS_DIR_H == 1 42 # include <sys/dir.h> 43 # endif 44 # if defined(HAVE_SYS_NDIR_H) && HAVE_SYS_NDIR_H == 1 45 # include <sys/ndir.h> 46 # endif 47 # if defined(HAVE_NDIR_H) && HAVE_NDIR_H == 1 48 # include <ndir.h> 49 # endif 50 typedef struct direct dir_entry; 51 52 #endif /* sys/ndir or ndir or sys/dir */ 53 54 #endif /* dirent__INCLUDED */ 55