1 /* src/config.h.in. Generated from configure.ac by autoheader. */
3 /* CPU and C ABI indicator */
22 #ifndef __arm64_ilp32__
23 #undef __arm64_ilp32__
34 #ifndef __ia64_ilp32__
40 #ifndef __loongarch64__
41 #undef __loongarch64__
61 #ifndef __powerpc64_elfv2__
62 #undef __powerpc64_elfv2__
70 #ifndef __riscv32_ilp32__
71 #undef __riscv32_ilp32__
73 #ifndef __riscv32_ilp32f__
74 #undef __riscv32_ilp32f__
76 #ifndef __riscv32_ilp32d__
77 #undef __riscv32_ilp32d__
79 #ifndef __riscv64_ilp32__
80 #undef __riscv64_ilp32__
82 #ifndef __riscv64_ilp32f__
83 #undef __riscv64_ilp32f__
85 #ifndef __riscv64_ilp32d__
86 #undef __riscv64_ilp32d__
88 #ifndef __riscv64_lp64__
89 #undef __riscv64_lp64__
91 #ifndef __riscv64_lp64f__
92 #undef __riscv64_lp64f__
94 #ifndef __riscv64_lp64d__
95 #undef __riscv64_lp64d__
114 /* Define if building universal (internal helper macro) */
115 #undef AC_APPLE_UNIVERSAL_BUILD
117 /* Define to 1 if the `closedir' function returns void instead of int. */
120 /* Define to 1 if using 'alloca.c'. */
123 /* Define to 1 for DGUX with <sys/dg_sys_info.h>. */
126 /* Define to 1 if translation of program messages to the user's native
127 language is requested. */
130 /* Use high resolution file timestamps if nonzero. */
131 #undef FILE_TIMESTAMP_HI_RES
133 /* Define to 1 when the gnulib module getloadavg should be tested. */
134 #undef GNULIB_TEST_GETLOADAVG
136 /* Define to 1 if you have 'alloca' after including <alloca.h>, a header that
137 may be supplied by this distribution. */
140 /* Define to 1 if <alloca.h> works. */
143 /* Define to 1 if you have the `atexit' function. */
146 /* Use case insensitive file names */
147 #undef HAVE_CASE_INSENSITIVE_FS
149 /* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
150 CoreFoundation framework. */
151 #undef HAVE_CFLOCALECOPYCURRENT
153 /* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
154 the CoreFoundation framework. */
155 #undef HAVE_CFPREFERENCESCOPYAPPVALUE
157 /* Define to 1 if you have the clock_gettime function. */
158 #undef HAVE_CLOCK_GETTIME
160 /* Define if the GNU dcgettext() function is already present or preinstalled.
162 #undef HAVE_DCGETTEXT
164 /* Define to 1 if you have the declaration of `bsd_signal', and to 0 if you
166 #undef HAVE_DECL_BSD_SIGNAL
168 /* Define to 1 if you have the declaration of `dlerror', and to 0 if you
170 #undef HAVE_DECL_DLERROR
172 /* Define to 1 if you have the declaration of `dlopen', and to 0 if you don't.
174 #undef HAVE_DECL_DLOPEN
176 /* Define to 1 if you have the declaration of `dlsym', and to 0 if you don't.
178 #undef HAVE_DECL_DLSYM
180 /* Define to 1 if you have the declaration of 'getloadavg'. */
181 #undef HAVE_DECL_GETLOADAVG
183 /* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
185 #undef HAVE_DECL_SYS_SIGLIST
187 /* Define to 1 if you have the declaration of `_sys_siglist', and to 0 if you
189 #undef HAVE_DECL__SYS_SIGLIST
191 /* Define to 1 if you have the declaration of `__sys_siglist', and to 0 if you
193 #undef HAVE_DECL___SYS_SIGLIST
195 /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
199 /* Support DOS-style pathnames. */
200 #undef HAVE_DOS_PATHS
202 /* Define to 1 if you have the `dup' function. */
205 /* Define to 1 if you have the `dup2' function. */
208 /* Define to 1 if you have the <fcntl.h> header file. */
211 /* Define to 1 if you have the `fdopen' function. */
214 /* Define to 1 if you have the `fork' function. */
217 /* Define to 1 if you have the `getcwd' function. */
220 /* Define to 1 if you have the `getgroups' function. */
221 #undef HAVE_GETGROUPS
223 /* Define to 1 if you have the `gethostbyname' function. */
224 #undef HAVE_GETHOSTBYNAME
226 /* Define to 1 if you have the `gethostname' function. */
227 #undef HAVE_GETHOSTNAME
229 /* Define to 1 if you have the `getrlimit' function. */
230 #undef HAVE_GETRLIMIT
232 /* Define if the GNU gettext() function is already present or preinstalled. */
235 /* Define to 1 if you have a standard gettimeofday function */
236 #undef HAVE_GETTIMEOFDAY
238 /* Embed GNU Guile support */
241 /* Define if you have the iconv() function and it works. */
244 /* Define to 1 if the system has the type `intmax_t'. */
247 /* Define to 1 if you have the <inttypes.h> header file. */
248 #undef HAVE_INTTYPES_H
250 /* Define to 1 if you have the `isatty' function. */
253 /* Define to 1 if you have the `dgc' library (-ldgc). */
256 /* Define to 1 if you have the `kstat' library (-lkstat). */
259 /* Define to 1 if you have the `perfstat' library (-lperfstat). */
260 #undef HAVE_LIBPERFSTAT
262 /* Define to 1 if you have the <limits.h> header file. */
265 /* Define to 1 if you have the <locale.h> header file. */
268 /* Define to 1 if the system has the type 'long long int'. */
269 #undef HAVE_LONG_LONG_INT
271 /* Define to 1 if you have the `lstat' function. */
274 /* Define to 1 if you have the <mach/mach.h> header file. */
275 #undef HAVE_MACH_MACH_H
277 /* Define to 1 if you have the <memory.h> header file. */
280 /* Define to 1 if you have the `mempcpy' function. */
283 /* Define to 1 if you have the `memrchr' function. */
286 /* Define to 1 if you have the <minix/config.h> header file. */
287 #undef HAVE_MINIX_CONFIG_H
289 /* Define to 1 if you have the `mkfifo' function. */
292 /* Define to 1 if you have the `mkstemp' function. */
295 /* Define to 1 if you have the `mktemp' function. */
298 /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
301 /* Define to 1 if you have the <nlist.h> header file. */
304 /* Define to 1 if you have the `pipe' function. */
307 /* Define to 1 if you have the `posix_spawn' function. */
308 #undef HAVE_POSIX_SPAWN
310 /* Define to 1 if you have the `posix_spawnattr_setsigmask' function. */
311 #undef HAVE_POSIX_SPAWNATTR_SETSIGMASK
313 /* Define to 1 if you have the `pselect' function. */
316 /* Define to 1 if you have the `pstat_getdynamic' function. */
317 #undef HAVE_PSTAT_GETDYNAMIC
319 /* Define to 1 if you have the `readlink' function. */
322 /* Define to 1 if you have the `realpath' function. */
325 /* Define to 1 if <signal.h> defines the SA_RESTART constant. */
326 #undef HAVE_SA_RESTART
328 /* Define to 1 if you have the `setegid' function. */
331 /* Define to 1 if you have the `seteuid' function. */
334 /* Define to 1 if you have the `setlinebuf' function. */
335 #undef HAVE_SETLINEBUF
337 /* Define to 1 if you have the `setregid' function. */
340 /* Define to 1 if you have the `setreuid' function. */
343 /* Define to 1 if you have the `setrlimit' function. */
344 #undef HAVE_SETRLIMIT
346 /* Define to 1 if you have the `setvbuf' function. */
349 /* Define to 1 if you have the `sigaction' function. */
350 #undef HAVE_SIGACTION
352 /* Define to 1 if you have the `sigsetmask' function. */
353 #undef HAVE_SIGSETMASK
355 /* Define to 1 if the system has the type `sig_atomic_t'. */
356 #undef HAVE_SIG_ATOMIC_T
358 /* Define to 1 if you have the `socket' function. */
361 /* Define to 1 if you have the <spawn.h> header file. */
364 /* Define to 1 if you have the <stdint.h> header file. */
367 /* Define to 1 if you have the <stdio.h> header file. */
370 /* Define to 1 if you have the <stdlib.h> header file. */
373 /* Define to 1 if you have the `stpcpy' function. */
376 /* Define to 1 if you have the `strcasecmp' function. */
377 #undef HAVE_STRCASECMP
379 /* Define to 1 if you have the `strcmpi' function. */
382 /* Define to 1 if you have the `strcoll' function and it is properly defined.
386 /* Define to 1 if you have the `strdup' function. */
389 /* Define to 1 if you have the `strerror' function. */
392 /* Define to 1 if you have the `stricmp' function. */
395 /* Define to 1 if you have the <strings.h> header file. */
396 #undef HAVE_STRINGS_H
398 /* Define to 1 if you have the <string.h> header file. */
401 /* Define to 1 if you have the `strncasecmp' function. */
402 #undef HAVE_STRNCASECMP
404 /* Define to 1 if you have the `strncmpi' function. */
407 /* Define to 1 if you have the `strndup' function. */
410 /* Define to 1 if you have the `strnicmp' function. */
413 /* Define to 1 if you have the `strsignal' function. */
414 #undef HAVE_STRSIGNAL
416 /* Define to 1 if you have the `strtoll' function. */
419 /* Define to 1 if `d_type' is a member of `struct dirent'. */
420 #undef HAVE_STRUCT_DIRENT_D_TYPE
422 /* Define to 1 if `n_un.n_name' is a member of `struct nlist'. */
423 #undef HAVE_STRUCT_NLIST_N_UN_N_NAME
425 /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
427 #undef HAVE_SYS_DIR_H
429 /* Define to 1 if you have the <sys/file.h> header file. */
430 #undef HAVE_SYS_FILE_H
432 /* Define to 1 if you have the <sys/loadavg.h> header file. */
433 #undef HAVE_SYS_LOADAVG_H
435 /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
437 #undef HAVE_SYS_NDIR_H
439 /* Define to 1 if you have the <sys/param.h> header file. */
440 #undef HAVE_SYS_PARAM_H
442 /* Define to 1 if you have the <sys/resource.h> header file. */
443 #undef HAVE_SYS_RESOURCE_H
445 /* Define to 1 if you have the <sys/select.h> header file. */
446 #undef HAVE_SYS_SELECT_H
448 /* Define to 1 if you have the <sys/stat.h> header file. */
449 #undef HAVE_SYS_STAT_H
451 /* Define to 1 if you have the <sys/timeb.h> header file. */
452 #undef HAVE_SYS_TIMEB_H
454 /* Define to 1 if you have the <sys/time.h> header file. */
455 #undef HAVE_SYS_TIME_H
457 /* Define to 1 if you have the <sys/types.h> header file. */
458 #undef HAVE_SYS_TYPES_H
460 /* Define to 1 if you have the <sys/wait.h> header file. */
461 #undef HAVE_SYS_WAIT_H
463 /* Define to 1 if you have the `ttyname' function. */
466 /* Define to 1 if the system has the type `uintmax_t'. */
467 #undef HAVE_UINTMAX_T
469 /* Define to 1 if you have the `umask' function. */
472 /* Define to 1 if you have the 'union wait' type in <sys/wait.h>. */
473 #undef HAVE_UNION_WAIT
475 /* Define to 1 if you have the <unistd.h> header file. */
478 /* Define to 1 if the system has the type 'unsigned long long int'. */
479 #undef HAVE_UNSIGNED_LONG_LONG_INT
481 /* Define to 1 if you have the `vfork' function. */
484 /* Define to 1 if you have the <vfork.h> header file. */
487 /* Define to 1 if you have the `wait3' function. */
490 /* Define to 1 if you have the `waitpid' function. */
493 /* Define to 1 if you have the <wchar.h> header file. */
496 /* Define to 1 if `fork' works. */
497 #undef HAVE_WORKING_FORK
499 /* Define to 1 if `vfork' works. */
500 #undef HAVE_WORKING_VFORK
502 /* Define to 1 if the system has the type `_Bool'. */
505 /* Build host information. */
508 /* Define to 1 to enable job server support in GNU make. */
509 #undef MAKE_JOBSERVER
511 /* Define to 1 to enable 'load' support in GNU make. */
514 /* Define to 1 to enable symbolic link timestamp checking. */
517 /* Define to 1 if config.h is generated by running the configure script. */
520 /* Define to 1 if the nlist n_name member is a pointer */
521 #undef N_NAME_POINTER
523 /* Name of package */
526 /* Define to the address where bug reports for this package should be sent. */
527 #undef PACKAGE_BUGREPORT
529 /* Define to the full name of this package. */
532 /* Define to the full name and version of this package. */
533 #undef PACKAGE_STRING
535 /* Define to the one symbol short name of this package. */
536 #undef PACKAGE_TARNAME
538 /* Define to the home page for this package. */
541 /* Define to the version of this package. */
542 #undef PACKAGE_VERSION
544 /* Define to the character that separates directories in PATH. */
545 #undef PATH_SEPARATOR_CHAR
547 /* Define to the name of the SCCS 'get' command. */
550 /* Define to 1 if the SCCS 'get' command understands the '-G<file>' option. */
551 #undef SCCS_GET_MINUS_G
553 /* If using the C implementation of alloca, define if you know the
554 direction of stack growth for your system; otherwise it will be
555 automatically deduced at runtime.
556 STACK_DIRECTION > 0 => grows toward higher addresses
557 STACK_DIRECTION < 0 => grows toward lower addresses
558 STACK_DIRECTION = 0 => direction of growth unknown */
559 #undef STACK_DIRECTION
561 /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
562 #undef STAT_MACROS_BROKEN
564 /* Define to 1 if all of the C90 standard headers exist (not just the ones
565 required in a freestanding environment). This macro is provided for
566 backward compatibility; new code need not use it. */
569 /* Define if struct stat contains a nanoseconds field */
572 /* Define to 1 on System V Release 4. */
575 /* Define to 1 for Encore UMAX. */
578 /* Define to 1 for Encore UMAX 4.3 that has <inq_status/cpustats.h> instead of
582 /* Define to 1 to use posix_spawn(). */
583 #undef USE_POSIX_SPAWN
585 /* Enable extensions on AIX 3, Interix. */
589 /* Enable general extensions on macOS. */
590 #ifndef _DARWIN_C_SOURCE
591 # undef _DARWIN_C_SOURCE
593 /* Enable general extensions on Solaris. */
594 #ifndef __EXTENSIONS__
595 # undef __EXTENSIONS__
597 /* Enable GNU extensions on systems that have them. */
601 /* Enable X/Open compliant socket functions that do not require linking
602 with -lxnet on HP-UX 11.11. */
603 #ifndef _HPUX_ALT_XOPEN_SOCKET_API
604 # undef _HPUX_ALT_XOPEN_SOCKET_API
606 /* Identify the host operating system as Minix.
607 This macro does not affect the system headers' behavior.
608 A future release of Autoconf may stop defining this macro. */
612 /* Enable general extensions on NetBSD.
613 Enable NetBSD compatibility extensions on Minix. */
614 #ifndef _NETBSD_SOURCE
615 # undef _NETBSD_SOURCE
617 /* Enable OpenBSD compatibility extensions on NetBSD.
618 Oddly enough, this does nothing on OpenBSD. */
619 #ifndef _OPENBSD_SOURCE
620 # undef _OPENBSD_SOURCE
622 /* Define to 1 if needed for POSIX-compatible behavior. */
623 #ifndef _POSIX_SOURCE
624 # undef _POSIX_SOURCE
626 /* Define to 2 if needed for POSIX-compatible behavior. */
627 #ifndef _POSIX_1_SOURCE
628 # undef _POSIX_1_SOURCE
630 /* Enable POSIX-compatible threading on Solaris. */
631 #ifndef _POSIX_PTHREAD_SEMANTICS
632 # undef _POSIX_PTHREAD_SEMANTICS
634 /* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
635 #ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
636 # undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
638 /* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
639 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
640 # undef __STDC_WANT_IEC_60559_BFP_EXT__
642 /* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
643 #ifndef __STDC_WANT_IEC_60559_DFP_EXT__
644 # undef __STDC_WANT_IEC_60559_DFP_EXT__
646 /* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
647 #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
648 # undef __STDC_WANT_IEC_60559_FUNCS_EXT__
650 /* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
651 #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
652 # undef __STDC_WANT_IEC_60559_TYPES_EXT__
654 /* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
655 #ifndef __STDC_WANT_LIB_EXT2__
656 # undef __STDC_WANT_LIB_EXT2__
658 /* Enable extensions specified by ISO/IEC 24747:2009. */
659 #ifndef __STDC_WANT_MATH_SPEC_FUNCS__
660 # undef __STDC_WANT_MATH_SPEC_FUNCS__
662 /* Enable extensions on HP NonStop. */
663 #ifndef _TANDEM_SOURCE
664 # undef _TANDEM_SOURCE
666 /* Enable X/Open extensions. Define to 500 only if necessary
667 to make mbstate_t available. */
668 #ifndef _XOPEN_SOURCE
669 # undef _XOPEN_SOURCE
673 /* Version number of package */
676 /* Build for the WINDOWS32 API. */
679 /* Define if using the dmalloc debugging malloc package */
682 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
683 significant byte first (like Motorola and SPARC, unlike Intel). */
684 #if defined AC_APPLE_UNIVERSAL_BUILD
685 # if defined __BIG_ENDIAN__
686 # define WORDS_BIGENDIAN 1
689 # ifndef WORDS_BIGENDIAN
690 # undef WORDS_BIGENDIAN
694 /* Number of bits in a file offset, on hosts where this is settable. */
695 #undef _FILE_OFFSET_BITS
697 /* True if the compiler says it groks GNU C version MAJOR.MINOR. */
698 #if defined __GNUC__ && defined __GNUC_MINOR__
699 # define _GL_GNUC_PREREQ(major, minor) \
700 ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__))
702 # define _GL_GNUC_PREREQ(major, minor) 0
706 /* Define to enable the declarations of ISO C 11 types and functions. */
707 #undef _ISOC11_SOURCE
709 /* Define for large files, on AIX-style hosts. */
712 /* The _Noreturn keyword of C11. */
714 # if (defined __cplusplus \
715 && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
716 || (defined _MSC_VER && 1900 <= _MSC_VER)) \
718 /* [[noreturn]] is not practically usable, because with it the syntax
719 extern _Noreturn void func (...);
720 would not be valid; such a declaration would only be valid with 'extern'
721 and '_Noreturn' swapped, or without the 'extern' keyword. However, some
722 AIX system header files and several gnulib header files use precisely
723 this syntax with 'extern'. */
724 # define _Noreturn [[noreturn]]
725 # elif ((!defined __cplusplus || defined __clang__) \
726 && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
727 || (!defined __STRICT_ANSI__ \
728 && (_GL_GNUC_PREREQ (4, 7) \
729 || (defined __apple_build_version__ \
730 ? 6000000 <= __apple_build_version__ \
731 : 3 < __clang_major__ + (5 <= __clang_minor__))))))
732 /* _Noreturn works as-is. */
733 # elif _GL_GNUC_PREREQ (2, 8) || defined __clang__ || 0x5110 <= __SUNPRO_C
734 # define _Noreturn __attribute__ ((__noreturn__))
735 # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
736 # define _Noreturn __declspec (noreturn)
743 /* Number of bits in a timestamp, on hosts where this is settable. */
746 /* For 64-bit time_t on 32-bit mingw. */
747 #undef __MINGW_USE_VC2005_COMPAT
749 /* The _GL_ASYNC_SAFE marker should be attached to functions that are
750 signal handlers (for signals other than SIGABRT, SIGPIPE) or can be
751 invoked from such signal handlers. Such functions have some restrictions:
752 * All functions that it calls should be marked _GL_ASYNC_SAFE as well,
753 or should be listed as async-signal-safe in POSIX
754 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04>
755 section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in
756 particular, are NOT async-signal-safe.
757 * All memory locations (variables and struct fields) that these functions
758 access must be marked 'volatile'. This holds for both read and write
759 accesses. Otherwise the compiler might optimize away stores to and
760 reads from such locations that occur in the program, depending on its
761 data flow analysis. For example, when the program contains a loop
762 that is intended to inspect a variable set from within a signal handler
763 while (!signal_occurred)
765 the compiler is allowed to transform this into an endless loop if the
766 variable 'signal_occurred' is not declared 'volatile'.
767 Additionally, recall that:
768 * A signal handler should not modify errno (except if it is a handler
769 for a fatal signal and ends by raising the same signal again, thus
770 provoking the termination of the process). If it invokes a function
771 that may clobber errno, it needs to save and restore the value of
773 #define _GL_ASYNC_SAFE
777 #if (defined __has_attribute \
778 && (!defined __clang_minor__ \
779 || (defined __apple_build_version__ \
780 ? 6000000 <= __apple_build_version__ \
781 : 3 < __clang_major__ + (5 <= __clang_minor__))))
782 # define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
784 # define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr
785 # define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3)
786 # define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2)
787 # define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3)
788 # define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3)
789 # define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95)
790 # define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1)
791 # define _GL_ATTR_diagnose_if 0
792 # define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3)
793 # define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1)
794 # define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0)
795 # define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7)
796 # define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6)
797 # define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0)
799 # define _GL_ATTR_may_alias 0
801 # define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3)
803 # define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1)
804 # define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3)
805 # define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0)
806 # define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3)
807 # define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7)
808 # define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96)
809 # define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9)
810 # define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0)
811 # define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7)
812 # define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4)
815 #ifdef __has_c_attribute
816 # if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710 \
817 && _GL_GNUC_PREREQ (4, 6))
818 # pragma GCC diagnostic ignored "-Wpedantic"
820 # define _GL_HAS_C_ATTRIBUTE(attr) __has_c_attribute (__##attr##__)
822 # define _GL_HAS_C_ATTRIBUTE(attr) 0
826 /* _GL_ATTRIBUTE_ALLOC_SIZE ((N)) declares that the Nth argument of the function
827 is the size of the returned memory block.
828 _GL_ATTRIBUTE_ALLOC_SIZE ((M, N)) declares that the Mth argument multiplied
829 by the Nth argument of the function is the size of the returned memory block.
831 /* Applies to: function, pointer to function, function types. */
832 #if _GL_HAS_ATTRIBUTE (alloc_size)
833 # define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
835 # define _GL_ATTRIBUTE_ALLOC_SIZE(args)
838 /* _GL_ATTRIBUTE_ALWAYS_INLINE tells that the compiler should always inline the
839 function and report an error if it cannot do so. */
840 /* Applies to: function. */
841 #if _GL_HAS_ATTRIBUTE (always_inline)
842 # define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__))
844 # define _GL_ATTRIBUTE_ALWAYS_INLINE
847 /* _GL_ATTRIBUTE_ARTIFICIAL declares that the function is not important to show
848 in stack traces when debugging. The compiler should omit the function from
850 /* Applies to: function. */
851 #if _GL_HAS_ATTRIBUTE (artificial)
852 # define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__))
854 # define _GL_ATTRIBUTE_ARTIFICIAL
857 /* _GL_ATTRIBUTE_COLD declares that the function is rarely executed. */
858 /* Applies to: functions. */
859 /* Avoid __attribute__ ((cold)) on MinGW; see thread starting at
860 <https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>.
861 Also, Oracle Studio 12.6 requires 'cold' not '__cold__'. */
862 #if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__
864 # define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
866 # define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
869 # define _GL_ATTRIBUTE_COLD
872 /* _GL_ATTRIBUTE_CONST declares that it is OK for a compiler to omit duplicate
873 calls to the function with the same arguments.
874 This attribute is safe for a function that neither depends on nor affects
875 observable state, and always returns exactly once - e.g., does not loop
876 forever, and does not call longjmp.
877 (This attribute is stricter than _GL_ATTRIBUTE_PURE.) */
878 /* Applies to: functions. */
879 #if _GL_HAS_ATTRIBUTE (const)
880 # define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
882 # define _GL_ATTRIBUTE_CONST
885 /* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers
886 that can be freed by passing them as the Ith argument to the
888 _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that
889 can be freed via 'free'; it can be used only after declaring 'free'. */
890 /* Applies to: functions. Cannot be used on inline functions. */
891 #if _GL_GNUC_PREREQ (11, 0)
892 # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
894 # define _GL_ATTRIBUTE_DEALLOC(f, i)
896 /* If gnulib's <string.h> or <wchar.h> has already defined this macro, continue
897 to use this earlier definition, since <stdlib.h> may not have been included
899 #ifndef _GL_ATTRIBUTE_DEALLOC_FREE
900 # define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
903 /* _GL_ATTRIBUTE_DEPRECATED: Declares that an entity is deprecated.
904 The compiler may warn if the entity is used. */
906 - function, variable,
907 - struct, union, struct/union member,
908 - enumeration, enumeration item,
910 in C++ also: namespace, class, template specialization. */
911 #if _GL_HAS_C_ATTRIBUTE (deprecated)
912 # define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
913 #elif _GL_HAS_ATTRIBUTE (deprecated)
914 # define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
916 # define _GL_ATTRIBUTE_DEPRECATED
919 /* _GL_ATTRIBUTE_ERROR(msg) requests an error if a function is called and
920 the function call is not optimized away.
921 _GL_ATTRIBUTE_WARNING(msg) requests a warning if a function is called and
922 the function call is not optimized away. */
923 /* Applies to: functions. */
924 #if _GL_HAS_ATTRIBUTE (error)
925 # define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
926 # define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
927 #elif _GL_HAS_ATTRIBUTE (diagnose_if)
928 # define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__diagnose_if__ (1, msg, "error")))
929 # define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__diagnose_if__ (1, msg, "warning")))
931 # define _GL_ATTRIBUTE_ERROR(msg)
932 # define _GL_ATTRIBUTE_WARNING(msg)
935 /* _GL_ATTRIBUTE_EXTERNALLY_VISIBLE declares that the entity should remain
936 visible to debuggers etc., even with '-fwhole-program'. */
937 /* Applies to: functions, variables. */
938 #if _GL_HAS_ATTRIBUTE (externally_visible)
939 # define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible))
941 # define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
944 /* _GL_ATTRIBUTE_FALLTHROUGH declares that it is not a programming mistake if
945 the control flow falls through to the immediately following 'case' or
946 'default' label. The compiler should not warn in this case. */
947 /* Applies to: Empty statement (;), inside a 'switch' statement. */
948 /* Always expands to something. */
949 #if _GL_HAS_C_ATTRIBUTE (fallthrough)
950 # define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]]
951 #elif _GL_HAS_ATTRIBUTE (fallthrough)
952 # define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))
954 # define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0)
957 /* _GL_ATTRIBUTE_FORMAT ((ARCHETYPE, STRING-INDEX, FIRST-TO-CHECK))
958 declares that the STRING-INDEXth function argument is a format string of
959 style ARCHETYPE, which is one of:
962 strftime, gnu_strftime,
964 or the same thing prefixed and suffixed with '__'.
965 If FIRST-TO-CHECK is not 0, arguments starting at FIRST-TO_CHECK
966 are suitable for the format string. */
967 /* Applies to: functions. */
968 #if _GL_HAS_ATTRIBUTE (format)
969 # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
971 # define _GL_ATTRIBUTE_FORMAT(spec)
974 /* _GL_ATTRIBUTE_LEAF declares that if the function is called from some other
975 compilation unit, it executes code from that unit only by return or by
976 exception handling. This declaration lets the compiler optimize that unit
977 more aggressively. */
978 /* Applies to: functions. */
979 #if _GL_HAS_ATTRIBUTE (leaf)
980 # define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__))
982 # define _GL_ATTRIBUTE_LEAF
985 /* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly
987 /* Applies to: functions. */
988 #if _GL_HAS_ATTRIBUTE (malloc)
989 # define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
991 # define _GL_ATTRIBUTE_MALLOC
994 /* _GL_ATTRIBUTE_MAY_ALIAS declares that pointers to the type may point to the
995 same storage as pointers to other types. Thus this declaration disables
996 strict aliasing optimization. */
997 /* Applies to: types. */
998 /* Oracle Studio 12.6 mishandles may_alias despite __has_attribute OK. */
999 #if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C
1000 # define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
1002 # define _GL_ATTRIBUTE_MAY_ALIAS
1005 /* _GL_ATTRIBUTE_MAYBE_UNUSED declares that it is not a programming mistake if
1006 the entity is not used. The compiler should not warn if the entity is not
1009 - function, variable,
1010 - struct, union, struct/union member,
1011 - enumeration, enumeration item,
1013 in C++ also: class. */
1014 /* In C++ and C2x, this is spelled [[__maybe_unused__]].
1015 GCC's syntax is __attribute__ ((__unused__)).
1016 clang supports both syntaxes. */
1017 #if _GL_HAS_C_ATTRIBUTE (maybe_unused)
1018 # define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
1020 # define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED
1022 /* Alternative spelling of this macro, for convenience and for
1023 compatibility with glibc/include/libc-symbols.h. */
1024 #define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED
1025 /* Earlier spellings of this macro. */
1026 #define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED
1028 /* _GL_ATTRIBUTE_NODISCARD declares that the caller of the function should not
1029 discard the return value. The compiler may warn if the caller does not use
1030 the return value, unless the caller uses something like ignore_value. */
1031 /* Applies to: function, enumeration, class. */
1032 #if _GL_HAS_C_ATTRIBUTE (nodiscard)
1033 # define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
1034 #elif _GL_HAS_ATTRIBUTE (warn_unused_result)
1035 # define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__))
1037 # define _GL_ATTRIBUTE_NODISCARD
1040 /* _GL_ATTRIBUTE_NOINLINE tells that the compiler should not inline the
1042 /* Applies to: functions. */
1043 #if _GL_HAS_ATTRIBUTE (noinline)
1044 # define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__))
1046 # define _GL_ATTRIBUTE_NOINLINE
1049 /* _GL_ATTRIBUTE_NONNULL ((N1, N2,...)) declares that the arguments N1, N2,...
1051 _GL_ATTRIBUTE_NONNULL () declares that all pointer arguments must not be
1053 /* Applies to: functions. */
1054 #if _GL_HAS_ATTRIBUTE (nonnull)
1055 # define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args))
1057 # define _GL_ATTRIBUTE_NONNULL(args)
1060 /* _GL_ATTRIBUTE_NONSTRING declares that the contents of a character array is
1061 not meant to be NUL-terminated. */
1062 /* Applies to: struct/union members and variables that are arrays of element
1063 type '[[un]signed] char'. */
1064 #if _GL_HAS_ATTRIBUTE (nonstring)
1065 # define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
1067 # define _GL_ATTRIBUTE_NONSTRING
1070 /* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */
1072 /* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions.
1074 /* Applies to: functions. */
1075 #if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus
1076 # define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
1078 # define _GL_ATTRIBUTE_NOTHROW
1081 /* _GL_ATTRIBUTE_PACKED declares:
1082 For struct members: The member has the smallest possible alignment.
1083 For struct, union, class: All members have the smallest possible alignment,
1084 minimizing the memory required. */
1085 /* Applies to: struct members, struct, union,
1086 in C++ also: class. */
1087 #if _GL_HAS_ATTRIBUTE (packed)
1088 # define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
1090 # define _GL_ATTRIBUTE_PACKED
1093 /* _GL_ATTRIBUTE_PURE declares that It is OK for a compiler to omit duplicate
1094 calls to the function with the same arguments if observable state is not
1095 changed between calls.
1096 This attribute is safe for a function that does not affect
1097 observable state, and always returns exactly once.
1098 (This attribute is looser than _GL_ATTRIBUTE_CONST.) */
1099 /* Applies to: functions. */
1100 #if _GL_HAS_ATTRIBUTE (pure)
1101 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
1103 # define _GL_ATTRIBUTE_PURE
1106 /* _GL_ATTRIBUTE_RETURNS_NONNULL declares that the function's return value is
1107 a non-NULL pointer. */
1108 /* Applies to: functions. */
1109 #if _GL_HAS_ATTRIBUTE (returns_nonnull)
1110 # define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
1112 # define _GL_ATTRIBUTE_RETURNS_NONNULL
1115 /* _GL_ATTRIBUTE_SENTINEL(pos) declares that the variadic function expects a
1116 trailing NULL argument.
1117 _GL_ATTRIBUTE_SENTINEL () - The last argument is NULL (requires C99).
1118 _GL_ATTRIBUTE_SENTINEL ((N)) - The (N+1)st argument from the end is NULL. */
1119 /* Applies to: functions. */
1120 #if _GL_HAS_ATTRIBUTE (sentinel)
1121 # define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos))
1123 # define _GL_ATTRIBUTE_SENTINEL(pos)
1126 /* A helper macro. Don't use it directly. */
1127 #if _GL_HAS_ATTRIBUTE (unused)
1128 # define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
1130 # define _GL_ATTRIBUTE_UNUSED
1134 /* _GL_UNUSED_LABEL; declares that it is not a programming mistake if the
1135 immediately preceding label is not used. The compiler should not warn
1136 if the label is not used. */
1137 /* Applies to: label (both in C and C++). */
1138 /* Note that g++ < 4.5 does not support the '__attribute__ ((__unused__)) ;'
1139 syntax. But clang does. */
1140 #if !(defined __cplusplus && !_GL_GNUC_PREREQ (4, 5)) || defined __clang__
1141 # define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED
1143 # define _GL_UNUSED_LABEL
1147 /* Define to empty if `const' does not conform to ANSI C. */
1150 /* Define as 'access' if you don't have the eaccess() function. */
1153 /* Define to `int' if <sys/types.h> doesn't define. */
1156 /* Define to the widest signed integer type if <stdint.h> and <inttypes.h> do
1160 /* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
1161 the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
1162 earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
1163 __APPLE__ && __MACH__ test for Mac OS X.
1164 __APPLE_CC__ tests for the Apple compiler and its version.
1165 __STDC_VERSION__ tests for the C99 mode. */
1166 #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
1167 # define __GNUC_STDC_INLINE__ 1
1170 /* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2, where
1171 n1 and n2 are expressions without side effects, that evaluate to real
1172 numbers (excluding NaN).
1177 The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional
1178 jump with nearly all GCC versions up to GCC 10.
1179 This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many
1180 GCC versions up to GCC 9.
1181 The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9
1182 avoids conditional jumps in all GCC versions >= 3.4. */
1183 #define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2)))
1186 /* Define to `long int' if <sys/types.h> does not define. */
1189 /* Define as a signed integer type capable of holding a process identifier. */
1192 /* Define as an integer type suitable for memory locations that can be
1193 accessed atomically even in the presence of asynchronous signals. */
1196 /* Define to `unsigned int' if <sys/types.h> does not define. */
1199 /* Define to `int' if <sys/types.h> does not define. */
1202 /* Define to `int' if <sys/types.h> doesn't define. */
1205 /* Define to the widest unsigned integer type if <stdint.h> and <inttypes.h>
1209 /* Define as `fork' if `vfork' does not work. */