mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-06-15 23:35:50 +00:00
master
130 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2c61ad3428 |
Pacify -Wuseless-cast for pthread_self
* lib/glthread/thread.h (gl_thread_self_pointer): * tests/test-pthread-mutex.c, tests/test-pthread-once2.c: * tests/test-pthread-rwlock.c, tests/test-pthread-spin.c: * tests/test-pthread-tss.c: Be consistent about casting pthread_self to void *, by always casting via intptr_t first. This pacifies -Wuseless-cast on GNU/Linux. |
||
|
|
7e6f301b8e |
Pacify -Wuseless-cast via compound literals in lib
* lib/bitset.c (bitset_print): * lib/bitset/list.c (LBITSET_ELT_BITS, debug_lbitset): * lib/bitset/table.c (TBITSET_ELT_BITS): * lib/bitsetv.c (bitsetv_dump, debug_bitsetv) (bitsetv_matrix_dump): * lib/gettext.h (gettext, ngettext, textdomain, bindtextdomain) (bind_textdomain_codeset): * lib/gl_anyavltree_list2.h (gl_tree_nx_add_first) (gl_tree_nx_add_last, gl_tree_nx_add_before) (gl_tree_nx_add_after): * lib/gl_anylinked_list2.h (gl_linked_nx_create) (gl_linked_node_nx_set_value, gl_linked_nx_set_at) (gl_linked_search_from_to, gl_linked_indexof_from_to) (gl_linked_nx_add_first, gl_linked_nx_add_last) (gl_linked_nx_add_before, gl_linked_nx_add_after) (gl_linked_nx_add_at): * lib/gl_anyrbtree_list2.h (gl_tree_nx_add_first) (gl_tree_nx_add_last, gl_tree_nx_add_before) (gl_tree_nx_add_after): * lib/gl_anytree_list2.h (gl_tree_node_nx_set_value) (gl_tree_nx_set_at): * lib/gl_anytreehash_list1.h (add_nodes_to_buckets): * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): * lib/gl_array_list.c, lib/gl_carray_list.c, lib/gl_sublist.c: (INDEX_TO_NODE): * lib/gl_hash_map.c (gl_hash_search, gl_hash_nx_getput) (gl_hash_getremove): * lib/gl_hash_set.c (gl_hash_search, gl_hash_nx_add) (gl_hash_remove): * lib/gl_linkedhash_map.c (gl_linkedhash_search) (gl_linkedhash_nx_getput, gl_linkedhash_getremove): * lib/gl_linkedhash_set.c (gl_linkedhash_search) (gl_linkedhash_nx_add, gl_linkedhash_remove): * lib/isnand-nolibm.h (isnand): * lib/isnanf-nolibm.h (isnanf): * lib/isnanl-nolibm.h (isnanl): * lib/math.in.h (isnand, _gl_isnand, isnan): * lib/md4.c, lib/sha1.c: (rol): * lib/pagealign_alloc.c (pagealign_alloc, pagealign_free): * lib/ssfmalloc.h (allocate_block_from_pool): * lib/u64.h (u64hilo, u64lo, u64getlo) [INT_MAX < UINT64_MAX]: Use compound literal when it is safer than a cast and it pacifies -Wuseless-cast. * lib/fsusage.c (PROPAGATE_ALL_ONES): * lib/glthread/thread.h (glthread_atfork, glthread_sigmask): Parenthesize more. * lib/gettext.h (dgettext, dcgettext, dngettext, dcngettext) (bindtextdomain, bind_textdomain_codeset): Check types of unused args. |
||
|
|
c40a945971 |
thread: Fix possible link error (regression 2026-04-25).
* lib/glthread/thread.c (gl_thread_create): Define always. Ignore -Wsuggest-attribute=noreturn warning. |
||
|
|
77aa674b23 |
thread: Improve no-op macros.
* lib/glthread/thread.h (glthread_atfork, glthread_create, glthread_sigmask, glthread_join): Improve indentation. (gl_thread_exit): Simplify. |
||
|
|
88bde746d9 |
cond: always include glthread/lock.h
* lib/glthread/cond.h: Revert my 2026-03-31 namespace cleanup patch, which was incorrect because this header’s gl_cond_timedwait_func function uses lock_t even when threading is disabled. |
||
|
|
c04d5cfcd3 |
thread: better nonreturn fix for gl_thread_create
* lib/glthread/thread.c (gl_thread_create): Define as a function only if multithreading. This is cleaner than my previous patch today that sometimes made it _Noreturn, as the function’s definition and declaration now always agree on noreturnedness, and it pushes the noreturnedness issue up to the caller. Also, it suppresses GCC’s “warning: function declared 'noreturn' has a 'return' statement”. |
||
|
|
6bce2d2f70 |
thread: pacify gcc -Wunused-value
* lib/glthread/thread.h (glthread_atfork, glthread_sigmask) (glthread_create, glthread_join): Evaluate arguments even when these macros are no-ops. Type-check the arguments too. This is cleaner anyway, in case the args have the wrong types (or have side effects!). |
||
|
|
dd1e3c7219 |
thread: pacify gcc -Wsuggest-attribute=noreturn
* lib/glthread/thread.c (gl_thread_create): When threading is disabled, this function is _Noreturn. |
||
|
|
87fb310b69 |
doc: be more like POSIX in threading terms
In documentation and comments, be more like POSIX in terminology involving multithreading. Explain the distinction between multithreaded process vs multithreaded program. Change “program” to “process” when the latter wording is more accurate or informative. Simplify the wording for the constraints on processes that use unlocked I/O. Change “multithread-safe” to “thread-safe”. Change “thread-safety” to “thread safety”. However, do not change “multithreaded” to “multi-threaded” even though there are some uses of both spellinga, as there are a whole bunch of uses of “multithreaded”, also in identifier names; perhaps Gnulib should even standardize on “multithreaded” (not “multi-threaded”), contra POSIX. |
||
|
|
250881c4f8 |
thread: lessen glthread namespace pollution
In lib/glthread/*.h, avoid including files if it’s easy, and if the files are not needed in the .h file to implement the module. * lib/glthread/cond.h: Include glthread/lock.h only if needed. * lib/glthread/lock.c, lib/glthread/once.c: Include <errno.h> here ... * lib/glthread/lock.h, lib/glthread/once.h: ... instead of here. * lib/glthread/lock.h: Include glthread/once.h only if needed. * lib/glthread/yield.h: Don’t include <errno.h>. |
||
|
|
a8482ceecf | maint: run 'make update-copyright' | ||
|
|
7c247d45e3 |
extern-inline: #define AAA_INLINE pre-<config.h>
In *.c files using the "#define AAA_INLINE _GL_EXTERN_INLINE" idiom, put the idiom before including <config.h>. This is suggested in the Gnulib documentation, and avoids problems when an application like Emacs rashly defines a config.h file that includes a *.h file that uses the documented "#ifndef AAA_INLINE / # define AAA_INLINE _GL_INLINE / #endif" idiom. |
||
|
|
6edf6dbacf |
lib: Reduce scope of local variables.
M = Move variable declaration to its initialization. R = Reduce scope. S = Split scope, create separate variables from one variable. B = Insert braces, creating a block scope. O = Change order of initializations. * lib/accept4.c (accept4): M. * lib/acl-internal.c (acl_ace_nontrivial): R. * lib/acosl.c (acosl): MS. * lib/af_alg.c (afalg_stream): B. * lib/alignalloc.h (alignalloc): R. * lib/alloca.c (find_stack_direction): M. (alloca): M. * lib/amemxfrm.c (amemxfrm): MR. * lib/arcfour.c (arcfour_stream): MB. (arcfour_setkey): MB. * lib/arctwo.c (arctwo_encrypt): M. (arctwo_decrypt): M. (arctwo_setkey_ekb): M. * lib/areadlink-with-size.c (areadlink_with_size): MR. * lib/areadlinkat-with-size.c (areadlinkat_with_size): MR. * lib/argmatch.c (argmatch): MO. (main): RBO. * lib/argp-fmtstream.c (__argp_make_fmtstream): M. (__argp_fmtstream_update): M. (__argp_fmtstream_ensure): R. (__argp_fmtstream_printf): R. * lib/argp-fmtstream.h (__argp_fmtstream_set_lmargin): M. (__argp_fmtstream_set_rmargin): M. (__argp_fmtstream_set_wmargin): M. * lib/argp-help.c (validate_uparams): M. (fill_in_uparams): MR. (make_hol): MRSO. (hol_entry_short_iterate): R. (hol_entry_long_iterate): R. (hol_entry_first_long): Rename 'num' to 'nopts'. (canon_doc_option): M. (hol_append): MR. (argp_hol): O. (hol_entry_help): RSBO. (hol_help): RB. (usage_argful_short_opt): R. (usage_long_opt): R. (hol_usage): SB. (argp_args_levels): R. (argp_args_usage): MRB. (argp_doc): RBO. (_help): MR. (__argp_error): R. * lib/argp-parse.c (group_parse): M. (parser_init): MRB. (parser_finalize): MS. (parser_parse_next): R. (__argp_parse): MR. (__argp_input): M. * lib/argz.c (argz_add_sep): M. (argz_create_sep): M. (argz_create): R. (argz_replace): RB. * lib/asinl.c (asinl): MRS. * lib/asnprintf.c (asnprintf): M. * lib/asnwprintf.c (asnwprintf): M. * lib/asprintf.c (asprintf): M. * lib/astrxfrm.c (astrxfrm): MR. * lib/aszprintf.c (aszprintf): M. * lib/at-func.c (AT_FUNC_NAME): MR. * lib/at-func2.c (at_func2): MRS. * lib/atanl.c (atanl): MRS. * lib/backupfile.c (numbered_backup): R. * lib/base32.c (decode_8): R. (base32_decode_ctx): R. * lib/base64.c (decode_4): R. (base64_decode_ctx): R. * lib/basename-lgpl.c (last_component): R. (base_len): RO. * lib/bitset.c (bitset_copy_): R. * lib/bitset/list.c (lbitset_prune): MR. (lbitset_weed): MR. (lbitset_list): SB. * lib/bitset/table.c (tbitset_list): SB. * lib/boot-time-aux.h (get_windows_boot_time_fallback): R. * lib/btoc32.c (btoc32): R. * lib/c-asprintf.c (c_asprintf): M. * lib/c-aszprintf.c (c_aszprintf): M. * lib/c-snprintf.c (c_snprintf): M. * lib/c-snzprintf.c (c_snzprintf): M. * lib/c-strcasecmp.c (c_strcasecmp): R. * lib/c-strcasestr.c (c_strcasestr): MRSB. * lib/c-strncasecmp.c (c_strncasecmp): R. * lib/c-strtod.c (C_STRTOD): R. * lib/c-vsnzprintf.c (c_vsnzprintf): M. * lib/c-xasprintf.c (c_xasprintf): M. * lib/c32tob.c (c32tob): R. * lib/canon-host.c (canon_host_r): MR. * lib/canonicalize.c (canonicalize_filename_mode_stk): R. * lib/canonicalize-lgpl.c (realpath_stk): R. * lib/cbrt.c (cbrt): M. * lib/cbrtf.c (cbrtf): M. * lib/cbrtl.c (cbrtl): MR. * lib/chdir-long.c (chdir_long): M. (main): MR. * lib/classpath.c (new_classpath): MB. * lib/clean-temp.c (create_temp_dir): M. (unregister_temp_file): M. (unregister_temp_subdir): M. (cleanup_temp_file): M. (cleanup_temp_subdir): M. (cleanup_temp_dir_contents): MSB. (open_temp): R. (fopen_temp): R. (close_temp): RB. (fclose_variant_temp): RB. * lib/clean-temp-simple.c (cleanup_action): MSB. (cleanup_temporary_file): M. * lib/copy-file.c (copy_file_internal): MRB. * lib/cosl.c (cosl): MR. * lib/crc-generate-table.c (make_crc_table): M. * lib/crc-x86_64-pclmul.c (crc32_update_no_xor_pclmul): MRSB. * lib/crc.c (crc32_update_no_xor_slice_by_8): S. (crc32_update_no_xor_slice_by_n): M. (crc32_update_no_xor): MR. * lib/csharpcomp.c (compile_csharp_using_mono): MRB. (compile_csharp_using_dotnet): MRSB. (compile_csharp_using_sscli): MRB. * lib/csharpexec.c (execute_csharp_using_mono): MO. (execute_csharp_using_dotnet): MO. (execute_csharp_using_sscli): MO. (execute_csharp_program): R. * lib/cygpath.c (execute_and_read_line): M. * lib/des.c (gl_des_is_weak_key): M. (gl_3des_ecb_crypt): MO. * lib/dfa.c (closure): B. (dfamust): MRB. * lib/di-set.c (map_device): M. (di_set_insert): M. (di_set_lookup): M. * lib/dirname-lgpl.c (dir_len): R. * lib/dprintf.c (dprintf): M. * lib/dup.c (dup_nothrow): R. * lib/dup2.c (ms_windows_dup2): M. (klibc_dup2dirfd): M. (klibc_dup2): MR. (rpl_dup2): M. * lib/dup3.c (dup3): M. * lib/duplocale.c (duplocale): MRSB. * lib/dzprintf.c (dzprintf): M. * lib/euidaccess.c (euidaccess): MR. (main): M. * lib/exclude.c (add_exclude): R. * lib/execl.c (execl): SB. * lib/execle.c (execle): SB. * lib/execlp.c (execlp): SB. * lib/execute.c (execute): R. * lib/fchdir.c (ensure_dirs_slot): M. (get_name): M. (_gl_register_fd): R. * lib/fclose.c (rpl_fclose): MR. * lib/fcntl.c (dupfd): RO. (fcntl): R. (klibc_dupdirfd): M. (klibc_fcntl): MRSB. * lib/fdopen.c (rpl_fdopen): M. * lib/file-has-acl.c (get_aclinfo): R. (fdfile_has_aclinfo): MR. * lib/file-remote.c (main): M. * lib/file-set.c (record_file): M. (seen_file): R. * lib/findprog.c (find_in_path): MR. * lib/findprog-in.c (find_in_given_path): MR. * lib/flock.c (do_lock): MR. (do_unlock): M. (flock): MR. * lib/fma.c (decode): M. * lib/fopen.c (rpl_fopen): MR. * lib/forkpty.c (forkpty): M. * lib/fprintf.c (fprintf): M. * lib/freadseek.c (freadseek): MR. * lib/freopen.c (rpl_freopen): M. * lib/freopen-safer.c (freopen_safer): M. * lib/frexp.c (FUNC): MR. * lib/fseterr.c (fseterr): M. * lib/fstatat.c (rpl_fstatat): M. * lib/fstrcmp.c (fstrcmp_free_resources): M. (fstrcmp_bounded): MR. * lib/fsusage.c (statvfs_works): R. * lib/fsync.c (fsync): M. * lib/ftello.c (ftello): M. * lib/ftruncate.c (SetFileSize): M. * lib/fts.c (fts_open): MR. (fts_load): M. (fts_close): MR. (filesystem_type): MRO. (fts_read): MB. (fts_children): M. (fts_build): MR. (fts_cross_check): RO. (fd_ring_print): RO. (fts_stat): RO. (fts_sort): R. (fts_alloc): M. (fts_lfree): R. (fts_palloc): M. (fts_padjust): MS. (fts_maxarglen): M. (fts_safe_changedir): MR. * lib/fts-cycle.c (enter_dir): MRO. (leave_dir): M. * lib/fzprintf.c (fzprintf): M. * lib/gc-gnulib.c (gc_cipher_open): MR. (gc_cipher_setkey): MSB. (gc_cipher_setiv): M. (gc_cipher_encrypt_inline): M. (gc_cipher_decrypt_inline): M. (gc_hash_open): MR. (gc_hash_clone): M. * lib/gc-libgcrypt.c (gc_init): Remove local variable 'err'. (gc_cipher_open): MR. (gc_cipher_setkey): M. (gc_cipher_setiv): M. (gc_hash_open): MR. (gc_hash_clone): M. (gc_md4): MR. (gc_md5): MR. (gc_sha1): MR. (gc_sha256): MR. (gc_sha512): MR. (gc_sm3): MR. (gc_hmac_md5): MR. Remove local variable 'err'. (gc_hmac_sha1): MR. Remove local variable 'err'. (gc_hmac_sha256): MR. Remove local variable 'err'. (gc_hmac_sha512): MR. Remove local variable 'err'. * lib/gc-pbkdf2.c (gc_pbkdf2_prf): MR. * lib/gen-uni-tables.c (fill_attributes): M. (debug_output_predicate): M. (output_predicate_test): M. (output_predicate): MR. (output_category): MR. (output_combclass): MR. (output_bidi_category): MR. (output_decimal_digit_test): M. (output_decimal_digit): MR. (output_digit_test): M. (output_digit): MR. (output_numeric_test): M. (output_numeric): MR. (fill_mirror): MR. (get_mirror_value): M. (output_mirror): MR. (fill_properties): MR. (fill_property30): MR. (output_indic_conjunct_break_test): M. (output_indic_conjunct_break): MR. (fill_arabicshaping): MR. (output_joining_type_test): M. (output_joining_type): MR. (output_joining_group_test): M. (output_joining_group): MR. (fill_scripts): MR. (output_scripts): MR. (output_scripts_byname): M. (fill_blocks): MR. (output_blocks): M. (output_ident_category): MR. (output_charclass): MR. (output_charmap): MR. (output_tables): M. (fill_width): MR. (output_nonspacing_property): MR. (output_width_property_test): M. (debug_output_lbrk_tables): M. (fill_org_lbp): MR. (debug_output_org_lbrk_tables): M. (output_lbpea): M. (output_lbrk_tables): R. (output_lbrk_rules_as_tables): M. (debug_output_wbrk_tables): M. (fill_org_wbp): MR. (debug_output_org_wbrk_tables): M. (output_wbp): M. (output_wbrk_tables): M. (output_gbp_test): MR. (output_gbp_table): MR. (fill_org_gbp): MR. (get_decomposition): MR. (output_decomposition): M. (output_decomposition_tables): R. (fill_composition_exclusions): MR. (debug_output_composition_tables): M. (output_composition_tables): MSB. (output_simple_mapping_test): M. (output_simple_mapping): MR. (fill_casing_rules): MR. (fill_casefolding_rules): MR. (output_casing_rules): M. (output_version): MR. * lib/get-rusage-as.c (get_rusage_as_via_setrlimit): R. (get_rusage_as): M. * lib/get-rusage-data.c (get_rusage_data_via_setrlimit): R. (get_rusage_data): M. * lib/get_ppid_of.c (get_ppid_of): M. * lib/get_progname_of.c (get_progname_of): MR. * lib/getaddrinfo.c (use_win32_p): M. (getaddrinfo): MR. (freeaddrinfo): M. * lib/getcwd.c (__getcwd_generic): MRSBO. * lib/getcwd-lgpl.c (rpl_getcwd): MS. * lib/getdelim.c (getdelim): MR. * lib/getdomainname.c (getdomainname): M. * lib/getentropy.c (getentropy): R. * lib/getgroups.c (rpl_getgroups): MR. * lib/gethostname.c (rpl_gethostname): M. * lib/getloadavg.c (getloadavg): MRB. * lib/getlocalename_l-unsafe.c (newlocale): MR. (duplocale): MR. (freelocale): M. * lib/getlogin_r.c (getlogin_r): M. * lib/getndelim2.c (getndelim2): MR. * lib/getopt.c (exchange): MS. (process_long_option): MRB. (_getopt_internal_r): MR. (_getopt_internal): M. (main): M. * lib/getopt1.c (main): M. * lib/getpass.c (getpass): MRB. * lib/getprogname.c (getprogname): M. * lib/getrusage.c (getrusage): M. * lib/getsockopt.c (rpl_getsockopt): M. * lib/getsubopt.c (getsubopt): M. * lib/gettext.h (dcpgettext_expr): M. (dcnpgettext_expr): M. * lib/gettimeofday.c (gettimeofday): R. * lib/getugroups.c (getugroups): MR. * lib/getumask.c (getumask): R. * lib/gl_anyavltree_list2.h (rebalance): MR. (gl_tree_remove_node_from_tree): MR. (gl_tree_nx_add_before): R. (gl_tree_nx_add_after): R. * lib/gl_anyhash2.h (hash_resize): M. * lib/gl_anylinked_list2.h (gl_linked_get_at): R. (gl_linked_nx_set_at): R. (gl_linked_search_from_to): R. (gl_linked_indexof_from_to): MR. (gl_linked_nx_add_at): M. (gl_linked_remove_node): M. (gl_linked_remove_at): MR. (gl_linked_iterator_from_to): M. (gl_linked_sortedlist_search_from_to): R. (gl_linked_sortedlist_indexof_from_to): R. * lib/gl_anyrbtree_list2.h (rebalance_after_add): MR. (gl_tree_remove_node_from_tree): M. * lib/gl_anytree_list2.h (gl_tree_iterator): MB. (gl_tree_sortedlist_indexof_from_to): R. * lib/gl_anytree_omap.h (gl_tree_nx_getput): M. (gl_tree_iterator): MB. * lib/gl_anytree_oset.h (gl_tree_nx_add): M. (gl_tree_update): M. (gl_tree_iterator): MB. * lib/gl_anytreehash_list1.h (add_to_bucket): M. * lib/gl_array_list.c (grow): M. (gl_array_nx_add_first): M. (gl_array_nx_add_before): M. (gl_array_nx_add_after): M. (gl_array_nx_add_at): M. (gl_array_remove_node): M. (gl_array_remove_at): M. * lib/gl_array_map.c (grow): M. (gl_array_nx_getput): M. (gl_array_remove_at): M. * lib/gl_array_omap.c (grow): M. (gl_array_nx_add_at): M. (gl_array_remove_at): M. * lib/gl_array_oset.c (grow): M. (gl_array_nx_add_at): M. (gl_array_remove_at): M. * lib/gl_array_set.c (grow): M. * lib/gl_avltree_ordered.h (rebalance): M. (gl_tree_add_node_before): R. (gl_tree_add_node_after): R. (gl_tree_remove_node_no_free): M. * lib/gl_carray_list.c (gl_carray_node_value): M. (gl_carray_node_nx_set_value): M. (gl_carray_get_at): M. (gl_carray_nx_set_at): M. (gl_carray_indexof_from_to): M. (grow): M. (gl_carray_nx_add_last): M. (gl_carray_nx_add_at): M. (gl_carray_remove_at): M. (gl_carray_iterator_from_to): R. (gl_carray_sortedlist_indexof_from_to): M. (gl_carray_sortedlist_nx_add): M. * lib/gl_rbtree_ordered.h (rebalance_after_add): M. (gl_tree_remove_node_no_free): M. * lib/gl_sublist.c (gl_sublist_sortedlist_search_from_to): M. (gl_sublist_sortedlist_indexof_from_to): M. * lib/glob.c (__glob): MR. * lib/globfree.c (globfree): M. * lib/glthread/lock.c (glthread_rwlock_init_for_glibc): M. (glthread_rwlock_init_multithreaded): M. (glthread_rwlock_rdlock_multithreaded): M. (glthread_rwlock_wrlock_multithreaded): M. (glthread_rwlock_destroy_multithreaded): M. (glthread_rwlock_init_multithreaded): M. (glthread_rwlock_rdlock_multithreaded): M. (glthread_rwlock_wrlock_multithreaded): M. (glthread_rwlock_unlock_multithreaded): M. (glthread_rwlock_destroy_multithreaded): M. (glthread_recursive_lock_init_multithreaded): M. (glthread_recursive_lock_lock_multithreaded): M. (glthread_recursive_lock_destroy_multithreaded): M. (glthread_recursive_lock_init_multithreaded): M. (glthread_recursive_lock_lock_multithreaded): M. * lib/glthread/thread.c (gl_thread_create): M. * lib/group-member.c (group_member): M. (main): M. * lib/hash.c (hash_get_next): MB. (check_tuning): M. (hash_initialize): M. (hash_clear): M. (hash_free): MS. (transfer_entries): M. (hash_rehash): MR. (hash_insert_if_absent): MR. (hash_remove): MR. (hash_print): M. * lib/hasmntopt.c (hasmntopt): M. * lib/hmac.c (hmac_hash): R. (GL_HMAC_FN): R. * lib/human.c (group_number): MRO. (human_readable): MR. (humblock): M. * lib/hypot.c (hypot): M. * lib/hypotl.c (hypotl): M. * lib/i-ring.c (i_ring_pop): M. * lib/iconv_open.c (rpl_iconv_open): R. * lib/idcache.c (getuidbyname): M. (getgidbyname): M. * lib/inet_ntop.c (inet_ntop4): M. (inet_ntop6): R. * lib/inet_pton.c (inet_pton4): MRBO. (inet_pton6): MRBO. * lib/ino-map.c (ino_map_insert): M. * lib/integer_length.c (integer_length): M. * lib/ioctl.c (rpl_ioctl): M. (ioctl): M. * lib/is_l-impl.h (FUNC): M. * lib/isatty.c (IsCygwinConsoleHandle): R. * lib/isnan.c (FUNC): MR. * lib/javacomp.c (compile_using_envjavac): MRB. (compile_using_javac): MB. (execute_and_read_line): M. (write_temp_file): M. (get_classfile_version): MR. (is_envjavac_usable): MR. (is_javac_present): M. (is_javac_usable): MR. (compile_java_class): MR. * lib/javaexec.c (execute_java_class): MRBO. * lib/javaversion.c (execute_and_read_line): M. (javaexec_version): R. * lib/kwset.c (treefails): M. (kwsprep): MRSB. (bmexec_trans): MRSO. (acexec_trans): MRS. * lib/lchown.c (rpl_lchown): R. * lib/linebuffer.c (readlinebuffer_delim): RO. * lib/link.c (link): MRBO. (rpl_link): M. * lib/linkat.c (link_immediate): R. (link_follow): M. (linkat_follow): M. * lib/localcharset.c (locale_charset): MR. * lib/localeinfo.c (is_using_utf8): R. Rename 'mbs' to 'state'. (init_localeinfo): Rename 's' to 'state'. * lib/localename.c (gl_locale_name): MSB. * lib/localename-environ.c (gl_locale_name_environ): MSB. * lib/localename-unsafe.c (gl_locale_name_canonicalize): MSB. (gl_locale_name_from_win32_LANGID): M. (gl_locale_name_from_win32_LCID): M. (enum_locales_fn): R. (gl_locale_name_unsafe): MSB. * lib/log2.c (log2): M. * lib/log2f.c (log2f): M. * lib/log2l.c (log2l): M. * lib/login_tty.c (login_tty): M. * lib/logl.c (logl): MR. * lib/long-options.c (parse_long_options): MR. (parse_gnu_standard_options_only): M. * lib/mbfile.h (mbfile_multi_getc): MR. * lib/mbmemcasecoll.c (apply_c32tolower): M. (mbmemcasecoll): MR. * lib/mbrtoc32.c (mbrtoc32): R. * lib/mbrtowc.c (rpl_mbrtowc): MRS. * lib/mbrtowc-impl.h: MRB. * lib/mbscasestr.c (knuth_morris_pratt_multibyte): MR. (mbscasestr): R. * lib/mbscspn.c (mbscspn): MR. * lib/mbsnrtowcs-impl.h (FUNC): M. * lib/mbspbrk.c (mbspbrk): MR. * lib/mbsrtowcs-impl.h (FUNC): M. * lib/mbsspn.c (mbsspn): MR. * lib/mbsstr.c (knuth_morris_pratt_multibyte): MR. (mbsstr): MR. * lib/mbswidth.c (mbsnwidth): M. * lib/mbtowc-impl.h (mbtowc): MR. * lib/mbtowc-lock.h (mbtowc_with_lock): M. * lib/mcel.h: MR in comments. * lib/md2.c (md2_finish_ctx): M. (md2_process_bytes): M. (md2_update_chksum): M. (md2_compress): M. * lib/md2-stream.c (md2_stream): MR. * lib/md4.c (md4_finish_ctx): M. (md4_process_block): MR. * lib/md4-stream.c (md4_stream): MR. * lib/md5-stream.c (md5_stream): MR. * lib/mem-hash-map.c (compute_hashval): M. (lookup): M. * lib/memchr.c (__memchr): MRB. * lib/memchr2.c (memchr2): MRB. * lib/memrchr.c (__memrchr): MRB. * lib/mgetgroups.c (mgetgroups): MRS. * lib/mkancesdirs.c (mkancesdirs): M. * lib/mkdir.c (rpl_mkdir): MR. * lib/mkdir-p.c (make_dir_parents): R. * lib/modechange.c (mode_compile): R. * lib/mountlist.c (fstype_to_string): M. (dev_from_mount_options): MR. (read_file_system_list): MR. * lib/mpsort.c (mpsort_into_tmp): M. (mpsort_with_tmp): M. * lib/msvc-inval.h (TRY_MSVC_INVAL): M. * lib/mtx.c (mtx_init): MSB. * lib/nanosleep.c (nanosleep): M. * lib/nl_langinfo.c (ctype_codeset): MR. (nl_langinfo_with_lock): M. * lib/nonblocking.c (get_nonblocking_flag): M. (set_nonblocking_flag): M. * lib/nproc.c (num_processors_via_affinity_mask): M. (cgroup2_mount): MR. (get_cgroup2_cpu_quota): M. (parse_omp_threads): Remove variable 'ret'. (num_processors): M. * lib/obstack.c (_obstack_newchunk): M. (_obstack_allocated_p): M. (__obstack_free): M. * lib/obstack_printf.c (OBSTACK_PRINTF): M. (OBSTACK_VPRINTF): M. * lib/omp-init.c (parse_omp_threads): Remove variable 'ret'. * lib/openat-proc.c (openat_proc_name): R. * lib/openat2.c (do_openat2): R. (openat2): MSB. * lib/opendir.c (opendir): MR. * lib/openpty.c (openpty): M. * lib/os2-spawn.c (prepare_spawn): M. (spawnpvech): R. * lib/pagealign_alloc.c (pagealign_alloc): MR. (pagealign_xalloc): M. (pagealign_free): M. * lib/parse-duration.c (parse_scaled_value): M. (parse_year_month_day): M. (parse_yearmonthday): MR. (parse_YMWD): SB. (parse_hour_minute_second): M. (parse_hourminutesecond): MR. (parse_HMS): SB. (parse_time): M. (parse_period): MR. (parse_non_iso8601): M. * lib/passfd.c (sendfd): MRO. (recvfd): MRO. * lib/perror.c (perror): M. * lib/physmem.c (physmem_total): M. (physmem_claimable): M. * lib/pipe-filter-gi.c (filter_loop): MRB. (pipe_filter_gi_create): M. (pipe_filter_gi_close): M. * lib/pipe-filter-ii.c (_beginthreadex): M. (WaitForMultipleObjects): MR. (pipe_filter_ii_execute): MRB. * lib/poll.c (IsSocketHandle): R. (windows_compute_revents): MRB. (windows_compute_revents_socket): M. (poll): MRB. Remove variable 'bRet'. * lib/popen.c (rpl_popen): MB. * lib/posix_openpt.c (posix_openpt): M. * lib/posixtm.c (posix_time_parse): R. (posixtime): R. * lib/pread.c (pread): M. * lib/printf.c (printf): M. * lib/printf-frexp.c (FUNC): R. * lib/printf-parse.c (PRINTF_PARSE): MR. * lib/progreloc.c (maybe_executable): R. (find_executable): MRSB. (prepare_relocate): M. * lib/propername.c (mbsstr_trimmed_wordbounded): RSB. (proper_name_utf8): M. * lib/pselect.c (pselect): MR. * lib/pt_chown.c (do_pt_chown): MR. * lib/pthread-cond.c (pthread_cond_timedwait): R. * lib/pthread-rwlock.c (pthread_rwlockattr_init): MSB. (pthread_rwlock_init): MSB. (pthread_rwlock_rdlock): MSB. (pthread_rwlock_wrlock): MSB. (pthread_rwlock_tryrdlock): MB. (pthread_rwlock_trywrlock): MB. (pthread_rwlock_timedrdlock): MSB. (pthread_rwlock_timedwrlock): MSB. (pthread_rwlock_unlock): MSB. (pthread_rwlock_destroy): MSB. (pthread_rwlock_init): MSB. (pthread_rwlock_timedrdlock): MRB. (pthread_rwlock_timedwrlock): MRB. * lib/pthread_mutex_timedlock.c (pthread_mutex_timedlock): MRB. * lib/pthread_sigmask.c (pthread_sigmask): MR. * lib/ptsname_r.c (ptsname_r): MR. * lib/putenv.c (putenv): M. * lib/pwrite.c (pwrite): M. * lib/qcopy-acl.c (qcopy_acl): Remove a use of variable 'ret'. * lib/qset-acl.c (qset_acl): M. * lib/qsort.c (_quicksort): MR. * lib/quotearg.c (set_quoting_flags): M. (quotearg_buffer_restyled): MRSB. * lib/random.c (__initstate): M. (__setstate): M. (__random): R. * lib/random_r.c (__srandom_r): M. (__setstate_r): MO. (__random_r): M. * lib/rawmemchr.c (rawmemchr): RB. * lib/read-file.c (fread_file): M. (read_file): M. * lib/readdir.c (readdir): MR. * lib/readline.c (readline): R. * lib/readtokens.c (readtoken): R. (readtokens): M. * lib/regex-quote.c (regex_quote_spec_gnu): MB. (regex_quote_spec_pcre): MB. (regex_quote_length): MR. (regex_quote): MB. * lib/relocatable.c (set_this_relocation_prefix): M. (compute_curr_prefix): MR. (find_shared_library_fullname): MRS. (relocate): M. * lib/relocwrapper.c (activate_libdirs): MB. (main): M. * lib/rename.c (rpl_rename): MRBO. * lib/renameatu.c (renameatu): MRB. * lib/rijndael-alg-fst.c (rijndaelKeySetupEnc): MSB. (rijndaelKeySetupDec): MRSB. (rijndaelEncrypt): MSB. (rijndaelDecrypt): MSB. * lib/rijndael-api-fst.c (rijndaelMakeKey): MRSB. (rijndaelCipherInit): MSB. (rijndaelBlockEncrypt): MRSB. (rijndaelPadEncrypt): MRSB. (rijndaelBlockDecrypt): MRSB. (rijndaelPadDecrypt): MRSB. * lib/rmdir.c (rpl_rmdir): M. * lib/rpmatch.c (localized_pattern): MS. (try): M. (rpmatch): MSB. * lib/same.c (same_nameat): R. Remove variable 'flags'. * lib/savedir.c (streamsavedir): MRB. * lib/scandir.c (SCANDIR): MR. * lib/select.c (IsSocketHandle): R. (windows_poll_handle): MRSB. Remove variable 'bRet'. (rpl_select): MR. Remove variable 'bRet'. * lib/set-permissions.c (set_acls_from_mode): R. (context_acl_from_mode): R. (context_aclv_from_mode): M. (set_acls_from_mode): MR. (context_acl_from_mode): M. (set_acls): R. (set_permissions): MS. * lib/setenv.c (__add_to_environ): M. (rpl_setenv): M. * lib/sethostname.c (sethostname): MR. * lib/setlocale.c (setlocale_unixlike): MR. (langcmp): R. (setlocale_improved): MR. * lib/setlocale_null.c (setlocale_null_r_with_lock): M. (setlocale_null): M. * lib/setsockopt.c (rpl_setsockopt): R. * lib/sh-quote.c (shell_quote_argv): MB. * lib/sha1.c (sha1_process_block): R. * lib/sha1-stream.c (sha1_stream): M. * lib/sha256.c (sha256_process_block): MR. * lib/sha256-stream.c (shaxxx_stream): M. * lib/sha3.c (sha3_read_ctx): R. (sha3_process_block): R. * lib/sha3-stream.c (sha3_xxx_stream): M. * lib/sha512-stream.c (shaxxx_stream): M. * lib/sig2str.c (str2signum): RS. (sig2str): MR. * lib/sigaction.c (sigaction_handler): MR. (sigaction): MRB. * lib/sigprocmask.c (sigprocmask): M. * lib/sigsegv.c (sigsegv_handler): MR. * lib/sincosl.c (kernel_sinl): MRS. (kernel_cosl): MRS. * lib/sinl.c (sinl): MR. * lib/sleep.c (rpl_sleep): M. * lib/sm3.c (sm3_process_block): MR. * lib/sm3-stream.c (sm3_stream): MR. * lib/snprintf.c (snprintf): M. * lib/snzprintf.c (snzprintf): M. * lib/socket.c (rpl_socket): M. * lib/sockets.c (close_fd_maybe_socket): MR. (ioctl_fd_maybe_socket): MR. (gl_sockets_startup): M. (gl_sockets_cleanup): M. * lib/spawn-pipe.c (create_pipe): MR. * lib/spawni.c (__spawni): Split variable declaration. * lib/sprintf.c (sprintf): M. * lib/sqrtl.c (sqrtl): MR. * lib/ssfmalloc.h (allocate_block_from_pool): MSB. * lib/stackvma.c (rof_open): M. (vma_iterate_proc): RSB. (vma_iterate_bsd): MB. (mapped_range_start): M. (mapped_range_end): M. (is_unmapped): MR. (mapped_range_start): M. (mapped_range_end): M. (vma_iterate): MR. * lib/stat-w32.c (_gl_convert_FILETIME_to_timespec): R. * lib/stdio-consolesafe.c (gl_consolesafe_fprintf): R. (gl_consolesafe_printf): R. * lib/stdio-read.c (CALL_WITH_ERRNO_FIX): M. (scanf): M. (fscanf): M. * lib/stdio-write.c (CALL_WITH_SIGPIPE_EMULATION): M. (printf): M. (fprintf): M. * lib/stpncpy.c (__stpncpy): MSB. * lib/str-kmp.h (knuth_morris_pratt): M. * lib/str-two-way.h (critical_factorization): MSB. (two_way_short_needle): MS. (two_way_long_needle): MRS. * lib/strcasecmp.c (strcasecmp): R. * lib/strcasecmp_l.c (strcasecmp_l): MR. * lib/strcasestr.c (strcasestr): MRSB. * lib/strchrnul.c (strchrnul): MRB. * lib/strerror.c (strerror): M. * lib/strerror_l.c (strerror_l_r): R. * lib/strerror_r.c (local_snprintf): M. (strerror_r): M. * lib/strfmon_l.c (rpl_strfmon_l): MR. * lib/strftime.c (__strftime_internal): MR. * lib/striconv.c (mem_cd_iconv): MR. (str_cd_iconv): MR. (str_iconv): M. * lib/striconveh.c (iconveh_open): MR. (utf8conv_carefully): M. (mem_cd_iconveh_internal): MR. (mem_iconveh): M. (str_iconveh): M. * lib/striconveha.c (uniconv_register_autodetect): MRSB. (mem_iconveha_notranslit): MS. (mem_iconveha): M. (str_iconveha_notranslit): MS. (str_iconveha): M. * lib/string-buffer-printf.c (sb_appendvf): R. (sb_appendf): R. * lib/string-buffer-reversed-printf.c (sbr_prependvf): R. (sbr_prependf): R. * lib/string-desc.c (sd_new): R. * lib/stripslash.c (strip_trailing_slashes): M. * lib/strncasecmp.c (strncasecmp): R. * lib/strncasecmp_l.c (strncasecmp_l): MR. * lib/strptime.c (__strptime_internal): RSB. * lib/strsep.c (strsep): R. * lib/strsignal.c (strsignal): R. * lib/strstr.c (strstr): MRSB. * lib/strtod.c (parse_number): MR. (STRTOD): MR. * lib/strtok_r.c (__strtok_r): M. * lib/strtol.c (strtol): MR. * lib/struniq.h (struniq): M. * lib/supersede.c (open_supersede): R. * lib/system-quote.c (system_quote_argv): MB. * lib/szprintf.c (szprintf): M. * lib/tanl.c (kernel_tanl): MRS. (tanl): MR. * lib/tempname.c (try_tempname_len): M. * lib/term-style-control.c (sprintf_integer): MR. * lib/textstyle.in.h (ostream_printf): MR. * lib/time.c (time): M. * lib/times.c (filetime2clock): M. * lib/timespec-add.c (timespec_add): R. * lib/timespec-sub.c (timespec_sub): R. * lib/tmpdir.c (path_search): MR. * lib/tmpfile.c (tmpfile): M. * lib/to_l-impl.h (FUNC): M. * lib/tparm.c (tparm): MRB. * lib/trigl.c (ieee754_rem_pio2l): MRS. (kernel_rem_pio2): MRS. * lib/trim.c (trim2): MR. * lib/tsearch.c (check_tree): R. (maybe_split_for_insert): M. (__tsearch): MR. (__tfind): M. (__tdelete): MRB. * lib/ttyname_r.c (ttyname_r): M. * lib/uname.c (uname): MR. * lib/unicase/locale-language.c (uc_locale_language): M. * lib/unicase/u-casecmp.h (FUNC): MR. * lib/unicase/u-casecoll.h (FUNC): MR. * lib/unicase/u-casemap.h (FUNC): MR. * lib/unicase/u-casexfrm.h (FUNC): MR. * lib/unicase/u-ct-casefold.h (FUNC): MR. * lib/unicase/u-ct-totitle.h (FUNC): MR. * lib/unicase/u-is-cased.h (FUNC): MR. * lib/unicase/u-is-invariant.h (FUNC): MR. * lib/unicase/u8-casefold.c (read_file): M. * lib/unicase/u8-tolower.c (read_file): M. * lib/unicase/u8-totitle.c (read_file): M. * lib/unicase/u8-toupper.c (read_file): M. * lib/unicase/ulc-casecmp.c (ulc_u8_casefold): MR. * lib/unicase/ulc-casexfrm.c (ulc_casexfrm): MR. * lib/unicodeio.c (unicode_to_mb): MR. * lib/uniconv/u-conv-from-enc.h (FUNC): M. * lib/uniconv/u-conv-to-enc.h (FUNC): MR. * lib/uniconv/u-strconv-from-enc.h (FUNC): M. * lib/uniconv/u-strconv-to-enc.h (FUNC): M. * lib/uniconv/u16-conv-to-enc.c (FUNC): MR. * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): R. * lib/uniconv/u8-conv-to-enc.c (u8_conv_to_encoding): R. * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): MS. * lib/unictype/3level.h (CONCAT(TABLE,_add)): M. (CONCAT(TABLE,_finalize)): MRB. * lib/unictype/3levelbit.h (CONCAT(TABLE,_add)): M. (CONCAT(TABLE,_finalize)): MRB. * lib/unictype/bidi_byname.c (uc_bidi_class_byname): M. * lib/unictype/categ_and.c (uc_general_category_and): MR. * lib/unictype/categ_and_not.c (uc_general_category_and_not): MR. * lib/unictype/categ_byname.c (uc_general_category_byname): M. * lib/unictype/categ_of.c (uc_general_category): R. * lib/unictype/categ_or.c (uc_general_category_or): MR. * lib/unictype/combiningclass_byname.c (uc_combining_class_byname): M. * lib/unictype/incb_byname.c (uc_indic_conjunct_break_byname): M. * lib/unictype/joininggroup_byname.c (uc_joining_group_byname): M. * lib/unictype/joiningtype_byname.c (uc_joining_type_byname): M. * lib/unictype/pr_byname.c (uc_property_byname): MRB. * lib/unictype/scripts.c (uc_script_byname): M. * lib/unigbrk/u-grapheme-prev.h (ends_with_incb_consonant_extended_linker_extended): M. (ends_with_emoji_modifier_sequence): M. (ends_with_ri_count): M. (FUNC): M. * lib/unigbrk/uc-is-grapheme-break.c (uc_is_grapheme_break): M. * lib/unigbrk/ulc-grapheme-breaks.c (ulc_grapheme_breaks): M. * lib/unilbrk/u16-width-linebreaks.c (u16_width_linebreaks_internal): M. * lib/unilbrk/u32-width-linebreaks.c (u32_width_linebreaks_internal): M. * lib/unilbrk/u8-possible-linebreaks.c (read_file): M. * lib/unilbrk/u8-width-linebreaks.c (u8_width_linebreaks_internal): M. (read_file): M. * lib/unilbrk/ulc-possible-linebreaks.c (ulc_possible_linebreaks_internal): M. (read_file): M. * lib/unilbrk/ulc-width-linebreaks.c (ulc_width_linebreaks_internal): M. (read_file): M. * lib/uniname/uniname.c (unicode_name_word): MR. (unicode_character_name): M. (unicode_name_character): MR. * lib/uninorm/canonical-decomposition.c (uc_canonical_decomposition): M. * lib/uninorm/composition.c (uc_composition): M. * lib/uninorm/decomposition.c (uc_decomposition): M. * lib/uninorm/u-normalize-internal.h (FUNC): MR. * lib/uninorm/u-normcmp.h (FUNC): MR. * lib/uninorm/u-normcoll.h (FUNC): MR. * lib/uninorm/u-normxfrm.h (FUNC): MR. * lib/uninorm/uninorm-filter.c (uninorm_filter_write): M. * lib/unistdio/u-asnprintf.h (ASNPRINTF): M. * lib/unistdio/u-asprintf.h (ASPRINTF): M. * lib/unistdio/u-snprintf.h (SNPRINTF): M. * lib/unistdio/u-sprintf.h (SPRINTF): M. * lib/unistdio/u-vsnprintf.h (VSNPRINTF): M. * lib/unistdio/u-vsprintf.h (VSPRINTF): M. * lib/unistdio/ulc-fprintf.c (ulc_fprintf): M. * lib/unistdio/ulc-vfprintf.c (ulc_vfprintf): M. * lib/unistr/u16-chr.c (u16_chr): R. * lib/unistr/u16-mbsnlen.c (u16_mbsnlen): M. * lib/unistr/u16-next.c (u16_next): M. * lib/unistr/u16-strchr.c (u16_strchr): R. * lib/unistr/u16-strrchr.c (u16_strrchr): R. * lib/unistr/u16-to-u32.c (FUNC): MR. * lib/unistr/u16-to-u8.c (FUNC): MR. * lib/unistr/u32-next.c (u32_next): M. * lib/unistr/u32-to-u16.c (FUNC): MR. * lib/unistr/u32-to-u8.c (FUNC): MR. * lib/unistr/u8-chr.c (u8_chr): M. * lib/unistr/u8-mbsnlen.c (u8_mbsnlen): M. * lib/unistr/u8-next.c (u8_next): M. * lib/unistr/u8-strchr.c (u8_strchr): R. * lib/unistr/u8-strrchr.c (u8_strrchr): R. * lib/unistr/u8-to-u16.c (FUNC): MR. * lib/unistr/u8-to-u32.c (FUNC): MR. * lib/uniwbrk/u8-wordbreaks.c (read_file): M. * lib/uniwbrk/ulc-wordbreaks.c (ulc_wordbreaks): M. (read_file): M. * lib/uniwidth/u16-width.c (u16_width): M. * lib/uniwidth/u32-width.c (u32_width): M. * lib/uniwidth/u8-width.c (u8_width): M. * lib/unlinkat.c (rpl_unlinkat): MR. * lib/unsetenv.c (unsetenv): M. (rpl_unsetenv): R. * lib/userspec.c (parse_with_separator): MRS. (main): MR. * lib/utime.c (_gl_utimens_windows): M. * lib/utimecmp.c (utimecmpat): R. * lib/utimens.c (validate_timespec): R. (fdutimens): MR. (lutimens): MR. * lib/utimensat.c (rpl_utimensat): M. * lib/vasnprintf.c (divide): M. (decode_long_double): MR. (decode_double): MR. (scale10_round_decimal_decoded): MR. (floorlog10l): MR. (floorlog10): MR. (VASNPRINTF): MR. * lib/vc-mtime.c (is_git_present): MR. (git_vc_controlled): MR. (git_unmodified): M. (git_mtime): MR. (abs_git_checkout): MR. (max_vc_mtime): MR. * lib/vdzprintf.c (vdzprintf): M. * lib/vfzprintf.c (vfzprintf): M. * lib/vma-iter.c (rof_open): M. (vma_iterate_proc): MRSB. (vma_iterate_bsd): MB. (vma_iterate): MR. * lib/vsnzprintf.c (vsnzprintf): M. * lib/vszprintf.c (vszprintf): M. * lib/wait-process.c (klibc_waitpid): M. (wait_subprocess): MR. * lib/wcs-two-way.h (critical_factorization): MSB. (two_way_short_needle): MS. * lib/wcsstr-impl.h (FUNC): MRSB. * lib/wcswidth-impl.h (FUNC): B. * lib/wcsxfrm-impl.h (wcsxfrm): MR. * lib/wctomb-impl.h (wctomb): M. * lib/wgetcwd-lgpl.c (wgetcwd): MRS. * lib/windows-cond.c (glwthread_waitqueue_add): M. (glwthread_waitqueue_notify_first): M. (glwthread_waitqueue_notify_all): M. (glwthread_cond_wait): M. (glwthread_cond_timedwait): MRS. * lib/windows-cygpath.c (execute_and_read_line): MR. * lib/windows-rwlock.c (glwthread_waitqueue_add): M. (glwthread_rwlock_rdlock): M. (glwthread_rwlock_wrlock): M. * lib/windows-spawn.c (quoted_arg_length): M. (quoted_arg_string): M. (prepare_spawn): MR. (compose_command): MRB. (compose_envblock): RSB. * lib/windows-thread.c (glwthread_thread_self): M. (glwthread_thread_create): M. * lib/windows-timedmutex.c (glwthread_timedmutex_timedlock): MR. * lib/windows-timedrecmutex.c (glwthread_timedrecmutex_timedlock): MR. * lib/windows-timedrwlock.c (glwthread_waitqueue_add): M. (glwthread_waitqueue_notify_first): M. (glwthread_waitqueue_notify_all): M. (glwthread_timedrwlock_rdlock): M. (glwthread_timedrwlock_wrlock): M. (glwthread_timedrwlock_timedrdlock): MR. (glwthread_timedrwlock_timedwrlock): MR. * lib/xasprintf.c (xasprintf): M. * lib/xconcat-filename.c (xconcatenated_filename): M. * lib/xmalloc.c (xpalloc): R. * lib/xmalloca.c (xmmalloca): M. * lib/xprintf.c (xprintf): M. (xfprintf): M. * lib/xstring-buffer-printf.c (sb_xappendf): M. * lib/xstring-buffer-reversed-printf.c (sbr_xprependf): M. * lib/xstrtod.c (XSTRTOD): MR. * lib/xstrtol.c (__xstrtol): R. * lib/xstrtol-error.c (xstrtol_error): R. * lib/xvasprintf.c (xstrcat): MB. (xvasprintf): R. * lib/zprintf.c (zprintf): M. |
||
|
|
cef883c1d7 |
thread: Remove support for IRIX.
* lib/glthread/thread.h: Remove code for IRIX. |
||
|
|
19adc7a2f5 |
Remove support for OSF/1.
* all-modules: Update comments. * build-aux/install-reloc: Likewise. * gnulib-tool: Likewise. * gnulib-tool.py: Likewise. * gnulib-tool.sh: Likewise. * lib/calloc.c: Likewise. * lib/euidaccess.c: Likewise. * lib/fbufmode.c: Likewise. * lib/fflush.c: Likewise. * lib/fpending.c: Likewise. * lib/fpurge.c: Likewise. * lib/freadable.c: Likewise. * lib/freadahead.c: Likewise. * lib/freading.c: Likewise. * lib/freadptr.c: Likewise. * lib/freadseek.c: Likewise. * lib/fseeko.c: Likewise. * lib/fseterr.c: Likewise. * lib/fwritable.c: Likewise. * lib/fwriting.c: Likewise. * lib/get-permissions.c: Likewise. * lib/get-rusage-as.c: Likewise. * lib/getdomainname.c: Likewise. * lib/getpass.c: Likewise. * lib/glthread/spin.c: Likewise. * lib/idpriv-drop.c: Likewise. * lib/idpriv-droptemp.c: Likewise. * lib/log10l.c: Likewise. * lib/login_tty.c: Likewise. * lib/minmax.h: Likewise. * lib/mountlist.c: Likewise. * lib/netdb.in.h: Likewise. * lib/nproc.c: Likewise. * lib/passfd.c: Likewise. * lib/posix_openpt.c: Likewise. * lib/resource-ext.h: Likewise. * lib/safe-read.h: Likewise. * lib/safe-write.h: Likewise. * lib/stdint.in.h: Likewise. * lib/stdio.in.h: Likewise. * lib/string.in.h: Likewise. * lib/sys-limits.h: Likewise. * lib/termcap.h: Likewise. * lib/terminfo.h: Likewise. * lib/ttyname_r.c: Likewise. * lib/vasnprintf.c: Likewise. * lib/wait-process.c: Likewise. * m4/fmal.m4: Likewise. * m4/getdomainname.m4: Likewise. * m4/getopt.m4: Likewise. * m4/hypot.m4: Likewise. * m4/hypotf.m4: Likewise. * m4/hypotl.m4: Likewise. * m4/iconv.m4: Likewise. * m4/iconv_open-utf.m4: Likewise. * m4/imaxabs.m4: Likewise. * m4/imaxdiv.m4: Likewise. * m4/largefile.m4: Likewise. * m4/link-follow.m4: Likewise. * m4/locale-fr.m4: Likewise. * m4/locale-ja.m4: Likewise. * m4/locale_h.m4: Likewise. * m4/lock.m4: Likewise. * m4/log10l.m4: Likewise. * m4/mkstemp.m4: Likewise. * m4/mmap-anon.m4: Likewise. * m4/modf.m4: Likewise. * m4/modff.m4: Likewise. * m4/modfl.m4: Likewise. * m4/semaphore.m4: Likewise. * m4/socklen.m4: Likewise. * m4/strerror_r.m4: Likewise. * m4/terminfo.m4: Likewise. * m4/wcwidth.m4: Likewise. * posix-modules: Likewise. * tests/havelib/README: Likewise. * tests/init.sh: Likewise. * tests/socket-client.h: Likewise. * tests/socket-server.h: Likewise. * tests/test-echo.sh: Likewise. * tests/test-nonblocking-socket.h: Likewise. * tests/test-strtod.h: Likewise. * tests/test-strtof.h: Likewise. |
||
|
|
9870493709 | Shorten glibc bug URLs | ||
|
|
a258598ec7 |
spin: New module.
* lib/glthread/spin.h: New file, based on lib/glthread/lock.h and lib/asyncsafe-spin.h. * lib/glthread/spin.c: New file, based on lib/asyncsafe-spin.c. * modules/spin: New file. * doc/multithread.texi (Choosing a multithreading API): Spin locks no longer require POSIX threads. (Gnulib multithreading): Mention the 'spin' module. |
||
|
|
9e054b0b47 |
Fix some ungrammatical uses of "allows to"
This buys back some comment changes from Emacs, and fixes other instances I noticed. |
||
|
|
7b08932179 | maint: run 'make update-copyright' | ||
|
|
2d08d8759b |
doc: Prefer https urls where possible.
* doc/gnulib.texi (POSIXURL): Use https url. * doc/multithread.texi: Use https instead of http where possible. * doc/glibc-functions/*.texi: Likewise. * doc/posix-functions/*.texi: Likewise. * lib/glthread/lock.c: Likewise. * lib/hamt.h: Likewise. * lib/localcharset.c: Likewise. * lib/pipe2.c: Likewise. * lib/pipe.c: Likewise. * lib/sigsegv.c: Likewise. * lib/sigsegv.in.h: Likewise. * lib/sm3.c: Likewise. * lib/sm3.h: Likewise. * lib/sm3-stream.c: Likewise. * lib/stackvma.c: Likewise. * lib/stdio-impl.h: Likewise. * lib/stdnoreturn.in.h: Likewise. * m4/getopt.m4: Likewise. * m4/largefile.m4: Likewise. * m4/stdalign.m4: Likewise. * STATUS-libposix: Likewise. * tests/test-float.c: Likewise. * tests/test-getopt.h: Likewise. * tests/test-setenv.c: Likewise. * tests/test-spawn-pipe-child.c: Likewise. * tests/test-strerror.c: Likewise. * tests/test-strerror_r.c: Likewise. * tests/test-unsetenv.c: Likewise. * users.txt: Likewise. |
||
|
|
4c323abafa |
once: Fix pthread-rwlock crashes with clang (regr. 2024-08-07).
* lib/glthread/once.h: Don't mark pthread_rwlock_init, pthread_rwlockattr_init as weak if we are overriding them. |
||
|
|
fd56043675 |
thread: Reduce dependencies.
* lib/glthread/thread.c: Don't include glthread/lock.h. * modules/thread (Depends-on): Remove lock. |
||
|
|
1d1374e3ed |
once: New module, extracted from lock.
* lib/glthread/once.h: New file, extracted from lib/glthread/lock.h. * lib/glthread/once.c: New file, extracted from lib/glthread/lock.c. * lib/glthread/lock.h: Include glthread/once.h. Don't include windows-once.h. (c11_threads_in_use, glthread_in_use, gl_once_t, gl_once_define, glthread_once): Remove. (glthread_once_singlethreaded, glthread_once_multithreaded): Remove declarations. * lib/glthread/lock.c (fresh_once, glthread_once_singlethreaded, glthread_once_multithreaded): Remove. * modules/once: New file. * modules/lock (Depends-on): Add once. Remove pthread-once, windows-once. * tests/test-once.c: Include glthread/once.h instead of glthread/lock.h. * doc/multithread.texi (Gnulib multithreading): Mention the module 'once'. |
||
|
|
32a0b508a3 |
Fix linkage errors when using C++.
Reported by Miro Palmu <email@miropalmu.cc> in <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00274.html>. * lib/acl.h: Add 'extern "C" {' / '}' boilerplate. * lib/alignalloc.h: Likewise. * lib/aligned-malloc.h: Likewise. * lib/allocator.h: Likewise. * lib/arcfour.h: Likewise. * lib/arctwo.h: Likewise. * lib/areadlink.h: Likewise. * lib/argv-iter.h: Likewise. * lib/argz.in.h: Likewise. * lib/binary-io.h: Likewise. * lib/bitrotate.h: Likewise. * lib/bitset.h: Likewise. * lib/bitsetv.h: Likewise. * lib/c-strcaseeq.h: Likewise. * lib/canon-host.h: Likewise. * lib/careadlinkat.h: Likewise. * lib/chdir-long.h: Likewise. * lib/check-version.h: Likewise. * lib/classpath.h: Likewise. * lib/cloexec.h: Likewise. * lib/close-stream.h: Likewise. * lib/crc.h: Likewise. * lib/csharpcomp.h: Likewise. * lib/csharpexec.h: Likewise. * lib/cycle-check.h: Likewise. * lib/des.h: Likewise. * lib/dev-ino.h: Likewise. * lib/di-set.h: Likewise. * lib/eealloc.h: Likewise. * lib/exclude.h: Likewise. * lib/execinfo.in.h: Likewise. * lib/execute.h: Likewise. * lib/exitfail.h: Likewise. * lib/fcntl-safer.h: Likewise. * lib/file-set.h: Likewise. * lib/file-type.h: Likewise. * lib/filenamecat.h: Likewise. * lib/filevercmp.h: Likewise. * lib/fpending.h: Likewise. * lib/fprintftime.h: Likewise. * lib/fpucw.h: Likewise. * lib/fsusage.h: Likewise. * lib/ftoastr.h: Likewise. * lib/full-read.h: Likewise. * lib/gc.h: Likewise. * lib/getndelim2.h: Likewise. * lib/getnline.h: Likewise. * lib/getugroups.h: Likewise. * lib/glthread/tls.h: Likewise. * lib/hamt.h: Likewise. * lib/hard-locale.h: Likewise. * lib/hash-pjw-bare.h: Likewise. * lib/hash-pjw.h: Likewise. * lib/hash-triple.h: Likewise. * lib/hmac.h: Likewise. * lib/human.h: Likewise. * lib/i-ring.h: Likewise. * lib/idcache.h: Likewise. * lib/idx.h: Likewise. * lib/ino-map.h: Likewise. * lib/inttostr.h: Likewise. * lib/isapipe.h: Likewise. * lib/javacomp.h: Likewise. * lib/javaexec.h: Likewise. * lib/jit/cache.h: Likewise. * lib/linebuffer.h: Likewise. * lib/localeinfo.h: Likewise. * lib/long-options.h: Likewise. * lib/mbchar.h: Likewise. * lib/mbfile.h: Likewise. * lib/mbiter.h: Likewise. * lib/mbiterf.h: Likewise. * lib/mbuiter.h: Likewise. * lib/mbuiterf.h: Likewise. * lib/mcel.h: Likewise. * lib/memcasecmp.h: Likewise. * lib/memcoll.h: Likewise. * lib/memxor.h: Likewise. * lib/mgetgroups.h: Likewise. * lib/mkdir-p.h: Likewise. * lib/modechange.h: Likewise. * lib/mountlist.h: Likewise. * lib/mpsort.h: Likewise. * lib/msvc-nothrow.h: Likewise. * lib/nan.h: Likewise. * lib/openat-priv.h: Likewise. * lib/openat.h: Likewise. * lib/opendirat.h: Likewise. * lib/pagealign_alloc.h: Likewise. * lib/parse-datetime.h: Likewise. * lib/parse-duration.h: Likewise. * lib/physmem.h: Likewise. * lib/posixtm.h: Likewise. * lib/posixver.h: Likewise. * lib/printf-frexp.h: Likewise. * lib/printf-frexpl.h: Likewise. * lib/priv-set.h: Likewise. * lib/quote.h: Likewise. * lib/quotearg.h: Likewise. * lib/read-file.h: Likewise. * lib/readline.h: Likewise. * lib/readtokens.h: Likewise. * lib/readtokens0.h: Likewise. * lib/regex-quote.h: Likewise. * lib/renameatu.h: Likewise. * lib/rijndael-alg-fst.h: Likewise. * lib/rijndael-api-fst.h: Likewise. * lib/safe-alloc.h: Likewise. * lib/safe-write.h: Likewise. * lib/same-inode.h: Likewise. * lib/same.h: Likewise. * lib/save-cwd.h: Likewise. * lib/savedir.h: Likewise. * lib/savewd.h: Likewise. * lib/selinux-at.h: Likewise. * lib/signed-nan.h: Likewise. * lib/signed-snan.h: Likewise. * lib/snan.h: Likewise. * lib/sockets.h: Likewise. * lib/stdio-safer.h: Likewise. * lib/stdlib-safer.h: Likewise. * lib/streq.h: Likewise. * lib/strerror-override.h: Likewise. * lib/tmpdir.h: Likewise. * lib/trim.h: Likewise. * lib/u64.h: Likewise. * lib/unicase/casefold.h: Likewise. * lib/unicase/caseprop.h: Likewise. * lib/unicase/invariant.h: Likewise. * lib/unicase/special-casing.in.h: Likewise. * lib/unicase/unicasemap.h: Likewise. * lib/unicodeio.h: Likewise. * lib/unilbrk/lbrktables.h: Likewise. * lib/unilbrk/ulc-common.h: Likewise. * lib/uninorm/decompose-internal.h: Likewise. * lib/unistd-safer.h: Likewise. * lib/unitypes.in.h: Likewise. * lib/uniwbrk/wbrktable.h: Likewise. * lib/unlinkdir.h: Likewise. * lib/userspec.h: Likewise. * lib/utimecmp.h: Likewise. * lib/utimens.h: Likewise. * lib/windows-spawn.h: Likewise. * lib/write-any-file.h: Likewise. * lib/xbinary-io.h: Likewise. * lib/xgetcwd.h: Likewise. * lib/xgetdomainname.h: Likewise. * lib/xgethostname.h: Likewise. * lib/xmemcoll.h: Likewise. * lib/xprintf.h: Likewise. * lib/xreadlink.h: Likewise. * lib/xsize.h: Likewise. * lib/xstrndup.h: Likewise. * lib/xstrtod.h: Likewise. * lib/xstrtol.h: Likewise. * lib/yesno.h: Likewise. * lib/isnand-nolibm.h (isnand): Declare with C linkage. * lib/isnanf-nolibm.h (isnanf): Likewise. * lib/isnanl-nolibm.h (isnanl): Likewise. |
||
|
|
5b92dd0a45 | maint: run 'make update-copyright' | ||
|
|
f4015ac6ea |
thread: Avoid compiler warnings on Solaris.
* lib/glthread/thread.h: Include <stdint.h>. (gl_thread_self_pointer): Do the cast from pthread_t to 'void *' via intptr_t. * modules/thread (Depends-on): Add stdint. |
||
|
|
3a70af2168 |
gettimeofday, pthread-*, thread, thrd: Don't omit intended initializers.
* lib/gettimeofday.c (gettimeofday): List the initializers of both tv_sec and tv_usec. * lib/glthread/thread.c (gl_thread_self): List the initializers of both tv_sec and tv_nsec. * lib/pthread-cond.c (pthread_cond_wait): Likewise. * lib/thrd.c (rpl_thrd_current): Likewise. * lib/pthread-rwlock.c (MIN): New macro. (pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock): List the initializers of both tv_sec and tv_nsec. Don't modify the duration after having initialized it. * lib/pthread_mutex_timedlock.c (MIN): New macro. (pthread_mutex_timedlock): List the initializers of both tv_sec and tv_nsec. Don't modify the duration after having initialized it. |
||
|
|
88811b7d04 |
timespec: fill in other members
This problem was found when compiling GNU Emacs with --enable-gcc-warnings on a platform where tv_sec is 64 bits and tv_nsec is 32 bits, and struct timespec has padding. GCC -Wuse-of-uninitialized-value complained when a struct timespec initialized only via assigning to tv_sec and tv_nsec was copied via assignment (this was in lib/timespec.h’s make_timespec). Although behavior is well-defined on this platform, the warning is annoying and the behavior might not be well-defined on theoretical platforms where struct timespec has other members. To work around this, initialize all the struct’s members. * lib/getsockopt.c (rpl_getsockopt): * lib/gettime.c (gettime): * lib/gettimeofday.c (gettimeofday): * lib/glthread/thread.c (gl_thread_self): * lib/nanosleep.c (nanosleep): * lib/parse-datetime.y (digits_to_date_time, set_hhmmss) (signed_seconds, unsigned_seconds, yylex, parse_datetime_body): * lib/poll.c (poll): * lib/pselect.c (pselect): * lib/pthread-cond.c (endlessly, pthread_cond_timedwait): * lib/pthread-rwlock.c (pthread_rwlock_timedrdlock) (pthread_rwlock_timedwrlock): * lib/pthread_mutex_timedlock.c (pthread_mutex_timedlock): * lib/select.c (rpl_select): * lib/settime.c (settime): * lib/stat-time.h (get_stat_atime, get_stat_ctime) (get_stat_mtime, get_stat_birthtime): * lib/thrd.c (rpl_thrd_current): * lib/timespec.h (make_timespec): * lib/timespec_getres.c (timespec_getres): * lib/utimecmp.c (utimecmpat): * lib/utimens.c (fdutimens): When filling in a struct timespec or similar time-related structure that might be copied elsewhere, also assign to any storage other than tv_sec and tv_nsec, to avoid undefined behavior on (likely theoretical) platforms where struct timespec has other members, and also to avoid warnings from GCC and/or valgrind. |
||
|
|
45122e72f2 |
Add more reminders to include <config.h>.
* lib/aligned-malloc.h: Check that config.h was already included. * lib/careadlinkat.h: Likewise. * lib/filemode.h: Likewise. * lib/freadptr.h: Likewise. * lib/fseterr.h: Likewise. * lib/glthread/lock.h: Likewise. * lib/glthread/tls.h: Likewise. * lib/immutable.h: Likewise. * lib/isapipe.h: Likewise. * lib/isnand-nolibm.h: Likewise. * lib/isnanf-nolibm.h: Likewise. * lib/isnanl-nolibm.h: Likewise. * lib/mbswidth.h: Likewise. * lib/md5.h: Likewise. * lib/minmax.h: Likewise. * lib/msvc-inval.h: Likewise. * lib/msvc-nothrow.h: Likewise. * lib/pathmax.h: Likewise. * lib/sha1.h: Likewise. * lib/sha256.h: Likewise. * lib/sha512.h: Likewise. * lib/size_max.h: Likewise. * lib/sm3.h: Likewise. * lib/stat-size.h: Likewise. * lib/termcap.h: Likewise. * lib/terminfo.h: Likewise. * lib/thread-optim.h: Likewise. * lib/unlocked-io.h: Likewise. * lib/vma-iter.h: Likewise. |
||
|
|
298293b2d0 |
Adjust comments in <config.h> reminders.
* lib/*.h: In the comments, mention also HAVE_*. |
||
|
|
8ad7bc6714 |
Add more reminders to include <config.h>.
* m4/gnulib-common.m4 (gl_COMMON): In config.h, define _GL_CONFIG_H_INCLUDED. * lib/acl-internal.h: Test _GL_CONFIG_H_INCLUDED instead of _GL_INLINE_HEADER_BEGIN. * lib/alignalloc.h: Likewise. * lib/argp-fmtstream.h: Likewise. * lib/argp.h: Likewise. * lib/binary-io.h: Likewise. * lib/bitrotate.h: Likewise. * lib/c-ctype.h: Likewise. * lib/count-leading-zeros.h: Likewise. * lib/count-one-bits.h: Likewise. * lib/count-trailing-zeros.h: Likewise. * lib/eealloc.h: Likewise. * lib/execinfo.in.h: Likewise. * lib/gethrxtime.h: Likewise. * lib/gl_list.h: Likewise. * lib/gl_map.h: Likewise. * lib/gl_omap.h: Likewise. * lib/gl_openssl.h: Likewise. * lib/gl_oset.h: Likewise. * lib/gl_set.h: Likewise. * lib/gl_xlist.h: Likewise. * lib/gl_xmap.h: Likewise. * lib/gl_xomap.h: Likewise. * lib/gl_xoset.h: Likewise. * lib/gl_xset.h: Likewise. * lib/gl_xsublist.h: Likewise. * lib/glthread/cond.h: Likewise. * lib/hamt.h: Likewise. * lib/ialloc.h: Likewise. * lib/math.in.h: Likewise. * lib/mbchar.h: Likewise. * lib/mbfile.h: Likewise. * lib/mbiter.h: Likewise. * lib/mbuiter.h: Likewise. * lib/openat.h: Likewise. * lib/pipe-filter-aux.h: Likewise. * lib/priv-set.h: Likewise. * lib/safe-alloc.h: Likewise. * lib/savewd.h: Likewise. * lib/se-context.in.h: Likewise. * lib/se-label.in.h: Likewise. * lib/se-selinux.in.h: Likewise. * lib/sig-handler.h: Likewise. * lib/stat-time.h: Likewise. * lib/string-desc-quotearg.h: Likewise. * lib/string-desc.h: Likewise. * lib/sys_socket.in.h: Likewise. * lib/timespec.h: Likewise. * lib/u64.h: Likewise. * lib/uchar.in.h: Likewise. * lib/unistd.in.h: Likewise. * lib/utimens.h: Likewise. * lib/wctype.in.h: Likewise. * lib/xalloc.h: Likewise. * lib/xbinary-io.h: Likewise. * lib/xsize.h: Likewise. * lib/xstring-desc.h: Likewise. * lib/xtime.h: Likewise. * lib/acl.h: Check that config.h was already included. * lib/alignof.h: Likewise. * lib/argmatch.h: Likewise. * lib/argv-iter.h: Likewise. * lib/arpa_inet.in.h: Likewise. * lib/attribute.h: Likewise. * lib/backupfile.h: Likewise. * lib/base32.h: Likewise. * lib/base64.h: Likewise. * lib/basename-lgpl.h: Likewise. * lib/bitset.h: Likewise. * lib/bitsetv.h: Likewise. * lib/c-snprintf.h: Likewise. * lib/c-stack.h: Likewise. * lib/c-strcase.h: Likewise. * lib/c-vasnprintf.h: Likewise. * lib/c-vasprintf.h: Likewise. * lib/c-vsnprintf.h: Likewise. * lib/c-xvasprintf.h: Likewise. * lib/canon-host.h: Likewise. * lib/canonicalize.h: Likewise. * lib/clean-temp.h: Likewise. * lib/concat-filename.h: Likewise. * lib/ctype.in.h: Likewise. * lib/dfa.h: Likewise. * lib/di-set.h: Likewise. * lib/dirent-safer.h: Likewise. * lib/dirent.in.h: Likewise. * lib/dirname.h: Likewise. * lib/eloop-threshold.h: Likewise. * lib/error.in.h: Likewise. * lib/exclude.h: Likewise. * lib/fatal-signal.h: Likewise. * lib/fcntl.in.h: Likewise. * lib/file-type.h: Likewise. * lib/filenamecat.h: Likewise. * lib/filevercmp.h: Likewise. * lib/flexmember.h: Likewise. * lib/fnmatch.in.h: Likewise. * lib/fpending.h: Likewise. * lib/freadable.h: Likewise. * lib/freadahead.h: Likewise. * lib/freading.h: Likewise. * lib/fts_.h: Likewise. * lib/fwritable.h: Likewise. * lib/fwriting.h: Likewise. * lib/gc.h: Likewise. * lib/get_progname_of.h: Likewise. * lib/glob.in.h: Likewise. * lib/glthread/thread.h: Likewise. * lib/hash-pjw-bare.h: Likewise. * lib/hash-pjw.h: Likewise. * lib/hash-triple.h: Likewise. * lib/hash.h: Likewise. * lib/i-ring.h: Likewise. * lib/iconv.in.h: Likewise. * lib/ino-map.h: Likewise. * lib/inttostr.h: Likewise. * lib/inttypes.in.h: Likewise. * lib/javaversion.h: Likewise. * lib/langinfo.in.h: Likewise. * lib/locale.in.h: Likewise. * lib/localename.h: Likewise. * lib/malloc.in.h: Likewise. * lib/malloca.h: Likewise. * lib/memcasecmp.h: Likewise. * lib/memchr2.h: Likewise. * lib/memcmp2.h: Likewise. * lib/modechange.h: Likewise. * lib/monetary.in.h: Likewise. * lib/mountlist.h: Likewise. * lib/netdb.in.h: Likewise. * lib/obstack.h: Likewise. * lib/opendirat.h: Likewise. * lib/pagealign_alloc.h: Likewise. * lib/pipe-filter.h: Likewise. * lib/poll.in.h: Likewise. * lib/pthread.in.h: Likewise. * lib/pty.in.h: Likewise. * lib/quotearg.h: Likewise. * lib/read-file.h: Likewise. * lib/readline.h: Likewise. * lib/readutmp.h: Likewise. * lib/regex-quote.h: Likewise. * lib/relocatable.h: Likewise. * lib/savedir.h: Likewise. * lib/sched.in.h: Likewise. * lib/search.in.h: Likewise. * lib/sh-quote.h: Likewise. * lib/signal.in.h: Likewise. * lib/sigpipe-die.h: Likewise. * lib/sockets.h: Likewise. * lib/spawn.in.h: Likewise. * lib/ssfmalloc.h: Likewise. * lib/stack.h: Likewise. * lib/stdalign.in.h: Likewise. * lib/stdarg.in.h: Likewise. * lib/stddef.in.h: Likewise. * lib/stdio-safer.h: Likewise. * lib/stdio.in.h: Likewise. * lib/stdlib.in.h: Likewise. * lib/stdnoreturn.in.h: Likewise. * lib/strerror-override.h: Likewise. * lib/striconv.h: Likewise. * lib/striconveh.h: Likewise. * lib/striconveha.h: Likewise. * lib/string-buffer.h: Likewise. * lib/string.in.h: Likewise. * lib/strings.in.h: Likewise. * lib/strnlen1.h: Likewise. * lib/sys_file.in.h: Likewise. * lib/sys_ioctl.in.h: Likewise. * lib/sys_random.in.h: Likewise. * lib/sys_resource.in.h: Likewise. * lib/sys_select.in.h: Likewise. * lib/sys_stat.in.h: Likewise. * lib/sys_time.in.h: Likewise. * lib/sys_times.in.h: Likewise. * lib/sys_utsname.in.h: Likewise. * lib/sys_wait.in.h: Likewise. * lib/system-quote.h: Likewise. * lib/term-style-control.h: Likewise. * lib/termios.in.h: Likewise. * lib/textstyle.in.h: Likewise. * lib/threads.in.h: Likewise. * lib/time.in.h: Likewise. * lib/trim.h: Likewise. * lib/utime.in.h: Likewise. * lib/utmp.in.h: Likewise. * lib/vasnprintf.h: Likewise. * lib/verror.h: Likewise. * lib/version-etc.h: Likewise. * lib/wchar.in.h: Likewise. * lib/windows-spawn.h: Likewise. * lib/windows-thread.h: Likewise. * lib/xgetcwd.h: Likewise. * lib/xgetdomainname.h: Likewise. * lib/xgethostname.h: Likewise. * lib/xmalloca.h: Likewise. * lib/xmemdup0.h: Likewise. * lib/xprintf.h: Likewise. * lib/xreadlink.h: Likewise. * lib/xstriconv.h: Likewise. * lib/xstriconveh.h: Likewise. * lib/xstrndup.h: Likewise. * lib/xstrtol-error.h: Likewise. * lib/xvasprintf.h: Likewise. * Makefile (config_h_MACROS*): New variables. (sc_check_config_h_reminder): New rule. |
||
|
|
32a72f4537 | maint: run 'make update-copyright' | ||
|
|
37e0cb5e7e |
thread: pacify gcc -Wbad-function-cast
* lib/glthread/thread.h (gl_thread_self_pointer): With POSIX threads, cast the call to gl_thread_t before casting to void *. |
||
|
|
2f858e5e43 |
Rely on new stdbool behavior
Prefer the C23 style to the C99 style, since the stdbool module now supports C23. * lib/acl-internal.h, lib/acl.h, lib/argmatch.c, lib/argmatch.h: * lib/argp-help.c, lib/argv-iter.h, lib/asyncsafe-spin.c: * lib/backup-internal.h, lib/backupfile.c, lib/base32.h: * lib/base64.h, lib/basename-lgpl.c, lib/bitset/base.h: * lib/c-ctype.h, lib/c-strcasestr.c, lib/canonicalize-lgpl.c: * lib/canonicalize.c, lib/chdir-long.c, lib/chown.c: * lib/classpath.h, lib/clean-temp-private.h: * lib/clean-temp-simple.c, lib/clean-temp-simple.h: * lib/clean-temp.c, lib/clean-temp.h, lib/cloexec.h: * lib/close-stream.c, lib/closein.c, lib/closeout.c, lib/closeout.h: * lib/csharpcomp.h, lib/csharpexec.h, lib/cycle-check.c: * lib/cycle-check.h, lib/des.h, lib/dfa.h, lib/diffseq.h: * lib/dirname.h, lib/exclude.c, lib/exclude.h, lib/execute.c: * lib/execute.h, lib/execvpe.c, lib/fatal-signal.c, lib/fchdir.c: * lib/file-set.h, lib/filevercmp.c, lib/findprog-in.c: * lib/findprog.c, lib/findprog.h, lib/fma.c, lib/fnmatch.c: * lib/fopen.c, lib/freadable.h, lib/freading.h, lib/freopen-safer.c: * lib/fstrcmp.c, lib/fsusage.h, lib/fts.c, lib/fwritable.h: * lib/fwriteerror.c, lib/fwriting.h, lib/gen-uni-tables.c: * lib/getaddrinfo.c, lib/getcwd.c, lib/getloadavg.c: * lib/getndelim2.c, lib/getpass.c, lib/getrandom.c: * lib/git-merge-changelog.c, lib/gl_list.h, lib/gl_map.h: * lib/gl_omap.h, lib/gl_oset.h, lib/gl_set.h, lib/glob.c: * lib/glthread/cond.h, lib/hamt.h, lib/hard-locale.h: * lib/hash-triple.h, lib/hash.h, lib/human.h, lib/i-ring.h: * lib/isapipe.c, lib/javacomp.h, lib/javaexec.h, lib/javaversion.c: * lib/lchown.c, lib/localeinfo.h, lib/localename.c: * lib/long-options.h, lib/malloc/dynarray.h, lib/mbchar.h: * lib/mbfile.h, lib/mbiter.h, lib/mbmemcasecoll.h, lib/mbscasestr.c: * lib/mbsstr.c, lib/mbuiter.h, lib/mkdir-p.h, lib/modechange.h: * lib/mountlist.h, lib/nanosleep.c, lib/nonblocking.h: * lib/nstrftime.c, lib/openat.c, lib/openat.h, lib/os2-spawn.c: * lib/parse-datetime.h, lib/pipe-filter-aux.c, lib/pipe-filter-gi.c: * lib/pipe-filter-ii.c, lib/pipe-filter.h, lib/posixtm.h: * lib/priv-set.c, lib/progreloc.c, lib/propername.c: * lib/pthread-spin.c, lib/quotearg.c, lib/readtokens.c: * lib/readtokens0.h, lib/readutmp.c, lib/regex-quote.h: * lib/regex_internal.h, lib/relocwrapper.c, lib/rename.c: * lib/renameatu.c, lib/rpmatch.c, lib/same.c, lib/same.h: * lib/save-cwd.c, lib/savewd.c, lib/savewd.h, lib/spawn-pipe.h: * lib/spawni.c, lib/stack.h, lib/stat.c, lib/stdckdint.in.h: * lib/strcasestr.c, lib/strfmon_l.c, lib/striconveh.c: * lib/striconveha.h, lib/string-buffer.h, lib/strptime.c: * lib/strstr.c, lib/strtod.c, lib/supersede.h, lib/system-quote.c: * lib/tempname.c, lib/term-style-control.c: * lib/term-style-control.h, lib/textstyle.in.h, lib/time_rz.c: * lib/tmpdir.c, lib/tmpdir.h, lib/tmpfile.c, lib/unicase.in.h: * lib/unicase/caseprop.h, lib/unicase/invariant.h: * lib/unicase/u16-casemap.c, lib/unicase/u16-ct-totitle.c: * lib/unicase/u16-is-invariant.c, lib/unicase/u32-casemap.c: * lib/unicase/u32-ct-totitle.c, lib/unicase/u32-is-invariant.c: * lib/unicase/u8-casemap.c, lib/unicase/u8-ct-totitle.c: * lib/unicase/u8-is-invariant.c, lib/unictype.in.h: * lib/unigbrk.in.h, lib/unigbrk/u16-grapheme-breaks.c: * lib/unigbrk/u32-grapheme-breaks.c: * lib/unigbrk/u8-grapheme-breaks.c: * lib/unigbrk/uc-grapheme-breaks.c, lib/uniname/uniname.c: * lib/unistr.in.h, lib/unlinkdir.h, lib/userspec.h, lib/utime.c: * lib/utimecmp.c, lib/utimens.c, lib/wait-process.h: * lib/windows-cond.c, lib/windows-spawn.c, lib/windows-spawn.h: * lib/windows-timedrwlock.c, lib/write-any-file.h, lib/xbinary-io.c: * lib/xstrtod.h, lib/yesno.h: * tests/nap.h, tests/qemu.h, tests/test-areadlink-with-size.c: * tests/test-areadlink.c, tests/test-areadlinkat-with-size.c: * tests/test-areadlinkat.c, tests/test-base32.c: * tests/test-base64.c, tests/test-ceil2.c, tests/test-ceilf2.c: * tests/test-chown.c, tests/test-dirname.c, tests/test-dup-safer.c: * tests/test-dup3.c, tests/test-exclude.c: * tests/test-execute-child.c, tests/test-execute-main.c: * tests/test-execute-script.c, tests/test-explicit_bzero.c: * tests/test-fchownat.c, tests/test-fcntl-safer.c: * tests/test-fcntl.c, tests/test-fdutimensat.c: * tests/test-filenamecat.c, tests/test-floor2.c: * tests/test-floorf2.c, tests/test-fstatat.c, tests/test-fstrcmp.c: * tests/test-futimens.c, tests/test-getlogin.h, tests/test-getopt.h: * tests/test-hard-locale.c, tests/test-hash.c: * tests/test-idpriv-drop.c, tests/test-idpriv-droptemp.c: * tests/test-immutable.c, tests/test-intprops.c: * tests/test-lchown.c, tests/test-link.c, tests/test-linkat.c: * tests/test-lstat.c, tests/test-mbmemcasecmp.c: * tests/test-mbmemcasecoll.c, tests/test-mkdir.c: * tests/test-mkdirat.c, tests/test-mkfifo.c, tests/test-mkfifoat.c: * tests/test-mknod.c, tests/test-nonblocking-pipe-child.c: * tests/test-nonblocking-pipe-main.c: * tests/test-nonblocking-socket-child.c: * tests/test-nonblocking-socket-main.c, tests/test-open.c: * tests/test-openat.c, tests/test-pipe.c, tests/test-pipe2.c: * tests/test-poll.c, tests/test-posix_spawn-chdir.c: * tests/test-posix_spawn-dup2-stdin.c: * tests/test-posix_spawn-dup2-stdout.c: * tests/test-posix_spawn-fchdir.c, tests/test-posix_spawn-open1.c: * tests/test-posix_spawn-open2.c, tests/test-quotearg-simple.c: * tests/test-quotearg.c, tests/test-readlink.c: * tests/test-readlinkat.c, tests/test-readtokens.c: * tests/test-rename.c, tests/test-renameat.c: * tests/test-renameatu.c, tests/test-rmdir.c, tests/test-round2.c: * tests/test-select.h, tests/test-spawn-pipe-child.c: * tests/test-spawn-pipe-main.c, tests/test-spawn-pipe-script.c: * tests/test-stack.c, tests/test-stat.c, tests/test-supersede.c: * tests/test-symlink.c, tests/test-symlinkat.c: * tests/test-system-quote-main.c: * tests/test-term-style-control-hello.c: * tests/test-term-style-control-yes.c, tests/test-timespec.c: * tests/test-trunc2.c, tests/test-truncf2.c, tests/test-unlink.c: * tests/test-unlinkat.c, tests/test-userspec.c, tests/test-utime.c: * tests/test-utimens.c, tests/test-utimensat.c: * tests/unictype/test-categ_byname.c: * tests/unigbrk/test-uc-is-grapheme-break.c: Don’t include stdbool.h. * modules/acl, modules/xgetcwd: Don’t depend on stdbool, as these modules don’t use bool. * modules/argp, modules/bitset, modules/diffseq, modules/file-has-acl: * modules/gen-uni-tables, modules/getrandom: * modules/hash-triple-simple, modules/posix_spawn-internal: * modules/strcasestr, modules/supersede, modules/system-quote: * modules/uniconv/base, modules/uniname/uniname, modules/utime: * modules/windows-timedrwlock: Depend on stdbool, as these modules use bool. |
||
|
|
eec12c00cf | maint: run 'make update-copyright' | ||
|
|
12b5b00f93 |
Don't use '#pragma weak' for thread functions in Linux/glibc>=2.34.
Suggested by Florian Weimer <fweimer@redhat.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00211.html>. * m4/threadlib.m4 (gl_PTHREADLIB_BODY): Set gl_pthread_in_glibc and set LIBPMULTITHREAD accordingly. (gl_STDTHREADLIB_BODY): Update comments. (gl_THREADLIB_BODY): Define USE_POSIX_THREADS_FROM_LIBC. * lib/glthread/thread.h (c11_threads_in_use): Define to 1 if all POSIX thread functions are in libc. * lib/glthread/lock.h (c11_threads_in_use): Likewise. * lib/glthread/cond.h (c11_threads_in_use): Likewise. * lib/glthread/tls.h (c11_threads_in_use): Likewise. |
||
|
|
5067cc8cde |
thread: Fix test link error on DragonFly BSD 6.0.
* lib/glthread/thread.c (gl_thread_create): Moved to here... * lib/glthread/thread.h (gl_thread_create): ...from here. (_GLTHREAD_THREAD_INLINE): Remove macro. Remove _GL_INLINE_HEADER_BEGIN/END invocations. |
||
|
|
5ffa144085 |
Put LGPLv2+ notices in source files where appropriate.
* lib/**.{h,c,gperf}: Use LGPLv2+ notice whenever the module description
says so.
|
||
|
|
4b94832196 | maint: run 'make update-copyright' | ||
|
|
6adb609cb3 |
threadlib: Fix test-fstrcmp failure on FreeBSD 11.
* m4/threadlib.m4 (gl_THREADLIB_BODY): When weak symbols are not present on FreeBSD, define PTHREAD_IN_USE_DETECTION_HARD. * lib/glthread/threadlib.c: Include <errno.h>. (glthread_in_use): For FreeBSD, provide an alternative implementation that uses pthread_key_create. |
||
|
|
d9e1d5c10d |
thread: pacify GCC on Solaris 10
Problem reported by Kiyoshi KANAZAWA for grep (Bug#43666#29). * lib/glthread/thread.h (gl_thread_self): Use ‘(pthread_t) 0’ instead of ‘(pthread_t) NULL’, to pacify GCC on Solaris 10 where pthread_t is unsigned int. |
||
|
|
5233359455 |
thread: Avoid possible compiler warnings in uses of gl_thread_exit.
* lib/glthread/thread.h (gl_thread_exit): Add a cast to void. |
||
|
|
f30726f699 |
lock: Fix test-once1 failure on FreeBSD 11 (regression from 2020-01-19).
* lib/glthread/lock.c (glthread_once_multithreaded): New function. * lib/glthread/lock.h (glthread_once_multithreaded): New declaration. (glthread_once): Use it. |
||
|
|
2cdc1bafb2 | maint: Run 'make update-copyright' | ||
|
|
49a0828d63 |
pthread-thread, lock: On z/OS, use PTHREAD_RWLOCK_INITIALIZER_NP.
Reported by Daniel Richard G. in <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00001.html> <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00167.html> * lib/pthread.in.h (PTHREAD_RWLOCK_INITIALIZER): Define to PTHREAD_RWLOCK_INITIALIZER_NP when possible. * lib/glthread/lock.h: Allow PTHREAD_RWLOCK_INITIALIZER_NP as an alternative to PTHREAD_RWLOCK_INITIALIZER. * lib/glthread/lock.c: Likewise. |
||
|
|
721d00b450 |
New options --enable-threads=isoc and --enable-threads=isoc+posix.
* m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Accept the options --enable-threads=isoc and --enable-threads=isoc+posix. (gl_THREADLIB_BODY): Test whether the ISO C threads API is available. When both the ISO C and the POSIX threads API are available, choose USE_ISOC_AND_POSIX_THREADS instead of USE_POSIX_THREADS if --enable-threads=isoc+posix was specified. When only the ISO C threads API is available and --enable-threads=iso was specified, choose USE_ISOC_THREADS. * lib/glthread/lock.h: Add new code for USE_ISOC_THREADS || USE_ISOC_AND_POSIX_THREADS. * 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/glthread/thread.h: Add new code for USE_ISOC_THREADS. Treat USE_ISOC_AND_POSIX_THREADS like USE_POSIX_THREADS. * lib/glthread/thread.c: Likewise. * lib/glthread/threadlib.c: Likewise. * tests/test-lock.c: Save and restore the values of USE_ISOC_THREADS and USE_ISOC_AND_POSIX_THREADS. * tests/test-cond.c: Consider USE_ISOC_THREADS and USE_ISOC_AND_POSIX_THREADS. * tests/test-tls.c: Likewise. * tests/test-thread_create.c (main): Likewise. * tests/test-pthread-cond.c: Likewise. * tests/test-pthread-mutex.c: Likewise. * tests/test-pthread-once2.c: Likewise. * tests/test-pthread-rwlock.c: Likewise. * tests/test-pthread-tss.c: Likewise. * tests/test-pthread_sigmask2.c: Treat USE_ISOC_AND_POSIX_THREADS like USE_POSIX_THREADS. |
||
|
|
72f60af8ed |
windows-rwlock: New module.
* lib/windows-rwlock.h: New file, extracted from lib/glthread/lock.h. * lib/windows-rwlock.c: New file, extracted from lib/glthread/lock.c. * lib/glthread/lock.h: Include windows-rwlock.h. Don't include windows-initguard.h. (gl_rwlock_t): Define using glwthread_rwlock_t. (gl_rwlock_initializer): Define using GLWTHREAD_RWLOCK_INIT. (glthread_rwlock_init): Define using glwthread_rwlock_init. (glthread_rwlock_rdlock): Define using glwthread_rwlock_rdlock. (glthread_rwlock_wrlock): Define using glwthread_rwlock_wrlock. (glthread_rwlock_unlock): Define using glwthread_rwlock_unlock. (glthread_rwlock_destroy): Define using glwthread_rwlock_destroy. (glthread_rwlock_init_func, glthread_rwlock_rdlock_func, glthread_rwlock_wrlock_func, glthread_rwlock_unlock_func, glthread_rwlock_destroy_func): Remove declarations. * lib/glthread/lock.c (gl_waitqueue_t): Remove type. (gl_waitqueue_init, gl_waitqueue_add, gl_waitqueue_notify_first, gl_waitqueue_notify_all, glthread_rwlock_init_func, glthread_rwlock_rdlock_func, glthread_rwlock_wrlock_func, glthread_rwlock_unlock_func, glthread_rwlock_destroy_func): Remove functions. * modules/windows-rwlock: New file. * modules/lock (Depends-on): Add windows-rwlock. |
||
|
|
6f520fb1dd |
windows-thread: Add support for creating a thread in detached state.
* lib/windows-thread.h (GLWTHREAD_ATTR_DETACHED): New macro. (glwthread_thread_create): Add attr argument. * lib/windows-thread.c (glwthread_thread_create): Likewise. * lib/glthread/thread.h (glthread_create): Update. * lib/thrd.c (thrd_create): Update. |
||
|
|
f249808baa |
windows-*: Rename glwthread_spinlock_t to glwthread_initguard_t.
* lib/windows-initguard.h: Renamed from lib/windows-spinlock.h. (glwthread_initguard_t): Renamed from glwthread_spinlock_t. (GLWTHREAD_INITGUARD_INIT): Renamed from GLWTHREAD_SPINLOCK_INIT. * lib/windows-mutex.h: Update. * lib/windows-recmutex.h: Likewise. * lib/windows-timedmutex.h: Likewise. * lib/windows-timedrecmutex.h: Likewise. * lib/windows-cond.h: Likewise. * lib/glthread/lock.h: Likewise. * modules/windows-mutex (Files): Add lib/windows-initguard.h. Remove lib/windows-spinlock.h. * modules/windows-recmutex (Files): Likewise. * modules/windows-timedmutex (Files): Likewise. * modules/windows-timedrecmutex (Files): Likewise. * modules/windows-cond (Files): Likewise. * modules/threads-h (Files): Likewise. |
||
|
|
7ce5f5c77f |
thread, lock, cond, tls: Remove support for Pth threads.
* 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. |