[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: failing SIGNATURE_CHECK's due to undefined types
From: |
Eric Blake |
Subject: |
Re: failing SIGNATURE_CHECK's due to undefined types |
Date: |
Wed, 6 Jan 2010 21:15:43 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de> writes:
> > Do we need to be using AC_USE_SYSTEM_EXTENSIONS for pread?
>
> I don't think AC_USE_SYSTEM_EXTENSIONS defines _XOPEN_SOURCE. I'm not
> sure it should though, it also disables some APIs on some systems.
On Linux, AC_USE_SYSTEM_EXTENSIONS defines _GNU_SOURCE, which in turn turns on
anything inside _XOPEN_SOURCE but without crippling items that would be
excluded by strict adherence to _XOPEN_SOURCE. So, if I'm not mistaken, this
patch should fix things (although it will be a few more hours before I have
access to a Linux box to verify).
> The following two failures remain:
>
> $ gnulib-tool --with-tests --test dirent
> [...]
> ../../gltests/test-dirent.c:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘i’
And this patch should fix that. Technically, ino_t is only required in
<dirent.h> on XSI systems (you can comply with base POSIX 2008 without having
ino_t), but it's easier in gnulib to just guarantee it always.
From: Eric Blake <address@hidden>
Date: Wed, 6 Jan 2010 14:08:15 -0700
Subject: [PATCH 1/2] dirent: fix test failure
* lib/dirent.in.h (includes): Guarantee ino_t.
Reported by Ralf Wildenhues.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 6 ++++++
lib/dirent.in.h | 3 +++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index af711e4..874246c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2010-01-06 Eric Blake <address@hidden>
+ dirent: fix test failure
+ * lib/dirent.in.h (includes): Guarantee ino_t.
+ Reported by Ralf Wildenhues.
+
+2010-01-06 Eric Blake <address@hidden>
+
maint.mk: ignore entire footer of NEWS file
* top/maint.mk (NEWS_hash): Add immunity to multi-line copyright
or GFDL license changes.
diff --git a/lib/dirent.in.h b/lib/dirent.in.h
index 94d9ce4..f52144e 100644
--- a/lib/dirent.in.h
+++ b/lib/dirent.in.h
@@ -26,6 +26,9 @@
#ifndef _GL_DIRENT_H
#define _GL_DIRENT_H
+/* Grab ino_t. */
+#include <sys/types.h>
+
/* The definition of _GL_ARG_NONNULL is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
--
1.6.4.2
>From 59e3b48aeb73f2f72c22db4cdb85363ac1efc3b9 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Wed, 6 Jan 2010 14:12:45 -0700
Subject: [PATCH 2/2] pread: fix compilation on glibc
pread was not mandatory until POSIX 2008, so glibc does not
expose it by default.
* m4/pread.m4 (gl_FUNC_PREAD): Request all interfaces.
Reported by Ralf Wildenhues.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 4 ++++
m4/pread.m4 | 5 ++++-
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 874246c..6454209 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2010-01-06 Eric Blake <address@hidden>
+ pread: fix compilation on glibc
+ * m4/pread.m4 (gl_FUNC_PREAD): Request all interfaces.
+ Reported by Ralf Wildenhues.
+
dirent: fix test failure
* lib/dirent.in.h (includes): Guarantee ino_t.
Reported by Ralf Wildenhues.
diff --git a/m4/pread.m4 b/m4/pread.m4
index 50d9e4d..f1425a6 100644
--- a/m4/pread.m4
+++ b/m4/pread.m4
@@ -1,4 +1,4 @@
-# pread.m4 serial 1
+# pread.m4 serial 2
dnl Copyright (C) 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,9 @@ dnl with or without modifications, as long as this notice is
preserved.
AC_DEFUN([gl_FUNC_PREAD],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ dnl Persuade glibc <unistd.h> to declare pread().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
AC_CHECK_FUNCS_ONCE([pread])
if test $ac_cv_func_pread = no; then
HAVE_PREAD=0
--
1.6.4.2