From dbeacaffd468bf0aeffe72fc8628acf580fe24e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fred=20Helmesj=C3=B6?= Date: Thu, 1 Sep 2022 09:40:24 +0200 Subject: [PATCH] Add HAVE_GETENV, HAVE_SETENV, HAVE_UNSETENV, HAVE_PUTENV, HAVE_GETRLIMIT, HAVE_SETRLIMIT, HAVE_SETFD (GH PR #28) --- .../libbuild2/autoconf/checks/HAVE_GETENV.h | 18 ++++++++++++++++++ .../autoconf/checks/HAVE_GETRLIMIT.h | 18 ++++++++++++++++++ .../libbuild2/autoconf/checks/HAVE_PUTENV.h | 18 ++++++++++++++++++ .../libbuild2/autoconf/checks/HAVE_SETENV.h | 18 ++++++++++++++++++ .../libbuild2/autoconf/checks/HAVE_SETFD.h | 19 +++++++++++++++++++ .../autoconf/checks/HAVE_SETRLIMIT.h | 18 ++++++++++++++++++ .../libbuild2/autoconf/checks/HAVE_UNSETENV.h | 18 ++++++++++++++++++ 7 files changed, 127 insertions(+) create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_GETENV.h create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_GETRLIMIT.h create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_PUTENV.h create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SETENV.h create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SETFD.h create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SETRLIMIT.h create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_UNSETENV.h diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_GETENV.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_GETENV.h new file mode 100644 index 0000000..6b91c6b --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_GETENV.h @@ -0,0 +1,18 @@ +// HAVE_GETENV : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_GETENV + +/* Since Version 7 AT&T UNIX, 4.3BSD-Tahoe (OpenBSD, FreeBSD, NetBSD, Mac OS X), +* glibc 1.09 + */ +#if defined(__FreeBSD__) || \ + defined(__OpenBSD__) || \ + defined(__NetBSD__) || \ + defined(BUILD2_AUTOCONF_MACOS) || \ + BUILD2_AUTOCONF_GLIBC_PREREQ(1, 09) +# define HAVE_GETENV 1 +#endif diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_GETRLIMIT.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_GETRLIMIT.h new file mode 100644 index 0000000..66de11b --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_GETRLIMIT.h @@ -0,0 +1,18 @@ +// HAVE_GETRLIMIT : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_GETRLIMIT + +/* Since 4.2BSD (Linux, OpenBSD, FreeBSD, NetBSD, Mac OS X), + * glibc 1.90 + */ +#if defined(__FreeBSD__) || \ + defined(__OpenBSD__) || \ + defined(__NetBSD__) || \ + defined(BUILD2_AUTOCONF_MACOS) || \ + BUILD2_AUTOCONF_GLIBC_PREREQ(1, 90) +# define HAVE_GETRLIMIT 1 +#endif diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_PUTENV.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_PUTENV.h new file mode 100644 index 0000000..921d8c0 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_PUTENV.h @@ -0,0 +1,18 @@ +// HAVE_PUTENV : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_PUTENV + +/* Since AT&T System V Release 2 UNIX, 4.3BSD-Reno (OpenBSD, FreeBSD, NetBSD, Mac OS X), +* glibc 1.09 + */ +#if defined(__FreeBSD__) || \ + defined(__OpenBSD__) || \ + defined(__NetBSD__) || \ + defined(BUILD2_AUTOCONF_MACOS) || \ + BUILD2_AUTOCONF_GLIBC_PREREQ(1, 09) +# define HAVE_PUTENV 1 +#endif diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SETENV.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SETENV.h new file mode 100644 index 0000000..01edffd --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SETENV.h @@ -0,0 +1,18 @@ +// HAVE_SETENV : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_SETENV + +/* Since Version 7 AT&T UNIX, 4.3BSD-Tahoe (OpenBSD, FreeBSD, NetBSD, Mac OS X), + * glibc 1.09 + */ +#if defined(__FreeBSD__) || \ + defined(__OpenBSD__) || \ + defined(__NetBSD__) || \ + defined(BUILD2_AUTOCONF_MACOS) || \ + BUILD2_AUTOCONF_GLIBC_PREREQ(1, 09) +# define HAVE_SETENV 1 +#endif diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SETFD.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SETFD.h new file mode 100644 index 0000000..9028ca3 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SETFD.h @@ -0,0 +1,19 @@ +// HAVE_SETFD : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_SETFD + +/* Since SVr4, 4.3BSD, POSIX.1-2001 (only Linux mentioned but assume all + * because it's old & standardized), + * glibc 1.90 + */ +#if defined(__FreeBSD__) || \ + defined(__OpenBSD__) || \ + defined(__NetBSD__) || \ + defined(BUILD2_AUTOCONF_MACOS) || \ + BUILD2_AUTOCONF_GLIBC_PREREQ(1, 90) +# define HAVE_SETFD 1 +#endif diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SETRLIMIT.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SETRLIMIT.h new file mode 100644 index 0000000..1e62e02 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SETRLIMIT.h @@ -0,0 +1,18 @@ +// HAVE_SETRLIMIT : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_SETRLIMIT + +/* Since 4.2BSD (Linux, OpenBSD, FreeBSD, NetBSD, Mac OS X) + * glibc 1.90 + */ +#if defined(__FreeBSD__) || \ + defined(__OpenBSD__) || \ + defined(__NetBSD__) || \ + defined(BUILD2_AUTOCONF_MACOS) || \ + BUILD2_AUTOCONF_GLIBC_PREREQ(1, 90) +# define HAVE_SETRLIMIT 1 +#endif diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_UNSETENV.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_UNSETENV.h new file mode 100644 index 0000000..c01ecbf --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_UNSETENV.h @@ -0,0 +1,18 @@ +// HAVE_UNSETENV : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_UNSETENV + +/* Since Version 7 AT&T UNIX, 4.3BSD-Tahoe (OpenBSD, FreeBSD, NetBSD, Mac OS X), + * glibc 1.90 + */ +#if defined(__FreeBSD__) || \ + defined(__OpenBSD__) || \ + defined(__NetBSD__) || \ + defined(BUILD2_AUTOCONF_MACOS) || \ + BUILD2_AUTOCONF_GLIBC_PREREQ(1, 90) +# define HAVE_UNSETENV 1 +#endif