comparison platform/dirent.h @ 525:2ff26b697877

Fixes for building with Innotek GCC. Will have to check for regressions with VAC and EMX.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 20 Mar 2004 01:21:13 +0000
parents 6803aba19dae
children 56f311dc23f6
comparison
equal deleted inserted replaced
524:55c9fa60af78 525:2ff26b697877
2 #include <dirent.h> 2 #include <dirent.h>
3 #else 3 #else
4 #ifndef __DIRENT_H__ 4 #ifndef __DIRENT_H__
5 #define __DIRENT_H__ 5 #define __DIRENT_H__
6 6
7 #include "compat.h"
7 #include <stdio.h> 8 #include <stdio.h>
8 #ifdef MAXPATHLEN 9 #ifdef MAXPATHLEN
9 #undef MAXPATHLEN 10 #undef MAXPATHLEN
10 #endif 11 #endif
11 #define MAXPATHLEN (FILENAME_MAX*4) 12 #define MAXPATHLEN (FILENAME_MAX*4)
37 }; 38 };
38 39
39 typedef struct _dirdescr DIR; 40 typedef struct _dirdescr DIR;
40 /* the structs do not have to be defined here */ 41 /* the structs do not have to be defined here */
41 42
42 extern DIR *_opendir(const char *); 43 extern DIR * API _opendir(const char *);
43 #define opendir(a) _opendir(a) 44 #define opendir(a) _opendir(a)
44 extern DIR *_openxdir(const char *, unsigned); 45 extern DIR *API _openxdir(const char *, unsigned);
45 #define openxdir(a, b) _openxdir(a, b) 46 #define openxdir(a, b) _openxdir(a, b)
46 extern struct dirent *_readdir(DIR *); 47 extern struct dirent * API _readdir(DIR *);
47 #define readdir(a) _readdir(a) 48 #define readdir(a) _readdir(a)
48 extern void _seekdir(DIR *, long); 49 extern void API _seekdir(DIR *, long);
49 #define seekdir(a, b) _seekdir(a, b) 50 #define seekdir(a, b) _seekdir(a, b)
50 extern long _telldir(DIR *); 51 extern long API _telldir(DIR *);
51 #define telldir(a) _telldir(a) 52 #define telldir(a) _telldir(a)
52 extern void _closedir(DIR *); 53 extern void API _closedir(DIR *);
53 #define closedir(a) _closedir(a) 54 #define closedir(a) _closedir(a)
54 55
55 #define rewinddir(dirp) _seekdir(dirp, 0L) 56 #define rewinddir(dirp) _seekdir(dirp, 0L)
56 extern char * _abs_path(const char *name, char *buffer, int len); 57 extern char * API _abs_path(const char *name, char *buffer, int len);
57 #define abs_path(a, b, c) _abs_path(a, b, c) 58 #define abs_path(a, b, c) _abs_path(a, b, c)
58 59
59 #ifndef S_IFMT 60 #ifndef S_IFMT
60 #define S_IFMT ( S_IFDIR | S_IFREG ) 61 #define S_IFMT ( S_IFDIR | S_IFREG )
61 #endif 62 #endif