diff options
Diffstat (limited to 'src/include/c.h')
-rw-r--r-- | src/include/c.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/include/c.h b/src/include/c.h index 4c9f930cef3..a580c90ab21 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -12,7 +12,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: c.h,v 1.141 2003/04/25 16:18:40 momjian Exp $ + * $Id: c.h,v 1.142 2003/05/09 01:16:29 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -722,6 +722,31 @@ int pgunlink(const char *path); #endif /* + * Win32 doesn't have opendir/readdir/closedir() + */ +#ifdef WIN32 +struct dirent { + ino_t d_ino; /* inode (always 1 on WIN32) */ + char d_name[MAX_PATH + 1]; /* filename (null terminated) */ +}; + +typedef struct { + HANDLE handle; /* handle for FindFirstFile or + * FindNextFile */ + long offset; /* offset into directory */ + int finished; /* 1 if there are not more files */ + WIN32_FIND_DATA finddata; /* file data FindFirstFile or FindNextFile + * returns */ + char *dir; /* the directory path we are reading */ + struct dirent ent; /* the dirent to return */ +} DIR; + +extern DIR *opendir(const char *); +extern struct dirent *readdir(DIR *); +extern int closedir(DIR *); +#endif + +/* * Win32 requires a special close for sockets and pipes, while on Unix * close() does them all. */ |