tests: cksum: add incorrect data to verify --check & --strict
[coreutils.git] / m4 / check-decl.m4
bloba7714f289adb97b449cce2026a21758c42307a58
1 #serial 27
2 # Check declarations for this package.
4 dnl Copyright (C) 1997-2024 Free Software Foundation, Inc.
6 dnl This file is free software; the Free Software Foundation
7 dnl gives unlimited permission to copy and/or distribute it,
8 dnl with or without modifications, as long as this notice is preserved.
11 dnl This is just a wrapper function to encapsulate this kludge.
12 dnl Putting it in a separate file like this helps share it between
13 dnl different packages.
14 AC_DEFUN([gl_CHECK_DECLS],
16   AC_CHECK_HEADERS_ONCE([grp.h pwd.h])
17   headers='
18 #include <sys/types.h>
20 #include <unistd.h>
22 #if HAVE_GRP_H
23 # include <grp.h>
24 #endif
26 #if HAVE_PWD_H
27 # include <pwd.h>
28 #endif
30   AC_CHECK_DECLS([
31     getgrgid,
32     getpwuid,
33     ttyname], , , $headers)
35   AC_CHECK_DECLS_ONCE([geteuid])
36   AC_CHECK_DECLS_ONCE([getlogin])
37   AC_CHECK_DECLS_ONCE([getuid])