diff options
| author | Tom Lane | 2025-12-14 21:53:34 +0000 |
|---|---|---|
| committer | Tom Lane | 2025-12-14 21:53:34 +0000 |
| commit | 66b2282b0c2237bccd933804da2e1dd0321ac151 (patch) | |
| tree | c0c1dd58bb85217f237a29cb271e8a39896d77a6 /src | |
| parent | fe7ede45f125af271fb3fef3cc5ee507d4c40d87 (diff) | |
Make "pgoff_t" be a typedef not a #define.
There doesn't seem to be any great reason why this has been a macro
rather than a typedef. But doing it like that means our buildfarm
typedef tooling doesn't capture the name as a typedef. That would
result in pgindent glitches, except that we've seemingly kept it
in typedefs.list manually. That's obviously error-prone, so let's
convert it to a typedef now.
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src')
| -rw-r--r-- | src/include/port.h | 2 | ||||
| -rw-r--r-- | src/include/port/win32_port.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/include/port.h b/src/include/port.h index 672b880d40b..af604fddbe7 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -418,7 +418,7 @@ extern FILE *pgwin32_popen(const char *command, const char *type); /* Type to use with fseeko/ftello */ #ifndef WIN32 /* WIN32 is handled in port/win32_port.h */ -#define pgoff_t off_t +typedef off_t pgoff_t; #endif #ifndef HAVE_GETPEEREID diff --git a/src/include/port/win32_port.h b/src/include/port/win32_port.h index 8194714976f..0f4b645f9af 100644 --- a/src/include/port/win32_port.h +++ b/src/include/port/win32_port.h @@ -194,7 +194,7 @@ extern DWORD pgwin32_get_file_type(HANDLE hFile); * with 64-bit offsets. Also, fseek() might not give an error for unseekable * streams, so harden that function with our version. */ -#define pgoff_t __int64 +typedef __int64 pgoff_t; #ifdef _MSC_VER extern int _pgfseeko64(FILE *stream, pgoff_t offset, int origin); |
