| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* build-aux/pmccabe2html: Don't use reserved _SOURCES namespace.
Use AM_V_GEN. Use LC_ALL=C.
|
|
|
|
| |
* lib/stdbool.in.h: Don't include <OS.h>.
|
|
|
|
|
| |
* lib/tempname.c (try_tempname_len): Use of entropy makes the function
more, not less, secure.
|
|
|
|
|
| |
* lib/tempname.c, lib/tempname.h: Remove incorrect comment,
as the names are not necessarily hard to predict (Bug#57129).
|
|
|
|
| |
* build-aux/bootstrap.conf: Add it.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Copy from bleeding-edge
Autoconf. Don’t define if Autoconf 2.72 or later.
* tests/test-stdbool.c (bool, false, true)
(__bool_true_false_are_defined): Do not require these to be
defined. C23 still requires __bool_true_false_are_defined but
marks it as obsolescent, and it’s no longer worth testing.
(WORKING_BOOL): New macro, which also tests __STDC_VERSION__.
Use it in tests for working bool.
Test for bool instead of for _Bool, which C23 says is obsolescent.
|
|
|
|
|
|
|
|
|
|
| |
* pygnulib/GLEmiter.py: Don't produce Windows CR-LFs on Windows.
(GLEmiter.po_Makevars): Emit a definition of top_builddir, not
top_subdir.
(GLEmiter.po_POTFILES_in): Fix result when sourcebase is 'tests' or
something like that.
(GLEmiter.initmacro_start): Add two more newlines (mistake from
2021-04-11).
|
|
|
|
|
|
|
| |
* pygnulib/constants.py (relinverse): New function.
* pygnulib/GLEmiter.py (GLEmiter.po_Makevars,
GLEmiter.tests_Makefile_am): Use it.
* pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
|
|
|
|
|
|
|
| |
Bug reported by Bruno Haible in
<https://lists.gnu.org/r/bug-gnulib/2022-04/msg00023.html>.
* lib/hamt.c (entry_insert): Remove technically undefined
behavior when shifting an integer of N bits by N or more bits.
|
|
|
|
|
| |
* modules/stdckdint (Depends-on): Add stdbool.
Reported by Bruno Haible.
|
|
|
|
|
|
|
|
| |
* lib/intprops.h (INT_ADD_OK, INT_SUBTRACT_OK, INT_MULTIPLY_OK):
* lib/pipe-filter-ii.c (GetLastError):
* lib/thread-optim.h (gl_multithreaded): Parenthesize
function-like macro definiens beginning with a unary operator;
needed for weird invocations like ‘m (...)[p]’.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
stdckdint.h is part of draft C23 and therefore is more likely
to be familiar to programmers in the future, so prefer it to
intprops.h in files that don’t need non-_WRAPV intprops.h macros.
* lib/alignalloc.c, lib/backupfile.c, lib/fnmatch.c, lib/fnmatch_loop.c:
* lib/group-member.c, lib/malloca.c, lib/posixtm.c, lib/reallocarray.c:
* lib/xmalloc.c:
For files that can use stdckdint.h just as easily as intprops.h,
include the former instead of the latter, and use the former’s
ckd_* macros instead of the latter’s *_WRAPV macros.
* modules/alignalloc, modules/backup-rename, modules/backupfile:
* modules/fnmatch, modules/group-member, modules/malloca:
* modules/posixtm, modules/reallocarray:
* modules/relocatable-prog-wrapper, modules/xalloc:
Depend on stdckdint instead of intprops.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This supports draft C23 <stdckdint.h>.
* doc/posix-headers/stdckdint.texi:
* lib/stdckdint.in.h, modules/stdckdint:
* modules/stdckdint-tests, tests/test-stdckdint.c:
New files.
* MODULES.html.sh, doc/gnulib.texi: Update for new module.
* lib/intprops-internal.h: Include <stdckdint.h> if C23 and
its macros would help and our substitute has not already
started to be included.
(_GL_INT_ADD_WRAPV, _GL_INT_SUBTRACT_WRAPV)
(_GL_INT_MULTIPLY_WRAPV): Use ckd_add, ckd_sub, ckd_mul
if they are defined and would help.
* lib/intprops-internal.h, lib/intprops.h: Improve comments.
The C23 restrictions on stdckdint macros already mostly applied to
intprops.h, so these are clarifications, not further restrictions.
* tests/test-intprops.c: If TEST_STDCKDINT is defined,
include <stdckdint.h> instead of "intprops.h", and test
it instead.
(VERIFY) [TEST_STDCKDINT]: Ignore the arg in this case.
(main) [TEST_STDCKDINT]: Skip tests irrelevant to stdckdint.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/intprops.h: Include new file intprops-internal.h.
(_GL_INT_CONVERT, _GL_INT_NEGATE_CONVERT, _GL_INT_MINIMUM)
(_GL_INT_MAXIMUM, _GL_SIGNED_INT_MAXIMUM, LLONG_MAX, LLONG_MIN)
(_GL_HAVE___TYPEOF__, _GL_SIGNED_TYPE_OR_EXPR)
(_GL_HAS_BUILTIN_ADD_OVERFLOW, _GL_HAS_BUILTIN_MUL_OVERFLOW)
(_GL_HAS_BUILTIN_OVERFLOW_P, _GL__GENERIC_BOGUS)
(_GL_INT_OP_WRAPV, _GL_INT_OP_WRAPV_LONGISH, _GL_INT_OP_CALC)
(_GL_INT_OP_WRAPV_VIA_UNSIGNED, _GL_INT_ADD_RANGE_OVERFLOW)
(_GL_INT_SUBTRACT_RANGE_OVERFLOW)
(_GL_INT_MULTIPLY_RANGE_OVERFLOW):
Move to intprops-internal.h.
(TYPE_SIGNED, EXPR_SIGNED, TYPE_WIDTH, INT_NEGATE_RANGE_OVERFLOW)
(INT_NEGATE_OVERFLOW, INT_ADD_WRAPV, INT_SUBTRACT_WRAPV)
(INT_MULTIPLY_WRAPV): Rename to _GL_ prefix, move to
intprops-internal.h, and define here in terms of the _GL_ name.
* lib/intprops-internal.h: New file, containing the above.
* modules/intprops (Files): Add lib/intprops-internal.h.
|
|
|
|
|
|
|
| |
* lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P)
[_GL_HAS_BUILTIN_OVERFLOW_P]: Use __builtin_sub_overflow_p
directly rather than indirectly via INT_SUBTRACT_OVERFLOW.
This simplifies future changes, and doesn’t change the generated code.
|
|
|
|
|
| |
* lib/verify.h (assume): Use C23's unreachable if available
and if GCC and/or MSC primitives are not available.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gnulib-tool.py (main) Accept options --conditional-dependencies,
--no-conditional-dependencies.
* pygnulib/GLModuleSystem.py (GLModuleTable.addConditional): Use
str(module), not module, as key. Fix logic bug.
(GLModuleTable.getCondition): Simplify.
(GLModuleTable.transitive_closure): Show a warning when there are
duplicate dependencies. Fix logic bug.
(GLModuleTable.transitive_closure_separately): Simplify.
(GLModuleTable.add_dummy): Ignore tests modules. Cope with multiple
lib_SOURCES augmentation lines. Cope with comments at the end of a
lib_SOURCES augmentation line. Add the dummy module at the end of the
modules list.
* pygnulib/GLTestDir.py (GLTestDir.execute): Remove the code that forces
the dummy module to the end of the list.
* pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Add code to
terminate the shell functions. Add code for the dependencies from the
unconditional to the conditional modules. Don't emit AM_CONDITIONAL for
unconditional modules.
|
|
|
|
|
|
|
|
|
| |
* pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet): Remove fileassistant
argument. Don't invoke the 'aux' transformer here. Don't produce Windows
CR-LFs on Windows.
(GLEmiter.autoconfSnippets): Remove fileassistant argument.
* pygnulib/GLImport.py (GLImport.gnulib_comp): Update all callers.
* pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): When removing a
lib_LDFLAGS line, remove also the newline. Fix regex that matches
lib_SOMETHING. Add a newline after each '## begin gnulib module' line.
Don't emit 'endif' lines without corresponding 'if'. When emitting a
'+=' augmentation, make sure it does not get emitted a second time.
Don't emit a blank line when there is no AM_CPPFLAGS augmentation.
Update after getLink() changed. In the value of DEFAULT_TEXT_DOMAIN,
backslash-escape the double-quotes. Don't produce Windows CR-LFs on
Windows. Simplify.
(GLEmiter.tests_Makefile_am): When removing a lib_LDFLAGS line, remove
also the newline. Fix regex that matches lib_SOMETHING. Don't remove a
blank line before EXTRA_DIST. Add a newline after each
'## begin gnulib module' line. Set uses_subdirs also when there is a .c
file in a subdir of tests/. When emitting a '+=' augmentation, make sure
it does not get emitted a second time. Don't produce Windows CR-LFs on
Windows. Simplify.
* pygnulib/GLImport.py (GLImport.execute): Update after getLink()
changed.
|
|
|
|
|
|
|
|
| |
* pygnulib/GLModuleSystem.py (GLModule.shell_id_chars): New constant.
(GLModule.getShellFunc): Don't use md5 just because of an '_' character.
(GLModule.getShellVar): Likewise.
(GLModule.getConditionalName): Include a newline in the md5 input.
* pygnulib/constants.py (ALPHANUMERIC): Remove constant.
|
|
|
|
|
| |
* pygnulib/GLModuleSystem.py (GLModule.getLicense): Separate the warning
logic from the result logic.
|
|
|
|
|
|
|
|
| |
* m4/largefile.m4 (gl_SET_LARGEFILE_SOURCE)
(_AC_SYS_LARGEFILE_MACRO_VALUE):
* m4/year2038.m4 (gl_YEAR2038_EARLY, gl_YEAR2038, gl_YEAR2038_BODY):
Adjust to Autoconf 2.72, which should contain the Gnulib
patches in this area and so should not need to be overridden.
|
|
|
|
| |
* gnulib-tool.py (main): Accept option --extract-tests-module.
|
|
|
|
|
| |
* gnulib-tool.py (main): To test whether a module exists, just call
GLModuleSystem.find and test its return value.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* pygnulib/GLModuleSystem.py (GLModule.getDependencies): Return a
snippet, not a list. Implement dependency of ${module}-tests on
${module}.
(GLModule.getDependenciesWithoutConditions,
GLModule.getDependenciesWithConditions): New methods.
(GLModuleTable.transitive_closure): Call getDependenciesWithConditions.
* pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Call
getDependenciesWithoutConditions.
* gnulib-tool.py (main) [--extract-dependencies]: Update.
|
|
|
|
|
|
|
| |
* pygnulib/GLModuleSystem.py (GLModule.getAutoconfEarlySnippet): Renamed
from GLModule.getAutoconfSnippet_Early.
* pygnulib/GLImport.py: Update.
* pygnulib/GLTestDir.py: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code with self.content.split(section)[-1]
was broken because it recognizes an indented section label.
Similar code with ('\n' + self.content).split('\n' + section)[-1]
would still be broken because it recognizes an indented section label
in the first line of the file.
The code with section_label_regex
was broken because sometimes it returns the second-to-last section with
the given label, not the last one.
Also, whitespace after the colon was not ignored.
* pygnulib/GLModuleSystem.py (GLModule.__init__): Dissect the module
description's contents immediately, once only, in a reliable way.
(GLModule.getDescription, GLModule.getComment): Simplify.
(GLModule.getStatus): Simplify. Return a string.
(GLModule.getStatuses): New function. Return a list.
(GLModule.getNotice, GLModule.getApplicability, GLModule.getFiles,
GLModule.getDependencies, GLModules.getAutoconfSnippet_Early,
GLModules.getAutoconfSnippet, GLModule.getAutomakeSnippet_Conditional,
GLModule.getInclude, GLModule.getLink, GLModule.getLicense_Raw):
Simplify.
(GLModule.getLicense): Remove whitespace after calling getLicense_Raw.
(GLModule.getMaintainer): Simplify.
(GLModuleTable.transitive_closure): Call getStatuses() instead of
getStatus().
* pygnulib/GLEmiter.py: Likewise.
* gnulib-tool.py (main): For --extract-description, --extract-comment,
--extract-status, --extract-notice, --extract-autoconf-snippet,
--extract-automake-snippet, --extract-include-directive,
--extract-link-directive, --extract-maintainer, don't add an extra
newline after the snippet.
|
|
|
|
|
| |
* pygnulib/GLModuleSystem.py (GLModule): Rename field 'module' to
'path'. Fix a typo in a TypeError message.
|
|
|
|
|
| |
* pygnulib/GLModuleSystem.py (GLModule): Convert Windows newlines right
after reading the module description, not in every accessor.
|
|
|
|
|
| |
* pygnulib/GLModuleSystem.py (GLModule): Declare two regexes are class
variables.
|
|
|
|
|
|
|
|
| |
* pygnulib/GLModuleSystem.py (GLModuleSystem.file_is_module): New
method.
(GLModuleSystem.list): Filter the listing in memory; don't use a 'sed'
subprocess.
* gnulib-tool.py (main): Handle mode 'find'.
|
|
|
|
|
|
| |
* gnulib-tool (func_prefixed_modules_in_dir): New function.
(find): Use it, and filter the directory names away after the 'grep'
pass.
|
|
|
|
|
|
| |
* pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): Use an equivalent
regex as gnulib-tool.
* pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
|
|
|
|
|
|
| |
* pygnulib/GLModuleSystem.py (GLModuleTable.transitive_closure): Match
the regex against all lines of the snippet, not only the first line.
* pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet): Likewise.
|
|
|
|
|
|
|
| |
* pygnulib/constants.py: Don't use the "minimal matching" *? construct
when it makes no difference (because we're matching a single line only
and flag re.M is not specified).
* pygnulib/GLModuleSystem.py: Likewise.
|
|
|
|
|
|
|
|
|
|
| |
* pygnulib/GLModuleSystem.py: Don't use flag re.S on regular expressions
that are meant to match a single line only, and remove the use of the
"minimal matching" *? construct whose only purpose was to neutralize the
re.S flag.
* pygnulib/GLEmiter.py: Likewise.
* pygnulib/GLImport.py: Likewise.
* pygnulib/GLTestDir.py: Likewise.
|
|
|
|
|
|
| |
* pygnulib/GLEmiter.py: Don't use flag re.S on regular expressions on
regular expressions with no '.'.
* pygnulib/GLImport.py: Likewise.
|
|
|
|
|
|
|
|
|
| |
This makes these messages consistent with the other "Copying ..." and
"Creating ..." messages.
* gnulib-tool (func_import): Omit $destdir/ from the "Updating"/
"Creating" messages regarding .gitignore files.
* pygnulib/GLImport.py (GLImport._update_ignorelist_): Likewise.
|
|
|
|
|
| |
* pygnulib/GLImport.py (GLImport._update_ignorelist_): In dry-run mode,
say "Update", not "Updating".
|
|
|
|
|
|
|
|
|
| |
* gnulib-tool.py (main): Accept options --vc-files, --no-vc-files.
* pygnulib/GLImport.py (GLImport.__init__): Correct parsing of
gl_VC_FILES directive.
(GLImport.gnulib_cache): Don't treat the value False like None.
(GLImport.execute): Skip the .gitignore file manipulations if vc_files
is False.
|
|
|
|
|
|
| |
* gnulib-tool.py (main): Accept option --witness-c-macro.
* pygnulib/GLConfig.py (GLConfig.__init__): Remove wrong type check of
witness_c_macro argument.
|
|
|
|
|
|
| |
* gnulib-tool.py (main): Initialize each local variable in one place.
I prefer to have pylint tell me about uninitialized variables than to
get the value None at runtime.
|
|
|
|
|
|
|
|
|
| |
* gnulib-tool.py (main): Accept option --po-domain.
* pygnulib/GLEmiter.py (GLEmiter.po_POTFILES_in): Fix variable
reference.
* pygnulib/GLImport.py (GLImport.execute): Don't delete Makefile.in.in
from the gnulib directory. Don't require a shell when invoking wget.
After invoking wget, restore the current directory.
|
|
|
|
| |
* gnulib-tool.py (main): Accept option --macro-prefix.
|
|
|
|
|
| |
* gnulib-tool.py (main): Handle option --makefile-name like all other
string-valued options.
|
|
|
|
| |
* gnulib-tool.py (main): Accept option --no-libtool.
|
|
|
|
|
|
|
| |
* pygnulib/GLConfig.py (GLConfig.__init__): Remove redundant type
checks, left over from 2022-08-04.
(GLConfig.getIncludeGuardPrefix): Improve comment.
(GLConfig.resetMacroPrefix): Optimize.
|
|
|
|
|
|
|
|
|
| |
* gnulib-tool.py (main): Rename variable 'makefile' to 'makefile_name'.
* pygnulib/GLConfig.py: Rename attribute 'makefile' to 'makefile_name'.
* pygnulib/GLMakefileTable.py: Update.
* pygnulib/GLEmiter.py: Likewise.
* pygnulib/GLImport.py: Likewise.
* pygnulib/GLFileSystem.py (GLFileAssistant): Remove unused assignment.
|
|
|
|
|
|
|
|
| |
* pygnulib/constants.py (joinpath): Fix comment.
(as_link_value_at_dest): New function, extracted from link_relative.
(link_relative): Use it.
(link_if_changed): Really don't replace the symbolic link if it does not
need to change.
|
|
|
|
|
| |
* gnulib-tool.py: Remove unused imports.
* pygnulib/*.py: Likewise.
|