With DragonFlyBSD 3.8 / i386 I see these problems in a gnulib testdir:

1) A warning

freadahead.c: In function 'freadahead':
freadahead.c:39:3: warning: implicit declaration of function '__sreadahead' 
[-Wimplicit-function-declaration]

2) A failure
FAIL: test-get-rusage-data
(assertion failed at test-get-rusage-data:60)

3) A failure
FAIL: test-localeconv
(assertion failed at test-localeconv.c:41)

4)
FAIL: test-select
Invalid fd test... failed

Fixed through the attached changesets.


NOT FIXED:

1)
FAIL: test-dup2
(assertion failed at test-dup2.c:163)

FAIL: test-getdtablesize
(assertion failed in test-getdtablesize.c:32)

2) A warning

test-float.c: In function 'test_long_double':
test-float.c:315:5: warning: floating constant exceeds range of 'long double' 
[-Woverflow]

and failures

FAIL: test-float
(assertion failed at test-float.c:318)

FAIL: test-fmal2
(assertion failed at test-fma2.h:538)

3) A failure
FAIL: test-localename
(assertion failed at test-localename.c:183)
LC_CTYPE inheritance appears to be broken.
>From df17c50823c30724c3401dc17fa27f84d28070fd Mon Sep 17 00:00:00 2001
From: Bruno Haible <br...@clisp.org>
Date: Wed, 15 Mar 2017 18:53:58 +0100
Subject: [PATCH 1/2] freadahead: Silence warning on DragonFlyBSD.

* lib/freadahead.c (__sreadahead): Declare ourselves.
---
 ChangeLog        | 5 +++++
 lib/freadahead.c | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index d65bf74..0a82298 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2017-03-14  Bruno Haible  <br...@clisp.org>
 
+	freadahead: Silence warning on DragonFlyBSD.
+	* lib/freadahead.c (__sreadahead): Declare ourselves.
+
+2017-03-14  Bruno Haible  <br...@clisp.org>
+
 	vma-iter: Add comment about AIX.
 	* lib/vma-iter.c: Add comment about why this module is not implemented
 	on AIX.
diff --git a/lib/freadahead.c b/lib/freadahead.c
index 6820317..32a1f0a 100644
--- a/lib/freadahead.c
+++ b/lib/freadahead.c
@@ -22,6 +22,11 @@
 #include <stdlib.h>
 #include "stdio-impl.h"
 
+#if defined __DragonFly__
+/* Defined in libc, but not declared in <stdio.h>.  */
+extern size_t __sreadahead (FILE *);
+#endif
+
 size_t
 freadahead (FILE *fp)
 {
-- 
2.7.4

>From 69fabe94446fe98cfc6f9203b6a9b18679d12ab7 Mon Sep 17 00:00:00 2001
From: Bruno Haible <br...@clisp.org>
Date: Wed, 15 Mar 2017 20:32:45 +0100
Subject: [PATCH 2/2] Fix test failures on DragonFlyBSD.

* tests/test-localeconv.c (main): Treat DragonFlyBSD like FreeBSD.
* tests/test-select.h (test_bad_fd): Likewise.
* tests/test-get-rusage-data.c (main): Treat DragonFlyBSD like OpenBSD.
---
 ChangeLog                    | 7 +++++++
 tests/test-get-rusage-data.c | 2 +-
 tests/test-localeconv.c      | 4 ++--
 tests/test-select.h          | 4 ++--
 4 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0a82298..3fe8678 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2017-03-14  Bruno Haible  <br...@clisp.org>
 
+	Fix test failures on DragonFlyBSD.
+	* tests/test-localeconv.c (main): Treat DragonFlyBSD like FreeBSD.
+	* tests/test-select.h (test_bad_fd): Likewise.
+	* tests/test-get-rusage-data.c (main): Treat DragonFlyBSD like OpenBSD.
+
+2017-03-14  Bruno Haible  <br...@clisp.org>
+
 	freadahead: Silence warning on DragonFlyBSD.
 	* lib/freadahead.c (__sreadahead): Declare ourselves.
 
diff --git a/tests/test-get-rusage-data.c b/tests/test-get-rusage-data.c
index 3c00680..7577535 100644
--- a/tests/test-get-rusage-data.c
+++ b/tests/test-get-rusage-data.c
@@ -55,7 +55,7 @@ main ()
       ASSERT (value2 >= value1);
       ASSERT (value3 >= value2);
 
-#if !((defined __APPLE__ && defined __MACH__) || defined __OpenBSD__ || (defined _WIN32 || defined __WIN32__) || defined __CYGWIN__)
+#if !((defined __APPLE__ && defined __MACH__) || defined __DragonFly__ || defined __OpenBSD__ || (defined _WIN32 || defined __WIN32__) || defined __CYGWIN__)
       /* Allocating 2.5 MB of memory should increase the data segment size.  */
       ASSERT (value3 > value1);
 #endif
diff --git a/tests/test-localeconv.c b/tests/test-localeconv.c
index 8ed987a..2fb5c41 100644
--- a/tests/test-localeconv.c
+++ b/tests/test-localeconv.c
@@ -37,13 +37,13 @@ main ()
 
     ASSERT (STREQ (l->decimal_point, "."));
     ASSERT (STREQ (l->thousands_sep, ""));
-#if !(defined __FreeBSD__ || defined __sun)
+#if !((defined __FreeBSD__ || defined __DragonFly__) || defined __sun)
     ASSERT (STREQ (l->grouping, ""));
 #endif
 
     ASSERT (STREQ (l->mon_decimal_point, ""));
     ASSERT (STREQ (l->mon_thousands_sep, ""));
-#if !(defined __FreeBSD__ || defined __sun)
+#if !((defined __FreeBSD__ || defined __DragonFly__) || defined __sun)
     ASSERT (STREQ (l->mon_grouping, ""));
 #endif
     ASSERT (STREQ (l->positive_sign, ""));
diff --git a/tests/test-select.h b/tests/test-select.h
index d79fa7b..aa67ca0 100644
--- a/tests/test-select.h
+++ b/tests/test-select.h
@@ -292,8 +292,8 @@ test_bad_fd (select_fn my_select)
   /* On Linux, Mac OS X, *BSD, values of fd like 99 or 399 are discarded
      by the kernel early and therefore do *not* lead to EBADF, as required
      by POSIX.  */
-# if defined __linux__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined __NetBSD__
-  fd = 16;
+# if defined __linux__ || (defined __APPLE__ && defined __MACH__) || (defined __FreeBSD__ || defined __DragonFly__) || defined __OpenBSD__ || defined __NetBSD__
+  fd = 14;
 # else
   fd = 99;
 # endif
-- 
2.7.4

Reply via email to