1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-25 18:19:00 +02:00
Files
coreutils/m4/check-decl.m4
T

87 lines
1.5 KiB
Plaintext
Raw Normal View History

2003-02-09 08:40:09 +00:00
#serial 19
1997-12-14 15:03:38 +00:00
1997-10-24 01:42:27 +00:00
dnl This is just a wrapper function to encapsulate this kludge.
dnl Putting it in a separate file like this helps share it between
dnl different packages.
AC_DEFUN([jm_CHECK_DECLS],
1997-10-24 01:42:27 +00:00
[
2000-01-22 14:22:42 +00:00
AC_REQUIRE([_jm_DECL_HEADERS])
AC_REQUIRE([AC_HEADER_TIME])
1998-10-18 01:08:22 +00:00
headers='
#include <stdio.h>
#if HAVE_STRING_H
1998-10-18 01:08:22 +00:00
# if !STDC_HEADERS && HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#else
# if HAVE_STRINGS_H
1998-10-18 01:08:22 +00:00
# include <strings.h>
# endif
#endif
2000-01-22 14:07:23 +00:00
#if HAVE_STDLIB_H
1998-10-18 01:08:22 +00:00
# include <stdlib.h>
#endif
#if HAVE_UNISTD_H
1998-10-18 01:08:22 +00:00
# include <unistd.h>
#endif
#include <sys/types.h>
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
#if HAVE_UTMP_H
# include <utmp.h>
#endif
#if HAVE_GRP_H
# include <grp.h>
#endif
#if HAVE_PWD_H
# include <pwd.h>
#endif
1998-10-18 01:08:22 +00:00
'
1999-01-10 22:45:03 +00:00
AC_CHECK_DECLS([
2003-02-09 08:40:09 +00:00
euidaccess,
free,
getenv,
geteuid,
2000-07-23 18:44:35 +00:00
getgrgid,
getlogin,
2000-07-23 18:44:35 +00:00
getpwuid,
getuid,
2000-04-05 15:22:04 +00:00
getutent,
lseek,
malloc,
memchr,
2000-10-21 10:36:32 +00:00
memrchr,
nanosleep,
realloc,
stpcpy,
2000-05-03 08:37:03 +00:00
strndup,
2000-07-04 09:03:26 +00:00
strnlen,
strstr,
strtoul,
strtoull,
ttyname], , , $headers)
1997-10-24 01:42:27 +00:00
])
2000-01-22 14:22:42 +00:00
dnl FIXME: when autoconf has support for it.
dnl This is a little helper so we can require these header checks.
AC_DEFUN([_jm_DECL_HEADERS],
2000-01-22 14:22:42 +00:00
[
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_HEADERS(grp.h memory.h pwd.h string.h strings.h stdlib.h \
unistd.h sys/time.h utmp.h utmpx.h)
2000-01-22 14:22:42 +00:00
])