No empty .Rs/.Re
[netbsd-mini2440.git] / external / bsd / openldap / dist / include / ac / dirent.h
blobb5307d1861a5cf845aa65b2811b602575c2f1273
1 /* Generic dirent.h */
2 /* $OpenLDAP: pkg/ldap/include/ac/dirent.h,v 1.14.2.4 2008/02/11 23:26:40 kurt Exp $ */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 1998-2008 The OpenLDAP Foundation.
6 * All rights reserved.
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.
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>.
17 #ifndef _AC_DIRENT_H
18 #define _AC_DIRENT_H
20 #ifdef HAVE_DIRENT_H
21 # include <dirent.h>
22 # define NAMLEN(dirent) strlen((dirent)->d_name)
23 #elif defined(_MSC_VER)
24 #include <windows.h>
25 #ifndef MAX_PATH
26 #define MAX_PATH 260
27 #endif
28 struct dirent {
29 char *d_name;
31 typedef struct DIR {
32 HANDLE dir;
33 struct dirent data;
34 int first;
35 char buf[MAX_PATH+1];
36 } DIR;
37 #else
38 # define dirent direct
39 # define NAMLEN(dirent) (dirent)->d_namlen
40 # ifdef HAVE_SYS_NDIR_H
41 # include <sys/ndir.h>
42 # endif
43 # ifdef HAVE_SYS_DIR_H
44 # include <sys/dir.h>
45 # endif
46 # ifdef HAVE_NDIR_H
47 # include <ndir.h>
48 # endif
49 #endif
51 #endif /* _AC_DIRENT_H */