Mercurial > hg > xemacs-beta
comparison src/sysdir.h @ 412:697ef44129c6 r21-2-14
Import from CVS: tag r21-2-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:20:41 +0200 |
parents | de805c49cfc1 |
children |
comparison
equal
deleted
inserted
replaced
411:12e008d41344 | 412:697ef44129c6 |
---|---|
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
19 Boston, MA 02111-1307, USA. */ | 19 Boston, MA 02111-1307, USA. */ |
20 | 20 |
21 /* Synched up with: Not really in FSF. */ | 21 /* Synched up with: Not really in FSF. */ |
22 | 22 |
23 #ifndef INCLUDED_sysdir_h_ | |
24 #define INCLUDED_sysdir_h_ | |
25 | |
26 #ifdef HAVE_UNISTD_H | 23 #ifdef HAVE_UNISTD_H |
27 #include <unistd.h> | 24 #include <unistd.h> |
28 #endif | 25 #endif |
29 | 26 |
30 #ifdef SYSV_SYSTEM_DIR | 27 #ifdef SYSV_SYSTEM_DIR |
31 # include <dirent.h> | 28 # include <dirent.h> |
32 #elif defined (WIN32_NATIVE) | 29 #elif defined (NONSYSTEM_DIR_LIBRARY) |
33 # include <direct.h> | |
34 # include "ndir.h" | 30 # include "ndir.h" |
35 #elif defined (NONSYSTEM_DIR_LIBRARY) | 31 #elif defined (MSDOS) |
36 # include "ndir.h" | 32 # include <dirent.h> |
37 #else | 33 #else |
38 # include <sys/dir.h> | 34 # include <sys/dir.h> |
39 #endif /* not NONSYSTEM_DIR_LIBRARY */ | 35 #endif /* not NONSYSTEM_DIR_LIBRARY */ |
40 | 36 |
41 #ifdef SYSV_SYSTEM_DIR | 37 #ifdef SYSV_SYSTEM_DIR |
57 doesn't specify it -- mrb) | 53 doesn't specify it -- mrb) |
58 | 54 |
59 Since applying strlen to the name always works, we'll just do that. */ | 55 Since applying strlen to the name always works, we'll just do that. */ |
60 #define NAMLEN(p) strlen (p->d_name) | 56 #define NAMLEN(p) strlen (p->d_name) |
61 | 57 |
58 #ifdef MSDOS | |
59 #define DIRENTRY_NONEMPTY(p) ((p)->d_name[0] != 0) | |
60 #else | |
62 #define DIRENTRY_NONEMPTY(p) ((p)->d_ino) | 61 #define DIRENTRY_NONEMPTY(p) ((p)->d_ino) |
62 #endif | |
63 | 63 |
64 /* encapsulation: directory calls */ | 64 /* encapsulation: directory calls */ |
65 | 65 |
66 #ifdef ENCAPSULATE_CHDIR | 66 #ifdef ENCAPSULATE_CHDIR |
67 int sys_chdir (const char *path); | 67 int sys_chdir (CONST char *path); |
68 #endif | 68 #endif |
69 #if defined (ENCAPSULATE_CHDIR) && !defined (DONT_ENCAPSULATE) | 69 #if defined (ENCAPSULATE_CHDIR) && !defined (DONT_ENCAPSULATE) |
70 # undef chdir | 70 # undef chdir |
71 # define chdir sys_chdir | 71 # define chdir sys_chdir |
72 #endif | 72 #endif |
73 #if !defined (ENCAPSULATE_CHDIR) && defined (DONT_ENCAPSULATE) | 73 #if !defined (ENCAPSULATE_CHDIR) && defined (DONT_ENCAPSULATE) |
74 # define sys_chdir chdir | 74 # define sys_chdir chdir |
75 #endif | 75 #endif |
76 | 76 |
77 #ifdef ENCAPSULATE_MKDIR | 77 #ifdef ENCAPSULATE_MKDIR |
78 int sys_mkdir (const char *path, mode_t mode); | 78 int sys_mkdir (CONST char *path, mode_t mode); |
79 #endif | 79 #endif |
80 #if defined (ENCAPSULATE_MKDIR) && !defined (DONT_ENCAPSULATE) | 80 #if defined (ENCAPSULATE_MKDIR) && !defined (DONT_ENCAPSULATE) |
81 # undef mkdir | 81 # undef mkdir |
82 # define mkdir sys_mkdir | 82 # define mkdir sys_mkdir |
83 #endif | 83 #endif |
84 #if !defined (ENCAPSULATE_MKDIR) && defined (DONT_ENCAPSULATE) | 84 #if !defined (ENCAPSULATE_MKDIR) && defined (DONT_ENCAPSULATE) |
85 # define sys_mkdir mkdir | 85 # define sys_mkdir mkdir |
86 #endif | 86 #endif |
87 | 87 |
88 #ifdef ENCAPSULATE_OPENDIR | 88 #ifdef ENCAPSULATE_OPENDIR |
89 DIR *sys_opendir (const char *filename); | 89 DIR *sys_opendir (CONST char *filename); |
90 #endif | 90 #endif |
91 #if defined (ENCAPSULATE_OPENDIR) && !defined (DONT_ENCAPSULATE) | 91 #if defined (ENCAPSULATE_OPENDIR) && !defined (DONT_ENCAPSULATE) |
92 # undef opendir | 92 # undef opendir |
93 # define opendir sys_opendir | 93 # define opendir sys_opendir |
94 #endif | 94 #endif |
117 #if !defined (ENCAPSULATE_CLOSEDIR) && defined (DONT_ENCAPSULATE) | 117 #if !defined (ENCAPSULATE_CLOSEDIR) && defined (DONT_ENCAPSULATE) |
118 # define sys_closedir closedir | 118 # define sys_closedir closedir |
119 #endif | 119 #endif |
120 | 120 |
121 #ifdef ENCAPSULATE_RMDIR | 121 #ifdef ENCAPSULATE_RMDIR |
122 int sys_rmdir (const char *path); | 122 int sys_rmdir (CONST char *path); |
123 #endif | 123 #endif |
124 #if defined (ENCAPSULATE_RMDIR) && !defined (DONT_ENCAPSULATE) | 124 #if defined (ENCAPSULATE_RMDIR) && !defined (DONT_ENCAPSULATE) |
125 # undef rmdir | 125 # undef rmdir |
126 # define rmdir sys_rmdir | 126 # define rmdir sys_rmdir |
127 #endif | 127 #endif |
128 #if !defined (ENCAPSULATE_RMDIR) && defined (DONT_ENCAPSULATE) | 128 #if !defined (ENCAPSULATE_RMDIR) && defined (DONT_ENCAPSULATE) |
129 # define sys_rmdir rmdir | 129 # define sys_rmdir rmdir |
130 #endif | 130 #endif |
131 | 131 |
132 #endif /* INCLUDED_sysdir_h_ */ |