Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit95ea526

Browse files
committed
Backport fixed AC_FUNC_FSEEKO
1 parent66c80bf commit95ea526

File tree

2 files changed

+35
-5
lines changed

2 files changed

+35
-5
lines changed

‎config/c-library.m4

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Macros that test various C library quirks
2-
# $PostgreSQL: pgsql/config/c-library.m4,v 1.31 2005/02/24 01:34:45 tgl Exp $
2+
# $PostgreSQL: pgsql/config/c-library.m4,v 1.32 2008/02/19 18:02:30 petere Exp $
33

44

55
# PGAC_VAR_INT_TIMEZONE
@@ -297,3 +297,29 @@ int main()
297297
])dnl AC_CACHE_VAL
298298
AC_MSG_RESULT([$pgac_cv_printf_arg_control])
299299
])# PGAC_FUNC_PRINTF_ARG_CONTROL
300+
301+
302+
# backport from Autoconf 2.61a
303+
# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=f0c325537a22105536ac8c4e88656e50f9946486
304+
305+
# AC_FUNC_FSEEKO
306+
# --------------
307+
AN_FUNCTION([ftello],[AC_FUNC_FSEEKO])
308+
AN_FUNCTION([fseeko],[AC_FUNC_FSEEKO])
309+
AC_DEFUN([AC_FUNC_FSEEKO],
310+
[_AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1,
311+
[ac_cv_sys_largefile_source],
312+
[Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).],
313+
[[#include <sys/types.h> /* for off_t */
314+
#include <stdio.h>]],
315+
[[int (*fp) (FILE *, off_t, int) = fseeko;
316+
return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);]])
317+
318+
# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
319+
# in glibc 2.1.3, but that breaks too many other things.
320+
# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
321+
if test $ac_cv_sys_largefile_source != unknown; then
322+
AC_DEFINE(HAVE_FSEEKO,1,
323+
[Define to 1 if fseeko (and presumably ftello) exists and is declared.])
324+
fi
325+
])# AC_FUNC_FSEEKO

‎configure

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18051,11 +18051,13 @@ _ACEOF
1805118051
cat confdefs.h >>conftest.$ac_ext
1805218052
cat >>conftest.$ac_ext <<_ACEOF
1805318053
/* end confdefs.h. */
18054-
#include <stdio.h>
18054+
#include <sys/types.h> /* for off_t */
18055+
#include <stdio.h>
1805518056
int
1805618057
main ()
1805718058
{
18058-
return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
18059+
int (*fp) (FILE *, off_t, int) = fseeko;
18060+
return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
1805918061
;
1806018062
return 0;
1806118063
}
@@ -18095,11 +18097,13 @@ cat confdefs.h >>conftest.$ac_ext
1809518097
cat >>conftest.$ac_ext <<_ACEOF
1809618098
/* end confdefs.h. */
1809718099
#define _LARGEFILE_SOURCE 1
18098-
#include <stdio.h>
18100+
#include <sys/types.h> /* for off_t */
18101+
#include <stdio.h>
1809918102
int
1810018103
main ()
1810118104
{
18102-
return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
18105+
int (*fp) (FILE *, off_t, int) = fseeko;
18106+
return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
1810318107
;
1810418108
return 0;
1810518109
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp