aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/xlogreader.h4
-rw-r--r--src/include/pg_config.h.in6
-rw-r--r--src/include/port.h19
-rw-r--r--src/include/port/win32_port.h6
4 files changed, 8 insertions, 27 deletions
diff --git a/src/include/access/xlogreader.h b/src/include/access/xlogreader.h
index 5395f155aa1..87ff00feb72 100644
--- a/src/include/access/xlogreader.h
+++ b/src/include/access/xlogreader.h
@@ -375,11 +375,11 @@ extern bool XLogReaderValidatePageHeader(XLogReaderState *state,
/*
* Error information from WALRead that both backend and frontend caller can
- * process. Currently only errors from pg_pread can be reported.
+ * process. Currently only errors from pread can be reported.
*/
typedef struct WALReadError
{
- int wre_errno; /* errno set by the last pg_pread() */
+ int wre_errno; /* errno set by the last pread() */
int wre_off; /* Offset we tried to read from. */
int wre_req; /* Bytes requested to be read. */
int wre_read; /* Bytes read by the last read(). */
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in
index b6ee575681c..4d61ecd9142 100644
--- a/src/include/pg_config.h.in
+++ b/src/include/pg_config.h.in
@@ -388,9 +388,6 @@
/* Define to 1 if you have the `ppoll' function. */
#undef HAVE_PPOLL
-/* Define to 1 if you have the `pread' function. */
-#undef HAVE_PREAD
-
/* Define to 1 if the PS_STRINGS thing exists. */
#undef HAVE_PS_STRINGS
@@ -406,9 +403,6 @@
/* Have PTHREAD_PRIO_INHERIT. */
#undef HAVE_PTHREAD_PRIO_INHERIT
-/* Define to 1 if you have the `pwrite' function. */
-#undef HAVE_PWRITE
-
/* Define to 1 if you have the <readline.h> header file. */
#undef HAVE_READLINE_H
diff --git a/src/include/port.h b/src/include/port.h
index 85c9b38f4ee..14b640fe33e 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -417,25 +417,6 @@ extern char *mkdtemp(char *path);
extern int inet_aton(const char *cp, struct in_addr *addr);
#endif
-/*
- * Windows and older Unix don't have pread(2) and pwrite(2). We have
- * replacement functions, but they have slightly different semantics so we'll
- * use a name with a pg_ prefix to avoid confusion.
- */
-#ifdef HAVE_PREAD
-#define pg_pread pread
-#else
-extern ssize_t pg_pread(int fd, void *buf, size_t nbyte, off_t offset);
-#endif
-
-#ifdef HAVE_PWRITE
-#define pg_pwrite pwrite
-#else
-extern ssize_t pg_pwrite(int fd, const void *buf, size_t nbyte, off_t offset);
-#endif
-
-/* For pg_pwritev() and pg_preadv(), see port/pg_iovec.h. */
-
#if !HAVE_DECL_STRLCAT
extern size_t strlcat(char *dst, const char *src, size_t siz);
#endif
diff --git a/src/include/port/win32_port.h b/src/include/port/win32_port.h
index a48eed53eb7..336e11b3ba4 100644
--- a/src/include/port/win32_port.h
+++ b/src/include/port/win32_port.h
@@ -562,4 +562,10 @@ typedef unsigned short mode_t;
#define HAVE_BUGGY_STRTOF 1
#endif
+/* in port/win32pread.c */
+extern ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset);
+
+/* in port/win32pwrite.c */
+extern ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset);
+
#endif /* PG_WIN32_PORT_H */