summaryrefslogtreecommitdiff
path: root/m4
Commit message (Collapse)AuthorAgeFilesLines
* host-cpu-c-abi: Recognize i386 and a couple of other CPUs as 32-bit.Bruno Haible2019-10-271-3/+23
| | | | | | | * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Include i386 in the case statement. (gl_HOST_CPU_C_ABI_32BIT): Likewise. Also recognize a couple of other 32-bit CPUs.
* Update some URLsPaul Eggert2019-09-2210-11/+11
| | | | | | This is a clerical change that mostly changes http: to https: in URLs where either will work. It also updates some URLs that have moved, removes some URLs that no longer work, and fixes related text.
* access: New module.Bruno Haible2019-09-152-4/+22
| | | | | | | | | | | | | * lib/unistd.in.h (access): New declaration. * lib/access.c: New file. * m4/access.m4: New file. * m4/unistd_h.m4 (gl_UNISTD_H): Test whether access is declared. (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_ACCESS, REPLACE_ACCESS. * modules/unistd (Makefile.am): Substitute GNULIB_ACCESS, REPLACE_ACCESS. * modules/access: New file. * tests/test-unistd-c++.cc (access): Check signature. * doc/posix-functions/access.texi: Mention the new module.
* creat: New module.Bruno Haible2019-09-154-41/+86
| | | | | | | | | | | | | | | | * lib/fcntl.in.h (creat): New declaration. * lib/creat.c: New file, based on lib/open.c. * m4/creat.m4: New file. * m4/open-slash.m4: New file, extracted from m4/open.m4. * m4/open.m4 (gl_FUNC_OPEN): Move trailing-slash test to open-slash.m4. Invoke gl_OPEN_TRAILING_SLASH_BUG. * modules/open (Files): Add m4/open-slash.m4. * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Initialize GNULIB_CREAT, REPLACE_CREAT. * modules/fcntl-h (Makefile.am): Substitute GNULIB_CREAT, REPLACE_CREAT. * modules/creat: New file. * tests/test-fcntl-h-c++.cc (creat): Check signature. * doc/posix-functions/creat.texi: Mention the new module.
* Make autoconf tests work with -Werror=implicit-function-declaration.Bruno Haible2019-09-142-6/+9
| | | | | | | * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Include <wctype.h>, for towupper() declaration. * m4/ptsname.m4 (gl_FUNC_PTSNAME): Include <stdlib.h>, for ptsname() declaration.
* wctob: Fix autoconf test.Bruno Haible2019-09-101-1/+2
| | | | | | Based on patch by Florian Weimer <fweimer@redhat.com>. * m4/wctob.m4 (gl_FUNC_WCTOB): Include <stdlib.h> before using mbtowc.
* Add option to assume the best, not the worst, when cross-compiling.Bruno Haible2019-09-09107-424/+452
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggested by Jonas Termansen <sortie@maxsi.org>. * m4/gnulib-common.m4 (gl_COMMON_BODY): Add --enable-cross-guesses=... option. Set gl_cross_guess_normal and gl_cross_guess_inverted. * m4/argz.m4 (gl_FUNC_ARGZ): Obey --enable-cross-guesses for lt_cv_sys_argz_works. * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Obey --enable-cross-guesses for ac_cv_func_calloc_0_nonnull. * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Obey --enable-cross-guesses for gl_cv_func_realpath_works. * m4/cbrtl.m4 (gl_FUNC_CBRTL): Obey --enable-cross-guesses for gl_cv_func_cbrtl_ieee. * m4/ceil.m4 (gl_FUNC_CEIL): Obey --enable-cross-guesses for gl_cv_func_ceil_ieee. * m4/ceilf.m4 (gl_FUNC_CEILF): Obey --enable-cross-guesses for gl_cv_func_ceilf_ieee. * m4/ceill.m4 (gl_FUNC_CEILL): Obey --enable-cross-guesses for gl_cv_func_ceill_ieee. * m4/chown.m4 (AC_FUNC_CHOWN): Obey --enable-cross-guesses for ac_cv_func_chown_works. (gl_FUNC_CHOWN): Obey --enable-cross-guesses for gl_cv_func_chown_slash_works, gl_cv_func_chown_ctime_works. * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Obey --enable-cross-guesses for gl_cv_struct_dirent_d_ino. * m4/exp2l.m4 (gl_FUNC_EXP2L): Obey --enable-cross-guesses for gl_cv_func_exp2l_works, gl_cv_func_exp2l_ieee. * m4/expl.m4 (gl_FUNC_EXPL): Obey --enable-cross-guesses for gl_cv_func_expl_works. * m4/expm1.m4 (gl_FUNC_EXPM1): Obey --enable-cross-guesses for gl_cv_func_expm1_ieee. * m4/expm1l.m4 (gl_FUNC_EXPM1L): Obey --enable-cross-guesses for gl_cv_func_expm1l_works. * m4/fchdir.m4 (gl_FUNC_FCHDIR): Obey --enable-cross-guesses for gl_cv_func_open_directory_works. * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Obey --enable-cross-guesses for gl_cv_func_fchownat_nofollow_works. (gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Obey --enable-cross-guesses for gl_cv_func_fchownat_empty_filename_works. * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Obey --enable-cross-guesses for gl_cv_func_fdopendir_works. * m4/floor.m4 (gl_FUNC_FLOOR): Obey --enable-cross-guesses for gl_cv_func_floor_ieee. * m4/floorf.m4 (gl_FUNC_FLOORF): Obey --enable-cross-guesses for gl_cv_func_floorf_ieee. * m4/fma.m4 (gl_FUNC_FMA_WORKS): Obey --enable-cross-guesses for gl_cv_func_fma_works. * m4/fmaf.m4 (gl_FUNC_FMAF_WORKS): Obey --enable-cross-guesses for gl_cv_func_fmaf_works. * m4/fmal.m4 (gl_FUNC_FMAL_WORKS): Obey --enable-cross-guesses for gl_cv_func_fmal_works. * m4/fmod.m4 (gl_FUNC_FMOD): Obey --enable-cross-guesses for gl_cv_func_fmod_ieee. * m4/fmodf.m4 (gl_FUNC_FMODF): Obey --enable-cross-guesses for gl_cv_func_fmodf_ieee. * m4/fmodl.m4 (gl_FUNC_FMODL): Obey --enable-cross-guesses for gl_cv_func_fmodl_ieee. * m4/fpurge.m4 (gl_FUNC_FPURGE): Obey --enable-cross-guesses for gl_cv_func_fpurge_works. * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Obey --enable-cross-guesses for gl_cv_func_getcwd_path_max. * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Obey --enable-cross-guesses for gl_cv_func_getcwd_null. (gl_FUNC_GETCWD): Update for getcwd-path-max.m4 change. * m4/getdelim.m4 (gl_FUNC_GETDELIM): Obey --enable-cross-guesses for gl_cv_func_working_getdelim. * m4/getgroups.m4 (AC_FUNC_GETGROUPS): Obey --enable-cross-guesses for ac_cv_func_getgroups_works. Keep this macro also in Autoconf >= 2.70. (gl_FUNC_GETGROUPS): Obey --enable-cross-guesses for gl_cv_func_getgroups_works. * m4/getline.m4 (gl_FUNC_GETLINE): Obey --enable-cross-guesses for am_cv_func_working_getline. * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Obey --enable-cross-guesses for gl_cv_func_getopt_gnu. * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Obey --enable-cross-guesses for gl_cv_func_gettimeofday_clobber. * m4/hypot.m4 (gl_FUNC_HYPOT): Obey --enable-cross-guesses for gl_cv_func_hypot_ieee. * m4/hypotf.m4 (gl_FUNC_HYPOTF): Obey --enable-cross-guesses for gl_cv_func_hypotf_ieee. * m4/hypotl.m4 (gl_FUNC_HYPOTL): Obey --enable-cross-guesses for gl_cv_func_hypotl_ieee. * m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): Obey --enable-cross-guesses for gl_cv_func_iconv_supports_utf. * m4/link.m4 (gl_FUNC_LINK): Obey --enable-cross-guesses for gl_cv_func_link_works. * m4/linkat.m4 (gl_FUNC_LINKAT): Obey --enable-cross-guesses for gl_cv_func_linkat_slash. * m4/log.m4 (gl_FUNC_LOG): Obey --enable-cross-guesses for gl_cv_func_log_ieee. * m4/logf.m4 (gl_FUNC_LOGF): Obey --enable-cross-guesses for gl_cv_func_logf_ieee. * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Obey --enable-cross-guesses for gl_cv_func_logl_works. * m4/log10.m4 (gl_FUNC_LOG10): Obey --enable-cross-guesses for gl_cv_func_log10_ieee. * m4/log10f.m4 (gl_FUNC_LOG10F): Obey --enable-cross-guesses for gl_cv_func_log10f_ieee. * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Obey --enable-cross-guesses for gl_cv_func_log10l_works. * m4/log1p.m4 (gl_FUNC_LOG1P): Obey --enable-cross-guesses for gl_cv_func_log1p_ieee. * m4/log1pf.m4 (gl_FUNC_LOG1PF): Obey --enable-cross-guesses for gl_cv_func_log1pf_ieee. * m4/log1pl.m4 (gl_FUNC_LOG1PL): Obey --enable-cross-guesses for gl_cv_func_log1pl_ieee. * m4/log2.m4 (gl_FUNC_LOG2): Obey --enable-cross-guesses for gl_cv_func_log2_ieee. * m4/log2f.m4 (gl_FUNC_LOG2F): Obey --enable-cross-guesses for gl_cv_func_log2f_ieee. * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Obey --enable-cross-guesses for gl_cv_func_lstat_dereferences_slashed_symlink. * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Obey --enable-cross-guesses for ac_cv_func_malloc_0_nonnull. Keep this macro also in Autoconf >= 2.70. * m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): Obey --enable-cross-guesses for gl_cv_C_locale_sans_EILSEQ. * m4/memchr.m4 (gl_FUNC_MEMCHR): Obey --enable-cross-guesses for gl_cv_func_memchr_works. * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Obey --enable-cross-guesses for gl_cv_func_memmem_works_always. (gl_FUNC_MEMMEM): Obey --enable-cross-guesses for gl_cv_func_memmem_works_fast. * m4/mkdir.m4 (gl_FUNC_MKDIR): Obey --enable-cross-guesses for gl_cv_func_mkdir_trailing_slash_works, gl_cv_func_mkdir_trailing_dot_works. * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Obey --enable-cross-guesses for gl_cv_func_mkfifo_works. * m4/mknod.m4 (gl_FUNC_MKNOD): Obey --enable-cross-guesses for gl_cv_func_mknod_works. * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Obey --enable-cross-guesses for gl_cv_func_working_mkstemp. * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Obey --enable-cross-guesses for gl_cv_func_working_mktime. * m4/modf.m4 (gl_FUNC_MODF): Obey --enable-cross-guesses for gl_cv_func_modf_ieee. * m4/modff.m4 (gl_FUNC_MODFF): Obey --enable-cross-guesses for gl_cv_func_modff_ieee. * m4/modfl.m4 (gl_FUNC_MODFL): Obey --enable-cross-guesses for gl_cv_func_modfl_ieee. * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Obey --enable-cross-guesses for gl_cv_func_nanosleep. * m4/perror.m4 (gl_FUNC_PERROR): Obey --enable-cross-guesses for gl_cv_func_perror_works. * m4/printf.m4 (gl_PRINTF_SIZES_C99): Obey --enable-cross-guesses for gl_cv_func_printf_sizes_c99. (gl_PRINTF_INFINITE): Obey --enable-cross-guesses for gl_cv_func_printf_infinite. (gl_PRINTF_INFINITE_LONG_DOUBLE): Obey --enable-cross-guesses for gl_cv_func_printf_infinite_long_double. (gl_PRINTF_DIRECTIVE_A): Obey --enable-cross-guesses for gl_cv_func_printf_directive_a. (gl_PRINTF_DIRECTIVE_F): Obey --enable-cross-guesses for gl_cv_func_printf_directive_f. (gl_PRINTF_FLAG_ZERO): Obey --enable-cross-guesses for gl_cv_func_printf_flag_zero. (gl_PRINTF_ENOMEM): Obey --enable-cross-guesses for gl_cv_func_printf_enomem. (gl_SNPRINTF_TRUNCATION_C99): Obey --enable-cross-guesses for gl_cv_func_snprintf_truncation_c99. (gl_SNPRINTF_RETVAL_C99): Obey --enable-cross-guesses for gl_cv_func_snprintf_retval_c99. (gl_SNPRINTF_DIRECTIVE_N): Obey --enable-cross-guesses for gl_cv_func_snprintf_directive_n. (gl_VSNPRINTF_ZEROSIZE_C99): Obey --enable-cross-guesses for gl_cv_func_vsnprintf_zerosize_c99. * m4/pselect.m4 (gl_FUNC_PSELECT): Obey --enable-cross-guesses for gl_cv_func_pselect_detects_ebadf. * m4/pthread_rwlock_rdlock.m4 (gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER): Obey --enable-cross-guesses for gl_cv_pthread_rwlock_rdlock_prefer_writer. * m4/ptsname.m4 (gl_FUNC_PTSNAME): Obey --enable-cross-guesses for gl_cv_func_ptsname_sets_errno. * m4/putenv.m4 (gl_FUNC_PUTENV): Obey --enable-cross-guesses for gl_cv_func_svid_putenv. * m4/readlink.m4 (gl_FUNC_READLINK): Obey --enable-cross-guesses for gl_cv_func_readlink_works. * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Obey --enable-cross-guesses for ac_cv_func_realloc_0_nonnull. Keep this macro also in Autoconf >= 2.70. * m4/regex.m4 (gl_REGEX): Obey --enable-cross-guesses for gl_cv_func_re_compile_pattern_working. * m4/remainder.m4 (gl_FUNC_REMAINDER): Obey --enable-cross-guesses for gl_cv_func_remainder_ieee. * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Obey --enable-cross-guesses for gl_cv_func_remainderf_ieee. * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Obey --enable-cross-guesses for gl_cv_func_remainderl_ieee. * m4/rintl.m4 (gl_FUNC_RINTL): Obey --enable-cross-guesses for gl_cv_func_rintl_works. * m4/rmdir.m4 (gl_FUNC_RMDIR): Obey --enable-cross-guesses for gl_cv_func_rmdir_works. * m4/round.m4 (gl_FUNC_ROUND): Obey --enable-cross-guesses for gl_cv_func_round_ieee. * m4/roundf.m4 (gl_FUNC_ROUNDF): Obey --enable-cross-guesses for gl_cv_func_roundf_ieee. * m4/roundl.m4 (gl_FUNC_ROUNDL): Obey --enable-cross-guesses for gl_cv_func_roundl_ieee. * m4/select.m4 (gl_FUNC_SELECT): Obey --enable-cross-guesses for gl_cv_func_select_detects_ebadf. * m4/setenv.m4 (gl_FUNC_SETENV): Obey --enable-cross-guesses for gl_cv_func_setenv_works. (gl_FUNC_UNSETENV): Obey --enable-cross-guesses for gl_cv_func_unsetenv_works. * m4/signbit.m4 (gl_SIGNBIT): Obey --enable-cross-guesses for gl_cv_func_signbit, gl_cv_func_signbit_gcc. * m4/sleep.m4 (gl_FUNC_SLEEP): Obey --enable-cross-guesses for gl_cv_func_sleep_works. * m4/stat.m4 (gl_FUNC_STAT): Obey --enable-cross-guesses for gl_cv_func_stat_file_slash. * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Obey --enable-cross-guesses for gl_cv_func_stpncpy. * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Obey --enable-cross-guesses for gl_cv_func_strcasestr_works_always. (gl_FUNC_STRCASESTR): Obey --enable-cross-guesses for gl_cv_func_strcasestr_linear. * m4/strerror.m4 (gl_FUNC_STRERROR): Obey --enable-cross-guesses for gl_cv_func_working_strerror. (gl_FUNC_STRERROR_0): Obey --enable-cross-guesses for gl_cv_func_strerror_0_works. * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Obey --enable-cross-guesses for gl_cv_func_strerror_r_works. * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Obey --enable-cross-guesses for gl_cv_func_strstr_works_always. (gl_FUNC_STRSTR): Obey --enable-cross-guesses for gl_cv_func_strstr_linear. * m4/strtod.m4 (gl_FUNC_STRTOD): Obey --enable-cross-guesses for gl_cv_func_strtod_works. * m4/strtold.m4 (gl_FUNC_STRTOLD): Obey --enable-cross-guesses for gl_cv_func_strtold_works. * m4/symlink.m4 (gl_FUNC_SYMLINK): Obey --enable-cross-guesses for gl_cv_func_symlink_works. * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Obey --enable-cross-guesses for gl_cv_func_symlinkat_works. * m4/trunc.m4 (gl_FUNC_TRUNC): Obey --enable-cross-guesses for gl_cv_func_trunc_ieee. * m4/truncf.m4 (gl_FUNC_TRUNCF): Obey --enable-cross-guesses for gl_cv_func_truncf_ieee. * m4/truncl.m4 (gl_FUNC_TRUNCL): Obey --enable-cross-guesses for gl_cv_func_truncl_ieee. * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Obey --enable-cross-guesses for gl_cv_func_tzset_clobber. * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Obey --enable-cross-guesses for gl_cv_func_ungetc_works. * m4/unlink.m4 (gl_FUNC_UNLINK): Obey --enable-cross-guesses for gl_cv_func_unlink_honors_slashes, gl_cv_func_unlink_parent_fails. * m4/usleep.m4 (gl_FUNC_USLEEP): Obey --enable-cross-guesses for gl_cv_func_usleep_works. * m4/utimens.m4 (gl_UTIMENS): Obey --enable-cross-guesses for gl_cv_func_futimesat_works. * m4/utimes.m4 (gl_FUNC_UTIMES): Obey --enable-cross-guesses for gl_cv_func_working_utimes. * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Obey --enable-cross-guesses for gl_cv_func_wcwidth_works. * m4/glob.m4 (gl_GLOB): When cross-compiling, don't create symlinks for testing. Obey --enable-cross-guesses for gl_cv_glob_lists_symlinks. * m4/rename.m4 (gl_FUNC_RENAME): When cross-compiling, don't create links for testing. Obey --enable-cross-guesses for gl_cv_func_rename_slash_dst_works, gl_cv_func_rename_slash_src_works, gl_cv_func_rename_link_works, gl_cv_func_rename_dest_works.
* Clarify that cross-compilation guesses are guesses.Bruno Haible2019-09-091-3/+13
| | | | | * m4/threads.m4 (gl_THREADS_H): Say "guessing yes" or "guessing no" when cross-compiling.
* chown: Fix configure output (regression from 2019-03-23).Bruno Haible2019-09-081-4/+5
| | | | | * m4/chown.m4 (gl_FUNC_CHOWN): Fix reference to gl_cv_func_chown_follows_symlink variable.
* findprog-in: New module.Bruno Haible2019-09-081-0/+11
| | | | | | | | | Suggested by Paul Smith <psmith@gnu.org>. * lib/findprog.h (find_in_given_path): New declaration. * lib/findprog-in.c: New file, based on lib/findprog.c. * m4/findprog-in.m4: New file, based on m4/findprog.m4. * modules/findprog-in: New file.
* findprog: Remove test that is obsolete since 2006-04-24.Bruno Haible2019-09-081-2/+1
| | | | * m4/findprog.m4 (gl_FINDPROG): Don't test for unistd.h.
* lock: Fix cross-compilation guesses.Bruno Haible2019-08-301-3/+23
| | | | | | * m4/pthread_rwlock_rdlock.m4 (gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER): Require AC_CANONICAL_HOST. When cross-compiling, guess no on most platforms.
* crypto/gc-sm3: Fix compilation error with --with-libgcrypt.Bruno Haible2019-08-241-1/+16
| | | | | | | | | * m4/gc-sm3.m4 (gl_GC_SM3): Test whether libgcrypt supports SM3. Define LIBGCRYPT_HAS_MD_SM3. * lib/gc-libgcrypt.c: Include sm3.h. (_gc_hash_ctx, gc_hash_open, gc_hash_hmac_setkey, gc_hash_write, gc_hash_read, gc_hash_close, gc_hash_buffer, gc_sm3): Use the gnulib implementation if libgcrypt does not support SM3.
* crypto/gc: Fix link error with --with-libgcrypt.Bruno Haible2019-08-241-3/+6
| | | | | * m4/gc.m4 (gl_GC): Set LIB_CRYPTO to the value found by the AC_LIB_HAVE_LINKFLAGS invocation.
* gc: Fix configuration with --with-libgcrypt.Bruno Haible2019-08-242-4/+170
| | | | | | * m4/libgcrypt.m4: New file, copied from libgcrypt/src/libgcrypt.m4. * modules/crypto/gc (Files): Add it. * m4/gc.m4 (gl_GC): Assume AM_PATH_LIBGCRYPT is defined.
* Remove unused file.Bruno Haible2019-08-241-12/+0
| | | | * m4/stat-macros.m4: Remove file.
* Defeat -flto GCC optimization in math autoconf tests.Bruno Haible2019-08-1812-36/+36
| | | | | | | | | | | | | | | | | | Reported by Tomasz Kłoczko <kloczko.tomasz@gmail.com> at <https://savannah.gnu.org/bugs/?56109>. * m4/mathfunc.m4 (gl_MATHFUNC): Mark function pointer as 'volatile'. * m4/acosl.m4 (gl_FUNC_ACOSL): Likewise. * m4/asinl.m4 (gl_FUNC_ASINL): Likewise. * m4/atanl.m4 (gl_FUNC_ATANL): Likewise. * m4/cosl.m4 (gl_FUNC_COSL): Likewise. * m4/exp2.m4 (gl_FUNC_EXP2): Likewise. * m4/expl.m4 (gl_FUNC_EXPL): Likewise. * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise. * m4/expm1l.m4 (gl_FUNC_EXPM1L): Likewise. * m4/sinl.m4 (gl_FUNC_SINL): Likewise. * m4/sqrtl.m4 (gl_FUNC_SQRTL): Likewise. * m4/tanl.m4 (gl_FUNC_TANL): Likewise.
* parse-datetime: Require Bison 2.4 or newer.Bruno Haible2019-07-201-1/+32
| | | | | | | * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Set PARSE_DATETIME_BISON. Code taken from gettext's intl.m4. * modules/parse-datetime (Makefile.am): Use PARSE_DATETIME_BISON instead of YACC.
* pthread: Turn into a convenience module.Bruno Haible2019-07-151-1/+0
| | | | | | | | | | | | * lib/pthread.in.h: Remove declarations for extern inline functions. * lib/pthread.c: Remove file. * modules/pthread (Files): Remove it. (Depends-on): Add pthread-thread, pthread-once, pthread-mutex, pthread-rwlock, pthread-cond, pthread-tss, pthread-spin. (configure.ac): Don't compile lib/pthread.c. Don't set GNULIB_PTHREAD. * m4/pthread_h.m4 (gl_PTHREAD_H_DEFAULTS): Don't initialize GNULIB_PTHREAD. * modules/pthread-h (Makefile.am): Don't substitute GNULIB_PTHREAD.
* pthread-spin: New module.Bruno Haible2019-07-151-0/+30
| | | | | | | | | | | | | | * lib/pthread.in.h (pthread_spin_init, pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock): Remove inline definitions. * lib/pthread-spin.c: New file. * m4/pthread-spin.m4: New file. * modules/pthread-spin: New file. * doc/posix-functions/pthread_spin_init.texi: Mention the new module. * doc/posix-functions/pthread_spin_lock.texi: Likewise. * doc/posix-functions/pthread_spin_trylock.texi: Likewise. * doc/posix-functions/pthread_spin_unlock.texi: Likewise. * doc/posix-functions/pthread_spin_destroy.texi: Likewise.
* pthread-tss: New module.Bruno Haible2019-07-151-0/+28
| | | | | | | | | | * lib/pthread-tss.c: New file. * m4/pthread-tss.m4: New file. * modules/pthread-tss: New file. * doc/posix-functions/pthread_key_create.texi: Mention the new module. * doc/posix-functions/pthread_setspecific.texi: Likewise. * doc/posix-functions/pthread_getspecific.texi: Likewise. * doc/posix-functions/pthread_key_delete.texi: Likewise.
* pthread-cond: New module.Bruno Haible2019-07-151-0/+36
| | | | | | | | | | | | | | | | * lib/pthread.in.h (pthread_cond_destroy, pthread_cond_init, pthread_cond_signal, pthread_cond_wait): Remove inline definitions. * lib/pthread-cond.c: New file. * m4/pthread-cond.m4: New file. * modules/pthread-cond: New file. * doc/posix-functions/pthread_cond_init.texi: Mention the new module. * doc/posix-functions/pthread_condattr_init.texi: Likewise. * doc/posix-functions/pthread_condattr_destroy.texi: Likewise. * doc/posix-functions/pthread_cond_wait.texi: Likewise. * doc/posix-functions/pthread_cond_timedwait.texi: Likewise. * doc/posix-functions/pthread_cond_signal.texi: Likewise. * doc/posix-functions/pthread_cond_broadcast.texi: Likewise. * doc/posix-functions/pthread_cond_destroy.texi: Likewise.
* pthread-rwlock: New module.Bruno Haible2019-07-151-0/+91
| | | | | | | | | | | | | | | | | | * lib/pthread-rwlock.c: New file, based on lib/glthread/lock.c. * m4/pthread-rwlock.m4: New file. * modules/pthread-rwlock: New file. * doc/posix-functions/pthread_rwlock_init.texi: Mention the new module and the Android problem. * doc/posix-functions/pthread_rwlockattr_init.texi: Likewise. * doc/posix-functions/pthread_rwlockattr_destroy.texi: Likewise. * doc/posix-functions/pthread_rwlock_rdlock.texi: Likewise. * doc/posix-functions/pthread_rwlock_wrlock.texi: Likewise. * doc/posix-functions/pthread_rwlock_tryrdlock.texi: Likewise. * doc/posix-functions/pthread_rwlock_trywrlock.texi: Likewise. * doc/posix-functions/pthread_rwlock_timedrdlock.texi: Likewise. * doc/posix-functions/pthread_rwlock_timedwrlock.texi: Likewise. * doc/posix-functions/pthread_rwlock_unlock.texi: Likewise. * doc/posix-functions/pthread_rwlock_destroy.texi: Likewise.
* pthread-mutex: New module.Bruno Haible2019-07-151-0/+44
| | | | | | | | | | | | | | | | | | | | | | * lib/pthread.in.h (pthread_mutexattr_destroy, pthread_mutexattr_init, pthread_mutexattr_settype, pthread_mutex_destroy, pthread_mutex_init, pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_timedlock, pthread_mutex_unlock): Remove inline definitions. * lib/pthread-mutex.c: New file. * m4/pthread-mutex.m4: New file. * modules/pthread-mutex: New file. * doc/posix-functions/pthread_mutex_init.texi: Mention the new module. * doc/posix-functions/pthread_mutexattr_init.texi: Likewise. * doc/posix-functions/pthread_mutexattr_gettype.texi: Likewise. * doc/posix-functions/pthread_mutexattr_settype.texi: Likewise. * doc/posix-functions/pthread_mutexattr_getrobust.texi: Likewise. * doc/posix-functions/pthread_mutexattr_setrobust.texi: Likewise. * doc/posix-functions/pthread_mutexattr_destroy.texi: Likewise. * doc/posix-functions/pthread_mutex_lock.texi: Likewise. * doc/posix-functions/pthread_mutex_trylock.texi: Likewise. * doc/posix-functions/pthread_mutex_timedlock.texi: Likewise. * doc/posix-functions/pthread_mutex_unlock.texi: Likewise. * doc/posix-functions/pthread_mutex_destroy.texi: Likewise.
* pthread-once: New module.Bruno Haible2019-07-151-0/+22
| | | | | | | * lib/pthread-once.c: New file. * m4/pthread-once.m4: New file. * modules/pthread-once: New file. * doc/posix-functions/pthread_once.texi: Mention the new module.
* pthread-thread: New module.Bruno Haible2019-07-151-0/+69
| | | | | | | | | | | | | | | | | | * lib/pthread.in.h (pthread_create, pthread_exit, pthread_join): Remove inline definitions. * lib/pthread-thread.c: New file. * m4/pthread-thread.m4: New file. * modules/pthread-thread: New file. * doc/posix-functions/pthread_create.texi: Mention the new module. * doc/posix-functions/pthread_attr_init.texi: Likewise. * doc/posix-functions/pthread_attr_getdetachstate.texi: Likewise. * doc/posix-functions/pthread_attr_setdetachstate.texi: Likewise. * doc/posix-functions/pthread_attr_destroy.texi: Likewise. * doc/posix-functions/pthread_self.texi: Likewise. * doc/posix-functions/pthread_equal.texi: Likewise. * doc/posix-functions/pthread_detach.texi: Likewise. * doc/posix-functions/pthread_join.texi: Likewise. * doc/posix-functions/pthread_exit.texi: Likewise.
* pthread-h: Prepare for adding new modules.Bruno Haible2019-07-151-2/+68
| | | | | | | | | | | | | | * lib/pthread.in.h: Define the types and macros for each of the facilities separately. * m4/pthread_h.m4 (gl_PTHREAD_H): Set HAVE_PTHREAD_CREATE_DETACHED, HAVE_PTHREAD_MUTEX_RECURSIVE, HAVE_PTHREAD_MUTEX_ROBUST, HAVE_PTHREAD_PROCESS_SHARED. (gl_PTHREAD_H_DEFAULTS): Initialize HAVE_PTHREAD_CREATE_DETACHED, HAVE_PTHREAD_MUTEX_RECURSIVE, HAVE_PTHREAD_MUTEX_ROBUST, HAVE_PTHREAD_PROCESS_SHARED. * modules/pthread-h (Makefile.am): Substitute HAVE_PTHREAD_CREATE_DETACHED, HAVE_PTHREAD_MUTEX_RECURSIVE, HAVE_PTHREAD_MUTEX_ROBUST, HAVE_PTHREAD_PROCESS_SHARED.
* pthread-h: Add declarations of essential pthread functions.Bruno Haible2019-07-151-7/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/pthread.in.h: Include snippets. (pthread_create, pthread_attr_init, pthread_attr_getdetachstate, pthread_attr_setdetachstate, pthread_attr_destroy, pthread_self, pthread_equal, pthread_detach, pthread_join, pthread_exit, pthread_once, pthread_mutex_init, pthread_mutexattr_init, pthread_mutexattr_gettype, pthread_mutexattr_settype, pthread_mutexattr_getrobust, pthread_mutexattr_setrobust, pthread_mutexattr_destroy, pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_unlock, pthread_mutex_destroy, pthread_rwlock_init, pthread_rwlockattr_init, pthread_rwlockattr_destroy, pthread_rwlock_rdlock, pthread_rwlock_wrlock, pthread_rwlock_tryrdlock, pthread_rwlock_trywrlock, pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock, pthread_rwlock_unlock, pthread_rwlock_destroy, pthread_cond_init, pthread_condattr_init, pthread_condattr_destroy, pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal, pthread_cond_broadcast, pthread_cond_destroy, pthread_key_create, pthread_setspecific, pthread_getspecific, pthread_key_delete, pthread_spin_init, pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock, pthread_spin_destroy): New declarations. (pthread_mutex_timedlock): Move declaration. * m4/pthread_h.m4 (gl_PTHREAD_H): Check whether the new functions are declared. (gl_PTHREAD_H_DEFAULTS): Initialize GNULIB_PTHREAD_THREAD, GNULIB_PTHREAD_ONCE, GNULIB_PTHREAD_MUTEX, GNULIB_PTHREAD_RWLOCK, GNULIB_PTHREAD_COND, GNULIB_PTHREAD_TSS, GNULIB_PTHREAD_SPIN and the HAVE_* and REPLACE_* variables for the new functions. * modules/pthread-h (Depends-on): Add snippet/c++defs, snippet/_Noreturn, snippet/arg-nonnull, snippet/warn-on-use. (Makefile.am): Substitute GNULIB_PTHREAD_THREAD, GNULIB_PTHREAD_ONCE, GNULIB_PTHREAD_MUTEX, GNULIB_PTHREAD_RWLOCK, GNULIB_PTHREAD_COND, GNULIB_PTHREAD_TSS, GNULIB_PTHREAD_SPIN and the HAVE_* and REPLACE_* variables for the new functions. Split the sed script, to avoid the limit of 99 commands of HP-UX sed. * tests/test-pthread-c++.cc: Check the signature of the new functions.
* pthread-h: Respect --enable-threads={posix|windows} option on mingw.Bruno Haible2019-07-151-36/+8
| | | | | | | | | | | * m4/pthread_h.m4 (gl_PTHREAD_H): Require gl_THREADLIB. Set HAVE_PTHREAD_H if gl_threads_api is 'windows'. (LIB_PTHREAD): Rely on $LIBMULTITHREAD from threadlib.m4. * modules/pthread (Link): Change to $(LIBMULTITHREAD). * modules/pthread-h (Depends-on): Add threadlib. (Link): Change to $(LIBTHREAD). * modules/pthread-h-c++-tests (test_pthread_c___LDADD): Use $(LIBMULTITHREAD) instead of $(LIB_PTHREAD).
* pthread-h: New module.Bruno Haible2019-07-153-116/+97
| | | | | | | | | | | | | | | | | * lib/pthread.in.h: Define replacement functions only if GNULIB_PTHREAD is 1. * m4/pthread_h.m4: Renamed from m4/pthread.m4. (gl_PTHREAD_H): Renamed from gl_PTHREAD_CHECK. Don't test whether <pthread.h> pollutes the namespace; instead, prepare for generating a pthread.h always. Substitute HAVE_PTHREAD_H here. (gl_PTHREAD_H_DEFAULTS): Renamed from gl_PTHREAD_DEFAULTS. Initialize GNULIB_PTHREAD. Don't initialize HAVE_PTHREAD_H here. * modules/pthread-h: New file, based on modules/pthread. * modules/pthread: Rely on 'pthread-h'. * m4/pthread_mutex_timedlock.m4 (gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK): Update. * modules/pthread_mutex_timedlock (Depends-on): Add pthread-h. Remove pthread.
* sched_yield: New module.Bruno Haible2019-07-152-59/+98
| | | | | | | | | | | | | | | | | * lib/sched.in.h: Add _GL_FUNCDECL_RPL, _GL_WARN_ON_USE placeholders. (sched_yield): New declaration. * lib/sched_yield.c: New file. * m4/sched_yield.m4: New file. * m4/sched_h.m4 (gl_SCHED_H): Require gl_SCHED_H_DEFAULTS. Arrange to provide a replacement sched.h always. Test whether sched_yield is declared. (gl_SCHED_MODULE_INDICATOR, gl_SCHED_H_DEFAULTS): New macros. * modules/sched (Depends-on): Add snippet/c++defs, snippet/warn-on-use. (Makefile.am): Provide a replacement sched.h always. Substitute GNULIB_SCHED_YIELD, HAVE_SCHED_YIELD, REPLACE_SCHED_YIELD, _GL_FUNCDECL_RPL, _GL_WARN_ON_USE. * modules/sched_yield: New file. * doc/posix-functions/sched_yield.texi: Mention the new module.
* thread, lock, cond, tls: Remove support for Pth threads.Bruno Haible2019-07-063-48/+8
| | | | | | | | | | | | | | | | | | | | | | | | * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Don't document --enable-threads=pth any more. (gl_THREADLIB_BODY): Don't set USE_PTH_THREADS any more. * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Update comment. * m4/threads.m4 (gl_THREADS_H): Remove test for conflict between Pth threads and ISO C11 threads. * lib/glthread/thread.h: Remove code for USE_PTH_THREADS. * lib/glthread/lock.h: Likewise. * lib/glthread/lock.c: Likewise. * lib/glthread/cond.h: Likewise. * lib/glthread/cond.c: Likewise. * lib/glthread/tls.h: Likewise. * lib/glthread/tls.c: Likewise. * lib/glthread/yield.h: Likewise. * lib/regex_internal.h: Likewise. * tests/test-thread_create.c: Likewise. * tests/test-lock.c: Likewise. * tests/test-cond.c: Likewise. * tests/test-tls.c: Likewise. * tests/test-rwlock1.c: Don't include glthread/yield.h. (main): Sleep without calling gl_thread_yield.
* thread, lock, cond, tls: Remove support for old Solaris threads.Bruno Haible2019-07-061-36/+4
| | | | | | | | | | | | | | | | | | | | | | Solaris >= 2.5.1 has POSIX threads. * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Don't document --enable-threads=solaris any more. (gl_THREADLIB_BODY): Don't set USE_SOLARIS_THREADS any more. * lib/glthread/thread.c: Update comment. * lib/glthread/thread.h: Remove code for USE_SOLARIS_THREADS. * lib/glthread/lock.h: Likewise. * lib/glthread/lock.c: Likewise. * lib/glthread/cond.h: Likewise. * lib/glthread/cond.c: Likewise. * lib/glthread/tls.h: Likewise. * lib/glthread/tls.c: Likewise. * lib/glthread/yield.h: Likewise. * lib/regex_internal.h: Likewise. * tests/test-thread_create.c: Likewise. * tests/test-lock.c: Likewise. * tests/test-cond.c: Likewise. * tests/test-tls.c: Likewise.
* inet_ntop, inet_pton: Avoid conflict with native Windows functions.Bruno Haible2019-06-302-9/+23
| | | | | | | | | | | * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_WS2TCPIP): New macro, extracted from gl_PREREQ_SYS_H_SOCKET. (gl_PREREQ_SYS_H_SOCKET): Invoke it. * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Invoke gl_PREREQ_SYS_H_WS2TCPIP. * modules/arpa_inet (Files): Add m4/sys_socket_h.m4, m4/socklen.m4. (Makefile.am): Substitute HAVE_WS2TCPIP_H. * lib/arpa_inet.in.h: Include <ws2tcpip.h>.
* inet_ntop, inet_pton: Forward-compatibility with newer Windows versions.Bruno Haible2019-06-302-10/+12
| | | | | | | * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): On native Windows, set REPLACE_INET_NTOP to 1 always. * m4/inet_pton.m4 (gl_FUNC_INET_PTON): On native Windows, set REPLACE_INET_PTON to 1 always.
* poll-h: Fix compilation error on mingw with _WIN32_WINNT >= 0x0600.Bruno Haible2019-06-301-1/+3
| | | | | | | | | | Reported by Hannes Müller <h.c.f.mueller@gmx.de>. * lib/poll.in.h: Include <winsock2.h>. (POLL*, pollfd): Override on native Windows. * m4/poll_h.m4 (gl_POLL_H): Invoke gl_PREREQ_SYS_H_WINSOCK2. * modules/poll-h (Files): Add m4/sys_socket_h.m4. (Makefile.am): Substitute HAVE_WINSOCK2_H.
* accept4: Fix compilation error on OpenIndiana.Bruno Haible2019-06-291-3/+6
| | | | | | | | Reported by Michal Nowak <mnowak@startmail.com> via Mark H Weaver <mhw@netris.org>. * m4/accept.m4 (gl_FUNC_ACCEPT4): Test whether accept4 is declared, not whether it exists as a function.
* threads-h: Define 'thread_local' if and only it actually works.Bruno Haible2019-06-211-11/+73
| | | | | | | | | | | | | | | | | | | * m4/threads.m4 (gl_THREAD_LOCAL_DEFINITION): New macro. (gl_THREADS_H): Define _Thread_local to __thread also for ARM C, IBM C, Oracle Solaris Studio C. Compile a simple program, to see whether _Thread_local basically works. Set HAVE_THREAD_LOCAL and LIBTHREADLOCAL. (gl_THREADS_H_DEFAULTS): Initialize HAVE_THREAD_LOCAL. * lib/threads.in.h (thread_local): Undefine if it does not work. * modules/threads-h (Makefile.am): Substitute HAVE_THREAD_LOCAL. (Link): Mention LIBTHREADLOCAL. * tests/test-threads.c: Don't check that thread_local is defined. * tests/test-thread_local.c: New file. * modules/threads-h-tests (Files): Add it and macros.h. (Depends-on): Add thrd and stdint. (configure.ac): Test whether 'alarm' is declared. (Makefile.am): Arrange to build and link test-thread_local. * doc/posix-headers/threads.texi: Mention the platforms that don't support 'thread_local'.
* threads-h: Simplify link dependencies.Bruno Haible2019-06-211-7/+7
| | | | | | | | | | * m4/threads.m4 (gl_THREADS_H): Bail out if Pth threading is requested. Don't set LTLIBSTDTHREAD. * modules/thrd (Link): Simplify accordingly. * modules/mtx (Link): Likewise. * modules/cnd (Link): Likewise. * modules/tss (Link): Likewise. * modules/threads (Link): Likewise.
* threads-h: Fix link error on FreeBSD 11.Bruno Haible2019-06-211-4/+5
| | | | | * m4/threads.m4 (gl_THREADS_H): When linking with -lstdthreads, link also with -lpthread.
* threadlib: Fix typo (regression from today).Bruno Haible2019-06-211-1/+1
| | | | * m4/threadlib.m4 (gl_THREADLIB_BODY): Fix typo in comment marker.
* thrd: New module.Bruno Haible2019-06-201-0/+63
| | | | | | | | | | | | | | | | * lib/thrd.c: New file. * m4/thrd.m4: New file. * modules/thrd: New file. * doc/posix-functions/thrd_current.texi: Mention the new module. * doc/posix-functions/thrd_detach.texi: Likewise. * doc/posix-functions/thrd_equal.texi: Likewise. * doc/posix-functions/thrd_exit.texi: Likewise. * doc/posix-functions/thrd_sleep.texi: Likewise. * doc/posix-functions/thrd_yield.texi: Likewise. * doc/posix-functions/thrd_create.texi: Mention the new module and the AIX bug. * doc/posix-functions/thrd_join.texi: Mention the new module and the AIX and Solaris bugs.
* threads-h: New module.Bruno Haible2019-06-202-2/+128
| | | | | | | | | | * lib/threads.in.h: New file. * m4/threads.m4: New file. * m4/yield.m4 (gl_YIELD): Update comment. * modules/threads-h: New file. * modules/yields (configure.ac): Use AC_REQUIRE. * doc/posix-headers/threads.texi: Mention the new module and the AIX bugs.
* pthread_mutex_timedlock: New module.Bruno Haible2019-06-202-9/+36
| | | | | | | | | | | | | | | | | | * lib/pthread.in.h (pthread_mutex_timedlock): New dummy function and new declaration. * lib/pthread_mutex_timedlock.c: New file. * m4/pthread_mutex_timedlock.m4: New file. * m4/pthread.m4 (gl_PTHREAD_CHECK): Don't call AC_LIBOBJ here. Test whether pthread_mutex_timedlock is declared. (gl_PTHREAD_MODULE_INDICATOR): New macro. (gl_PTHREAD_DEFAULTS): Initialize GNULIB_PTHREAD_MUTEX_TIMEDLOCK, HAVE_PTHREAD_MUTEX_TIMEDLOCK. * modules/pthread (configure.ac): Call AC_LIBOBJ here. (Makefile.am): Substitute GNULIB_PTHREAD_MUTEX_TIMEDLOCK, HAVE_PTHREAD_MUTEX_TIMEDLOCK. * modules/pthread_mutex_timedlock: New file. * doc/posix-functions/pthread_mutex_timedlock.texi: Mention the new module.
* thread, lock, cond, tls: Recognize C11 multithreaded applications.Bruno Haible2019-06-201-1/+8
| | | | | | | | | | | | * m4/threadlib.m4 (gl_THREADLIB_BODY): Test for <threads.h>. * lib/glthread/thread.h (c11_threads_in_use): New macro. (pthread_in_use, pth_in_use, thread_in_use): Use it. * lib/glthread/lock.h (c11_threads_in_use): New macro. (pthread_in_use, pth_in_use, thread_in_use): Use it. * lib/glthread/cond.h (c11_threads_in_use): New macro. (pthread_in_use, pth_in_use, thread_in_use): Use it. * lib/glthread/tls.h (c11_threads_in_use): New macro. (pthread_in_use, pth_in_use, thread_in_use): Use it.
* posix_spawn_file_actions_addfchdir: New module.Bruno Haible2019-06-103-25/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/spawn.in.h (posix_spawn_file_actions_addfchdir): New declaration. * lib/spawn_int.h (struct __spawn_action): Add tag 'spawn_do_fchdir' and union member 'fchdir_action'. * lib/spawn_faction_addfchdir.c: New file. * lib/spawni.c (__spawni): Implement the spawn_do_fchdir action. * m4/posix_spawn_faction_addfchdir.m4: New file. * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test whether module 'posix_spawn_file_actions_addfchdir' is present and whether posix_spawn_file_actions_addfchdir_np exists. Set REPLACE_POSIX_SPAWN. * m4/spawn_h.m4 (gl_SPAWN_H): Test whether posix_spawn_file_actions_addfchdir is declared. (gl_SPAWN_H_DEFAULTS): Initialize GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR, HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR, REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR. * modules/spawn (Makefile.am): Substitute GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR, HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR, REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR. * modules/posix_spawn_file_actions_addfchdir: New file. * tests/test-spawn-c++.cc (posix_spawn_file_actions_addfchdir): Check signature. * doc/posix-functions/posix_spawn.texi: Mention the new module. * doc/posix-functions/posix_spawnp.texi: Likewise. * doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi: Likewise.
* copy-file-range: simplify into a stubPaul Eggert2019-06-061-2/+20
| | | | | | | | | | | | | | | Based on a comment by Florian Weimer in: https://lists.gnu.org/r/bug-gnulib/2019-06/msg00007.html It turns out that Emacs (which will use this module) won’t need an emulation and I suspect other programs won’t either, because these programs will need to fall back on read+write anyway. Perhaps I am wrong and other programs will be able to use an emulation; if so, this patch can be reverted. * lib/copy-file-range.c (COPY_FILE_RANGE): Replace with a stub. Just call it copy_file_range. * m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE): Check via AC_LINK_IFELSE. * modules/copy-file-range (Depends-on): Remove modules no longer used.
* copy-file-range: new modulePaul Eggert2019-06-042-1/+21
| | | | | | | | | | * MODULES.html.sh: Add copy-file-range. * lib/copy-file-range.c, m4/copy-file-range.m4: * modules/copy-file-range: New files. * lib/unistd.in.h (copy_file_range): Declare. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set up GNULIB_COPY_FILE_RANGE and HAVE_COPY_FILE_RANGE. * modules/unistd (unistd.h): Substitute them.
* flexmember: update comments againPaul Eggert2019-05-241-9/+3
| | | | * lib/flexmember.h, m4/flexmember.m4: Improve comments further.
* flexmember: update commentPaul Eggert2019-05-241-3/+7
| | | | * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER): Improve comment.