| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
Fixes https://bugs.debian.org/1050089.
* bootstrap.conf: If the `--skip-po` option is explicitly passed, then
don't pass `--po-base` or `--po-domain` options to `gnulib-tool`, and
don't merge `gl/ref-po/` into `gl/po/`.
|
|
|
|
|
| |
* bootstrap.conf (GNULIB_REVISION): Set to
d1b40e09c9c04d5c1ff120373397c6180bc16beb.
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Add `year2038-recommended`.
* NEWS.md: Document this.
|
|
|
|
|
|
|
|
|
| |
* bootstrap: Sync to Gnulib b7f7ed06961454cdf77b93c6c00c3e3f26202663.
* bootstrap.conf (GNULIB_REVISION): Set to
b7f7ed06961454cdf77b93c6c00c3e3f26202663.
* src/tests/Makefile.am (fspause_LDADD): Link with `$(NANOSLEEP_LIB)`
instead of `$(LIB_NANOSLEEP)`.
* NEWS.md: Document this.
|
|
|
|
|
| |
* bootstrap.conf (GNULIB_REVISION): Set to
c5dc86ca5c2e5c16177508bc32afe755b7995685.
|
|
|
|
|
|
| |
* bootstrap.conf (bootstrap_epilogue): Avoid leaving
`docs/INSTALL.autoconf` as a dangling symbolic link if the `--copy`
option is not used.
|
|
|
|
|
|
|
| |
* bootstrap: Sync to Gnulib 32a72f45374c9a36afa574d1a08bb98090270012.
* bootstrap.conf (GNULIB_REVISION): Set to
32a72f45374c9a36afa574d1a08bb98090270012.
* NEWS.md: Document this.
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Add sigpipe.
* src/mandb.c (main): Drop `#ifdef SIGPIPE` guards, as Gnulib now
ensures that it's defined.
|
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Add termios.
* src/man.c (get_term): Replace with a no-op stub if the system has no
`<termios.h>` (Gnulib tests for it and can replace some functions, but
its replacement isn't sufficient here).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a step towards being able to reproduce the same database given
the same manual page tree.
* bootstrap.conf (gnulib_modules): Add stpcpy.
* libdb/db_lookup.c (name_ext_equals): Remove static; add pure
attribute.
(name_ext_compare): New function.
(list_extensions): Add entries in sorted order.
* libdb/db_storage.h (name_ext_equals, name_ext_compare): Add
prototypes.
* libdb/db_store.c (make_extensions_reference): New function.
(dbstore): When building or updating multi key references, maintain them
in sorted order.
* NEWS.md: Document this.
|
|
|
|
|
|
|
|
|
| |
Fixes https://gitlab.com/cjwatson/man-db/-/issues/6.
* bootstrap: Sync to Gnulib df336dc1ae60d8ad9f452f2234951133fe617bb0.
* bootstrap.conf (GNULIB_REVISION): Set to
df336dc1ae60d8ad9f452f2234951133fe617bb0.
* NEWS.md: Document build fix.
|
|
|
|
|
|
|
|
|
|
| |
In line with Gnulib, we now require Automake 1.14.
* bootstrap.conf (GNULIB_REVISION): Set to
8c4f4d7a3c28f88b64fce2fb1d0dc0e570d1a482.
(buildreq): Bump required automake version to 1.14.
* configure.ac (AM_INIT_AUTOMAKE): Bump minimum version to 1.14.
* NEWS.md: Document this.
|
|
|
|
|
|
|
| |
This can be made slightly more portable (e.g. to MinGW).
* bootstrap.conf (gnulib_modules): Add raise.
* lib/cleanup.c (sighandler): Call raise rather than kill.
|
|
|
|
|
|
| |
* bootstrap: Sync to Gnulib 735f319cde4ab7e98294557181d682564241d846.
* bootstrap.conf (GNULIB_REVISION): Set to
735f319cde4ab7e98294557181d682564241d846.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The usual idiom for fatal error reporting in man-db is `error (FATAL,
...)` (there are a few cases using different exit codes, but they're
less common). Unfortunately, there's no easy way to tell the compiler
that this call doesn't return, because `error (0, ...)` *does* return.
As a result, some call sites required extra work to give the compiler
this information, which can sometimes make a difference to static
analysis.
To simplify this, add a new `fatal` helper function which always exits
`FATAL` (i.e. 2) and never returns. This is declared with `_Noreturn`
so that the compiler can straightforwardly know what's going on.
* bootstrap.conf (gnulib_modules): Add verror.
(XGETTEXT_OPTIONS): Add --flag=fatal:2:c-format.
* lib/fatal.c, lib/fatal.h: New files.
* lib/Makefile.am (libman_la_SOURCES): Add fatal.c and fatal.h.
* src/tests/Makefile.am (AM_CPPFLAGS): Add -I$(top_srcdir)/lib.
(get_mtime_LDADD): Add $(top_builddir)/lib/libman.la.
* lib/pathsearch.c (pathsearch, directory_on_path): Use fatal.
* lib/sandbox.c (can_load_seccomp, make_seccomp_filter, _sandbox_load):
Likewise.
* lib/security.c (gripe_set_euid): Likewise.
* lib/xregcomp.c (xregcomp): Likewise.
* libdb/db_lookup.c (gripe_corrupt_data, dblookup_pattern): Likewise.
* libdb/db_ver.c (dbver_wr): Likewise.
* src/accessdb.c (main): Likewise.
* src/catman.c (parse_for_sec): Likewise.
* src/check_mandirs.c (chown_if_possible): Likewise.
* src/man-recode.c (recode): Likewise.
* src/man.c (open_cat_stream, format_display, gripe_converting_name):
Likewise.
* src/manconv.c (add_output): Likewise.
* src/manp.c (add_dir_to_path_list): Likewise.
* src/tests/get-mtime.c (main): Likewise.
* src/whatis.c (do_apropos): Likewise.
* src/zsoelim.l (<so>\"?[^ \t\n\"]+\"?): Likewise.
* libdb/db_lookup.c (gripe_corrupt_data, gripe_replace_key): Declare as
_Noreturn.
* src/accessdb.c (main): Remove now-unnecessary assertion.
* src/man.c (gripe_converting_name): Remove now-unnecessary abort.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In d9ebedad15 (man-db 2.7.0), mandb started relying on the modification
times of database files themselves rather than using a special row, in
order to make databases reproducible between otherwise-identical
installations (subject to predictable behaviour from the underlying
database).
There was a difficulty with this change. Because purging deleted pages
from the database opened and closed the database in a separate phase
before the main phase of looking for updated manual pages, and because
the main phase relies on comparing against the mtime of the database to
find changed files, I had to arrange to restore the original mtime at
the end of the purge phase in order to avoid confusing the main phase
into being a no-op. However, in some cases (perhaps due to other bugs,
but nevertheless), it's possible for the purge phase to find work to do
without the main phase ever finding any modified directories, which
meant that the net effect of mandb would be to modify its database
without changing its mtime. This is bad form, and confused some backup
systems into believing that the filesystem had been corrupted, since
files having their contents changed without updating their mtime is
indeed a likely symptom of filesystem corruption.
To avoid this, restructure our database-handling code so that a given
mandb run opens any given database at most once. This means that we no
longer need to modify mtimes manually, so the usual filesystem rules
apply.
Fixes Debian bug #1004355 and Ubuntu bug #1411633.
* bootstrap.conf (gnulib_modules): Remove futimens.
* libdb/db_btree.c (man_btree_close): Rename to ...
(man_btree_free): ... this. Check whether wrap->file is set. Free
wrap->mtime.
(man_btree_new): New function.
(man_btree_open): Convert to running on the result of man_btree_new.
(man_btree_get_time): Cache return value in wrap->mtime.
(man_btree_set_time): Remove.
* libdb/db_gdbm.c (man_gdbm_new): New function.
(man_gdbm_open_wrapper): Convert to running on the result of
man_gdbm_new.
(man_gdbm_get_time): Cache return value in wrap->mtime.
(man_gdbm_set_time): Remove.
(raw_close): Check whether wrap->file is set.
(man_gdbm_close): Rename to ...
(man_gdbm_free): ... this.
* libdb/db_ndbm.c (raw_close): Check whether wrap->file is set.
(man_ndbm_close): Rename to ...
(man_ndbm_free): ... this.
(man_ndbm_new): New function.
(man_ndbm_open): Convert to running on the result of man_ndbm_new.
(man_ndbm_get_time): Cache return value in wrap->mtime.
(man_ndbm_set_time): Remove.
* libdb/db_xdbm.c (man_xdbm_close): Rename to ...
(man_xdbm_free): ... this. Update all callers. Free dbf->mtime.
* libdb/db_xdbm.h (man_xdbm_close): Rename to ...
(man_xdbm_free): ... this.
* libdb/mydbm.h (man_gdbm_wrapper, man_ndbm_wrapper, man_btree_wrapper):
Add mtime.
(man_gdbm_new, man_ndbm_new, man_btree_new): Add prototypes.
(man_gdbm_open_wrapper, man_ndbm_open, man_btree_open): Update
prototypes.
(man_gdbm_set_time, man_ndbm_set_time, man_btree_set_time): Remove
prototypes.
(man_gdbm_close, man_ndbm_close, man_btree_close): Rename to ...
(man_gdbm_free, man_ndbm_free, man_btree_free): ... these, respectively.
(MYDBM_NEW): New macro.
(MYDBM_CTRWOPEN, MYDBM_RWOPEN, MYDBM_RDOPEN): Rename file argument to
wrap.
(MYDBM_CLOSE): Rename to ...
(MYDBM_FREE): ... this.
(MYDBM_SET_TIME): Remove macro.
* src/catman.c (parse_for_sec): Take a MYDBM_FILE argument rather than a
database path.
* src/check_mandirs.c (gripe_rwopen_failed, testmandirs, create_db,
update_db, purge_missing): Likewise.
* src/mandb.c (update_one_file, update_db_wrapper): Likewise.
* src/straycats.c (straycats): Likewise.
* src/check_mandirs.h (create_db, update_db, purge_missing): Update
prototypes.
* src/straycats.h (straycats): Likewise.
* src/check_mandirs.c (ensure_db_open): New function.
(testmandirs): Only open the database if it wasn't already open, and
don't close it.
(update_db, purge_missing): Likewise.
* src/mandb.c (update_one_file): Likewise.
* src/straycats.c (straycats): Assert that the database is already open,
and don't close it.
* src/accessdb.c (main): Update database opening code.
* src/catman.c (post_fork): Update database closing code.
(parse_for_sec): Move database opening and closing code to ...
(main): ... here, and update it.
* src/man.c (dbdelete_wrapper): Update database opening and closing
code.
* src/whatis.c (search): Update database opening and closing code.
* src/check_mandirs.c (purge_missing): Don't reorganize the database.
* src/mandb.c (mandb): Create a MYDBM_FILE from the database path, and
close and free it before returning. Rearrange purging so that it runs
on the temporary database copy, which we close and remove if
purge_missing finds a consistency problem requiring us to rescan from
scratch. Unless purging requires a rescan, all of the purge, main, and
stray cats phases now run on the same open database file. Reorganize
the database before closing it if the purge phase did any work.
(process_manpath): Rename the temporary database into place if either of
the purge or stray cats phases did any work, even if the main phase
didn't.
* src/check_mandirs.c (update_db_time): Remove.
(create_db): Don't manually update the database mtime.
(update_db, purge_missing): Likewise.
* src/tests/Makefile.am (ALL_TESTS): Add mandb-purge-updates-timestamp.
(check_PROGRAMS): Add get-mtime.
(get_mtime_SOURCES, get_mtime_LDADD): Add.
* src/tests/get-mtime.c: New file: test helper to get a file's mtime
portably.
* src/tests/mandb-purge-updates-timestamp: New file.
* .gitignore: Add src/tests/get-mtime.
* NEWS: Document this.
|
|
|
|
|
|
| |
* bootstrap: Sync to Gnulib 1eae0f7ea3c220d054025f2c9211700665f9f4a0.
* bootstrap.conf (GNULIB_REVISION): Set to
1eae0f7ea3c220d054025f2c9211700665f9f4a0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In line with Gnulib, we now require Autoconf 2.64.
* bootstrap: Sync to Gnulib 14db2b71b5bd05b94ec6126617fd32cd5f1016cd.
* bootstrap.conf (GNULIB_REVISION): Set to
14db2b71b5bd05b94ec6126617fd32cd5f1016cd.
(buildreq): Bump required autoconf version to 2.64.
* configure.ac (AC_PREREQ): Bump to 2.64.
(--enable-gcc-warnings): New option, based on code in coreutils. Use
this to enable -fanalyzer only if --enable-gcc-warnings=expensive is
used; it's useful but slow.
* include/manconfig.h.in (create_tempdir, appendstr): Move NODISCARD to
the start of these function declarations, required by draft C2x.
* patches/argp-domain.patch: Rebase.
* NEWS: Document this.
|
|
|
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Add c99 (already used indirectly, but
seems like a good idea to request directly now). Remove getopt-gnu,
lock, and unsetenv, none of which we use directly. Replace fcntl with
fcntl-h and signal with signal-h, since we use the corresponding header
files directly but not the corresponding functions.
* .gitignore: Remove lib/getopt.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
manconfig.h previously used _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM without
first including "stdio.h", which caused build failures. We should be
using the public names anyway.
* bootstrap.conf (gnulib_modules): Add attribute.
* include/manconfig.h.in (create_tempdir, appendstr): Use NODISCARD
rather than _GL_ATTRIBUTE_NODISCARD.
* include/manconfig.h.in (debug, debug_error): Use ATTRIBUTE_FORMAT
rather than _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM.
* lib/debug.c (vdebug): Likewise.
* include/manconfig.h.in (appendstr): Use ATTRIBUTE_SENTINEL rather than
_GL_ATTRIBUTE_SENTINEL.
* lib/encodings.c (get_page_encoding): Use ATTRIBUTE_MALLOC rather than
_GL_ATTRIBUTE_MALLOC.
* lib/util.c (trim_spaces): Likewise.
* lib/encodings.c (is_roff_device, get_output_encoding,
get_less_charset, get_jless_charset): Use ATTRIBUTE_PURE rather than
_GL_ATTRIBUTE_PURE.
* lib/glcontainers.c (string_equals, string_hash): Likewise.
* lib/security.c (running_setuid): Likewise.
* src/manp.c (canonicalized_path_equals, canonicalized_path_hash):
Likewise.
* src/whatis.c (match): Likewise.
* libdb/db_lookup.c (dash_if_unset): Use ATTRIBUTE_CONST rather than
_GL_ATTRIBUTE_CONST.
* libdb/db_store.c (compare_ids): Likewise.
|
|
|
|
|
|
| |
* bootstrap: Sync to Gnulib d4429157c13b49d1749f5ea18fb30e24ffa646aa.
* bootstrap.conf (GNULIB_REVISION): Set to
d4429157c13b49d1749f5ea18fb30e24ffa646aa.
|
|
|
|
|
|
|
|
| |
* bootstrap: Sync to Gnulib d279bc6d9f9323e19ad8c32b6d12ff96dfb0f5ba.
* bootstrap.conf (GNULIB_REVISION): Set to
d279bc6d9f9323e19ad8c32b6d12ff96dfb0f5ba.
(gnulib_modules): Add havelib, needed for AM_GNU_GETTEXT in
configure.ac.
|
|
|
|
|
|
|
|
|
|
|
| |
The bug (https://bugs.debian.org/762677) that this was working around
was fixed in glibc 2.28, or Debian glibc 2.27-2.
* patches/fdutimens-hurd.patch: Remove.
* bootstrap.conf (bootstrap_post_import_hook): Stop applying
patches/fdutimens-hurd.patch.
* Makefile.am (EXTRA_DIST): Remove patches/fdutimens-hurd.patch.
* NEWS: Document this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This has an interface designed for bulk conversion, and so can be much
faster than running "man --recode" on each page.
Fixes Debian bug #933576.
* bootstrap.conf (gnulib_modules): Add renameat, tempname, and unlinkat.
* src/man-recode.c: New file.
* src/Makefile.am (bin_PROGRAMS): Add man-recode.
(man_recode_LDADD, man_recode_SOURCES): Add.
* src/tests/man-recode-in-place, src/tests/man-recode-suffix: New files.
* src/tests/Makefile.am (ALL_TESTS): Add man-recode-in-place and
man-recode-suffix.
* .gitignore: Add src/man-recode.
* po/POTFILES.in: Add src/man-recode.c.
* m4/man-trans-subst.m4 (MAN_TRANS_SUBST): Adjust to support program
names containing dashes.
* configure.ac: Add substitutions for man-recode.
* man/man1/man-recode.man1: New file.
* man/man1/man.man1 (Main modes of operation): Add a note to the
description of --recode suggesting man-recode instead.
* man/man1/manconv.man1 (SEE ALSO): Add reference to man-recode(1).
* man/Makefile.am (man1_MANS): Add man1/man-recode.1.
* man/da/Makefile.am (man1_MANS): Likewise.
* man/de/Makefile.am (man1_MANS): Likewise.
* man/es/Makefile.am (man1_MANS): Likewise.
* man/fr/Makefile.am (man1_MANS): Likewise.
* man/id/Makefile.am (man1_MANS): Likewise.
* man/ja/Makefile.am (man1_MANS): Likewise.
* man/nl/Makefile.am (man1_MANS): Likewise.
* man/pl/Makefile.am (man1_MANS): Likewise.
* man/pt/Makefile.am (man1_MANS): Likewise.
* man/pt_BR/Makefile.am (man1_MANS): Likewise.
* man/ru/Makefile.am (man1_MANS): Likewise.
* man/sr/Makefile.am (man1_MANS): Likewise.
* man/sv/Makefile.am (man1_MANS): Likewise.
* man/tr/Makefile.am (man1_MANS): Likewise.
* man/zh_CN/Makefile.am (man1_MANS): Likewise.
* man/po4a/po4a.cfg: Add support for man-recode.
* man/replace.sin.in: Substitute %man_recode% and %thman_recode%.
* NEWS: Document this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Add manywarnings.
* configure.ac: Add gl_MANYWARN_ALL_GCC, with some refinements to
disable -Wsystem-headers and -Wmissing-field-initializers. Define
GNULIB_NO_VLA=1 to avoid tripping over -Wvla.
* src/accessdb.c (help_filter): Disable -Wformat-nonliteral around this
function.
* src/man.c (help_filter): Likewise.
* src/check_mandirs.c (gripe_rwopen_failed, update_db_time): Factor out
EAGAIN || EWOULDBLOCK check to ...
(is_eagain): ... here, with -Wlogical-op disabled.
* src/lexgrog.l, src/zsoelim.l: Disable -Wsuggest-attribute=malloc,
-Wsuggest-attribute=pure, and -Wunused-macros.
|
| |
|
|
|
|
|
|
| |
We're already using strcasecmp and strncasecmp.
* bootstrap.conf (gnulib_modules): Add strcase.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since we're using Gnulib's container types anyway, we might as well
reduce the maintenance burden of local code, especially since the result
tends to be more concise.
* bootstrap.conf (gnulib_modules): Add hash-map, hash-set, xmap, and
xset.
* lib/glcontainers.h (GL_MAP_FOREACH_START, GL_MAP_FOREACH_END): New
macros.
* lib/orderfiles.c (compare_physical_offsets, order_files): Convert
physical_offsets from a hashtable to a gl_map.
* libdb/db_btree.c (loop_check_hash): Rename to ...
(loop_check): ... this.
(btree_findkey): Convert loop_check from a hashtable to a gl_set.
* libdb/db_gdbm.c (parent_sortkey_hash): Rename to ...
(parent_keys: ... this.
(struct sortkey, parent_sortkey_hashtable_free): Remove.
(sortkey_hashtable_free): Rename to ...
(datum_free): ... this. Adjust for gl_list's expected interface.
(sortkey_compare): Rename to ...
(datum_compare): ... this. Adjust for gl_list's expected interface.
(datum_equals, datum_hash): New functions.
(man_gdbm_firstkey, man_gdbm_nextkey, man_gdbm_close): Convert
parent_keys from a hashtable to a gl_map, and convert its values from
hashtables with manual linking to gl_lists using a hash for fast lookup
by key.
* src/check_mandirs.c (whatis_hash): Rename to ...
(whatis_map): ... this.
(struct whatis_hashent): Rename to ...
(struct whatis): ... this.
(whatis_hashtable_free): Rename to ...
(whatis_free): ... this. Adjust for gl_map's expected interface.
(test_manfile): Convert whatis_map from a hashtable to a gl_map.
* src/globbing.c (struct dirent_hashent): Rename to ...
(struct dirent_names): ... this.
(dirent_hashtable_free): Rename to ...
(dirent_names_free): ... this. Adjust for gl_map's expected interface.
(dirent_hash): Rename to ...
(dirent_map): ... this.
(update_directory_cache): Convert dirent_map from a hashtable to a
gl_map.
* src/man.c (db_hash): Rename to ...
(db_map): ... this.
(db_hashtable_free): Remove.
(try_db, main): Convert db_map from a hashtable to a gl_map.
* src/mandb.c (process_manpath, tried_catdirs_free, purge_catdir,
purge_catdirs, main): Convert tried_catdirs from a hashtable to a
gl_map.
* src/whatis.c (display, main): Convert display_seen from a hashtable to
a gl_set.
* lib/Makefile.am (libman_la_SOURCES): Remove hashtable.c and
hashtable.h.
* lib/README: Remove hashtable.*.
* lib/hashtable.c, lib/hashtable.h: Remove.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This gets rid of some particularly awful allocation spaghetti in
src/globbing.c.
* bootstrap.conf (gnulib_modules): Add rbtree-list.
* lib/orderfiles.c (compare_physical_offsets): Expect arguments to be
const char * rather than const char **.
(order_files): Convert to taking a gl_list_t as an input/output argument
rather than an array. In the HAVE_LINUX_FIEMAP_H case, we produce a new
sorted list.
* lib/orderfiles.h (order_files): Update prototype.
* src/globbing.c (clear_glob): Remove.
(match_in_directory): Convert to gl_list. Remove inter-call allocation
and cleanup machinery.
(look_for_file): Convert to gl_list. Remove glob_t cleanup machinery;
the caller is now responsible for freeing the returned list.
* src/globbing.h (look_for_file): Update prototype.
* src/check_mandirs.c (add_dir_entries, count_glob_matches,
purge_normal): Convert to gl_list.
* src/straycats.c (check_for_stray): Likewise.
* src/check_mandirs.c (purge_whatis, purge_missing): Convert to gl_list.
Free list returned by look_for_file.
* src/globbing_test.c (main): Likewise.
* src/man.c (try_section, do_global_apropos_section): Likewise.
* src/zsoelim.l (zsoelim_open_file): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Add array-list.
* src/manp.c (struct list): Remove.
(struct config_item): New structure.
(config_item_free): New function.
(add_to_list): Rename to ...
(add_config): ... this. Convert to gl_list. Update all callers.
(get_from_list): Rename to ...
(get_config): ... this. Convert to gl_list. Update all callers.
(iterate_over_list): Remove.
(print_list, get_sections, free_config_file, def_path,
get_manpath_from_path, get_mandb_manpath, get_catpath,
is_global_mandir): Port config list handling to gl_list.
(add_to_dirlist): Rename config parameter to config_file.
(read_config_file): Create empty config list. Rename previous local
config variable to config_file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also remove lib/xchown.*; with only one call site, they don't pull their
weight over equivalent inline code.
* bootstrap.conf (gnulib_modules): Add lchown.
* configure.ac (AC_CHECK_FUNCS): Remove check for lchown.
* lib/Makefile.am (libman_la_SOURCES): Remove xchown.c and xchown.h.
* src/check_mandirs.c (chown_if_possible): Always use lchown rather than
chown, and inline the error check.
* po/POTFILES.in: Remove lib/xchown.c.
* po/man-db.pot, po/*.po: Update.
|
|
|
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Add fcntl.
* configure.ac (AC_CHECK_HEADERS): Remove check for fcntl.h.
* libdb/db_btree.c, libdb/db_ndbm.c, libdb/mydbm.h, src/man.c: Include
<fcntl.h> unconditionally.
* src/man.c: Remove conditional definitions of R_OK and X_OK; Gnulib's
<unistd.h> handles these.
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Add xstdopen.
* src/man.c (check_standard_fds): Remove.
(main): Call xstdopen rather than check_standard_fds.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes Savannah bug #50324.
* bootstrap.conf (gnulib_modules): Add hash-pjw-bare, linkedhash-list,
stdbool, and xlist.
* include/manconfig.h.in (MAXDIRS): Remove.
* src/manp.c (tmplist): Remove.
(string_equals, string_hash, string_free): New functions.
(gripe_overlong_list): Remove.
(insert_override_dir, get_manpath_from_path, add_expanded_dir_to_list,
add_dir_to_list, add_man_subdirs, add_dir_to_path_list, create_pathlist,
free_pathlist): Port manpath list handling to gl_list_t.
* src/catman.c (main): Likewise.
* src/man.c (do_global_apropos, local_man_loop, locate_page_in_manpath,
main): Likewise.
* src/mandb.c (main): Likewise.
* src/whatis.c (suitable_manpath, search, main): Likewise.
* src/zsoelim.l (<<EOF>>, zsoelim_parse_file, zsoelim_open_file,
zsoelim_stdin, zsoelim_stdin_data_new): Likewise.
* src/zsoelim_main.c (main): Likewise.
* src/manp.h (create_pathlist, free_pathlist): Update prototypes.
* src/zsoelim.h (zsoelim_open_file, zsoelim_parse_file,
zsoelim_stdin_data_new): Likewise.
* NEWS: Document this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In line with Gnulib, we now require Autoconf 2.63 and Automake 1.11.2.
* bootstrap: Sync to Gnulib d271f868a8df9bbec29049d01e056481b7a1a263.
* bootstrap.conf (GNULIB_REVISION): Set to
d271f868a8df9bbec29049d01e056481b7a1a263.
(buildreq): Bump required autoconf version to 2.63 and required automake
version to 1.11.2.
* configure.ac (AM_SILENT_RULES, AM_PROG_AR): Remove conditionals, which
were there for Automake 1.10 support.
(AC_PREREQ): Bump to 2.63.
* NEWS: Document this.
|
|
|
|
|
|
|
|
|
|
|
| |
The versions of gettext infrastructure files installed by gnulib-tool
don't necessarily match our configured AM_GNU_GETTEXT_VERSION, so we
need to fix things up in bootstrap.
* bootstrap.conf (gnulib_tool_option_extras): Set --po-base to gl/ref-po
rather than gnulib/po.
(bootstrap_post_import_hook): Merge temporary gl/ref-po directory into
gl/po.
|
|
|
|
|
|
| |
* bootstrap: Sync to Gnulib 900ca5c0b092e50f9f17329feea3fbfe2b6e2139.
* bootstrap.conf (GNULIB_REVISION): Set to
900ca5c0b092e50f9f17329feea3fbfe2b6e2139.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This lets us produce more accurate error messages when programs are
invoked with an absolute path.
* bootstrap.conf (gnulib_modules): Add progname.
* include/manconfig.h.in (program_name): Remove.
* src/accessdb.c (main): Call set_program_name rather than similar
hand-rolled code.
* src/catman.c (main): Likewise. Don't free program_name.
* src/globbing_test.c (main): Likewise.
* src/lexgrog_test.c (main): Likewise.
* src/man.c (main): Likewise. Don't free program_name.
* src/manconv_main.c (main): Likewise.
* src/mandb.c (main): Likewise. Don't free program_name.
* src/manpath.c (main): Likewise.
* src/tests/fspause.c (main): Likewise.
* src/whatis.c (main): Likewise.
* src/zsoelim_main.c (main): Likewise.
* src/man.c (manopt_to_env): Run program_name through base_name, since
that's no longer necessarily done up-front.
* src/whatis.c (main): Run program_name through base_name before
comparing it to APROPOS_NAME, since that's no longer necessarily done
up-front.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bootstrap.conf (GNULIB_URL): Remove.
(GNULIB_REVISION): Set to 90f289f249a266b1afb9c63e182f5d979d17df5f.
(gnulib_modules): Replace gettext with gettext-h.
(gnulib_tool_option_extras): Remove --no-cache-modules (accidental
leftover from earlier testing).
(local_gl_dir): Set to 'gnulib-local' to avoid confusion with 'gl' as
the local output directory. Remove 'rm -rf gl' hack, now superseded.
(buildreq): Bump minimum autopoint and gettext versions to 0.18.3,
matching previous change to configure.ac.
* configure.ac (AM_PROG_AR, LT_INIT): Move below gl_EARLY.
* patches/argp-domain.patch: Rebase.
* src/tests/Makefile.am (TESTS_ENVIRONMENT): Remove use of
@LOCALCHARSET_TESTS_ENVIRONMENT@, which is no longer needed by Gnulib.
|
|
We no longer keep autogenerated files in git.
* .gitignore: Add **/Makefile, **/Makefile.in, /ABOUT-NLS, /aclocal.m4,
/build-aux, /config.h.in, /configure, /gl, /gnulib,
docs/INSTALL.autoconf, po/Makefile.in.in, po/Makevars, po/Rules-quot,
po/boldquot.sed, po/en@boldquot.header, po/en@quot.header,
po/insert-header.sin, po/quot.sed, and po/remove-potcdate.sin. Remove
docs/Makefile, gnulib/*, init/Makefile, init/systemd/Makefile,
lib/Makefile, libdb/Makefile, man/Makefile, man/*/Makefile,
manual/Makefile, po/Makefile, po/Makefile.in, src/Makefile,
src/tests/Makefile, and tools/Makefile.
* ABOUT-NLS, Makefile.in, aclocal.m4, autogen.sh, build-aux,
config.h.in, configure, docs/INSTALL.autoconf, docs/Makefile.in, gnulib,
init/Makefile.in, init/systemd/Makefile.in, lib/Makefile.in,
libdb/Makefile.in, man/Makefile.in, man/da/Makefile.in,
man/de/Makefile.in, man/es/Makefile.in, man/fr/Makefile.in,
man/id/Makefile.in, man/it/Makefile.in, man/ja/Makefile.in,
man/nl/Makefile.in, man/pl/Makefile.in, man/po4a/Makefile.in,
man/pt_BR/Makefile.in, man/ru/Makefile.in, man/sr/Makefile.in,
man/sv/Makefile.in, man/tr/Makefile.in, man/zh_CN/Makefile.in,
manual/Makefile.in, po/Makefile.in.in, po/Makevars, po/Rules-quot,
po/boldquot.sed, po/en@boldquot.header, po/en@quot.header,
po/insert-header.sin, po/quot.sed, po/remove-potcdate.sin,
src/Makefile.in, src/tests/Makefile.in, tools/Makefile.in: Remove.
* bootstrap, bootstrap.conf: New files.
* Makefile.am (GNULIB_PO, SUBDIRS, EXTRA_DIST, ACLOCAL_AMFLAGS): Refer
to gl/ rather than gnulib/ (gnulib/ now contains pristine source).
(EXTRA_DIST): Replace autogen.sh with bootstrap and bootstrap.conf.
Replace gnulib/argp-domain.patch with patches/argp-domain.patch. Add
patches/fdutimens-hurd.patch. Remove gnulib/m4/gnulib-cache.m4 and
gnulib/m4/gnulib-tool.m4.
* gnulib/argp-domain.patch: Rename to ...
* patches/argp-domain.patch: ... this. Update target paths.
* gnulib/fdutimens-hurd.patch: Rename to ...
* patches/fdutimens-hurd.patch: ... this. Update target paths.
* configure.ac (AM_GNU_GETTEXT_VERSION): Upgrade to 0.18.3, for
compatibility with current Automake.
(HAVE_GNULIB_PO, AC_CONFIG_FILES): Refer to gl/ rather than gnulib/.
* lib/Makefile.am (libman_la_CPPFLAGS, libman_la_LIBADD): Likewise.
* libdb/Makefile.am (libmandb_la_CPPFLAGS): Likewise.
* src/Makefile.am (AM_CPPFLAGS, LIBMAN): Likewise.
* src/tests/Makefile.am (AM_CPPFLAGS, fspause_LDADD): Likewise.
* docs/HACKING: Describe new policy.
* release.sh: Call ./bootstrap rather than ./autogen.sh.
|