]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
fcntl-safer-tests: also update this for fifos
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 28 May 2025 19:31:45 +0000 (12:31 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 28 May 2025 19:32:30 +0000 (12:32 -0700)
* modules/fcntl-safer-tests (Depends-on): Add mkfifo.
(configure.ac) Check for alarm decl.
* tests/test-fcntl-safer.c:
Include sys/stat.h, for mkfifo.
[HAVE_DECL_ALARM]: Include signal.h, for alarm.

ChangeLog
modules/fcntl-safer-tests
tests/test-fcntl-safer.c

index 4e26800c3341ab7fac8b042f49bda9a65c175e22..18123ef0c2b3c6ba1f4559a5672f2449c2792e2c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        * lib/openat.c: Remove a few more unnecessary differences from open.c.
        * modules/open (Depends-on): Depend on lstat.
        * modules/openat (Depends-on): Add fstatat.
-       * modules/open-tests, modules/openat-tests:
+       * modules/fcntl-safer-tests, modules/open-tests, modules/openat-tests:
+       (Depends-on): Add mkfifo.
        (configure.ac) Check for alarm decl.
-       * tests/test-open.c, tests/test-openat.c:
+       * tests/test-fcntl-safer.c, tests/test-open.c, tests/test-openat.c:
        Include sys/stat.h, for mkfifo.
        [HAVE_DECL_ALARM]: Include signal.h, for alarm.
        * tests/test-open.h (test_open): Fail if test takes too long
index b61b4a7ec7ca884157e05e6da9f728cb172414c2..795b491571aa0d923f809051d6ee78d7b008b5cb 100644 (file)
@@ -6,9 +6,11 @@ tests/macros.h
 Depends-on:
 bool
 fcntl
+mkfifo
 symlink
 
 configure.ac:
+AC_CHECK_DECLS_ONCE([alarm])
 
 Makefile.am:
 TESTS += test-fcntl-safer
index 2ead91d84e2a152f1b0ed85668940f13bb5cb3fd..db5f55da56cce4ec872102dd4d5e575de8491811 100644 (file)
 
 #include <errno.h>
 #include <stdio.h>
+#include <sys/stat.h>
 #include <unistd.h>
 
+#if HAVE_DECL_ALARM
+# include <signal.h>
+#endif
+
 #include "macros.h"
 
 #define BASE "test-fcntl-safer.t"