summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* autoupdateKarl Berry2019-09-221-4/+4
|
* autoupdateKarl Berry2019-09-181-3/+9
|
* findprog-in: Set errno when the search fails.Paul Smith2019-09-153-4/+36
| | | | | | | * lib/findprog-in.c: Include <errno.h>. (find_in_given_path): Set errno before returning NULL. * lib/findprog.h (find_in_given_path): Update comment accordingly. Define the term "slash".
* findprog, findprog-lgpl, findprog-in: Fix crash on MSVC.Bruno Haible2019-09-154-0/+10
| | | | | | * modules/findprog (Depends-on): Add access. * modules/findprog-lgpl (Depends-on): Likewise. * modules/findprog-in (Depends-on): Likewise.
* access: Add tests.Bruno Haible2019-09-153-0/+97
| | | | | * tests/test-access.c: New file. * modules/access-tests: New file.
* access: New module.Bruno Haible2019-09-159-8/+126
| | | | | | | | | | | | | * 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.
* fcntl-h: Fix compilation error of creat.c on MSVC.Bruno Haible2019-09-152-6/+18
| | | | | * lib/fcntl.in.h: Include <io.h> also when __need_system_fcntl_h is defined.
* creat: Add tests.Bruno Haible2019-09-153-0/+78
| | | | | * tests/test-creat.c: New file, based on tests/test-open.h. * modules/creat-tests: New file.
* creat: New module.Bruno Haible2019-09-1512-47/+250
| | | | | | | | | | | | | | | | * 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.
* open tests: Enhance test.Bruno Haible2019-09-152-0/+15
| | | | | * tests/test-open.h (test_open): Test the creation of an executable regular file. Also improve initial cleanup.
* intprops tests: Avoid build failure with HP-UX cc.Bruno Haible2019-09-152-0/+8
| | | | | * tests/test-intprops.c: Disable a check that makes HP cc choke with "error 4018: Macro param too large after substitution - use -H option.".
* autoupdateKarl Berry2019-09-141-1/+1
|
* Make autoconf tests work with -Werror=implicit-function-declaration.Bruno Haible2019-09-143-6/+17
| | | | | | | * 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.
* findprog-in: Better mimic the system on native Windows.Bruno Haible2019-09-142-4/+13
| | | | | | | Reported by Paul Smith <psmith@gnu.org>. * lib/findprog-in.c (find_in_given_path): On native Windows, don't try non-empty suffixes when the file name already contains a '.'.
* autoupdateKarl Berry2019-09-121-1/+4
|
* wctob: Fix autoconf test.Bruno Haible2019-09-102-1/+8
| | | | | | Based on patch by Florian Weimer <fweimer@redhat.com>. * m4/wctob.m4 (gl_FUNC_WCTOB): Include <stdlib.h> before using mbtowc.
* xhash: provide hash_xinitializeAkim Demaille2019-09-104-0/+72
| | | | | | | | Suggested by Egor Pugin <egor.pugin@gmail.com> https://lists.gnu.org/archive/html/bison-patches/2019-09/msg00026.html * modules/xhash, lib/xhash.c: New. * lib/hash.h (hash_xinitialize): New.
* findprog-in: Make exec optimization optional.Bruno Haible2019-09-093-22/+97
| | | | | | * lib/findprog.h: Add double-inclusion guard. Include <stdbool.h>. (find_in_given_path): Add optimize_for_exec parameter. * lib/findprog-in.c (find_in_given_path): Likewise.
* Add option to assume the best, not the worst, when cross-compiling.Bruno Haible2019-09-09108-424/+713
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-092-3/+19
| | | | | * 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-082-4/+11
| | | | | * m4/chown.m4 (gl_FUNC_CHOWN): Fix reference to gl_cv_func_chown_follows_symlink variable.
* findprog-in: New module.Bruno Haible2019-09-085-5/+246
| | | | | | | | | 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 unused dependency.Bruno Haible2019-09-082-1/+5
| | | | * modules/findprog (Depends-on): Remove strdup.
* findprog: Remove test that is obsolete since 2006-04-24.Bruno Haible2019-09-082-2/+6
| | | | * m4/findprog.m4 (gl_FINDPROG): Don't test for unistd.h.
* bitset: style changesAkim Demaille2019-09-085-9/+15
| | | | | | | * lib/bitset/vector.c (vbitset_resize): Factor computation. * lib/bitset.c, lib/bitset/stats.c, lib/bitsetv.c: Prefer xzalloc to xcalloc. Suggested by Paul Eggert.
* bitset: check memory allocationAkim Demaille2019-09-083-6/+28
| | | | | | | | | | | Reported by 江 祖铭 (Zu-Ming Jiang). With help from Paul Eggert. https://lists.gnu.org/archive/html/bug-bison/2019-08/msg00016.html * lib/bitset/table.c (tbitset_resize): When growing, use xrealloc instead of realloc. When shrinking, accept failures. * lib/bitset/vector.c (vbitset_resize): Likewise.
* scratch_buffer: sync from glibcPaul Eggert2019-09-075-6/+17
| | | | | | * config/srclist.txt: Add the scratch_buffer source code from glibc, since these should be in sync. Autoupdate.
* doc: Update for glibc 2.30.Bruno Haible2019-09-0713-5/+257
| | | | | | | | | | | | | | | * doc/glibc-functions/gettid.texi: New file. * doc/glibc-functions/pthread_cond_clockwait.texi: New file. * doc/glibc-functions/pthread_mutex_clocklock.texi: New file. * doc/glibc-functions/pthread_rwlock_clockrdlock.texi: New file. * doc/glibc-functions/pthread_rwlock_clockwrlock.texi: New file. * doc/glibc-functions/sem_clockwait.texi: New file. * doc/glibc-functions/tgkill.texi: New file. * doc/glibc-functions/twalk_r.texi: New file. * doc/gnulib.texi: Include them. (Glibc semaphore.h): New section. * doc/pastposix-functions/h_errno.texi: Update. * doc/posix-functions/*.texi: Likewise.
* symlink tests: Avoid test failure on Linux with Lustre file system.Bruno Haible2019-09-072-1/+9
| | | | | | | Reported by Thomas C Oppe <Thomas.C.Oppe@erdc.dren.mil> at <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37312>. * tests/test-symlink.h (test_symlink): Accept errno value ENOENT.
* gitsub.sh: Add support for shallow-cloning of subdirectories.Bruno Haible2019-09-012-7/+42
| | | | | | | | * top/gitsub.sh (func_usage): Document allowed git options with 'git pull'. (func_pull): Accept GIT_OPTIONS argument. (pull): Parse git options before complaining about too many arguments. Pass the git options to func_pull.
* lock: Fix cross-compilation guesses.Bruno Haible2019-08-302-3/+30
| | | | | | * m4/pthread_rwlock_rdlock.m4 (gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER): Require AC_CANONICAL_HOST. When cross-compiling, guess no on most platforms.
* isfinite, isinf, isnan, signbit: Fix error in C++ mode on mingw.Bruno Haible2019-08-282-11/+12
| | | | | | | | | | | Reported by Martin Storsjö <martin@martin.st> in <https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00075.html>. * lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Add more arguments. (isfinite, isinf, isnan, signbit): On platforms that use C++ include files from GCC 6 or newer, use an override through '#define', because the inline definitions in the platform's <cmath> cannot be overridden in another way.
* isfinite, isinf, isnan, signbit: Fix error in C++ mode on mingw.Bruno Haible2019-08-282-11/+49
| | | | | | | | | | Reported by Martin Storsjö <martin@martin.st> in <https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00075.html>. * lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Add more arguments. (isfinite, isinf, isnan, signbit): On mingw, use an override through '#define', because the inline definitions in the platform's <cmath> cannot be overridden in another way.
* Revert macOS INT_MULTIPLY_WRAPV patchPaul Eggert2019-08-272-8/+14
| | | | | | | | Problem reported by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2019-08/msg00076.html * lib/intprops.h (_GL_HAS___builtin_mul_overflow): Remove. (_GL_HAS_BUILTIN_MUL_OVERFLOW): Go back to working around the Clang bug on macOS.
* libtool-next-version: Fix error output.Bruno Haible2019-08-282-2/+8
| | | | | * build-aux/libtool-next-version (func_fatal_error): Fix the program name.
* autoupdateKarl Berry2019-08-271-1/+12
|
* Speed up INT_MULTIPLY_WRAPV on macOSPaul Eggert2019-08-272-5/+19
| | | | | | | | | | Assume that __builtin_mul_overflow works OK with Clang on macOS. Mattias Engdegård says it’s safe to assume the relevant library is always available there. * lib/intprops.h (_GL_HAS___builtin_mul_overflow): New temporary internal macro. (_GL_HAS_BUILTIN_MUL_OVERFLOW): No need to work around the Clang bug on macOS.
* intprops.h, verify.h: port better to clangPaul Eggert2019-08-253-42/+103
| | | | | | | | | | | | | | | | | | | | | | | Improve code generated by INT_ADD_WRAPV and INT_SUBTRACT_WRAPV with Clang. Problem reported privately by Mattias Engdegård. Also, insulate intprops.h and verify.h better against each other’s definitions of __has_builtin on non-Clang hosts. * lib/intprops.h (__has_builtin): Define a temporary substitute if __has_builtin is not already defined. (_GL_HAS___builtin_add_overflow, _GL_TEMPDEF___has_builtin): New temporary internal macros. (_GL_HAS_BUILTIN_ADD_OVERFLOW, _GL_HAS_BUILTIN_MUL_OVERFLOW): Now two separate macros, replacing the old _GL_HAS_BUILTIN_OVERFLOW, since we no longer assume that __builtin_mul_overflow is like the rest. All uses changed. (INT_ADD_WRAPV, INT_SUBTRACT_WRAPV, INT_MULTIPLY_WRAPV): Adjust to above changes. (_GL_INT_OP_WRAPV): Remove ‘builtin’ arg, since it’s no longer relevant. All uses changed. * lib/verify.h (__has_builtin): Treat like intprops.h, so that the two .h files do not collide with each other. (_GL_HAS___builtin_unreachable, _GL_HAS___builtin_trap) (_GL_TEMPDEF___has_builtin): New temporary internal macros.
* intprops: say why not Clang __builtin_add_overflowPaul Eggert2019-08-242-1/+10
| | | | | | * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW): Mention Clang in comment, responding to a query from Mattias Engdegård.
* doc: Document most of the files outside of modules.Bruno Haible2019-08-242-0/+239
| | | | | * doc/gnulib.texi (Build Infrastructure Files, Release Management Files): New chapters.
* bootstrap: Keep in sync with the 'gettext' module.Bruno Haible2019-08-243-46/+67
| | | | | | | | Reported by Assaf Gordon in <https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00045.html>. * build-aux/po/Makefile.in.in: Update to gettext 0.20. * build-aux/po/remove-potcdate.sin: Likewise.
* crypto/gc-sha512: Add tests.Bruno Haible2019-08-243-0/+144
| | | | | * tests/test-gc-sha512.c: New file, based on tests/test-gc-sha1.c. * modules/crypto/gc-sha512-tests: New file.
* crypto/gc-sha256: Add tests.Bruno Haible2019-08-243-0/+142
| | | | | * tests/test-gc-sha256.c: New file, based on tests/test-gc-sha1.c. * modules/crypto/gc-sha256-tests: New file.
* crypto/gc-sha256, crypto/gc-sha512: New modules.Bruno Haible2019-08-246-1/+216
| | | | | | | | | | | | * lib/gc.h (gc_sha256, gc_sha512): New declarations. * lib/gc-gnulib.c: Include sha256.h, sha512.h. (MAX_DIGEST_SIZE): Set to 64. (_gc_hash_ctx, gc_hash_open, gc_hash_digest_length, gc_hash_write, gc_hash_read, gc_hash_buffer): Add support for sha256 and sha512. (gc_sha256, gc_sha512): New functions. * lib/gc-libgcrypt.c (gc_sha256, gc_sha512): New functions. * modules/crypto/gc-sha256: New file, based on modules/crypto/gc-sha1. * modules/crypto/gc-sha512: New file, based on modules/crypto/gc-sha1.
* crypto/gc-sha1 tests: Improve output when the test fails.Bruno Haible2019-08-242-7/+13
| | | | | * tests/test-gc-sha1.c (main): In case of mismatch, print the entire output.
* crypto/gc-sm3: Fix compilation error with --with-libgcrypt.Bruno Haible2019-08-243-5/+74
| | | | | | | | | * 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-md2: Optimize and clarify code.Bruno Haible2019-08-243-1/+13
| | | | | | * lib/gc-gnulib.c (gc_hash_open): Comment out md2_init_ctx invocation. * lib/gc-libgcrypt.c (gc_hash_open): Clarify why md2_init_ctx invocation is not needed.
* crypto/gc-md2: Add comment.Bruno Haible2019-08-242-0/+7
| | | | * lib/gc-libgcrypt.c: Add comment.
* crypto/gc-{md[24],rijndael} tests: Fix link error with --with-libgcrypt.Bruno Haible2019-08-244-0/+11
| | | | | | | * modules/crypto/gc-md2-tests (test_gc_md2_LDADD): New variable. * modules/crypto/gc-md4-tests (test_gc_md4_LDADD): New variable. * modules/crypto/gc-rijndael-tests (test_gc_rijndael_LDADD): New variable.
* crypto/gc: Fix link error with --with-libgcrypt.Bruno Haible2019-08-242-3/+12
| | | | | * m4/gc.m4 (gl_GC): Set LIB_CRYPTO to the value found by the AC_LIB_HAVE_LINKFLAGS invocation.