]> git.sur5r.net Git - openldap/blob - include/ac/dirent.h
Notice updates
[openldap] / include / ac / dirent.h
1 /* Generic dirent.h */
2 /* $OpenLDAP$ */
3 /*
4  * Copyright 1998-2003 The OpenLDAP Foundation, Redwood City, California, USA
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted only as authorized by the OpenLDAP
9  * Public License.
10  *
11  * A copy of this license is available in file LICENSE in the
12  * top-level directory of the distribution or, alternatively, at
13  * <http://www.OpenLDAP.org/license.html>.
14  */
15
16 #ifndef _AC_DIRENT_H
17 #define _AC_DIRENT_H
18
19 #if HAVE_DIRENT_H
20 # include <dirent.h>
21 # define NAMLEN(dirent) strlen((dirent)->d_name)
22 #else
23 # define dirent direct
24 # define NAMLEN(dirent) (dirent)->d_namlen
25 # if HAVE_SYS_NDIR_H
26 #  include <sys/ndir.h>
27 # endif
28 # if HAVE_SYS_DIR_H
29 #  include <sys/dir.h>
30 # endif
31 # if HAVE_NDIR_H
32 #  include <ndir.h>
33 # endif
34 #endif
35
36 #endif /* _AC_DIRENT_H */