aboutsummaryrefslogtreecommitdiff
path: root/src/include/storage/fd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/storage/fd.h')
-rw-r--r--src/include/storage/fd.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h
index feca2b92b19..177925cf3e8 100644
--- a/src/include/storage/fd.h
+++ b/src/include/storage/fd.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/fd.h,v 1.43 2004/02/23 20:45:59 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/storage/fd.h,v 1.44 2004/02/23 23:03:10 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,10 +31,16 @@
* use FreeFile, not fclose, to close it. AVOID using stdio for files
* that you intend to hold open for any length of time, since there is
* no way for them to share kernel file descriptors with other files.
+ *
+ * Likewise, use AllocateDir/FreeDir, not opendir/closedir, to allocate
+ * open directories (DIR*).
*/
#ifndef FD_H
#define FD_H
+#include <dirent.h>
+
+
/*
* FileSeek uses the standard UNIX lseek(2) flags.
*/
@@ -65,7 +71,11 @@ extern int FileTruncate(File file, long offset);
/* Operations that allow use of regular stdio --- USE WITH CAUTION */
extern FILE *AllocateFile(char *name, char *mode);
-extern int FreeFile(FILE *);
+extern int FreeFile(FILE *file);
+
+/* Operations to allow use of the <dirent.h> library routines */
+extern DIR *AllocateDir(const char *dirname);
+extern int FreeDir(DIR *dir);
/* If you've really really gotta have a plain kernel FD, use this */
extern int BasicOpenFile(FileName fileName, int fileFlags, int fileMode);