aboutsummaryrefslogtreecommitdiff
path: root/src/include/c.h
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-04-25 01:24:00 +0000
committerBruce Momjian <bruce@momjian.us>2003-04-25 01:24:00 +0000
commitdb7e46a76dc5ea8f15ed0ca67cc232b5ea38938d (patch)
treee5267da20e29b26b95ba0dcf04ce1b5809d394d1 /src/include/c.h
parent5f677af2da8ca15516758a5b6c3af8565785977d (diff)
downloadpostgresql-db7e46a76dc5ea8f15ed0ca67cc232b5ea38938d.tar.gz
postgresql-db7e46a76dc5ea8f15ed0ca67cc232b5ea38938d.zip
Use closesocket() for all socket/pipe closing, because Win32 requires
it, and map that to close() on Unix.
Diffstat (limited to 'src/include/c.h')
-rw-r--r--src/include/c.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/include/c.h b/src/include/c.h
index 833312b9d6a..8352ebac2a4 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.139 2003/04/22 02:18:09 momjian Exp $
+ * $Id: c.h,v 1.140 2003/04/25 01:24:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -721,6 +721,13 @@ int pgunlink(const char *path);
#define unlink(from, to) pgunlink(from, to)
#endif
+/*
+ * Win32 requires a special close for sockets and pipes, while on Unix
+ * close() does them all.
+ */
+#ifndef WIN32
+#define closesocket close
+#endif
/* These are for things that are one way on Unix and another on NT */
#define NULL_DEV "/dev/null"