*** src/bin/pg_dump/pg_dump.h.orig Mon Oct 9 23:36:59 2006 --- src/bin/pg_dump/pg_dump.h Tue Dec 19 11:09:37 2006 *************** *** 16,21 **** --- 16,38 ---- #include "postgres_fe.h" + #ifdef WIN32 + /* + * WIN32 does not provide a 64-bit off_t, but it does provide functions operating + * with 64-bit offsets. Redefine off_t to what's always a 64-bit int, and redefine + * the functions that accept off_t to be the 64-bit only ones. + */ + #define off_t __int64 + #undef fseeko + #undef ftello + #ifdef WIN32_ONLY_COMPILER + #define fseeko(stream, offset, origin) _fseeki64(stream, offset, origin) + #define ftello(stream) _ftelli64(stream) + #else + #define fseeko(stream, offset, origin) fseeko64(stream, offset, origin) + #define ftello(stream) ftello64(stream) + #endif + #endif /* * pg_dump uses two different mechanisms for identifying database objects: