diff --git a/doc/paccapability.pod b/doc/paccapability.pod index 319b341..d968334 100644 --- a/doc/paccapability.pod +++ b/doc/paccapability.pod @@ -9,7 +9,7 @@ paccapability - query libalpm capabilities =head1 DESCRIPTION -B provides a way to query which features libalpm was built with. +B provides a way to query which features L was built with. Recognized capabilities are: =over @@ -52,3 +52,11 @@ Display version information and exit. paccapability signatures >/dev/null && ... =back + +=head1 SEE ALSO + +=over + +L + +=back diff --git a/doc/pacconf.pod b/doc/pacconf.pod index d814910..3868472 100644 --- a/doc/pacconf.pod +++ b/doc/pacconf.pod @@ -15,7 +15,7 @@ a normalized format. By default, if only a single I is provided, only its value will be printed without the option name. For directives without a value, the directive name will be used as the value. -The values displayed are the final values as would be parsed by pacman itself. +The values displayed are the final values as would be parsed by L itself. All default values are set, C directives are processed, C<$arch> and C<$repo> variables in repository servers are replaced, and C will be replaced if set to C. diff --git a/doc/paclog.pod b/doc/paclog.pod index e6c9f32..5ab5c07 100644 --- a/doc/paclog.pod +++ b/doc/paclog.pod @@ -100,6 +100,6 @@ Display errors, warnings, and notes. B determines whether or not to read the log file from F based on a naive check using L. If B is called in an environment, such as a shell function or script being used in a pipe, where F is not -connected to a terminal but does not a log file to parse, B should be +connected to a terminal but does not contain a log file to parse, B should be called with F closed. For POSIX-compatible shells, this can be done with C<< <&- >>. diff --git a/doc/pacrepairdb.pod b/doc/pacrepairdb.pod index e4a9dd7..ba93301 100644 --- a/doc/pacrepairdb.pod +++ b/doc/pacrepairdb.pod @@ -67,7 +67,7 @@ Disable low-speed timeouts for downloads. =item B<--print-only> -Display the packages to be repaired and the cache packages to be used and exit. +Display the packages to be repaired and the cached packages to be used and exit. =item B<--root>=F @@ -107,7 +107,7 @@ nonetheless has the same name and version, B will blindly install it, worsening any database problems. B does not check for leftover orphaned files. It is the user's -responsibility locate and handle orphaned files. +responsibility to locate and handle orphaned files. B determines whether or not to read package names from F based on a naive check using L. If B is called in an diff --git a/ext/globdir.c/t/Makefile b/ext/globdir.c/t/Makefile index 66c0a51..999a778 100644 --- a/ext/globdir.c/t/Makefile +++ b/ext/globdir.c/t/Makefile @@ -4,6 +4,11 @@ GIT ?= git CFLAGS += -Wall -Wextra -Wpedantic -g +LBITS := $(shell getconf LONG_BIT) +ifeq ($(LBITS),32) + CFLAGS += -D_FILE_OFFSET_BITS=64 +endif + override CPPFLAGS += -I.. TESTS = \ diff --git a/ext/mini.c/t/Makefile b/ext/mini.c/t/Makefile index 8232a53..2588a49 100644 --- a/ext/mini.c/t/Makefile +++ b/ext/mini.c/t/Makefile @@ -2,6 +2,11 @@ CFLAGS += -Wall -Wextra -Wpedantic -g +LBITS := $(shell getconf LONG_BIT) +ifeq ($(LBITS),32) + CFLAGS += -D_FILE_OFFSET_BITS=64 +endif + override CPPFLAGS += -I.. TESTS = 01-sanity.t 10-basic.t 10-lookup.t 90-smoke.t diff --git a/lib/Makefile b/lib/Makefile index a8c368c..3f00f40 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -5,6 +5,11 @@ ALPM_CFLAGS ?= $(shell pkg-config libalpm --cflags) CFLAGS ?= -Wall -Wextra -Wpedantic -Werror -g +LBITS := $(shell getconf LONG_BIT) +ifeq ($(LBITS),32) + CFLAGS += -D_FILE_OFFSET_BITS=64 +endif + override CFLAGS += $(ALPM_CFLAGS) override LDLIBS += -lalpm diff --git a/lib/pacutils/ui.c b/lib/pacutils/ui.c index 77f712c..d629402 100644 --- a/lib/pacutils/ui.c +++ b/lib/pacutils/ui.c @@ -515,7 +515,7 @@ void pu_ui_cb_download(void *ctx, const char *filename, (int)(100 * downloaded / s->total)); } else { fprintf(c->out, "(%d/%d) %s (%jd)\r", - c->index + 1, num, s->filename, s->downloaded); + c->index + 1, num, s->filename, (intmax_t)s->downloaded); } } fflush(c->out); diff --git a/src/Makefile b/src/Makefile index 708bca1..c9fecd6 100644 --- a/src/Makefile +++ b/src/Makefile @@ -5,6 +5,11 @@ ALPM_CFLAGS ?= $(shell pkg-config libalpm --cflags) CFLAGS ?= -Wall -Wextra -Wpedantic -Werror -g +LBITS := $(shell getconf LONG_BIT) +ifeq ($(LBITS),32) + CFLAGS += -D_FILE_OFFSET_BITS=64 +endif + override CFLAGS += $(ALPM_CFLAGS) override CPPFLAGS += -I../lib override LDFLAGS += -L../lib diff --git a/t/Makefile b/t/Makefile index 4e4d447..b34069e 100644 --- a/t/Makefile +++ b/t/Makefile @@ -2,6 +2,11 @@ CFLAGS += -Wall -g -Wextra -I../lib LDFLAGS += -L../lib LDLIBS += -lpacutils -lalpm -larchive +LBITS := $(shell getconf LONG_BIT) +ifeq ($(LBITS),32) + CFLAGS += -D_FILE_OFFSET_BITS=64 +endif + ALPM_CFLAGS ?= $(shell pkg-config libalpm --cflags) override CFLAGS += $(ALPM_CFLAGS)