summaryrefslogtreecommitdiff
path: root/src/include/libpq
diff options
context:
space:
mode:
authorTom Lane2001-02-10 02:31:31 +0000
committerTom Lane2001-02-10 02:31:31 +0000
commitd08741eab55f44214d08f33177523ec4821de532 (patch)
tree192af3b22d30b8be1ec3256ebf4806e601234612 /src/include/libpq
parentcf21985ab59e0075704b0322f7ba84033bf7e16e (diff)
Restructure the key include files per recent pghackers discussion: there
are now separate files "postgres.h" and "postgres_fe.h", which are meant to be the primary include files for backend .c files and frontend .c files respectively. By default, only include files meant for frontend use are installed into the installation include directory. There is a new make target 'make install-all-headers' that adds the whole content of the src/include tree to the installed fileset, for use by people who want to develop server-side code without keeping the complete source tree on hand. Cleaned up a whole lot of crufty and inconsistent header inclusions.
Diffstat (limited to 'src/include/libpq')
-rw-r--r--src/include/libpq/libpq-fs.h77
-rw-r--r--src/include/libpq/pqcomm.h6
2 files changed, 5 insertions, 78 deletions
diff --git a/src/include/libpq/libpq-fs.h b/src/include/libpq/libpq-fs.h
index 79aa4be80bd..64ded84dbc1 100644
--- a/src/include/libpq/libpq-fs.h
+++ b/src/include/libpq/libpq-fs.h
@@ -1,95 +1,24 @@
/*-------------------------------------------------------------------------
*
* libpq-fs.h
- * definitions for using Inversion file system routines
+ * definitions for using Inversion file system routines (ie, large objects)
*
*
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: libpq-fs.h,v 1.11 2001/01/24 19:43:25 momjian Exp $
+ * $Id: libpq-fs.h,v 1.12 2001/02/10 02:31:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef LIBPQ_FS_H
#define LIBPQ_FS_H
-/* UNIX compatibility junk. This should be in all systems' include files,
- but this is not always the case. */
-
-#ifndef MAXNAMLEN
-#define MAXNAMLEN 255
-#endif /* MAXNAMLEN */
-
-struct pgdirent
-{
- unsigned long d_ino;
- unsigned short d_namlen;
- char d_name[MAXNAMLEN + 1];
-};
-
-
-/* for stat(2) */
-#ifndef S_IRUSR
-/* file modes */
-
-#define S_IRWXU 00700 /* read, write, execute: owner */
-#define S_IRUSR 00400 /* read permission: owner */
-#define S_IWUSR 00200 /* write permission: owner */
-#define S_IXUSR 00100 /* execute permission: owner */
-
-#define S_IRWXG 00070 /* read, write, execute: group */
-#define S_IRGRP 00040 /* read permission: group */
-#define S_IWGRP 00020 /* write permission: group */
-#define S_IXGRP 00010 /* execute permission: group */
-
-#define S_IRWXO 00007 /* read, write, execute: other */
-#define S_IROTH 00004 /* read permission: other */
-#define S_IWOTH 00002 /* write permission: other */
-#define S_IXOTH 00001 /* execute permission: other */
-
-#define _S_IFMT 0170000 /* type of file; sync with S_IFMT */
-#define _S_IFBLK 0060000 /* block special; sync with S_IFBLK */
-#define _S_IFCHR 0020000 /* character special sync with S_IFCHR */
-#define _S_IFDIR 0040000 /* directory; sync with S_IFDIR */
-#define _S_IFIFO 0010000 /* FIFO - named pipe; sync with S_IFIFO */
-#define _S_IFREG 0100000 /* regular; sync with S_IFREG */
-
-#define S_IFDIR _S_IFDIR
-#define S_IFREG _S_IFREG
-
-#define S_ISDIR( mode ) (((mode) & _S_IFMT) == _S_IFDIR)
-
-#endif /* S_IRUSR */
-
/*
- * Inversion doesn't have links.
- */
-#ifndef S_ISLNK
-#define S_ISLNK(x) 0
-#endif
-
-/*
- * Flags for inversion file system large objects. Normally, creat()
- * takes mode arguments, but we don't use them in inversion, since
- * you get postgres protections. Instead, we use the low sixteen bits
- * of the integer mode argument to store the number of the storage
- * manager to be used, and the high sixteen bits for flags.
+ * Read/write mode flags for inversion (large object) calls
*/
#define INV_WRITE 0x00020000
#define INV_READ 0x00040000
-/* Error values for p_errno */
-#define PEPERM 1 /* Not owner */
-#define PENOENT 2 /* No such file or directory */
-#define PEACCES 13 /* Permission denied */
-#define PEEXIST 17 /* File exists */
-#define PENOTDIR 20 /* Not a directory */
-#define PEISDIR 21 /* Is a directory */
-#define PEINVAL 22 /* Invalid argument */
-#define PENAMETOOLONG 63 /* File name too long */
-#define PENOTEMPTY 66 /* Directory not empty */
-#define PEPGIO 99 /* postgres backend had problems */
-
#endif /* LIBPQ_FS_H */
diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h
index d7c6fb9fe4c..b952891411b 100644
--- a/src/include/libpq/pqcomm.h
+++ b/src/include/libpq/pqcomm.h
@@ -9,18 +9,16 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pqcomm.h,v 1.53 2001/01/24 19:43:25 momjian Exp $
+ * $Id: pqcomm.h,v 1.54 2001/02/10 02:31:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef PQCOMM_H
#define PQCOMM_H
-#include "postgres.h"
-
#include <sys/types.h>
#ifdef WIN32
-# include "winsock.h"
+# include <winsock.h>
#else /* not WIN32 */
# include <sys/socket.h>
# ifdef HAVE_SYS_UN_H