34 lines · 1.0 KB · C
RawDownload
/*  * This file is part of the UCB release of Plan 9. It is subject to the license * terms in the LICENSE file found in the top-level directory of this * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No * part of the UCB release of Plan 9, including this file, may be copied, * modified, propagated, or distributed except according to the terms contained * in the LICENSE file. */ /* Wrapper around the ugly dir includes/ifdefs *//* $Id$ */ #if defined(HAVE_DIRENT_H)# include <dirent.h># define NLENGTH(dirent)	(strlen(dirent->d_name))#else# define dirent direct# define NLENGTH(dirent)	(dirent->d_namlen)# ifdef HAVE_SYS_NDIR_H#  include <sys/ndir.h># endif /* HAVE_SYS_NDIR_H */# ifdef HAVE_SYS_DIR_H#  include <sys/dir.h># endif /* HAVE_SYSDIR_H */# ifdef HAVE_NDIR_H#  include <ndir.h># endif /* HAVE_NDIR_H */#endif /* HAVE_DIRENT_H */ #ifdef OPENDIR_DOES_NONDIRextern DIR *ksh_opendir ARGS((const char *d));#else /* OPENDIR_DOES_NONDIR */# define ksh_opendir(d)	opendir(d)#endif /* OPENDIR_DOES_NONDIR */