postgres.git / summary / log / commit / refs
commit 09eb633e1baa3b7cd7929f3cc77f9c46f63c20b1
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: Mon Feb 12 09:57:45 2024 +0000
First released in: 17.0
Remove "#ifdef WIN32" guards from src/port/win32*.c
These files are only compiled on Windows, and most of them didn't have
"#ifdef WIN32" guards. Remove them from the few that did, for
consistency.
Author: Tristan Partin
Discussion: https://www.postgresql.org/message-id/CXGM9RYSXA2J.1DBO4MRXGZA9P@neon.tech
src/port/win32common.c | 4 ----
src/port/win32fseek.c | 4 ++--
src/port/win32stat.c | 4 ----
3 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/src/port/win32common.c b/src/port/win32common.c
index f9ccfbf7255..dc83396236d 100644
--- a/src/port/win32common.c
+++ b/src/port/win32common.c
@@ -19,8 +19,6 @@
#include "postgres.h"
#endif
-#ifdef WIN32
-
/*
* pgwin32_get_file_type
*
@@ -64,5 +62,3 @@ pgwin32_get_file_type(HANDLE hFile)
return fileType;
}
-
-#endif /* WIN32 */
diff --git a/src/port/win32fseek.c b/src/port/win32fseek.c
index ce431203dd8..9ae3653e812 100644
--- a/src/port/win32fseek.c
+++ b/src/port/win32fseek.c
@@ -17,7 +17,7 @@
#include "postgres.h"
#endif
-#if defined(WIN32) && defined(_MSC_VER)
+#ifdef _MSC_VER
/*
* _pgfseeko64
@@ -72,4 +72,4 @@ _pgftello64(FILE *stream)
return -1;
}
-#endif /* defined(WIN32) && defined(_MSC_VER) */
+#endif /* _MSC_VER */
diff --git a/src/port/win32stat.c b/src/port/win32stat.c
index cebf96f965b..7ab35024af3 100644
--- a/src/port/win32stat.c
+++ b/src/port/win32stat.c
@@ -13,8 +13,6 @@
*-------------------------------------------------------------------------
*/
-#ifdef WIN32
-
#include "c.h"
#include "port/win32ntdll.h"
@@ -302,5 +300,3 @@ _pgfstat64(int fileno, struct stat *buf)
buf->st_nlink = 1;
return 0;
}
-
-#endif /* WIN32 */
[parent: 9f35e42e7d59]