4 Unix SMB/CIFS implementation.
6 directory system include wrappers
8 Copyright (C) Andrew Tridgell 2004
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 # define NAMLEN(dirent) strlen((dirent)->d_name)
29 # define dirent direct
30 # define NAMLEN(dirent) (dirent)->d_namlen
32 # include <sys/ndir.h>
42 #ifndef HAVE_MKDIR_MODE
43 #define mkdir(dir, mode) mkdir(dir)
46 /* Test whether a file name is the "." or ".." directory entries.
47 * These really should be inline functions.
50 #define ISDOT(path) ( \
51 *((const char *)(path)) == '.' && \
52 *(((const char *)(path)) + 1) == '\0' \
57 #define ISDOTDOT(path) ( \
58 *((const char *)(path)) == '.' && \
59 *(((const char *)(path)) + 1) == '.' && \
60 *(((const char *)(path)) + 2) == '\0' \