… | |
… | |
117 | #define PLUGIN_SUFFIX ".dll" |
117 | #define PLUGIN_SUFFIX ".dll" |
118 | |
118 | |
119 | /* struct dirent - same as Unix */ |
119 | /* struct dirent - same as Unix */ |
120 | |
120 | |
121 | typedef struct dirent { |
121 | typedef struct dirent { |
122 | long d_ino; /* inode (always 1 in WIN32) */ |
122 | long d_ino; /* inode (always 1 in WIN32) */ |
123 | off_t d_off; /* offset to this dirent */ |
123 | off_t d_off; /* offset to this dirent */ |
124 | unsigned short d_reclen; /* length of d_name */ |
124 | unsigned short d_reclen; /* length of d_name */ |
125 | char d_name[_MAX_FNAME + 1]; /* filename (null terminated) */ |
125 | char d_name[_MAX_FNAME + 1]; /* filename (null terminated) */ |
126 | }dirent; |
126 | }dirent; |
127 | |
127 | |
128 | #define NAMLEN(dirent) strlen((dirent)->d_name) |
128 | #define NAMLEN(dirent) strlen((dirent)->d_name) |
129 | |
129 | |
130 | /* typedef DIR - not the same as Unix */ |
130 | /* typedef DIR - not the same as Unix */ |
131 | typedef struct { |
131 | typedef struct { |
132 | long handle; /* _findfirst/_findnext handle */ |
132 | long handle; /* _findfirst/_findnext handle */ |
133 | short offset; /* offset into directory */ |
133 | short offset; /* offset into directory */ |
134 | short finished; /* 1 if there are not more files */ |
134 | short finished; /* 1 if there are not more files */ |
135 | struct _finddata_t fileinfo; /* from _findfirst/_findnext */ |
135 | struct _finddata_t fileinfo; /* from _findfirst/_findnext */ |
136 | char *dir; /* the dir we are reading */ |
136 | char *dir; /* the dir we are reading */ |
137 | struct dirent dent; /* the dirent to return */ |
137 | struct dirent dent; /* the dirent to return */ |
138 | } DIR; |
138 | } DIR; |
139 | |
139 | |
140 | #ifndef socklen_t |
140 | #ifndef socklen_t |
141 | #define socklen_t int /* Doesn't exist, just a plain int */ |
141 | #define socklen_t int /* Doesn't exist, just a plain int */ |
142 | #endif |
142 | #endif |