From 79d26b5bb3bd5655b59c1caaa886a238448aaf14 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 24 Apr 2022 12:09:02 +0200 Subject: [PATCH] Rename LIBC_VERSION to BUILD2_AUTOCONF_LIBC_VERSION, add include guard --- README.md | 8 ++++---- .../{LIBC_VERSION.h => BUILD2_AUTOCONF_LIBC_VERSION.h} | 7 ++++++- .../libbuild2/autoconf/checks/HAVE_CLOCK_GETTIME.h | 2 +- .../libbuild2/autoconf/checks/HAVE_DLOPEN.h | 2 +- .../libbuild2/autoconf/checks/HAVE_EVENTFD.h | 2 +- .../libbuild2/autoconf/checks/HAVE_EXPLICIT_BZERO.h | 2 +- .../libbuild2/autoconf/checks/HAVE_EXPLICIT_MEMSET.h | 2 +- .../libbuild2/autoconf/checks/HAVE_FUTIMENS.h | 2 +- .../libbuild2/autoconf/checks/HAVE_FUTIMES.h | 2 +- .../libbuild2/autoconf/checks/HAVE_GETAUXVAL.h | 2 +- .../libbuild2/autoconf/checks/HAVE_GETENTROPY.h | 2 +- .../libbuild2/autoconf/checks/HAVE_INOTIFY.h | 2 +- .../libbuild2/autoconf/checks/HAVE_LINKAT.h | 2 +- libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POLL.h | 2 +- .../libbuild2/autoconf/checks/HAVE_POLLTS.h | 2 +- .../libbuild2/autoconf/checks/HAVE_POSIX_FALLOCATE.h | 2 +- libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_PPOLL.h | 2 +- .../libbuild2/autoconf/checks/HAVE_RENAMEAT2.h | 2 +- libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STATX.h | 2 +- .../libbuild2/autoconf/checks/HAVE_THREADSAFE_CLOEXEC.h | 2 +- 20 files changed, 28 insertions(+), 23 deletions(-) rename libbuild2-autoconf/libbuild2/autoconf/checks/{LIBC_VERSION.h => BUILD2_AUTOCONF_LIBC_VERSION.h} (97%) diff --git a/README.md b/README.md index e62ffc3..e329457 100644 --- a/README.md +++ b/README.md @@ -141,9 +141,9 @@ The first line in this header file must be in the form: If the name is followed by the `!` modifier, then it is *unprefixable* (see the previous section for details). The name can also be followed by `:` and a list of base checks. Such checks are automatically inserted before the rest of -the lines in the resulting substitution. One notable check that you may -want to use as a base is [`LIBC_VERSION`][libc-version] (see comments for -details). +the lines in the resulting substitution. One notable check that you may want +to use as a base is [`BUILD2_AUTOCONF_LIBC_VERSION`][libc-version] (see +comments for details). Subsequent lines should be C-style comments or preprocessor directives that `#define` or `#undef` `` depending on whether the feature is available @@ -180,4 +180,4 @@ ways that deal with duplication (for example, include guards). [module-in]: https://build2.org/build2/doc/build2-build-system-manual.xhtml#module-in [proj-config]: https://build2.org/build2/doc/build2-build-system-manual.xhtml#proj-config [checks]: https://github.com/build2/libbuild2-autoconf/tree/master/libbuild2-autoconf/libbuild2/autoconf/checks/ -[libc-version]: https://github.com/build2/libbuild2-autoconf/tree/master/libbuild2-autoconf/libbuild2/autoconf/checks/LIBC_VERSION.h +[libc-version]: https://github.com/build2/libbuild2-autoconf/tree/master/libbuild2-autoconf/libbuild2/autoconf/checks/BUILD2_AUTOCONF_LIBC_VERSION.h diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/LIBC_VERSION.h b/libbuild2-autoconf/libbuild2/autoconf/checks/BUILD2_AUTOCONF_LIBC_VERSION.h similarity index 97% rename from libbuild2-autoconf/libbuild2/autoconf/checks/LIBC_VERSION.h rename to libbuild2-autoconf/libbuild2/autoconf/checks/BUILD2_AUTOCONF_LIBC_VERSION.h index 8cca04d..7f5705f 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/LIBC_VERSION.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/BUILD2_AUTOCONF_LIBC_VERSION.h @@ -1,4 +1,7 @@ -// LIBC_VERSION! +// BUILD2_AUTOCONF_LIBC_VERSION! + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +#define BUILD2_AUTOCONF_LIBC_VERSION /* Include headers required to make various libc version number macros * available. @@ -167,3 +170,5 @@ #else # define BUILD2_AUTOCONF_MACOS_PREREQ(maj, min) 0 #endif + +#endif /* BUILD2_AUTOCONF_LIBC_VERSION */ diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_CLOCK_GETTIME.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_CLOCK_GETTIME.h index 4c9302d..9241ae1 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_CLOCK_GETTIME.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_CLOCK_GETTIME.h @@ -1,4 +1,4 @@ -// HAVE_CLOCK_GETTIME : LIBC_VERSION +// HAVE_CLOCK_GETTIME : BUILD2_AUTOCONF_LIBC_VERSION #undef HAVE_CLOCK_GETTIME diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_DLOPEN.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_DLOPEN.h index 87ff5b6..9635be8 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_DLOPEN.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_DLOPEN.h @@ -1,4 +1,4 @@ -// HAVE_DLOPEN : LIBC_VERSION +// HAVE_DLOPEN : BUILD2_AUTOCONF_LIBC_VERSION #undef HAVE_DLOPEN diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_EVENTFD.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_EVENTFD.h index ebc2c88..20a8a78 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_EVENTFD.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_EVENTFD.h @@ -1,4 +1,4 @@ -// HAVE_EVENTFD : LIBC_VERSION +// HAVE_EVENTFD : BUILD2_AUTOCONF_LIBC_VERSION #undef HAVE_EVENTFD diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_EXPLICIT_BZERO.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_EXPLICIT_BZERO.h index 04b898d..e97eb81 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_EXPLICIT_BZERO.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_EXPLICIT_BZERO.h @@ -1,4 +1,4 @@ -// HAVE_EXPLICIT_BZERO : LIBC_VERSION +// HAVE_EXPLICIT_BZERO : BUILD2_AUTOCONF_LIBC_VERSION #undef HAVE_EXPLICIT_BZERO diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_EXPLICIT_MEMSET.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_EXPLICIT_MEMSET.h index 7d22f0d..cd6e1ec 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_EXPLICIT_MEMSET.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_EXPLICIT_MEMSET.h @@ -1,4 +1,4 @@ -// HAVE_EXPLICIT_MEMSET : LIBC_VERSION +// HAVE_EXPLICIT_MEMSET : BUILD2_AUTOCONF_LIBC_VERSION #undef HAVE_EXPLICIT_MEMSET diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_FUTIMENS.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_FUTIMENS.h index 63b8a29..71c186a 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_FUTIMENS.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_FUTIMENS.h @@ -1,4 +1,4 @@ -// HAVE_FUTIMENS : LIBC_VERSION +// HAVE_FUTIMENS : BUILD2_AUTOCONF_LIBC_VERSION #undef HAVE_FUTIMENS diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_FUTIMES.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_FUTIMES.h index a526d0c..278d647 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_FUTIMES.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_FUTIMES.h @@ -1,4 +1,4 @@ -// HAVE_FUTIMES : LIBC_VERSION +// HAVE_FUTIMES : BUILD2_AUTOCONF_LIBC_VERSION #undef HAVE_FUTIMES diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_GETAUXVAL.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_GETAUXVAL.h index 2fdefe9..f675e63 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_GETAUXVAL.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_GETAUXVAL.h @@ -1,4 +1,4 @@ -// HAVE_GETAUXVAL : LIBC_VERSION +// HAVE_GETAUXVAL : BUILD2_AUTOCONF_LIBC_VERSION #undef HAVE_GETAUXVAL diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_GETENTROPY.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_GETENTROPY.h index 0404413..0b5598d 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_GETENTROPY.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_GETENTROPY.h @@ -1,4 +1,4 @@ -// HAVE_GETENTROPY : LIBC_VERSION +// HAVE_GETENTROPY : BUILD2_AUTOCONF_LIBC_VERSION #undef HAVE_GETENTROPY diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_INOTIFY.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_INOTIFY.h index 5e23c4b..40cd376 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_INOTIFY.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_INOTIFY.h @@ -1,4 +1,4 @@ -// HAVE_INOTIFY : LIBC_VERSION +// HAVE_INOTIFY : BUILD2_AUTOCONF_LIBC_VERSION #undef HAVE_INOTIFY diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_LINKAT.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_LINKAT.h index 55bd253..32fd7a6 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_LINKAT.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_LINKAT.h @@ -1,4 +1,4 @@ -// HAVE_LINKAT : LIBC_VERSION +// HAVE_LINKAT : BUILD2_AUTOCONF_LIBC_VERSION #undef HAVE_LINKAT diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POLL.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POLL.h index cc03b70..92510f1 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POLL.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POLL.h @@ -1,4 +1,4 @@ -// HAVE_POLL : LIBC_VERSION +// HAVE_POLL : BUILD2_AUTOCONF_LIBC_VERSION #undef HAVE_POLL diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POLLTS.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POLLTS.h index 518ef2b..d2eab95 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POLLTS.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POLLTS.h @@ -1,4 +1,4 @@ -// HAVE_POLLTS : LIBC_VERSION +// HAVE_POLLTS : BUILD2_AUTOCONF_LIBC_VERSION #undef HAVE_POLLTS diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POSIX_FALLOCATE.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POSIX_FALLOCATE.h index 8cfb2ab..cad894a 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POSIX_FALLOCATE.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POSIX_FALLOCATE.h @@ -1,4 +1,4 @@ -// HAVE_POSIX_FALLOCATE : LIBC_VERSION +// HAVE_POSIX_FALLOCATE : BUILD2_AUTOCONF_LIBC_VERSION #undef HAVE_POSIX_FALLOCATE diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_PPOLL.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_PPOLL.h index fe0d394..55de0a8 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_PPOLL.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_PPOLL.h @@ -1,4 +1,4 @@ -// HAVE_PPOLL : LIBC_VERSION +// HAVE_PPOLL : BUILD2_AUTOCONF_LIBC_VERSION #undef HAVE_PPOLL diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_RENAMEAT2.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_RENAMEAT2.h index 3d26765..cac436e 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_RENAMEAT2.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_RENAMEAT2.h @@ -1,4 +1,4 @@ -// HAVE_RENAMEAT2 : LIBC_VERSION +// HAVE_RENAMEAT2 : BUILD2_AUTOCONF_LIBC_VERSION #undef HAVE_RENAMEAT2 diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STATX.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STATX.h index 385a48b..e148a34 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STATX.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STATX.h @@ -1,4 +1,4 @@ -// HAVE_STATX : LIBC_VERSION +// HAVE_STATX : BUILD2_AUTOCONF_LIBC_VERSION #undef HAVE_STATX diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_THREADSAFE_CLOEXEC.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_THREADSAFE_CLOEXEC.h index 6bff9bb..33b0609 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_THREADSAFE_CLOEXEC.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_THREADSAFE_CLOEXEC.h @@ -1,4 +1,4 @@ -// HAVE_THREADSAFE_CLOEXEC +// HAVE_THREADSAFE_CLOEXEC : BUILD2_AUTOCONF_LIBC_VERSION #undef HAVE_THREADSAFE_CLOEXEC