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