Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
d00a3472
Commit
d00a3472
authored
Jan 07, 2009
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update MinGW so it handles fseeko() similar to Unix.
parent
7e518a3d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
25 deletions
+24
-25
configure
configure
+2
-1
configure.in
configure.in
+3
-2
src/bin/pg_dump/pg_dump.h
src/bin/pg_dump/pg_dump.h
+1
-20
src/include/port.h
src/include/port.h
+5
-1
src/include/port/win32.h
src/include/port/win32.h
+13
-1
No files found.
configure
View file @
d00a3472
...
...
@@ -18999,7 +18999,8 @@ done
case
$host_os
in
# BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
bsdi
*
|
netbsd
*
)
# Mingw uses macros to access Win32 API calls
bsdi
*
|
netbsd
*
|
mingw
*
)
cat
>>
confdefs.h
<<
\
_ACEOF
#define HAVE_FSEEKO 1
...
...
configure.in
View file @
d00a3472
dnl Process this file with autoconf to produce a configure script.
dnl $PostgreSQL: pgsql/configure.in,v 1.58
2 2009/01/06 17:27:06 tgl
Exp $
dnl $PostgreSQL: pgsql/configure.in,v 1.58
3 2009/01/07 03:39:33 momjian
Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
...
...
@@ -1319,7 +1319,8 @@ AC_CHECK_FUNCS(atexit, [],
AC_REPLACE_FUNCS(fseeko)
case $host_os in
# BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
bsdi*|netbsd*)
# Mingw uses macros to access Win32 API calls
bsdi*|netbsd*|mingw*)
AC_DEFINE(HAVE_FSEEKO, 1, [Define to 1 because replacement version used.])
ac_cv_func_fseeko=yes;;
*)
...
...
src/bin/pg_dump/pg_dump.h
View file @
d00a3472
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.h,v 1.14
5 2009/01/01 17:23:54
momjian Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.h,v 1.14
6 2009/01/07 03:39:33
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -16,25 +16,6 @@
#include "postgres_fe.h"
/*
* WIN32 does not provide 64-bit off_t, but does provide the functions operating
* with 64-bit offsets.
*/
#ifdef WIN32
#define pgoff_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
#else
#define pgoff_t off_t
#endif
/*
* pg_dump uses two different mechanisms for identifying database objects:
*
...
...
src/include/port.h
View file @
d00a3472
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/port.h,v 1.12
3 2009/01/01 17:23:55
momjian Exp $
* $PostgreSQL: pgsql/src/include/port.h,v 1.12
4 2009/01/07 03:39:33
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -341,10 +341,14 @@ extern int gettimeofday(struct timeval * tp, struct timezone * tzp);
extern
char
*
crypt
(
const
char
*
key
,
const
char
*
setting
);
#endif
/* WIN32 handled in port/win32.h */
#ifndef WIN32
#define pgoff_t off_t
#if defined(bsdi) || defined(netbsd)
extern
int
fseeko
(
FILE
*
stream
,
off_t
offset
,
int
whence
);
extern
off_t
ftello
(
FILE
*
stream
);
#endif
#endif
#ifndef HAVE_FSEEKO
#define fseeko(a, b, c) fseek(a, b, c)
...
...
src/include/port/win32.h
View file @
d00a3472
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.8
4 2008/02/17 02:09:31 tgl
Exp $ */
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.8
5 2009/01/07 03:39:33 momjian
Exp $ */
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define WIN32_ONLY_COMPILER
...
...
@@ -190,6 +190,18 @@ struct itimerval
int
setitimer
(
int
which
,
const
struct
itimerval
*
value
,
struct
itimerval
*
ovalue
);
/*
* WIN32 does not provide 64-bit off_t, but does provide the functions operating
* with 64-bit offsets.
*/
#define pgoff_t __int64
#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
/*
* Supplement to <sys/types.h>.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment