Remove "#ifdef WIN32" guards from src/port/win32*.c
authorHeikki Linnakangas <[email protected]>
Mon, 12 Feb 2024 09:57:45 +0000 (11:57 +0200)
committerHeikki Linnakangas <[email protected]>
Mon, 12 Feb 2024 09:57:45 +0000 (11:57 +0200)
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/[email protected]

src/port/win32common.c
src/port/win32fseek.c
src/port/win32stat.c

index f9ccfbf7255eac170d75be170bc8dd0a9bf37f38..dc83396236d7deba8d186fe45d1830a4c898f435 100644 (file)
@@ -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 */
index ce431203dd8cf033d18537ee8231c6f7a9af8d29..9ae3653e812e5a968cbf994a6e3597657ee02863 100644 (file)
@@ -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 */
index cebf96f965b07712d1a6d3893bf885df302fcad8..7ab35024af3e01631feadb313aa2022fa99a1b16 100644 (file)
@@ -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 */