From 8e9b35958cc2102a37b6aa0e64509599c3460ebb Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Thu, 6 Mar 2008 23:19:33 +0100
Subject: [PATCH] Ensure that fseeko is declared when possible.

---
 ChangeLog      | 6 ++++++
 m4/fseeko.m4   | 8 ++++++--
 modules/fseeko | 1 +
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3610223705..71d79a7473 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-06  Bruno Haible  <bruno@clisp.org>
+
+	* modules/fseeko (Dependencies): Add extensions.
+	* m4/fseeko.m4 (gl_FUNC_FSEEKO): Require AC_USE_SYSTEM_EXTENSIONS.
+	Needed on glibc systems.
+
 2008-03-06  Bruno Haible  <bruno@clisp.org>
 
 	* doc/gnulib-tool.texi (@nosuchmodulenote): Avoid line break inside
diff --git a/m4/fseeko.m4 b/m4/fseeko.m4
index 40be63b4c2..3d77365688 100644
--- a/m4/fseeko.m4
+++ b/m4/fseeko.m4
@@ -1,5 +1,5 @@
-# fseeko.m4 serial 3
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+# fseeko.m4 serial 4
+dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -9,6 +9,10 @@ AC_DEFUN([gl_FUNC_FSEEKO],
   AC_REQUIRE([gl_STDIO_H_DEFAULTS])
   AC_REQUIRE([AC_PROG_CC])
   AC_REQUIRE([gl_STDIN_LARGE_OFFSET])
+
+  dnl Persuade glibc <stdio.h> to declare fseeko().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
   AC_CACHE_CHECK([for fseeko], [gl_cv_func_fseeko],
     [
       AC_TRY_LINK([#include <stdio.h>], [fseeko (stdin, 0, 0);],
diff --git a/modules/fseeko b/modules/fseeko
index eb109011ed..ced94529cf 100644
--- a/modules/fseeko
+++ b/modules/fseeko
@@ -6,6 +6,7 @@ lib/fseeko.c
 m4/fseeko.m4
 
 Depends-on:
+extensions
 lseek
 stdio
 
-- 
2.30.2