summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am724
-rw-r--r--src/Makefile.in3547
-rw-r--r--src/base64.c7
-rw-r--r--src/basename.c5
-rw-r--r--src/cat.c2
-rw-r--r--src/chcon.c10
-rw-r--r--src/chgrp.c2
-rw-r--r--src/chmod.c2
-rw-r--r--src/chown-core.c2
-rw-r--r--src/chown-core.h2
-rw-r--r--src/chown.c2
-rw-r--r--src/chroot.c2
-rw-r--r--src/cksum.c6
-rw-r--r--src/comm.c2
-rw-r--r--src/copy.c29
-rw-r--r--src/copy.h3
-rw-r--r--src/cp-hash.c2
-rw-r--r--src/cp.c22
-rw-r--r--src/csplit.c17
-rw-r--r--src/cu-progs.mk110
-rw-r--r--src/cut.c104
-rw-r--r--src/date.c8
-rwxr-xr-xsrc/dcgen2
-rw-r--r--src/dd.c37
-rw-r--r--src/df.c915
-rw-r--r--src/dircolors.c2
-rw-r--r--src/dircolors.h4
-rw-r--r--src/dircolors.hin4
-rw-r--r--src/dirname.c2
-rw-r--r--src/du.c138
-rw-r--r--src/echo.c2
-rw-r--r--src/env.c8
-rw-r--r--src/expand.c9
-rw-r--r--src/expr.c2
-rw-r--r--src/extent-scan.c14
-rw-r--r--src/extent-scan.h2
-rw-r--r--src/extract-magic2
-rw-r--r--src/factor.c2572
-rw-r--r--src/find-mount-point.c2
-rw-r--r--src/find-mount-point.h2
-rw-r--r--src/fmt.c17
-rw-r--r--src/fold.c9
-rw-r--r--src/fs-is-local.h6
-rw-r--r--src/fs.h8
-rw-r--r--src/getlimits.c2
-rw-r--r--src/group-list.c18
-rw-r--r--src/group-list.h2
-rw-r--r--src/groups.c2
-rw-r--r--src/head.c19
-rw-r--r--src/hostid.c2
-rw-r--r--src/hostname.c2
-rw-r--r--src/id.c44
-rw-r--r--src/install.c15
-rw-r--r--src/ioblksize.h2
-rw-r--r--src/join.c4
-rw-r--r--src/kill.c9
-rw-r--r--src/libstdbuf.c2
-rw-r--r--src/link.c2
-rw-r--r--src/ln.c20
-rw-r--r--src/local.mk526
-rw-r--r--src/logname.c2
-rw-r--r--src/longlong.h2155
-rw-r--r--src/ls.c29
-rw-r--r--src/make-prime-list.c227
-rw-r--r--src/md5sum.c222
-rw-r--r--src/mkdir.c9
-rw-r--r--src/mkfifo.c11
-rw-r--r--src/mknod.c11
-rw-r--r--src/mktemp.c5
-rw-r--r--src/mv.c16
-rw-r--r--src/nice.c14
-rw-r--r--src/nl.c20
-rw-r--r--src/nohup.c2
-rw-r--r--src/nproc.c9
-rw-r--r--src/numfmt.c1527
-rw-r--r--src/od.c56
-rw-r--r--src/operand2sig.c2
-rw-r--r--src/operand2sig.h2
-rw-r--r--src/paste.c9
-rw-r--r--src/pathchk.c2
-rw-r--r--src/pinky.c23
-rw-r--r--src/pr.c37
-rw-r--r--src/primes.h4014
-rw-r--r--src/printenv.c2
-rw-r--r--src/printf.c2
-rw-r--r--src/prog-fprintf.c2
-rw-r--r--src/prog-fprintf.h2
-rw-r--r--src/ptx.c9
-rw-r--r--src/pwd.c2
-rw-r--r--src/readlink.c62
-rw-r--r--src/realpath.c2
-rw-r--r--src/relpath.c2
-rw-r--r--src/relpath.h2
-rw-r--r--src/remove.c97
-rw-r--r--src/remove.h5
-rw-r--r--src/rm.c11
-rw-r--r--src/rmdir.c2
-rw-r--r--src/runcon.c8
-rw-r--r--src/seq.c197
-rw-r--r--src/setuidgid.c13
-rw-r--r--src/shred.c21
-rw-r--r--src/shuf.c9
-rw-r--r--src/sleep.c2
-rw-r--r--src/sort.c142
-rw-r--r--src/split.c44
-rw-r--r--src/stat.c29
-rw-r--r--src/stdbuf.c9
-rw-r--r--src/stty.c28
-rw-r--r--src/su.c520
-rw-r--r--src/sum.c2
-rw-r--r--src/sync.c2
-rw-r--r--src/system.h28
-rw-r--r--src/tac-pipe.c2
-rw-r--r--src/tac.c9
-rw-r--r--src/tail.c12
-rw-r--r--src/tee.c2
-rw-r--r--src/test.c2
-rw-r--r--src/timeout.c95
-rw-r--r--src/touch.c18
-rw-r--r--src/tr.c2
-rw-r--r--src/true.c2
-rw-r--r--src/truncate.c24
-rw-r--r--src/tsort.c2
-rw-r--r--src/tty.c2
-rw-r--r--src/uname.c2
-rw-r--r--src/unexpand.c9
-rw-r--r--src/uniq.c9
-rw-r--r--src/unlink.c2
-rw-r--r--src/uptime.c6
-rw-r--r--src/users.c2
-rw-r--r--src/wc.c2
-rwxr-xr-xsrc/wheel-gen.pl114
-rw-r--r--src/wheel-size.h1
-rw-r--r--src/wheel.h491
-rw-r--r--src/who.c21
-rw-r--r--src/whoami.c2
-rw-r--r--src/yes.c2
137 files changed, 12844 insertions, 6691 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index 06ab6152..00000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,724 +0,0 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-
-
-## Copyright (C) 1990-2012 Free Software Foundation, Inc.
-
-## This program is free software: you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation, either version 3 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# These are the names of programs that are not installed by default.
-# This list is *not* intended for programs like who, nice, chroot, etc.,
-# that are built only when certain requisite system features are detected.
-# Hence, if you want to install programs from this list anyway, say A and B,
-# use --enable-install-program=A,B
-no_install__progs = \
- arch hostname su
-
-build_if_possible__progs = \
- chroot \
- df \
- hostid \
- libstdbuf.so \
- nice \
- pinky \
- stdbuf \
- stty \
- su \
- uptime \
- users \
- who
-
-AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
-
-EXTRA_PROGRAMS = \
- $(no_install__progs) \
- $(build_if_possible__progs) \
- [ \
- base64 \
- basename \
- cat \
- chcon \
- chgrp \
- chmod \
- chown \
- cksum \
- comm \
- cp \
- csplit \
- cut \
- date \
- dd \
- dir \
- dircolors \
- dirname \
- du \
- echo \
- env \
- expand \
- expr \
- factor \
- false \
- fmt \
- fold \
- ginstall \
- groups \
- head \
- id \
- join \
- kill \
- link \
- ln \
- logname \
- ls \
- md5sum \
- mkdir \
- mkfifo \
- mknod \
- mktemp \
- mv \
- nl \
- nproc \
- nohup \
- od \
- paste \
- pathchk \
- pr \
- printenv \
- printf \
- ptx \
- pwd \
- readlink \
- realpath \
- rm \
- rmdir \
- runcon \
- seq \
- sha1sum \
- sha224sum \
- sha256sum \
- sha384sum \
- sha512sum \
- shred \
- shuf \
- sleep \
- sort \
- split \
- stat \
- sum \
- sync \
- tac \
- tail \
- tee \
- test \
- timeout \
- touch \
- tr \
- true \
- truncate \
- tsort \
- tty \
- uname \
- unexpand \
- uniq \
- unlink \
- vdir \
- wc \
- whoami \
- yes
-
-bin_PROGRAMS = $(OPTIONAL_BIN_PROGS)
-
-noinst_PROGRAMS = setuidgid getlimits
-
-pkglibexec_PROGRAMS = $(OPTIONAL_PKGLIB_PROGS)
-
-noinst_HEADERS = \
- chown-core.h \
- copy.h \
- cp-hash.h \
- dircolors.h \
- fiemap.h \
- find-mount-point.h \
- fs.h \
- fs-is-local.h \
- group-list.h \
- ioblksize.h \
- ls.h \
- operand2sig.h \
- prog-fprintf.h \
- remove.h \
- system.h \
- wheel-size.h \
- wheel.h \
- uname.h
-
-EXTRA_DIST = dcgen dircolors.hin tac-pipe.c \
- wheel-gen.pl extract-magic c99-to-c89.diff
-BUILT_SOURCES =
-CLEANFILES = $(SCRIPTS) su
-
-# Also remove these sometimes-built programs.
-# For example, even when excluded, they're built via _sc_check-AUTHORS.
-CLEANFILES += $(no_install__progs)
-
-AM_CPPFLAGS = -I$(top_srcdir)/lib
-
-noinst_LIBRARIES = libver.a
-nodist_libver_a_SOURCES = version.c version.h
-
-# Tell the linker to omit references to unused shared libraries.
-AM_LDFLAGS = $(IGNORE_UNUSED_LIBRARIES_CFLAGS)
-
-# Sometimes, the expansion of $(LIBINTL) includes -lc which may
-# include modules defining variables like 'optind', so libcoreutils.a
-# must precede $(LIBINTL) in order to ensure we use GNU getopt.
-# But libcoreutils.a must also follow $(LIBINTL), since libintl uses
-# replacement functions defined in libcoreutils.a.
-LDADD = libver.a ../lib/libcoreutils.a $(LIBINTL) ../lib/libcoreutils.a
-
-# First, list all programs, to make listing per-program libraries easier.
-# See [ below.
-arch_LDADD = $(LDADD)
-base64_LDADD = $(LDADD)
-basename_LDADD = $(LDADD)
-cat_LDADD = $(LDADD)
-chcon_LDADD = $(LDADD)
-chgrp_LDADD = $(LDADD)
-chmod_LDADD = $(LDADD)
-chown_LDADD = $(LDADD)
-chroot_LDADD = $(LDADD)
-cksum_LDADD = $(LDADD)
-comm_LDADD = $(LDADD)
-nproc_LDADD = $(LDADD)
-cp_LDADD = $(LDADD)
-csplit_LDADD = $(LDADD)
-cut_LDADD = $(LDADD)
-date_LDADD = $(LDADD)
-dd_LDADD = $(LDADD)
-df_LDADD = $(LDADD)
-# See dir_LDADD below
-dircolors_LDADD = $(LDADD)
-dirname_LDADD = $(LDADD)
-du_LDADD = $(LDADD)
-echo_LDADD = $(LDADD)
-env_LDADD = $(LDADD)
-expand_LDADD = $(LDADD)
-expr_LDADD = $(LDADD)
-factor_LDADD = $(LDADD)
-false_LDADD = $(LDADD)
-fmt_LDADD = $(LDADD)
-fold_LDADD = $(LDADD)
-getlimits_LDADD = $(LDADD)
-ginstall_LDADD = $(LDADD)
-groups_LDADD = $(LDADD)
-head_LDADD = $(LDADD)
-hostid_LDADD = $(LDADD)
-hostname_LDADD = $(LDADD)
-id_LDADD = $(LDADD)
-join_LDADD = $(LDADD)
-kill_LDADD = $(LDADD)
-link_LDADD = $(LDADD)
-ln_LDADD = $(LDADD)
-logname_LDADD = $(LDADD)
-ls_LDADD = $(LDADD)
-md5sum_LDADD = $(LDADD)
-mkdir_LDADD = $(LDADD)
-mkfifo_LDADD = $(LDADD)
-mknod_LDADD = $(LDADD)
-mktemp_LDADD = $(LDADD)
-mv_LDADD = $(LDADD)
-nice_LDADD = $(LDADD)
-nl_LDADD = $(LDADD)
-nohup_LDADD = $(LDADD)
-od_LDADD = $(LDADD)
-paste_LDADD = $(LDADD)
-pathchk_LDADD = $(LDADD)
-pinky_LDADD = $(LDADD)
-pr_LDADD = $(LDADD)
-printenv_LDADD = $(LDADD)
-printf_LDADD = $(LDADD)
-ptx_LDADD = $(LDADD)
-pwd_LDADD = $(LDADD)
-readlink_LDADD = $(LDADD)
-realpath_LDADD = $(LDADD)
-rm_LDADD = $(LDADD)
-rmdir_LDADD = $(LDADD)
-runcon_LDADD = $(LDADD)
-seq_LDADD = $(LDADD)
-setuidgid_LDADD = $(LDADD)
-sha1sum_LDADD = $(LDADD)
-sha224sum_LDADD = $(LDADD)
-sha256sum_LDADD = $(LDADD)
-sha384sum_LDADD = $(LDADD)
-sha512sum_LDADD = $(LDADD)
-shred_LDADD = $(LDADD)
-shuf_LDADD = $(LDADD)
-sleep_LDADD = $(LDADD)
-sort_LDADD = $(LDADD)
-split_LDADD = $(LDADD)
-stat_LDADD = $(LDADD)
-stdbuf_LDADD = $(LDADD)
-stty_LDADD = $(LDADD)
-su_LDADD = $(LDADD)
-sum_LDADD = $(LDADD)
-sync_LDADD = $(LDADD)
-tac_LDADD = $(LDADD)
-tail_LDADD = $(LDADD)
-tee_LDADD = $(LDADD)
-test_LDADD = $(LDADD)
-timeout_LDADD = $(LDADD)
-touch_LDADD = $(LDADD)
-tr_LDADD = $(LDADD)
-true_LDADD = $(LDADD)
-truncate_LDADD = $(LDADD)
-tsort_LDADD = $(LDADD)
-tty_LDADD = $(LDADD)
-uname_LDADD = $(LDADD)
-unexpand_LDADD = $(LDADD)
-uniq_LDADD = $(LDADD)
-unlink_LDADD = $(LDADD)
-uptime_LDADD = $(LDADD)
-users_LDADD = $(LDADD)
-# See vdir_LDADD below
-wc_LDADD = $(LDADD)
-who_LDADD = $(LDADD)
-whoami_LDADD = $(LDADD)
-yes_LDADD = $(LDADD)
-
-# Synonyms. Recall that Automake transliterates '[' to '_'.
-__LDADD = $(test_LDADD)
-dir_LDADD = $(ls_LDADD)
-vdir_LDADD = $(ls_LDADD)
-
-# Shared files
-copy_LDADD =
-cp_LDADD += $(copy_LDADD)
-ginstall_LDADD += $(copy_LDADD)
-mv_LDADD += $(copy_LDADD)
-
-remove_LDADD =
-mv_LDADD += $(remove_LDADD)
-rm_LDADD += $(remove_LDADD)
-
-# for eaccess, euidaccess
-copy_LDADD += $(LIB_EACCESS)
-remove_LDADD += $(LIB_EACCESS)
-test_LDADD += $(LIB_EACCESS)
-
-# for selinux use
-chcon_LDADD += $(LIB_SELINUX)
-copy_LDADD += $(LIB_SELINUX)
-ginstall_LDADD += $(LIB_SELINUX)
-id_LDADD += $(LIB_SELINUX)
-ls_LDADD += $(LIB_SELINUX)
-mkdir_LDADD += $(LIB_SELINUX)
-mkfifo_LDADD += $(LIB_SELINUX)
-mknod_LDADD += $(LIB_SELINUX)
-runcon_LDADD += $(LIB_SELINUX)
-stat_LDADD += $(LIB_SELINUX)
-
-# for gettime, settime, utimecmp, utimens
-copy_LDADD += $(LIB_CLOCK_GETTIME)
-date_LDADD += $(LIB_CLOCK_GETTIME)
-ginstall_LDADD += $(LIB_CLOCK_GETTIME)
-ls_LDADD += $(LIB_CLOCK_GETTIME)
-pr_LDADD += $(LIB_CLOCK_GETTIME)
-timeout_LDADD += $(LIB_TIMER_TIME)
-touch_LDADD += $(LIB_CLOCK_GETTIME)
-
-# for gethrxtime
-dd_LDADD += $(LIB_GETHRXTIME)
-
-# for cap_get_file
-ls_LDADD += $(LIB_CAP)
-
-# for fdatasync
-dd_LDADD += $(LIB_FDATASYNC)
-shred_LDADD += $(LIB_FDATASYNC)
-
-# for xnanosleep
-sleep_LDADD += $(LIB_NANOSLEEP)
-sort_LDADD += $(LIB_NANOSLEEP)
-tail_LDADD += $(LIB_NANOSLEEP)
-
-# for various GMP functions
-expr_LDADD += $(LIB_GMP)
-factor_LDADD += $(LIB_GMP)
-
-# for getloadavg
-uptime_LDADD += $(GETLOADAVG_LIBS)
-
-# for crypt
-su_LDADD += $(LIB_CRYPT)
-
-# for various ACL functions
-copy_LDADD += $(LIB_ACL)
-ls_LDADD += $(LIB_ACL)
-
-# for various xattr functions
-copy_LDADD += $(LIB_XATTR)
-
-# for print_unicode_char, proper_name_utf8
-cat_LDADD += $(LIBICONV)
-cp_LDADD += $(LIBICONV)
-df_LDADD += $(LIBICONV)
-du_LDADD += $(LIBICONV)
-getlimits_LDADD += $(LIBICONV)
-printf_LDADD += $(LIBICONV)
-ptx_LDADD += $(LIBICONV)
-realpath_LDADD += $(LIBICONV)
-split_LDADD += $(LIBICONV)
-stdbuf_LDADD += $(LIBICONV)
-timeout_LDADD += $(LIBICONV)
-truncate_LDADD += $(LIBICONV)
-
-# for canon_host
-pinky_LDADD += $(GETADDRINFO_LIB)
-who_LDADD += $(GETADDRINFO_LIB)
-
-# for gethostname, uname
-hostname_LDADD += $(GETHOSTNAME_LIB)
-uname_LDADD += $(GETHOSTNAME_LIB)
-
-# for strsignal
-kill_LDADD += $(LIBTHREAD)
-
-# for pthread
-sort_LDADD += $(LIB_PTHREAD)
-
-$(PROGRAMS): ../lib/libcoreutils.a
-
-# Get the release year from ../lib/version-etc.c.
-RELEASE_YEAR = \
- `sed -n '/.*COPYRIGHT_YEAR = \([0-9][0-9][0-9][0-9]\) };/s//\1/p' \
- $(top_srcdir)/lib/version-etc.c`
-
-all-local: su$(EXEEXT)
-
-installed_su = $(DESTDIR)$(bindir)/`echo su|sed '$(transform)'`
-
-setuid_root_mode = a=rx,u+s
-
-install_su = \
- if test "$(INSTALL_SU)" = yes; then \
- p=su; \
- echo " $(INSTALL_PROGRAM) $$p $(installed_su)"; \
- $(INSTALL_PROGRAM) $$p $(installed_su); \
- echo " chown root $(installed_su)"; \
- chown root $(installed_su); \
- echo " chmod $(setuid_root_mode) $(installed_su)"; \
- chmod $(setuid_root_mode) $(installed_su); \
- else \
- :; \
- fi
-
-install-root: su$(EXEEXT)
- @$(install_su)
-
-install-exec-hook: su$(EXEEXT)
- @if test "$(INSTALL_SU)" = yes; then \
- TMPFILE=$(DESTDIR)$(bindir)/.su-$$$$; \
- rm -f $$TMPFILE; \
- echo > $$TMPFILE; \
-## See if we can create a setuid root executable in $(bindir).
-## If not, then don't even try to install su.
- can_create_suid_root_executable=no; \
- chown root $$TMPFILE > /dev/null 2>&1 \
- && chmod $(setuid_root_mode) $$TMPFILE > /dev/null 2>&1 \
- && can_create_suid_root_executable=yes; \
- rm -f $$TMPFILE; \
- if test $$can_create_suid_root_executable = yes; then \
- $(install_su); \
- else \
- echo "WARNING: insufficient access; not installing su"; \
- echo "NOTE: to install su, run 'make install-root' as root"; \
- rm -f $(installed_su); \
- fi; \
- else :; \
- fi
-
-uninstall-local:
-# Remove su only if it's one we installed.
- @if test "$(INSTALL_SU)" = yes; then \
- if grep '$(PACKAGE_NAME)' $(installed_su) > /dev/null 2>&1; then \
- echo " rm -f $(installed_su)"; \
- rm -f $(installed_su); \
- else :; \
- fi; \
- fi
-
-copy_sources = copy.c cp-hash.c extent-scan.c extent-scan.h
-
-# Use 'ginstall' in the definition of PROGRAMS and in dependencies to avoid
-# confusion with the 'install' target. The install rule transforms 'ginstall'
-# to install before applying any user-specified name transformations.
-
-transform = s/ginstall/install/; $(program_transform_name)
-ginstall_SOURCES = install.c prog-fprintf.c $(copy_sources)
-
-# This is for the '[' program. Automake transliterates '[' to '_'.
-__SOURCES = lbracket.c
-
-cp_SOURCES = cp.c $(copy_sources)
-dir_SOURCES = ls.c ls-dir.c
-vdir_SOURCES = ls.c ls-vdir.c
-id_SOURCES = id.c group-list.c
-groups_SOURCES = groups.c group-list.c
-ls_SOURCES = ls.c ls-ls.c
-ln_SOURCES = ln.c relpath.c relpath.h
-chown_SOURCES = chown.c chown-core.c
-chgrp_SOURCES = chgrp.c chown-core.c
-kill_SOURCES = kill.c operand2sig.c
-realpath_SOURCES = realpath.c relpath.c relpath.h
-timeout_SOURCES = timeout.c operand2sig.c
-
-mv_SOURCES = mv.c remove.c $(copy_sources)
-rm_SOURCES = rm.c remove.c
-
-mkdir_SOURCES = mkdir.c prog-fprintf.c
-rmdir_SOURCES = rmdir.c prog-fprintf.c
-
-df_SOURCES = df.c find-mount-point.c
-stat_SOURCES = stat.c find-mount-point.c
-
-uname_SOURCES = uname.c uname-uname.c
-arch_SOURCES = uname.c uname-arch.c
-
-md5sum_CPPFLAGS = -DHASH_ALGO_MD5=1 $(AM_CPPFLAGS)
-sha1sum_SOURCES = md5sum.c
-sha1sum_CPPFLAGS = -DHASH_ALGO_SHA1=1 $(AM_CPPFLAGS)
-sha224sum_SOURCES = md5sum.c
-sha224sum_CPPFLAGS = -DHASH_ALGO_SHA224=1 $(AM_CPPFLAGS)
-sha256sum_SOURCES = md5sum.c
-sha256sum_CPPFLAGS = -DHASH_ALGO_SHA256=1 $(AM_CPPFLAGS)
-sha384sum_SOURCES = md5sum.c
-sha384sum_CPPFLAGS = -DHASH_ALGO_SHA384=1 $(AM_CPPFLAGS)
-sha512sum_SOURCES = md5sum.c
-sha512sum_CPPFLAGS = -DHASH_ALGO_SHA512=1 $(AM_CPPFLAGS)
-
-ginstall_CPPFLAGS = -DENABLE_MATCHPATHCON=1 $(AM_CPPFLAGS)
-
-# Ensure we don't link against libcoreutils.a as that lib is
-# not compiled with -fPIC which causes issues on 64 bit at least
-libstdbuf_so_LDADD =
-
-# Note libstdbuf is only compiled if GCC is available
-# (as per the check in configure.ac), so these flags should be available.
-# libtool is probably required to relax this dependency.
-libstdbuf_so_LDFLAGS = -shared
-libstdbuf_so_CFLAGS = -fPIC $(AM_CFLAGS)
-
-editpl = sed -e 's,@''PERL''@,$(PERL),g'
-
-BUILT_SOURCES += dircolors.h
-dircolors.h: dcgen dircolors.hin
- $(AM_V_GEN)rm -f $@ $@-t
- $(AM_V_at)$(PERL) -w -- $(srcdir)/dcgen $(srcdir)/dircolors.hin > $@-t
- $(AM_V_at)chmod a-w $@-t
- $(AM_V_at)mv $@-t $@
-
-wheel_size = 5
-
-BUILT_SOURCES += wheel-size.h
-wheel-size.h: Makefile.am
- $(AM_V_GEN)rm -f $@ $@-t
- $(AM_V_at)echo '#define WHEEL_SIZE $(wheel_size)' > $@-t
- $(AM_V_at)chmod a-w $@-t
- $(AM_V_at)mv $@-t $@
-
-BUILT_SOURCES += wheel.h
-wheel.h: wheel-gen.pl Makefile.am
- $(AM_V_GEN)rm -f $@ $@-t
- $(AM_V_at)$(srcdir)/wheel-gen.pl $(wheel_size) > $@-t
- $(AM_V_at)chmod a-w $@-t
- $(AM_V_at)mv $@-t $@
-
-# false exits nonzero even with --help or --version.
-# test doesn't support --help or --version.
-# Tell automake to exempt then from that installcheck test.
-AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = false test
-
-# Compare fs.h with the list of file system names/magic-numbers in the
-# Linux statfs man page. This target prints any new name/number pairs.
-# Also compare against /usr/include/linux/magic.h
-.PHONY: fs-magic-compare
-fs-magic-compare: fs-magic fs-kernel-magic fs-def
- join -v1 -t@ fs-magic fs-def
- join -v1 -t@ fs-kernel-magic fs-def
-
-CLEANFILES += fs-def
-fs-def: fs.h
- grep '^# *define ' $< | $(ASSORT) > $@-t && mv $@-t $@
-
-# Massage bits of the statfs man page and definitions from
-# /usr/include/linux/magic.h to be in a form consistent with what's in fs.h.
-fs_normalize_perl_subst = \
- -e 's/MINIX_SUPER_MAGIC\b/MINIX/;' \
- -e 's/MINIX_SUPER_MAGIC2\b/MINIX_30/;' \
- -e 's/MINIX2_SUPER_MAGIC\b/MINIX_V2/;' \
- -e 's/MINIX2_SUPER_MAGIC2\b/MINIX_V2_30/;' \
- -e 's/MINIX3_SUPER_MAGIC\b/MINIX_V3/;' \
- -e 's/CIFS_MAGIC_NUMBER/CIFS/;' \
- -e 's/(_SUPER)?_MAGIC//;' \
- -e 's/\s+0x(\S+)/" 0x" . uc $$1/e;' \
- -e 's/(\s+0x)(\X{3})\b/$${1}0$$2/;' \
- -e 's/(\s+0x)(\X{6})\b/$${1}00$$2/;' \
- -e 's/(\s+0x)(\X{7})\b/$${1}0$$2/;' \
- -e 's/^\s+//;' \
- -e 's/^\043define\s+//;' \
- -e 's/^_(XIAFS)/$$1/;' \
- -e 's/^USBDEVICE/USBDEVFS/;' \
- -e 's/NTFS_SB/NTFS/;' \
- -e 's/^/\043 define S_MAGIC_/;' \
- -e 's,\s*/\* .*? \*/,,;'
-
-CLEANFILES += fs-magic
-fs-magic: Makefile
- man statfs \
- |perl -ne '/File system types:/.../Nobody kno/ and print' \
- |grep 0x | perl -p \
- $(fs_normalize_perl_subst) \
- | grep -Ev 'S_MAGIC_EXT[34]|STACK_END' \
- | LC_ALL=C sort \
- > $@-t && mv $@-t $@
-
-CLEANFILES += fs-kernel-magic
-fs-kernel-magic: Makefile
- perl -ne '/^#define.*0x/ and print' /usr/include/linux/magic.h \
- | perl -p \
- $(fs_normalize_perl_subst) \
- | grep -Ev 'S_MAGIC_EXT[34]|STACK_END' \
- | LC_ALL=C sort \
- > $@-t && mv $@-t $@
-
-BUILT_SOURCES += fs-is-local.h
-fs-is-local.h: stat.c extract-magic
- $(AM_V_GEN)rm -f $@
- $(AM_V_at)$(PERL) $(srcdir)/extract-magic --local $(srcdir)/stat.c \
- > $@t
- $(AM_V_at)chmod a-w $@t
- $(AM_V_at)mv $@t $@
-
-BUILT_SOURCES += fs.h
-fs.h: stat.c extract-magic
- $(AM_V_GEN)rm -f $@
- $(AM_V_at)$(PERL) $(srcdir)/extract-magic $(srcdir)/stat.c > $@t
- $(AM_V_at)chmod a-w $@t
- $(AM_V_at)mv $@t $@
-
-BUILT_SOURCES += version.c
-version.c: Makefile
- $(AM_V_GEN)rm -f $@
- $(AM_V_at)printf '#include <config.h>\n' > $@t
- $(AM_V_at)printf 'char const *Version = "$(PACKAGE_VERSION)";\n' >> $@t
- $(AM_V_at)chmod a-w $@t
- $(AM_V_at)mv $@t $@
-
-BUILT_SOURCES += version.h
-version.h: Makefile
- $(AM_V_GEN)rm -f $@
- $(AM_V_at)printf 'extern char const *Version;\n' > $@t
- $(AM_V_at)chmod a-w $@t
- $(AM_V_at)mv $@t $@
-
-DISTCLEANFILES = version.c version.h
-MAINTAINERCLEANFILES = $(BUILT_SOURCES)
-
-# Sort in traditional ASCII order, regardless of the current locale;
-# otherwise we may get into trouble with distinct strings that the
-# current locale considers to be equal.
-ASSORT = LC_ALL=C sort
-
-all_programs = \
- $(bin_PROGRAMS) \
- $(bin_SCRIPTS) \
- $(EXTRA_PROGRAMS)
-
-built_programs.list:
- @echo $(bin_PROGRAMS) $(bin_SCRIPTS) | tr ' ' '\n' \
- | sed -e 's,$(EXEEXT)$$,,' | $(ASSORT) -u | tr '\n' ' '
-
-all_programs.list:
- @echo $(all_programs) | tr ' ' '\n' | sed -e 's,$(EXEEXT)$$,,' \
- | sed /libstdbuf/d \
- | $(ASSORT) -u
-
-# This is required because we have broken inter-directory dependencies:
-# in order to generate all man pages, even those for which we don't
-# install a binary, require that all programs be built at distribution time.
-dist-hook: $(all_programs)
-
-# Ensure that all programs are built so we can for example
-# subsequently syntax check all man pages.
-.PHONY: all_programs
-all_programs: $(all_programs)
-
-pm = progs-makefile
-pr = progs-readme
-# Ensure that the list of programs in README matches the list
-# of programs we can build.
-check: check-README check-duplicate-no-install
-.PHONY: check-README
-check-README:
- $(AM_V_GEN)rm -rf $(pr) $(pm)
- $(AM_V_at)echo $(all_programs) \
- | tr -s ' ' '\n' | sed -e 's,$(EXEEXT)$$,,;s/ginstall/install/' \
- | sed /libstdbuf/d \
- | $(ASSORT) -u > $(pm) && \
- sed -n '/^The programs .* are:/,/^[a-zA-Z]/p' $(top_srcdir)/README \
- | sed -n '/^ */s///p' | tr -s ' ' '\n' > $(pr)
- $(AM_V_at)diff $(pm) $(pr) && rm -rf $(pr) $(pm)
-
-# Ensure that a by-default-not-installed program (listed in
-# $(no_install__progs) is not also listed in $(EXTRA_PROGRAMS), because
-# if that were to happen, it *would* be installed by default.
-.PHONY: check-duplicate-no-install
-check-duplicate-no-install: tr
- $(AM_V_GEN)test -z "`echo '$(EXTRA_PROGRAMS)'| ./tr ' ' '\n' | uniq -d`"
-
-# Ensure that the list of programs and author names is accurate.
-# We need a UTF8 locale. If a lack of locale support or a missing
-# translation inhibits printing of UTF-8 names, just skip this test.
-au_dotdot = authors-dotdot
-au_actual = authors-actual
-.PHONY: _sc_check-AUTHORS
-_sc_check-AUTHORS: $(all_programs)
- @locale=en_US.UTF-8; \
- LC_ALL=$$locale ./cat --version \
- | grep ' Torbjorn ' > /dev/null \
- && { echo "$@: skipping this check"; exit 0; }; \
- rm -f $(au_actual) $(au_dotdot); \
- for i in `ls $(all_programs) | sed -e 's,$(EXEEXT)$$,,' \
- | sed /libstdbuf/d \
- | $(ASSORT) -u`; do \
- test "$$i" = '[' && continue; \
- exe=$$i; \
- if test "$$i" = install; then \
- exe=ginstall; \
- elif test "$$i" = test; then \
- exe='['; \
- fi; \
- LC_ALL=$$locale ./$$exe --version \
- | perl -0 -pi -e 's/,\n/, /gm' \
- | sed -n -e '/Written by /{ s//'"$$i"': /;' \
- -e 's/,* and /, /; s/\.$$//; p; }'; \
- done > $(au_actual) && \
- sed -n '/^[^ ][^ ]*:/p' $(top_srcdir)/AUTHORS > $(au_dotdot) && \
- diff $(au_actual) $(au_dotdot) && rm -f $(au_actual) $(au_dotdot)
-
-# Use the just-built ./ginstall, when not cross-compiling.
-if CROSS_COMPILING
-cu_install_program = @INSTALL_PROGRAM@
-else
-cu_install_program = ./ginstall
-endif
-INSTALL_PROGRAM = $(cu_install_program)
diff --git a/src/Makefile.in b/src/Makefile.in
deleted file mode 100644
index da1f3c4b..00000000
--- a/src/Makefile.in
+++ /dev/null
@@ -1,3547 +0,0 @@
-# Makefile.in generated by automake 1.12a from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-
-
-VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
- case $$MAKEFLAGS in \
- *\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
- esac; \
- test $$am__dry = yes; \
- }
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-EXTRA_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) [$(EXEEXT) \
- base64$(EXEEXT) basename$(EXEEXT) cat$(EXEEXT) chcon$(EXEEXT) \
- chgrp$(EXEEXT) chmod$(EXEEXT) chown$(EXEEXT) cksum$(EXEEXT) \
- comm$(EXEEXT) cp$(EXEEXT) csplit$(EXEEXT) cut$(EXEEXT) \
- date$(EXEEXT) dd$(EXEEXT) dir$(EXEEXT) dircolors$(EXEEXT) \
- dirname$(EXEEXT) du$(EXEEXT) echo$(EXEEXT) env$(EXEEXT) \
- expand$(EXEEXT) expr$(EXEEXT) factor$(EXEEXT) false$(EXEEXT) \
- fmt$(EXEEXT) fold$(EXEEXT) ginstall$(EXEEXT) groups$(EXEEXT) \
- head$(EXEEXT) id$(EXEEXT) join$(EXEEXT) kill$(EXEEXT) \
- link$(EXEEXT) ln$(EXEEXT) logname$(EXEEXT) ls$(EXEEXT) \
- md5sum$(EXEEXT) mkdir$(EXEEXT) mkfifo$(EXEEXT) mknod$(EXEEXT) \
- mktemp$(EXEEXT) mv$(EXEEXT) nl$(EXEEXT) nproc$(EXEEXT) \
- nohup$(EXEEXT) od$(EXEEXT) paste$(EXEEXT) pathchk$(EXEEXT) \
- pr$(EXEEXT) printenv$(EXEEXT) printf$(EXEEXT) ptx$(EXEEXT) \
- pwd$(EXEEXT) readlink$(EXEEXT) realpath$(EXEEXT) rm$(EXEEXT) \
- rmdir$(EXEEXT) runcon$(EXEEXT) seq$(EXEEXT) sha1sum$(EXEEXT) \
- sha224sum$(EXEEXT) sha256sum$(EXEEXT) sha384sum$(EXEEXT) \
- sha512sum$(EXEEXT) shred$(EXEEXT) shuf$(EXEEXT) sleep$(EXEEXT) \
- sort$(EXEEXT) split$(EXEEXT) stat$(EXEEXT) sum$(EXEEXT) \
- sync$(EXEEXT) tac$(EXEEXT) tail$(EXEEXT) tee$(EXEEXT) \
- test$(EXEEXT) timeout$(EXEEXT) touch$(EXEEXT) tr$(EXEEXT) \
- true$(EXEEXT) truncate$(EXEEXT) tsort$(EXEEXT) tty$(EXEEXT) \
- uname$(EXEEXT) unexpand$(EXEEXT) uniq$(EXEEXT) unlink$(EXEEXT) \
- vdir$(EXEEXT) wc$(EXEEXT) whoami$(EXEEXT) yes$(EXEEXT)
-noinst_PROGRAMS = setuidgid$(EXEEXT) getlimits$(EXEEXT)
-subdir = src
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/build-aux/depcomp $(noinst_HEADERS)
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
- $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/alloca.m4 \
- $(top_srcdir)/m4/arpa_inet_h.m4 $(top_srcdir)/m4/assert.m4 \
- $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/backupfile.m4 \
- $(top_srcdir)/m4/base64.m4 $(top_srcdir)/m4/bison.m4 \
- $(top_srcdir)/m4/boottime.m4 $(top_srcdir)/m4/btowc.m4 \
- $(top_srcdir)/m4/c-strtod.m4 $(top_srcdir)/m4/calloc.m4 \
- $(top_srcdir)/m4/canon-host.m4 \
- $(top_srcdir)/m4/canonicalize.m4 \
- $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/check-decl.m4 \
- $(top_srcdir)/m4/chown.m4 $(top_srcdir)/m4/clock_time.m4 \
- $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \
- $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closein.m4 \
- $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
- $(top_srcdir)/m4/config-h.m4 $(top_srcdir)/m4/configmake.m4 \
- $(top_srcdir)/m4/ctype.m4 $(top_srcdir)/m4/cycle-check.m4 \
- $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
- $(top_srcdir)/m4/dirent-safer.m4 $(top_srcdir)/m4/dirent_h.m4 \
- $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \
- $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \
- $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
- $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \
- $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/euidaccess.m4 \
- $(top_srcdir)/m4/exponentd.m4 $(top_srcdir)/m4/exponentf.m4 \
- $(top_srcdir)/m4/exponentl.m4 $(top_srcdir)/m4/extensions.m4 \
- $(top_srcdir)/m4/faccessat.m4 $(top_srcdir)/m4/fatal-signal.m4 \
- $(top_srcdir)/m4/fchdir.m4 $(top_srcdir)/m4/fchmodat.m4 \
- $(top_srcdir)/m4/fchownat.m4 $(top_srcdir)/m4/fclose.m4 \
- $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl-safer.m4 \
- $(top_srcdir)/m4/fcntl.m4 $(top_srcdir)/m4/fcntl_h.m4 \
- $(top_srcdir)/m4/fd-reopen.m4 $(top_srcdir)/m4/fdatasync.m4 \
- $(top_srcdir)/m4/fdopen.m4 $(top_srcdir)/m4/fdopendir.m4 \
- $(top_srcdir)/m4/fflush.m4 $(top_srcdir)/m4/fileblocks.m4 \
- $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \
- $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \
- $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \
- $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \
- $(top_srcdir)/m4/fpurge.m4 $(top_srcdir)/m4/freading.m4 \
- $(top_srcdir)/m4/freopen.m4 $(top_srcdir)/m4/frexp.m4 \
- $(top_srcdir)/m4/frexpl.m4 $(top_srcdir)/m4/fseek.m4 \
- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \
- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/fstypename.m4 \
- $(top_srcdir)/m4/fsusage.m4 $(top_srcdir)/m4/fsync.m4 \
- $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \
- $(top_srcdir)/m4/ftruncate.m4 $(top_srcdir)/m4/fts.m4 \
- $(top_srcdir)/m4/futimens.m4 $(top_srcdir)/m4/getaddrinfo.m4 \
- $(top_srcdir)/m4/getcwd-abort-bug.m4 \
- $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
- $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdtablesize.m4 \
- $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \
- $(top_srcdir)/m4/gethrxtime.m4 $(top_srcdir)/m4/getline.m4 \
- $(top_srcdir)/m4/getloadavg.m4 $(top_srcdir)/m4/getlogin.m4 \
- $(top_srcdir)/m4/getndelim2.m4 $(top_srcdir)/m4/getopt.m4 \
- $(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
- $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
- $(top_srcdir)/m4/gettimeofday.m4 \
- $(top_srcdir)/m4/getugroups.m4 \
- $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \
- $(top_srcdir)/m4/gmp.m4 $(top_srcdir)/m4/gnu-make.m4 \
- $(top_srcdir)/m4/gnulib-common.m4 \
- $(top_srcdir)/m4/gnulib-comp.m4 \
- $(top_srcdir)/m4/group-member.m4 \
- $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/host-os.m4 \
- $(top_srcdir)/m4/hostent.m4 $(top_srcdir)/m4/human.m4 \
- $(top_srcdir)/m4/i-ring.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/iconv_h.m4 $(top_srcdir)/m4/iconv_open.m4 \
- $(top_srcdir)/m4/idcache.m4 \
- $(top_srcdir)/m4/include-exclude-prog.m4 \
- $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \
- $(top_srcdir)/m4/inet_pton.m4 $(top_srcdir)/m4/inline.m4 \
- $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \
- $(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
- $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
- $(top_srcdir)/m4/ioctl.m4 $(top_srcdir)/m4/isapipe.m4 \
- $(top_srcdir)/m4/isatty.m4 $(top_srcdir)/m4/isblank.m4 \
- $(top_srcdir)/m4/isnand.m4 $(top_srcdir)/m4/isnanf.m4 \
- $(top_srcdir)/m4/isnanl.m4 $(top_srcdir)/m4/iswblank.m4 \
- $(top_srcdir)/m4/jm-macros.m4 $(top_srcdir)/m4/jm-winsz1.m4 \
- $(top_srcdir)/m4/jm-winsz2.m4 $(top_srcdir)/m4/langinfo_h.m4 \
- $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lchmod.m4 \
- $(top_srcdir)/m4/lchown.m4 $(top_srcdir)/m4/lcmessage.m4 \
- $(top_srcdir)/m4/ldexp.m4 $(top_srcdir)/m4/ldexpl.m4 \
- $(top_srcdir)/m4/lib-check.m4 $(top_srcdir)/m4/lib-ignore.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 \
- $(top_srcdir)/m4/libunistring-base.m4 \
- $(top_srcdir)/m4/link-follow.m4 $(top_srcdir)/m4/link.m4 \
- $(top_srcdir)/m4/linkat.m4 $(top_srcdir)/m4/localcharset.m4 \
- $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \
- $(top_srcdir)/m4/locale-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \
- $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \
- $(top_srcdir)/m4/localename.m4 $(top_srcdir)/m4/lock.m4 \
- $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ls-mntd-fs.m4 \
- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \
- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
- $(top_srcdir)/m4/manywarnings.m4 $(top_srcdir)/m4/math_h.m4 \
- $(top_srcdir)/m4/mbchar.m4 $(top_srcdir)/m4/mbiter.m4 \
- $(top_srcdir)/m4/mbrlen.m4 $(top_srcdir)/m4/mbrtowc.m4 \
- $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbslen.m4 \
- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \
- $(top_srcdir)/m4/mbswidth.m4 $(top_srcdir)/m4/mbtowc.m4 \
- $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/memcasecmp.m4 \
- $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/memcoll.m4 \
- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/mkancesdirs.m4 \
- $(top_srcdir)/m4/mkdir-p.m4 $(top_srcdir)/m4/mkdir.m4 \
- $(top_srcdir)/m4/mkfifo.m4 $(top_srcdir)/m4/mknod.m4 \
- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
- $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \
- $(top_srcdir)/m4/modechange.m4 $(top_srcdir)/m4/mountlist.m4 \
- $(top_srcdir)/m4/mpsort.m4 $(top_srcdir)/m4/msvc-inval.m4 \
- $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
- $(top_srcdir)/m4/nanosleep.m4 $(top_srcdir)/m4/netdb_h.m4 \
- $(top_srcdir)/m4/netinet_in_h.m4 \
- $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
- $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/nproc.m4 \
- $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/open.m4 \
- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \
- $(top_srcdir)/m4/parse-datetime.m4 $(top_srcdir)/m4/pathmax.m4 \
- $(top_srcdir)/m4/perl.m4 $(top_srcdir)/m4/perror.m4 \
- $(top_srcdir)/m4/physmem.m4 $(top_srcdir)/m4/pipe.m4 \
- $(top_srcdir)/m4/pipe2.m4 $(top_srcdir)/m4/po.m4 \
- $(top_srcdir)/m4/posix-shell.m4 \
- $(top_srcdir)/m4/posix_spawn.m4 $(top_srcdir)/m4/posixtm.m4 \
- $(top_srcdir)/m4/posixver.m4 $(top_srcdir)/m4/prereq.m4 \
- $(top_srcdir)/m4/printf-frexp.m4 \
- $(top_srcdir)/m4/printf-frexpl.m4 $(top_srcdir)/m4/printf.m4 \
- $(top_srcdir)/m4/priv-set.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/putenv.m4 \
- $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \
- $(top_srcdir)/m4/raise.m4 $(top_srcdir)/m4/rawmemchr.m4 \
- $(top_srcdir)/m4/read-file.m4 $(top_srcdir)/m4/read.m4 \
- $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readlink.m4 \
- $(top_srcdir)/m4/readlinkat.m4 $(top_srcdir)/m4/readtokens.m4 \
- $(top_srcdir)/m4/readutmp.m4 $(top_srcdir)/m4/realloc.m4 \
- $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/remove.m4 \
- $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/rewinddir.m4 \
- $(top_srcdir)/m4/rmdir.m4 $(top_srcdir)/m4/root-dev-ino.m4 \
- $(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/safe-read.m4 \
- $(top_srcdir)/m4/safe-write.m4 $(top_srcdir)/m4/same.m4 \
- $(top_srcdir)/m4/save-cwd.m4 $(top_srcdir)/m4/savedir.m4 \
- $(top_srcdir)/m4/savewd.m4 $(top_srcdir)/m4/sched_h.m4 \
- $(top_srcdir)/m4/select.m4 \
- $(top_srcdir)/m4/selinux-context-h.m4 \
- $(top_srcdir)/m4/selinux-selinux-h.m4 \
- $(top_srcdir)/m4/servent.m4 $(top_srcdir)/m4/setenv.m4 \
- $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/settime.m4 \
- $(top_srcdir)/m4/sha1.m4 $(top_srcdir)/m4/sha256.m4 \
- $(top_srcdir)/m4/sha512.m4 $(top_srcdir)/m4/sig2str.m4 \
- $(top_srcdir)/m4/sig_atomic_t.m4 $(top_srcdir)/m4/sigaction.m4 \
- $(top_srcdir)/m4/signal_h.m4 \
- $(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/signbit.m4 \
- $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sleep.m4 \
- $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \
- $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \
- $(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/spawn-pipe.m4 \
- $(top_srcdir)/m4/spawn_h.m4 $(top_srcdir)/m4/ssize_t.m4 \
- $(top_srcdir)/m4/st_dm_mode.m4 $(top_srcdir)/m4/stat-prog.m4 \
- $(top_srcdir)/m4/stat-size.m4 $(top_srcdir)/m4/stat-time.m4 \
- $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/stdalign.m4 \
- $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \
- $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
- $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
- $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \
- $(top_srcdir)/m4/stpncpy.m4 $(top_srcdir)/m4/strcase.m4 \
- $(top_srcdir)/m4/strchrnul.m4 $(top_srcdir)/m4/strdup.m4 \
- $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/strerror_r.m4 \
- $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/string_h.m4 \
- $(top_srcdir)/m4/strings_h.m4 $(top_srcdir)/m4/strncat.m4 \
- $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \
- $(top_srcdir)/m4/strnumcmp.m4 $(top_srcdir)/m4/strpbrk.m4 \
- $(top_srcdir)/m4/strsignal.m4 $(top_srcdir)/m4/strstr.m4 \
- $(top_srcdir)/m4/strtod.m4 $(top_srcdir)/m4/strtoimax.m4 \
- $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoull.m4 \
- $(top_srcdir)/m4/strtoumax.m4 $(top_srcdir)/m4/symlink.m4 \
- $(top_srcdir)/m4/symlinkat.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \
- $(top_srcdir)/m4/sys_resource_h.m4 \
- $(top_srcdir)/m4/sys_select_h.m4 \
- $(top_srcdir)/m4/sys_socket_h.m4 \
- $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
- $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_uio_h.m4 \
- $(top_srcdir)/m4/sys_utsname_h.m4 \
- $(top_srcdir)/m4/sys_wait_h.m4 $(top_srcdir)/m4/tempname.m4 \
- $(top_srcdir)/m4/termios_h.m4 $(top_srcdir)/m4/thread.m4 \
- $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/time_h.m4 \
- $(top_srcdir)/m4/time_r.m4 $(top_srcdir)/m4/timer_time.m4 \
- $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tls.m4 \
- $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/tzset.m4 \
- $(top_srcdir)/m4/uname.m4 $(top_srcdir)/m4/ungetc.m4 \
- $(top_srcdir)/m4/unicodeio.m4 $(top_srcdir)/m4/unistd-safer.m4 \
- $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlink-busy.m4 \
- $(top_srcdir)/m4/unlink.m4 $(top_srcdir)/m4/unlinkat.m4 \
- $(top_srcdir)/m4/unlinkdir.m4 $(top_srcdir)/m4/unlocked-io.m4 \
- $(top_srcdir)/m4/uptime.m4 $(top_srcdir)/m4/userspec.m4 \
- $(top_srcdir)/m4/usleep.m4 $(top_srcdir)/m4/utimbuf.m4 \
- $(top_srcdir)/m4/utimecmp.m4 $(top_srcdir)/m4/utimens.m4 \
- $(top_srcdir)/m4/utimensat.m4 $(top_srcdir)/m4/utimes.m4 \
- $(top_srcdir)/m4/vasnprintf.m4 \
- $(top_srcdir)/m4/vasprintf-posix.m4 \
- $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
- $(top_srcdir)/m4/vfprintf-posix.m4 \
- $(top_srcdir)/m4/vprintf-posix.m4 \
- $(top_srcdir)/m4/wait-process.m4 $(top_srcdir)/m4/waitpid.m4 \
- $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/m4/wchar_h.m4 \
- $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
- $(top_srcdir)/m4/wcswidth.m4 $(top_srcdir)/m4/wctob.m4 \
- $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \
- $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \
- $(top_srcdir)/m4/write-any-file.m4 $(top_srcdir)/m4/write.m4 \
- $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xattr.m4 \
- $(top_srcdir)/m4/xfts.m4 $(top_srcdir)/m4/xgetcwd.m4 \
- $(top_srcdir)/m4/xnanosleep.m4 $(top_srcdir)/m4/xsize.m4 \
- $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xstrtod.m4 \
- $(top_srcdir)/m4/xstrtol.m4 $(top_srcdir)/m4/xvasprintf.m4 \
- $(top_srcdir)/m4/yesno.m4 $(top_srcdir)/m4/yield.m4 \
- $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/lib/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-AM_V_AR = $(am__v_AR_@AM_V@)
-am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
-am__v_AR_0 = @echo " AR " $@;
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-libver_a_AR = $(AR) $(ARFLAGS)
-libver_a_LIBADD =
-nodist_libver_a_OBJECTS = version.$(OBJEXT)
-libver_a_OBJECTS = $(nodist_libver_a_OBJECTS)
-am__EXEEXT_1 = arch$(EXEEXT) hostname$(EXEEXT) su$(EXEEXT)
-am__EXEEXT_2 = chroot$(EXEEXT) df$(EXEEXT) hostid$(EXEEXT) \
- libstdbuf.so$(EXEEXT) nice$(EXEEXT) pinky$(EXEEXT) \
- stdbuf$(EXEEXT) stty$(EXEEXT) su$(EXEEXT) uptime$(EXEEXT) \
- users$(EXEEXT) who$(EXEEXT)
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)"
-PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(pkglibexec_PROGRAMS)
-am___OBJECTS = lbracket.$(OBJEXT)
-__OBJECTS = $(am___OBJECTS)
-am__DEPENDENCIES_1 =
-am__DEPENDENCIES_2 = libver.a ../lib/libcoreutils.a \
- $(am__DEPENDENCIES_1) ../lib/libcoreutils.a
-am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-__DEPENDENCIES = $(am__DEPENDENCIES_3)
-am_arch_OBJECTS = uname.$(OBJEXT) uname-arch.$(OBJEXT)
-arch_OBJECTS = $(am_arch_OBJECTS)
-arch_DEPENDENCIES = $(am__DEPENDENCIES_2)
-base64_SOURCES = base64.c
-base64_OBJECTS = base64.$(OBJEXT)
-base64_DEPENDENCIES = $(am__DEPENDENCIES_2)
-basename_SOURCES = basename.c
-basename_OBJECTS = basename.$(OBJEXT)
-basename_DEPENDENCIES = $(am__DEPENDENCIES_2)
-cat_SOURCES = cat.c
-cat_OBJECTS = cat.$(OBJEXT)
-cat_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-chcon_SOURCES = chcon.c
-chcon_OBJECTS = chcon.$(OBJEXT)
-chcon_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-am_chgrp_OBJECTS = chgrp.$(OBJEXT) chown-core.$(OBJEXT)
-chgrp_OBJECTS = $(am_chgrp_OBJECTS)
-chgrp_DEPENDENCIES = $(am__DEPENDENCIES_2)
-chmod_SOURCES = chmod.c
-chmod_OBJECTS = chmod.$(OBJEXT)
-chmod_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_chown_OBJECTS = chown.$(OBJEXT) chown-core.$(OBJEXT)
-chown_OBJECTS = $(am_chown_OBJECTS)
-chown_DEPENDENCIES = $(am__DEPENDENCIES_2)
-chroot_SOURCES = chroot.c
-chroot_OBJECTS = chroot.$(OBJEXT)
-chroot_DEPENDENCIES = $(am__DEPENDENCIES_2)
-cksum_SOURCES = cksum.c
-cksum_OBJECTS = cksum.$(OBJEXT)
-cksum_DEPENDENCIES = $(am__DEPENDENCIES_2)
-comm_SOURCES = comm.c
-comm_OBJECTS = comm.$(OBJEXT)
-comm_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am__objects_1 = copy.$(OBJEXT) cp-hash.$(OBJEXT) extent-scan.$(OBJEXT)
-am_cp_OBJECTS = cp.$(OBJEXT) $(am__objects_1)
-cp_OBJECTS = $(am_cp_OBJECTS)
-am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
-cp_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_4) \
- $(am__DEPENDENCIES_1)
-csplit_SOURCES = csplit.c
-csplit_OBJECTS = csplit.$(OBJEXT)
-csplit_DEPENDENCIES = $(am__DEPENDENCIES_2)
-cut_SOURCES = cut.c
-cut_OBJECTS = cut.$(OBJEXT)
-cut_DEPENDENCIES = $(am__DEPENDENCIES_2)
-date_SOURCES = date.c
-date_OBJECTS = date.$(OBJEXT)
-date_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-dd_SOURCES = dd.c
-dd_OBJECTS = dd.$(OBJEXT)
-dd_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
-am_df_OBJECTS = df.$(OBJEXT) find-mount-point.$(OBJEXT)
-df_OBJECTS = $(am_df_OBJECTS)
-df_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-am_dir_OBJECTS = ls.$(OBJEXT) ls-dir.$(OBJEXT)
-dir_OBJECTS = $(am_dir_OBJECTS)
-am__DEPENDENCIES_5 = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
-dir_DEPENDENCIES = $(am__DEPENDENCIES_5)
-dircolors_SOURCES = dircolors.c
-dircolors_OBJECTS = dircolors.$(OBJEXT)
-dircolors_DEPENDENCIES = $(am__DEPENDENCIES_2)
-dirname_SOURCES = dirname.c
-dirname_OBJECTS = dirname.$(OBJEXT)
-dirname_DEPENDENCIES = $(am__DEPENDENCIES_2)
-du_SOURCES = du.c
-du_OBJECTS = du.$(OBJEXT)
-du_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-echo_SOURCES = echo.c
-echo_OBJECTS = echo.$(OBJEXT)
-echo_DEPENDENCIES = $(am__DEPENDENCIES_2)
-env_SOURCES = env.c
-env_OBJECTS = env.$(OBJEXT)
-env_DEPENDENCIES = $(am__DEPENDENCIES_2)
-expand_SOURCES = expand.c
-expand_OBJECTS = expand.$(OBJEXT)
-expand_DEPENDENCIES = $(am__DEPENDENCIES_2)
-expr_SOURCES = expr.c
-expr_OBJECTS = expr.$(OBJEXT)
-expr_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-factor_SOURCES = factor.c
-factor_OBJECTS = factor.$(OBJEXT)
-factor_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-false_SOURCES = false.c
-false_OBJECTS = false.$(OBJEXT)
-false_DEPENDENCIES = $(am__DEPENDENCIES_2)
-fmt_SOURCES = fmt.c
-fmt_OBJECTS = fmt.$(OBJEXT)
-fmt_DEPENDENCIES = $(am__DEPENDENCIES_2)
-fold_SOURCES = fold.c
-fold_OBJECTS = fold.$(OBJEXT)
-fold_DEPENDENCIES = $(am__DEPENDENCIES_2)
-getlimits_SOURCES = getlimits.c
-getlimits_OBJECTS = getlimits.$(OBJEXT)
-getlimits_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-am__objects_2 = ginstall-copy.$(OBJEXT) ginstall-cp-hash.$(OBJEXT) \
- ginstall-extent-scan.$(OBJEXT)
-am_ginstall_OBJECTS = ginstall-install.$(OBJEXT) \
- ginstall-prog-fprintf.$(OBJEXT) $(am__objects_2)
-ginstall_OBJECTS = $(am_ginstall_OBJECTS)
-ginstall_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_4) \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-am_groups_OBJECTS = groups.$(OBJEXT) group-list.$(OBJEXT)
-groups_OBJECTS = $(am_groups_OBJECTS)
-groups_DEPENDENCIES = $(am__DEPENDENCIES_2)
-head_SOURCES = head.c
-head_OBJECTS = head.$(OBJEXT)
-head_DEPENDENCIES = $(am__DEPENDENCIES_2)
-hostid_SOURCES = hostid.c
-hostid_OBJECTS = hostid.$(OBJEXT)
-hostid_DEPENDENCIES = $(am__DEPENDENCIES_2)
-hostname_SOURCES = hostname.c
-hostname_OBJECTS = hostname.$(OBJEXT)
-hostname_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-am_id_OBJECTS = id.$(OBJEXT) group-list.$(OBJEXT)
-id_OBJECTS = $(am_id_OBJECTS)
-id_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-join_SOURCES = join.c
-join_OBJECTS = join.$(OBJEXT)
-join_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_kill_OBJECTS = kill.$(OBJEXT) operand2sig.$(OBJEXT)
-kill_OBJECTS = $(am_kill_OBJECTS)
-kill_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-libstdbuf_so_SOURCES = libstdbuf.c
-libstdbuf_so_OBJECTS = libstdbuf_so-libstdbuf.$(OBJEXT)
-libstdbuf_so_DEPENDENCIES =
-libstdbuf_so_LINK = $(CCLD) $(libstdbuf_so_CFLAGS) $(CFLAGS) \
- $(libstdbuf_so_LDFLAGS) $(LDFLAGS) -o $@
-link_SOURCES = link.c
-link_OBJECTS = link.$(OBJEXT)
-link_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_ln_OBJECTS = ln.$(OBJEXT) relpath.$(OBJEXT)
-ln_OBJECTS = $(am_ln_OBJECTS)
-ln_DEPENDENCIES = $(am__DEPENDENCIES_2)
-logname_SOURCES = logname.c
-logname_OBJECTS = logname.$(OBJEXT)
-logname_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_ls_OBJECTS = ls.$(OBJEXT) ls-ls.$(OBJEXT)
-ls_OBJECTS = $(am_ls_OBJECTS)
-ls_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
-md5sum_SOURCES = md5sum.c
-md5sum_OBJECTS = md5sum-md5sum.$(OBJEXT)
-md5sum_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_mkdir_OBJECTS = mkdir.$(OBJEXT) prog-fprintf.$(OBJEXT)
-mkdir_OBJECTS = $(am_mkdir_OBJECTS)
-mkdir_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-mkfifo_SOURCES = mkfifo.c
-mkfifo_OBJECTS = mkfifo.$(OBJEXT)
-mkfifo_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-mknod_SOURCES = mknod.c
-mknod_OBJECTS = mknod.$(OBJEXT)
-mknod_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-mktemp_SOURCES = mktemp.c
-mktemp_OBJECTS = mktemp.$(OBJEXT)
-mktemp_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_mv_OBJECTS = mv.$(OBJEXT) remove.$(OBJEXT) $(am__objects_1)
-mv_OBJECTS = $(am_mv_OBJECTS)
-am__DEPENDENCIES_6 = $(am__DEPENDENCIES_1)
-mv_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_4) \
- $(am__DEPENDENCIES_6)
-nice_SOURCES = nice.c
-nice_OBJECTS = nice.$(OBJEXT)
-nice_DEPENDENCIES = $(am__DEPENDENCIES_2)
-nl_SOURCES = nl.c
-nl_OBJECTS = nl.$(OBJEXT)
-nl_DEPENDENCIES = $(am__DEPENDENCIES_2)
-nohup_SOURCES = nohup.c
-nohup_OBJECTS = nohup.$(OBJEXT)
-nohup_DEPENDENCIES = $(am__DEPENDENCIES_2)
-nproc_SOURCES = nproc.c
-nproc_OBJECTS = nproc.$(OBJEXT)
-nproc_DEPENDENCIES = $(am__DEPENDENCIES_2)
-od_SOURCES = od.c
-od_OBJECTS = od.$(OBJEXT)
-od_DEPENDENCIES = $(am__DEPENDENCIES_2)
-paste_SOURCES = paste.c
-paste_OBJECTS = paste.$(OBJEXT)
-paste_DEPENDENCIES = $(am__DEPENDENCIES_2)
-pathchk_SOURCES = pathchk.c
-pathchk_OBJECTS = pathchk.$(OBJEXT)
-pathchk_DEPENDENCIES = $(am__DEPENDENCIES_2)
-pinky_SOURCES = pinky.c
-pinky_OBJECTS = pinky.$(OBJEXT)
-pinky_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-pr_SOURCES = pr.c
-pr_OBJECTS = pr.$(OBJEXT)
-pr_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-printenv_SOURCES = printenv.c
-printenv_OBJECTS = printenv.$(OBJEXT)
-printenv_DEPENDENCIES = $(am__DEPENDENCIES_2)
-printf_SOURCES = printf.c
-printf_OBJECTS = printf.$(OBJEXT)
-printf_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-ptx_SOURCES = ptx.c
-ptx_OBJECTS = ptx.$(OBJEXT)
-ptx_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-pwd_SOURCES = pwd.c
-pwd_OBJECTS = pwd.$(OBJEXT)
-pwd_DEPENDENCIES = $(am__DEPENDENCIES_2)
-readlink_SOURCES = readlink.c
-readlink_OBJECTS = readlink.$(OBJEXT)
-readlink_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_realpath_OBJECTS = realpath.$(OBJEXT) relpath.$(OBJEXT)
-realpath_OBJECTS = $(am_realpath_OBJECTS)
-realpath_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-am_rm_OBJECTS = rm.$(OBJEXT) remove.$(OBJEXT)
-rm_OBJECTS = $(am_rm_OBJECTS)
-rm_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_6)
-am_rmdir_OBJECTS = rmdir.$(OBJEXT) prog-fprintf.$(OBJEXT)
-rmdir_OBJECTS = $(am_rmdir_OBJECTS)
-rmdir_DEPENDENCIES = $(am__DEPENDENCIES_2)
-runcon_SOURCES = runcon.c
-runcon_OBJECTS = runcon.$(OBJEXT)
-runcon_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-seq_SOURCES = seq.c
-seq_OBJECTS = seq.$(OBJEXT)
-seq_DEPENDENCIES = $(am__DEPENDENCIES_2)
-setuidgid_SOURCES = setuidgid.c
-setuidgid_OBJECTS = setuidgid.$(OBJEXT)
-setuidgid_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_sha1sum_OBJECTS = sha1sum-md5sum.$(OBJEXT)
-sha1sum_OBJECTS = $(am_sha1sum_OBJECTS)
-sha1sum_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_sha224sum_OBJECTS = sha224sum-md5sum.$(OBJEXT)
-sha224sum_OBJECTS = $(am_sha224sum_OBJECTS)
-sha224sum_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_sha256sum_OBJECTS = sha256sum-md5sum.$(OBJEXT)
-sha256sum_OBJECTS = $(am_sha256sum_OBJECTS)
-sha256sum_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_sha384sum_OBJECTS = sha384sum-md5sum.$(OBJEXT)
-sha384sum_OBJECTS = $(am_sha384sum_OBJECTS)
-sha384sum_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_sha512sum_OBJECTS = sha512sum-md5sum.$(OBJEXT)
-sha512sum_OBJECTS = $(am_sha512sum_OBJECTS)
-sha512sum_DEPENDENCIES = $(am__DEPENDENCIES_2)
-shred_SOURCES = shred.c
-shred_OBJECTS = shred.$(OBJEXT)
-shred_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-shuf_SOURCES = shuf.c
-shuf_OBJECTS = shuf.$(OBJEXT)
-shuf_DEPENDENCIES = $(am__DEPENDENCIES_2)
-sleep_SOURCES = sleep.c
-sleep_OBJECTS = sleep.$(OBJEXT)
-sleep_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-sort_SOURCES = sort.c
-sort_OBJECTS = sort.$(OBJEXT)
-sort_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
-split_SOURCES = split.c
-split_OBJECTS = split.$(OBJEXT)
-split_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-am_stat_OBJECTS = stat.$(OBJEXT) find-mount-point.$(OBJEXT)
-stat_OBJECTS = $(am_stat_OBJECTS)
-stat_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-stdbuf_SOURCES = stdbuf.c
-stdbuf_OBJECTS = stdbuf.$(OBJEXT)
-stdbuf_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-stty_SOURCES = stty.c
-stty_OBJECTS = stty.$(OBJEXT)
-stty_DEPENDENCIES = $(am__DEPENDENCIES_2)
-su_SOURCES = su.c
-su_OBJECTS = su.$(OBJEXT)
-su_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-sum_SOURCES = sum.c
-sum_OBJECTS = sum.$(OBJEXT)
-sum_DEPENDENCIES = $(am__DEPENDENCIES_2)
-sync_SOURCES = sync.c
-sync_OBJECTS = sync.$(OBJEXT)
-sync_DEPENDENCIES = $(am__DEPENDENCIES_2)
-tac_SOURCES = tac.c
-tac_OBJECTS = tac.$(OBJEXT)
-tac_DEPENDENCIES = $(am__DEPENDENCIES_2)
-tail_SOURCES = tail.c
-tail_OBJECTS = tail.$(OBJEXT)
-tail_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-tee_SOURCES = tee.c
-tee_OBJECTS = tee.$(OBJEXT)
-tee_DEPENDENCIES = $(am__DEPENDENCIES_2)
-test_SOURCES = test.c
-test_OBJECTS = test.$(OBJEXT)
-test_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-am_timeout_OBJECTS = timeout.$(OBJEXT) operand2sig.$(OBJEXT)
-timeout_OBJECTS = $(am_timeout_OBJECTS)
-timeout_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
-touch_SOURCES = touch.c
-touch_OBJECTS = touch.$(OBJEXT)
-touch_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-tr_SOURCES = tr.c
-tr_OBJECTS = tr.$(OBJEXT)
-tr_DEPENDENCIES = $(am__DEPENDENCIES_2)
-true_SOURCES = true.c
-true_OBJECTS = true.$(OBJEXT)
-true_DEPENDENCIES = $(am__DEPENDENCIES_2)
-truncate_SOURCES = truncate.c
-truncate_OBJECTS = truncate.$(OBJEXT)
-truncate_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-tsort_SOURCES = tsort.c
-tsort_OBJECTS = tsort.$(OBJEXT)
-tsort_DEPENDENCIES = $(am__DEPENDENCIES_2)
-tty_SOURCES = tty.c
-tty_OBJECTS = tty.$(OBJEXT)
-tty_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_uname_OBJECTS = uname.$(OBJEXT) uname-uname.$(OBJEXT)
-uname_OBJECTS = $(am_uname_OBJECTS)
-uname_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-unexpand_SOURCES = unexpand.c
-unexpand_OBJECTS = unexpand.$(OBJEXT)
-unexpand_DEPENDENCIES = $(am__DEPENDENCIES_2)
-uniq_SOURCES = uniq.c
-uniq_OBJECTS = uniq.$(OBJEXT)
-uniq_DEPENDENCIES = $(am__DEPENDENCIES_2)
-unlink_SOURCES = unlink.c
-unlink_OBJECTS = unlink.$(OBJEXT)
-unlink_DEPENDENCIES = $(am__DEPENDENCIES_2)
-uptime_SOURCES = uptime.c
-uptime_OBJECTS = uptime.$(OBJEXT)
-uptime_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-users_SOURCES = users.c
-users_OBJECTS = users.$(OBJEXT)
-users_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_vdir_OBJECTS = ls.$(OBJEXT) ls-vdir.$(OBJEXT)
-vdir_OBJECTS = $(am_vdir_OBJECTS)
-vdir_DEPENDENCIES = $(am__DEPENDENCIES_5)
-wc_SOURCES = wc.c
-wc_OBJECTS = wc.$(OBJEXT)
-wc_DEPENDENCIES = $(am__DEPENDENCIES_2)
-who_SOURCES = who.c
-who_OBJECTS = who.$(OBJEXT)
-who_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
-whoami_SOURCES = whoami.c
-whoami_OBJECTS = whoami.$(OBJEXT)
-whoami_DEPENDENCIES = $(am__DEPENDENCIES_2)
-yes_SOURCES = yes.c
-yes_OBJECTS = yes.$(OBJEXT)
-yes_DEPENDENCIES = $(am__DEPENDENCIES_2)
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/lib
-depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_@AM_V@)
-am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo " CC " $@;
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_@AM_V@)
-am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo " CCLD " $@;
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
-SOURCES = $(nodist_libver_a_SOURCES) $(__SOURCES) $(arch_SOURCES) \
- base64.c basename.c cat.c chcon.c $(chgrp_SOURCES) chmod.c \
- $(chown_SOURCES) chroot.c cksum.c comm.c $(cp_SOURCES) \
- csplit.c cut.c date.c dd.c $(df_SOURCES) $(dir_SOURCES) \
- dircolors.c dirname.c du.c echo.c env.c expand.c expr.c \
- factor.c false.c fmt.c fold.c getlimits.c $(ginstall_SOURCES) \
- $(groups_SOURCES) head.c hostid.c hostname.c $(id_SOURCES) \
- join.c $(kill_SOURCES) libstdbuf.c link.c $(ln_SOURCES) \
- logname.c $(ls_SOURCES) md5sum.c $(mkdir_SOURCES) mkfifo.c \
- mknod.c mktemp.c $(mv_SOURCES) nice.c nl.c nohup.c nproc.c \
- od.c paste.c pathchk.c pinky.c pr.c printenv.c printf.c ptx.c \
- pwd.c readlink.c $(realpath_SOURCES) $(rm_SOURCES) \
- $(rmdir_SOURCES) runcon.c seq.c setuidgid.c $(sha1sum_SOURCES) \
- $(sha224sum_SOURCES) $(sha256sum_SOURCES) $(sha384sum_SOURCES) \
- $(sha512sum_SOURCES) shred.c shuf.c sleep.c sort.c split.c \
- $(stat_SOURCES) stdbuf.c stty.c su.c sum.c sync.c tac.c tail.c \
- tee.c test.c $(timeout_SOURCES) touch.c tr.c true.c truncate.c \
- tsort.c tty.c $(uname_SOURCES) unexpand.c uniq.c unlink.c \
- uptime.c users.c $(vdir_SOURCES) wc.c who.c whoami.c yes.c
-DIST_SOURCES = $(__SOURCES) $(arch_SOURCES) base64.c basename.c cat.c \
- chcon.c $(chgrp_SOURCES) chmod.c $(chown_SOURCES) chroot.c \
- cksum.c comm.c $(cp_SOURCES) csplit.c cut.c date.c dd.c \
- $(df_SOURCES) $(dir_SOURCES) dircolors.c dirname.c du.c echo.c \
- env.c expand.c expr.c factor.c false.c fmt.c fold.c \
- getlimits.c $(ginstall_SOURCES) $(groups_SOURCES) head.c \
- hostid.c hostname.c $(id_SOURCES) join.c $(kill_SOURCES) \
- libstdbuf.c link.c $(ln_SOURCES) logname.c $(ls_SOURCES) \
- md5sum.c $(mkdir_SOURCES) mkfifo.c mknod.c mktemp.c \
- $(mv_SOURCES) nice.c nl.c nohup.c nproc.c od.c paste.c \
- pathchk.c pinky.c pr.c printenv.c printf.c ptx.c pwd.c \
- readlink.c $(realpath_SOURCES) $(rm_SOURCES) $(rmdir_SOURCES) \
- runcon.c seq.c setuidgid.c $(sha1sum_SOURCES) \
- $(sha224sum_SOURCES) $(sha256sum_SOURCES) $(sha384sum_SOURCES) \
- $(sha512sum_SOURCES) shred.c shuf.c sleep.c sort.c split.c \
- $(stat_SOURCES) stdbuf.c stty.c su.c sum.c sync.c tac.c tail.c \
- tee.c test.c $(timeout_SOURCES) touch.c tr.c true.c truncate.c \
- tsort.c tty.c $(uname_SOURCES) unexpand.c uniq.c unlink.c \
- uptime.c users.c $(vdir_SOURCES) wc.c who.c whoami.c yes.c
-am__can_run_installinfo = \
- case $$AM_UPDATE_INFO_DIR in \
- n|no|NO) false;; \
- *) (install-info --version) >/dev/null 2>&1;; \
- esac
-HEADERS = $(noinst_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-pkglibexecdir = @pkglibexecdir@
-
-# Use 'ginstall' in the definition of PROGRAMS and in dependencies to avoid
-# confusion with the 'install' target. The install rule transforms 'ginstall'
-# to install before applying any user-specified name transformations.
-transform = s/ginstall/install/; $(program_transform_name)
-ACLOCAL = @ACLOCAL@
-ALLOCA = @ALLOCA@
-ALLOCA_H = @ALLOCA_H@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
-AR = @AR@
-ARFLAGS = @ARFLAGS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
-BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
-BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
-BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
-BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIG_INCLUDE = @CONFIG_INCLUDE@
-CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFAULT_POSIX2_VERSION = @DEFAULT_POSIX2_VERSION@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
-EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
-ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
-ENOLINK_VALUE = @ENOLINK_VALUE@
-EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
-EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
-ERRNO_H = @ERRNO_H@
-EXEEXT = @EXEEXT@
-FLOAT_H = @FLOAT_H@
-FNMATCH_H = @FNMATCH_H@
-GETADDRINFO_LIB = @GETADDRINFO_LIB@
-GETHOSTNAME_LIB = @GETHOSTNAME_LIB@
-GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
-GETOPT_H = @GETOPT_H@
-GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
-GLIBC21 = @GLIBC21@
-GMSGFMT = @GMSGFMT@
-GMSGFMT_015 = @GMSGFMT_015@
-GNULIB_ACCEPT = @GNULIB_ACCEPT@
-GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@
-GNULIB_ACOSF = @GNULIB_ACOSF@
-GNULIB_ACOSL = @GNULIB_ACOSL@
-GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
-GNULIB_ASINF = @GNULIB_ASINF@
-GNULIB_ASINL = @GNULIB_ASINL@
-GNULIB_ATAN2F = @GNULIB_ATAN2F@
-GNULIB_ATANF = @GNULIB_ATANF@
-GNULIB_ATANL = @GNULIB_ATANL@
-GNULIB_ATOLL = @GNULIB_ATOLL@
-GNULIB_BIND = @GNULIB_BIND@
-GNULIB_BTOWC = @GNULIB_BTOWC@
-GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
-GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
-GNULIB_CBRT = @GNULIB_CBRT@
-GNULIB_CBRTF = @GNULIB_CBRTF@
-GNULIB_CBRTL = @GNULIB_CBRTL@
-GNULIB_CEIL = @GNULIB_CEIL@
-GNULIB_CEILF = @GNULIB_CEILF@
-GNULIB_CEILL = @GNULIB_CEILL@
-GNULIB_CHDIR = @GNULIB_CHDIR@
-GNULIB_CHOWN = @GNULIB_CHOWN@
-GNULIB_CLOSE = @GNULIB_CLOSE@
-GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@
-GNULIB_CONNECT = @GNULIB_CONNECT@
-GNULIB_COPYSIGN = @GNULIB_COPYSIGN@
-GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@
-GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@
-GNULIB_COSF = @GNULIB_COSF@
-GNULIB_COSHF = @GNULIB_COSHF@
-GNULIB_COSL = @GNULIB_COSL@
-GNULIB_DIRFD = @GNULIB_DIRFD@
-GNULIB_DPRINTF = @GNULIB_DPRINTF@
-GNULIB_DUP = @GNULIB_DUP@
-GNULIB_DUP2 = @GNULIB_DUP2@
-GNULIB_DUP3 = @GNULIB_DUP3@
-GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
-GNULIB_ENVIRON = @GNULIB_ENVIRON@
-GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
-GNULIB_EXP2 = @GNULIB_EXP2@
-GNULIB_EXP2F = @GNULIB_EXP2F@
-GNULIB_EXP2L = @GNULIB_EXP2L@
-GNULIB_EXPF = @GNULIB_EXPF@
-GNULIB_EXPL = @GNULIB_EXPL@
-GNULIB_EXPM1 = @GNULIB_EXPM1@
-GNULIB_EXPM1F = @GNULIB_EXPM1F@
-GNULIB_EXPM1L = @GNULIB_EXPM1L@
-GNULIB_FABSF = @GNULIB_FABSF@
-GNULIB_FABSL = @GNULIB_FABSL@
-GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
-GNULIB_FCHDIR = @GNULIB_FCHDIR@
-GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
-GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
-GNULIB_FCLOSE = @GNULIB_FCLOSE@
-GNULIB_FCNTL = @GNULIB_FCNTL@
-GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
-GNULIB_FDOPEN = @GNULIB_FDOPEN@
-GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@
-GNULIB_FFLUSH = @GNULIB_FFLUSH@
-GNULIB_FFS = @GNULIB_FFS@
-GNULIB_FFSL = @GNULIB_FFSL@
-GNULIB_FFSLL = @GNULIB_FFSLL@
-GNULIB_FGETC = @GNULIB_FGETC@
-GNULIB_FGETS = @GNULIB_FGETS@
-GNULIB_FLOOR = @GNULIB_FLOOR@
-GNULIB_FLOORF = @GNULIB_FLOORF@
-GNULIB_FLOORL = @GNULIB_FLOORL@
-GNULIB_FMA = @GNULIB_FMA@
-GNULIB_FMAF = @GNULIB_FMAF@
-GNULIB_FMAL = @GNULIB_FMAL@
-GNULIB_FMOD = @GNULIB_FMOD@
-GNULIB_FMODF = @GNULIB_FMODF@
-GNULIB_FMODL = @GNULIB_FMODL@
-GNULIB_FOPEN = @GNULIB_FOPEN@
-GNULIB_FPRINTF = @GNULIB_FPRINTF@
-GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
-GNULIB_FPURGE = @GNULIB_FPURGE@
-GNULIB_FPUTC = @GNULIB_FPUTC@
-GNULIB_FPUTS = @GNULIB_FPUTS@
-GNULIB_FREAD = @GNULIB_FREAD@
-GNULIB_FREOPEN = @GNULIB_FREOPEN@
-GNULIB_FREXP = @GNULIB_FREXP@
-GNULIB_FREXPF = @GNULIB_FREXPF@
-GNULIB_FREXPL = @GNULIB_FREXPL@
-GNULIB_FSCANF = @GNULIB_FSCANF@
-GNULIB_FSEEK = @GNULIB_FSEEK@
-GNULIB_FSEEKO = @GNULIB_FSEEKO@
-GNULIB_FSTAT = @GNULIB_FSTAT@
-GNULIB_FSTATAT = @GNULIB_FSTATAT@
-GNULIB_FSYNC = @GNULIB_FSYNC@
-GNULIB_FTELL = @GNULIB_FTELL@
-GNULIB_FTELLO = @GNULIB_FTELLO@
-GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
-GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
-GNULIB_FWRITE = @GNULIB_FWRITE@
-GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@
-GNULIB_GETC = @GNULIB_GETC@
-GNULIB_GETCHAR = @GNULIB_GETCHAR@
-GNULIB_GETCWD = @GNULIB_GETCWD@
-GNULIB_GETDELIM = @GNULIB_GETDELIM@
-GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
-GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
-GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
-GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
-GNULIB_GETLINE = @GNULIB_GETLINE@
-GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
-GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
-GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
-GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
-GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@
-GNULIB_GETRUSAGE = @GNULIB_GETRUSAGE@
-GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
-GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
-GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
-GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
-GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
-GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
-GNULIB_GRANTPT = @GNULIB_GRANTPT@
-GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
-GNULIB_HYPOT = @GNULIB_HYPOT@
-GNULIB_HYPOTF = @GNULIB_HYPOTF@
-GNULIB_HYPOTL = @GNULIB_HYPOTL@
-GNULIB_ICONV = @GNULIB_ICONV@
-GNULIB_ILOGB = @GNULIB_ILOGB@
-GNULIB_ILOGBF = @GNULIB_ILOGBF@
-GNULIB_ILOGBL = @GNULIB_ILOGBL@
-GNULIB_IMAXABS = @GNULIB_IMAXABS@
-GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
-GNULIB_INET_NTOP = @GNULIB_INET_NTOP@
-GNULIB_INET_PTON = @GNULIB_INET_PTON@
-GNULIB_IOCTL = @GNULIB_IOCTL@
-GNULIB_ISATTY = @GNULIB_ISATTY@
-GNULIB_ISBLANK = @GNULIB_ISBLANK@
-GNULIB_ISFINITE = @GNULIB_ISFINITE@
-GNULIB_ISINF = @GNULIB_ISINF@
-GNULIB_ISNAN = @GNULIB_ISNAN@
-GNULIB_ISNAND = @GNULIB_ISNAND@
-GNULIB_ISNANF = @GNULIB_ISNANF@
-GNULIB_ISNANL = @GNULIB_ISNANL@
-GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
-GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
-GNULIB_LCHMOD = @GNULIB_LCHMOD@
-GNULIB_LCHOWN = @GNULIB_LCHOWN@
-GNULIB_LDEXPF = @GNULIB_LDEXPF@
-GNULIB_LDEXPL = @GNULIB_LDEXPL@
-GNULIB_LINK = @GNULIB_LINK@
-GNULIB_LINKAT = @GNULIB_LINKAT@
-GNULIB_LISTEN = @GNULIB_LISTEN@
-GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
-GNULIB_LOG = @GNULIB_LOG@
-GNULIB_LOG10 = @GNULIB_LOG10@
-GNULIB_LOG10F = @GNULIB_LOG10F@
-GNULIB_LOG10L = @GNULIB_LOG10L@
-GNULIB_LOG1P = @GNULIB_LOG1P@
-GNULIB_LOG1PF = @GNULIB_LOG1PF@
-GNULIB_LOG1PL = @GNULIB_LOG1PL@
-GNULIB_LOG2 = @GNULIB_LOG2@
-GNULIB_LOG2F = @GNULIB_LOG2F@
-GNULIB_LOG2L = @GNULIB_LOG2L@
-GNULIB_LOGB = @GNULIB_LOGB@
-GNULIB_LOGBF = @GNULIB_LOGBF@
-GNULIB_LOGBL = @GNULIB_LOGBL@
-GNULIB_LOGF = @GNULIB_LOGF@
-GNULIB_LOGL = @GNULIB_LOGL@
-GNULIB_LSEEK = @GNULIB_LSEEK@
-GNULIB_LSTAT = @GNULIB_LSTAT@
-GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
-GNULIB_MBRLEN = @GNULIB_MBRLEN@
-GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
-GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
-GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
-GNULIB_MBSCHR = @GNULIB_MBSCHR@
-GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
-GNULIB_MBSINIT = @GNULIB_MBSINIT@
-GNULIB_MBSLEN = @GNULIB_MBSLEN@
-GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
-GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
-GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
-GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
-GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
-GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
-GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
-GNULIB_MBSSEP = @GNULIB_MBSSEP@
-GNULIB_MBSSPN = @GNULIB_MBSSPN@
-GNULIB_MBSSTR = @GNULIB_MBSSTR@
-GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
-GNULIB_MBTOWC = @GNULIB_MBTOWC@
-GNULIB_MEMCHR = @GNULIB_MEMCHR@
-GNULIB_MEMMEM = @GNULIB_MEMMEM@
-GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
-GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
-GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
-GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
-GNULIB_MKFIFO = @GNULIB_MKFIFO@
-GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
-GNULIB_MKNOD = @GNULIB_MKNOD@
-GNULIB_MKNODAT = @GNULIB_MKNODAT@
-GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
-GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
-GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
-GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
-GNULIB_MKTIME = @GNULIB_MKTIME@
-GNULIB_MODF = @GNULIB_MODF@
-GNULIB_MODFF = @GNULIB_MODFF@
-GNULIB_MODFL = @GNULIB_MODFL@
-GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
-GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
-GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
-GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
-GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
-GNULIB_OPEN = @GNULIB_OPEN@
-GNULIB_OPENAT = @GNULIB_OPENAT@
-GNULIB_OPENDIR = @GNULIB_OPENDIR@
-GNULIB_PCLOSE = @GNULIB_PCLOSE@
-GNULIB_PERROR = @GNULIB_PERROR@
-GNULIB_PIPE = @GNULIB_PIPE@
-GNULIB_PIPE2 = @GNULIB_PIPE2@
-GNULIB_POPEN = @GNULIB_POPEN@
-GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
-GNULIB_POSIX_SPAWN = @GNULIB_POSIX_SPAWN@
-GNULIB_POSIX_SPAWNATTR_DESTROY = @GNULIB_POSIX_SPAWNATTR_DESTROY@
-GNULIB_POSIX_SPAWNATTR_GETFLAGS = @GNULIB_POSIX_SPAWNATTR_GETFLAGS@
-GNULIB_POSIX_SPAWNATTR_GETPGROUP = @GNULIB_POSIX_SPAWNATTR_GETPGROUP@
-GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM@
-GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY@
-GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT@
-GNULIB_POSIX_SPAWNATTR_GETSIGMASK = @GNULIB_POSIX_SPAWNATTR_GETSIGMASK@
-GNULIB_POSIX_SPAWNATTR_INIT = @GNULIB_POSIX_SPAWNATTR_INIT@
-GNULIB_POSIX_SPAWNATTR_SETFLAGS = @GNULIB_POSIX_SPAWNATTR_SETFLAGS@
-GNULIB_POSIX_SPAWNATTR_SETPGROUP = @GNULIB_POSIX_SPAWNATTR_SETPGROUP@
-GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM@
-GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY@
-GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT@
-GNULIB_POSIX_SPAWNATTR_SETSIGMASK = @GNULIB_POSIX_SPAWNATTR_SETSIGMASK@
-GNULIB_POSIX_SPAWNP = @GNULIB_POSIX_SPAWNP@
-GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
-GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
-GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
-GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@
-GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@
-GNULIB_POWF = @GNULIB_POWF@
-GNULIB_PREAD = @GNULIB_PREAD@
-GNULIB_PRINTF = @GNULIB_PRINTF@
-GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
-GNULIB_PSELECT = @GNULIB_PSELECT@
-GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
-GNULIB_PTSNAME = @GNULIB_PTSNAME@
-GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
-GNULIB_PUTC = @GNULIB_PUTC@
-GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
-GNULIB_PUTENV = @GNULIB_PUTENV@
-GNULIB_PUTS = @GNULIB_PUTS@
-GNULIB_PWRITE = @GNULIB_PWRITE@
-GNULIB_RAISE = @GNULIB_RAISE@
-GNULIB_RANDOM = @GNULIB_RANDOM@
-GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
-GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
-GNULIB_READ = @GNULIB_READ@
-GNULIB_READDIR = @GNULIB_READDIR@
-GNULIB_READLINK = @GNULIB_READLINK@
-GNULIB_READLINKAT = @GNULIB_READLINKAT@
-GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
-GNULIB_REALPATH = @GNULIB_REALPATH@
-GNULIB_RECV = @GNULIB_RECV@
-GNULIB_RECVFROM = @GNULIB_RECVFROM@
-GNULIB_REMAINDER = @GNULIB_REMAINDER@
-GNULIB_REMAINDERF = @GNULIB_REMAINDERF@
-GNULIB_REMAINDERL = @GNULIB_REMAINDERL@
-GNULIB_REMOVE = @GNULIB_REMOVE@
-GNULIB_RENAME = @GNULIB_RENAME@
-GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
-GNULIB_REWINDDIR = @GNULIB_REWINDDIR@
-GNULIB_RINT = @GNULIB_RINT@
-GNULIB_RINTF = @GNULIB_RINTF@
-GNULIB_RINTL = @GNULIB_RINTL@
-GNULIB_RMDIR = @GNULIB_RMDIR@
-GNULIB_ROUND = @GNULIB_ROUND@
-GNULIB_ROUNDF = @GNULIB_ROUNDF@
-GNULIB_ROUNDL = @GNULIB_ROUNDL@
-GNULIB_RPMATCH = @GNULIB_RPMATCH@
-GNULIB_SCANDIR = @GNULIB_SCANDIR@
-GNULIB_SCANF = @GNULIB_SCANF@
-GNULIB_SELECT = @GNULIB_SELECT@
-GNULIB_SEND = @GNULIB_SEND@
-GNULIB_SENDTO = @GNULIB_SENDTO@
-GNULIB_SETENV = @GNULIB_SETENV@
-GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
-GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
-GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
-GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
-GNULIB_SIGACTION = @GNULIB_SIGACTION@
-GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
-GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
-GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
-GNULIB_SINF = @GNULIB_SINF@
-GNULIB_SINHF = @GNULIB_SINHF@
-GNULIB_SINL = @GNULIB_SINL@
-GNULIB_SLEEP = @GNULIB_SLEEP@
-GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
-GNULIB_SOCKET = @GNULIB_SOCKET@
-GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
-GNULIB_SQRTF = @GNULIB_SQRTF@
-GNULIB_SQRTL = @GNULIB_SQRTL@
-GNULIB_STAT = @GNULIB_STAT@
-GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
-GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
-GNULIB_STPCPY = @GNULIB_STPCPY@
-GNULIB_STPNCPY = @GNULIB_STPNCPY@
-GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
-GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
-GNULIB_STRDUP = @GNULIB_STRDUP@
-GNULIB_STRERROR = @GNULIB_STRERROR@
-GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
-GNULIB_STRNCAT = @GNULIB_STRNCAT@
-GNULIB_STRNDUP = @GNULIB_STRNDUP@
-GNULIB_STRNLEN = @GNULIB_STRNLEN@
-GNULIB_STRPBRK = @GNULIB_STRPBRK@
-GNULIB_STRPTIME = @GNULIB_STRPTIME@
-GNULIB_STRSEP = @GNULIB_STRSEP@
-GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
-GNULIB_STRSTR = @GNULIB_STRSTR@
-GNULIB_STRTOD = @GNULIB_STRTOD@
-GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
-GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
-GNULIB_STRTOLL = @GNULIB_STRTOLL@
-GNULIB_STRTOULL = @GNULIB_STRTOULL@
-GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
-GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
-GNULIB_SYMLINK = @GNULIB_SYMLINK@
-GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
-GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
-GNULIB_TANF = @GNULIB_TANF@
-GNULIB_TANHF = @GNULIB_TANHF@
-GNULIB_TANL = @GNULIB_TANL@
-GNULIB_TCGETSID = @GNULIB_TCGETSID@
-GNULIB_TEST_WARN_CFLAGS = @GNULIB_TEST_WARN_CFLAGS@
-GNULIB_TIMEGM = @GNULIB_TIMEGM@
-GNULIB_TIME_R = @GNULIB_TIME_R@
-GNULIB_TMPFILE = @GNULIB_TMPFILE@
-GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
-GNULIB_TRUNC = @GNULIB_TRUNC@
-GNULIB_TRUNCF = @GNULIB_TRUNCF@
-GNULIB_TRUNCL = @GNULIB_TRUNCL@
-GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_UNAME = @GNULIB_UNAME@
-GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
-GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
-GNULIB_UNLINK = @GNULIB_UNLINK@
-GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
-GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
-GNULIB_UNSETENV = @GNULIB_UNSETENV@
-GNULIB_USLEEP = @GNULIB_USLEEP@
-GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
-GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
-GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
-GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
-GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
-GNULIB_VFSCANF = @GNULIB_VFSCANF@
-GNULIB_VPRINTF = @GNULIB_VPRINTF@
-GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
-GNULIB_VSCANF = @GNULIB_VSCANF@
-GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
-GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
-GNULIB_WAITPID = @GNULIB_WAITPID@
-GNULIB_WARN_CFLAGS = @GNULIB_WARN_CFLAGS@
-GNULIB_WCPCPY = @GNULIB_WCPCPY@
-GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
-GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
-GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
-GNULIB_WCSCAT = @GNULIB_WCSCAT@
-GNULIB_WCSCHR = @GNULIB_WCSCHR@
-GNULIB_WCSCMP = @GNULIB_WCSCMP@
-GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
-GNULIB_WCSCPY = @GNULIB_WCSCPY@
-GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
-GNULIB_WCSDUP = @GNULIB_WCSDUP@
-GNULIB_WCSLEN = @GNULIB_WCSLEN@
-GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
-GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
-GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
-GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
-GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
-GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
-GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
-GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
-GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
-GNULIB_WCSSPN = @GNULIB_WCSSPN@
-GNULIB_WCSSTR = @GNULIB_WCSSTR@
-GNULIB_WCSTOK = @GNULIB_WCSTOK@
-GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
-GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
-GNULIB_WCTOB = @GNULIB_WCTOB@
-GNULIB_WCTOMB = @GNULIB_WCTOMB@
-GNULIB_WCTRANS = @GNULIB_WCTRANS@
-GNULIB_WCTYPE = @GNULIB_WCTYPE@
-GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
-GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
-GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
-GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
-GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
-GNULIB_WMEMSET = @GNULIB_WMEMSET@
-GNULIB_WRITE = @GNULIB_WRITE@
-GNULIB__EXIT = @GNULIB__EXIT@
-GREP = @GREP@
-HAVE_ACCEPT4 = @HAVE_ACCEPT4@
-HAVE_ACOSF = @HAVE_ACOSF@
-HAVE_ACOSL = @HAVE_ACOSL@
-HAVE_ALPHASORT = @HAVE_ALPHASORT@
-HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@
-HAVE_ASINF = @HAVE_ASINF@
-HAVE_ASINL = @HAVE_ASINL@
-HAVE_ATAN2F = @HAVE_ATAN2F@
-HAVE_ATANF = @HAVE_ATANF@
-HAVE_ATANL = @HAVE_ATANL@
-HAVE_ATOLL = @HAVE_ATOLL@
-HAVE_BTOWC = @HAVE_BTOWC@
-HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
-HAVE_CBRT = @HAVE_CBRT@
-HAVE_CBRTF = @HAVE_CBRTF@
-HAVE_CBRTL = @HAVE_CBRTL@
-HAVE_CHOWN = @HAVE_CHOWN@
-HAVE_CLOSEDIR = @HAVE_CLOSEDIR@
-HAVE_COPYSIGN = @HAVE_COPYSIGN@
-HAVE_COPYSIGNL = @HAVE_COPYSIGNL@
-HAVE_COSF = @HAVE_COSF@
-HAVE_COSHF = @HAVE_COSHF@
-HAVE_COSL = @HAVE_COSL@
-HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
-HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
-HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
-HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@
-HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@
-HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
-HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
-HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@
-HAVE_DECL_COSL = @HAVE_DECL_COSL@
-HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
-HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
-HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@
-HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@
-HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@
-HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
-HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@
-HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
-HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
-HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
-HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@
-HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@
-HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
-HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@
-HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@
-HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
-HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
-HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@
-HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@
-HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
-HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
-HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
-HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
-HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
-HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@
-HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
-HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
-HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
-HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
-HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@
-HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@
-HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@
-HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
-HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@
-HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@
-HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@
-HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@
-HAVE_DECL_LOGB = @HAVE_DECL_LOGB@
-HAVE_DECL_LOGL = @HAVE_DECL_LOGL@
-HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
-HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
-HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
-HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@
-HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@
-HAVE_DECL_RINTF = @HAVE_DECL_RINTF@
-HAVE_DECL_ROUND = @HAVE_DECL_ROUND@
-HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
-HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
-HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
-HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
-HAVE_DECL_SINL = @HAVE_DECL_SINL@
-HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
-HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@
-HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
-HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
-HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
-HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
-HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
-HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
-HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@
-HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
-HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@
-HAVE_DECL_TANL = @HAVE_DECL_TANL@
-HAVE_DECL_TCGETSID = @HAVE_DECL_TCGETSID@
-HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@
-HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@
-HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@
-HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
-HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
-HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
-HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
-HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
-HAVE_DIRENT_H = @HAVE_DIRENT_H@
-HAVE_DPRINTF = @HAVE_DPRINTF@
-HAVE_DUP2 = @HAVE_DUP2@
-HAVE_DUP3 = @HAVE_DUP3@
-HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
-HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
-HAVE_EXPF = @HAVE_EXPF@
-HAVE_EXPL = @HAVE_EXPL@
-HAVE_EXPM1 = @HAVE_EXPM1@
-HAVE_EXPM1F = @HAVE_EXPM1F@
-HAVE_FABSF = @HAVE_FABSF@
-HAVE_FABSL = @HAVE_FABSL@
-HAVE_FACCESSAT = @HAVE_FACCESSAT@
-HAVE_FCHDIR = @HAVE_FCHDIR@
-HAVE_FCHMODAT = @HAVE_FCHMODAT@
-HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
-HAVE_FCNTL = @HAVE_FCNTL@
-HAVE_FDATASYNC = @HAVE_FDATASYNC@
-HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
-HAVE_FEATURES_H = @HAVE_FEATURES_H@
-HAVE_FFS = @HAVE_FFS@
-HAVE_FFSL = @HAVE_FFSL@
-HAVE_FFSLL = @HAVE_FFSLL@
-HAVE_FMA = @HAVE_FMA@
-HAVE_FMAF = @HAVE_FMAF@
-HAVE_FMAL = @HAVE_FMAL@
-HAVE_FMODF = @HAVE_FMODF@
-HAVE_FMODL = @HAVE_FMODL@
-HAVE_FREXPF = @HAVE_FREXPF@
-HAVE_FSEEKO = @HAVE_FSEEKO@
-HAVE_FSTATAT = @HAVE_FSTATAT@
-HAVE_FSYNC = @HAVE_FSYNC@
-HAVE_FTELLO = @HAVE_FTELLO@
-HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
-HAVE_FUTIMENS = @HAVE_FUTIMENS@
-HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
-HAVE_GETGROUPS = @HAVE_GETGROUPS@
-HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
-HAVE_GETLOGIN = @HAVE_GETLOGIN@
-HAVE_GETOPT_H = @HAVE_GETOPT_H@
-HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
-HAVE_GETRUSAGE = @HAVE_GETRUSAGE@
-HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
-HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
-HAVE_GRANTPT = @HAVE_GRANTPT@
-HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
-HAVE_HYPOTF = @HAVE_HYPOTF@
-HAVE_HYPOTL = @HAVE_HYPOTL@
-HAVE_ILOGB = @HAVE_ILOGB@
-HAVE_ILOGBF = @HAVE_ILOGBF@
-HAVE_ILOGBL = @HAVE_ILOGBL@
-HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
-HAVE_ISBLANK = @HAVE_ISBLANK@
-HAVE_ISNAND = @HAVE_ISNAND@
-HAVE_ISNANF = @HAVE_ISNANF@
-HAVE_ISNANL = @HAVE_ISNANL@
-HAVE_ISWBLANK = @HAVE_ISWBLANK@
-HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
-HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
-HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
-HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
-HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@
-HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@
-HAVE_LCHMOD = @HAVE_LCHMOD@
-HAVE_LCHOWN = @HAVE_LCHOWN@
-HAVE_LDEXPF = @HAVE_LDEXPF@
-HAVE_LINK = @HAVE_LINK@
-HAVE_LINKAT = @HAVE_LINKAT@
-HAVE_LOG10F = @HAVE_LOG10F@
-HAVE_LOG10L = @HAVE_LOG10L@
-HAVE_LOG1P = @HAVE_LOG1P@
-HAVE_LOG1PF = @HAVE_LOG1PF@
-HAVE_LOG1PL = @HAVE_LOG1PL@
-HAVE_LOGBF = @HAVE_LOGBF@
-HAVE_LOGBL = @HAVE_LOGBL@
-HAVE_LOGF = @HAVE_LOGF@
-HAVE_LOGL = @HAVE_LOGL@
-HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
-HAVE_LSTAT = @HAVE_LSTAT@
-HAVE_MBRLEN = @HAVE_MBRLEN@
-HAVE_MBRTOWC = @HAVE_MBRTOWC@
-HAVE_MBSINIT = @HAVE_MBSINIT@
-HAVE_MBSLEN = @HAVE_MBSLEN@
-HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
-HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
-HAVE_MEMCHR = @HAVE_MEMCHR@
-HAVE_MEMPCPY = @HAVE_MEMPCPY@
-HAVE_MKDIRAT = @HAVE_MKDIRAT@
-HAVE_MKDTEMP = @HAVE_MKDTEMP@
-HAVE_MKFIFO = @HAVE_MKFIFO@
-HAVE_MKFIFOAT = @HAVE_MKFIFOAT@
-HAVE_MKNOD = @HAVE_MKNOD@
-HAVE_MKNODAT = @HAVE_MKNODAT@
-HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
-HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
-HAVE_MKSTEMP = @HAVE_MKSTEMP@
-HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
-HAVE_MODFF = @HAVE_MODFF@
-HAVE_MODFL = @HAVE_MODFL@
-HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
-HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
-HAVE_NETDB_H = @HAVE_NETDB_H@
-HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
-HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
-HAVE_OPENAT = @HAVE_OPENAT@
-HAVE_OPENDIR = @HAVE_OPENDIR@
-HAVE_OS_H = @HAVE_OS_H@
-HAVE_PCLOSE = @HAVE_PCLOSE@
-HAVE_PIPE = @HAVE_PIPE@
-HAVE_PIPE2 = @HAVE_PIPE2@
-HAVE_POPEN = @HAVE_POPEN@
-HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
-HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
-HAVE_POSIX_SPAWN = @HAVE_POSIX_SPAWN@
-HAVE_POSIX_SPAWNATTR_T = @HAVE_POSIX_SPAWNATTR_T@
-HAVE_POSIX_SPAWN_FILE_ACTIONS_T = @HAVE_POSIX_SPAWN_FILE_ACTIONS_T@
-HAVE_POWF = @HAVE_POWF@
-HAVE_PREAD = @HAVE_PREAD@
-HAVE_PSELECT = @HAVE_PSELECT@
-HAVE_PTHREAD_H = @HAVE_PTHREAD_H@
-HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
-HAVE_PTHREAD_SPINLOCK_T = @HAVE_PTHREAD_SPINLOCK_T@
-HAVE_PTHREAD_T = @HAVE_PTHREAD_T@
-HAVE_PTSNAME = @HAVE_PTSNAME@
-HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
-HAVE_PWRITE = @HAVE_PWRITE@
-HAVE_RAISE = @HAVE_RAISE@
-HAVE_RANDOM = @HAVE_RANDOM@
-HAVE_RANDOM_H = @HAVE_RANDOM_H@
-HAVE_RANDOM_R = @HAVE_RANDOM_R@
-HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
-HAVE_READDIR = @HAVE_READDIR@
-HAVE_READLINK = @HAVE_READLINK@
-HAVE_READLINKAT = @HAVE_READLINKAT@
-HAVE_REALPATH = @HAVE_REALPATH@
-HAVE_REMAINDER = @HAVE_REMAINDER@
-HAVE_REMAINDERF = @HAVE_REMAINDERF@
-HAVE_RENAMEAT = @HAVE_RENAMEAT@
-HAVE_REWINDDIR = @HAVE_REWINDDIR@
-HAVE_RINT = @HAVE_RINT@
-HAVE_RINTL = @HAVE_RINTL@
-HAVE_RPMATCH = @HAVE_RPMATCH@
-HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@
-HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@
-HAVE_SCANDIR = @HAVE_SCANDIR@
-HAVE_SCHED_H = @HAVE_SCHED_H@
-HAVE_SETENV = @HAVE_SETENV@
-HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
-HAVE_SIGACTION = @HAVE_SIGACTION@
-HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
-HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
-HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
-HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
-HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
-HAVE_SIGSET_T = @HAVE_SIGSET_T@
-HAVE_SINF = @HAVE_SINF@
-HAVE_SINHF = @HAVE_SINHF@
-HAVE_SINL = @HAVE_SINL@
-HAVE_SLEEP = @HAVE_SLEEP@
-HAVE_SPAWN_H = @HAVE_SPAWN_H@
-HAVE_SQRTF = @HAVE_SQRTF@
-HAVE_SQRTL = @HAVE_SQRTL@
-HAVE_STDINT_H = @HAVE_STDINT_H@
-HAVE_STPCPY = @HAVE_STPCPY@
-HAVE_STPNCPY = @HAVE_STPNCPY@
-HAVE_STRCASECMP = @HAVE_STRCASECMP@
-HAVE_STRCASESTR = @HAVE_STRCASESTR@
-HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
-HAVE_STRINGS_H = @HAVE_STRINGS_H@
-HAVE_STRPBRK = @HAVE_STRPBRK@
-HAVE_STRPTIME = @HAVE_STRPTIME@
-HAVE_STRSEP = @HAVE_STRSEP@
-HAVE_STRTOD = @HAVE_STRTOD@
-HAVE_STRTOLL = @HAVE_STRTOLL@
-HAVE_STRTOULL = @HAVE_STRTOULL@
-HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@
-HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
-HAVE_STRUCT_SCHED_PARAM = @HAVE_STRUCT_SCHED_PARAM@
-HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
-HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@
-HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@
-HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
-HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@
-HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
-HAVE_SYMLINK = @HAVE_SYMLINK@
-HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
-HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
-HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
-HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@
-HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
-HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
-HAVE_SYS_RESOURCE_H = @HAVE_SYS_RESOURCE_H@
-HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@
-HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
-HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
-HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
-HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@
-HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@
-HAVE_TANF = @HAVE_TANF@
-HAVE_TANHF = @HAVE_TANHF@
-HAVE_TANL = @HAVE_TANL@
-HAVE_TERMIOS_H = @HAVE_TERMIOS_H@
-HAVE_TIMEGM = @HAVE_TIMEGM@
-HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
-HAVE_UNAME = @HAVE_UNAME@
-HAVE_UNISTD_H = @HAVE_UNISTD_H@
-HAVE_UNLINKAT = @HAVE_UNLINKAT@
-HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
-HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
-HAVE_USLEEP = @HAVE_USLEEP@
-HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
-HAVE_VASPRINTF = @HAVE_VASPRINTF@
-HAVE_VDPRINTF = @HAVE_VDPRINTF@
-HAVE_WCHAR_H = @HAVE_WCHAR_H@
-HAVE_WCHAR_T = @HAVE_WCHAR_T@
-HAVE_WCPCPY = @HAVE_WCPCPY@
-HAVE_WCPNCPY = @HAVE_WCPNCPY@
-HAVE_WCRTOMB = @HAVE_WCRTOMB@
-HAVE_WCSCASECMP = @HAVE_WCSCASECMP@
-HAVE_WCSCAT = @HAVE_WCSCAT@
-HAVE_WCSCHR = @HAVE_WCSCHR@
-HAVE_WCSCMP = @HAVE_WCSCMP@
-HAVE_WCSCOLL = @HAVE_WCSCOLL@
-HAVE_WCSCPY = @HAVE_WCSCPY@
-HAVE_WCSCSPN = @HAVE_WCSCSPN@
-HAVE_WCSDUP = @HAVE_WCSDUP@
-HAVE_WCSLEN = @HAVE_WCSLEN@
-HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@
-HAVE_WCSNCAT = @HAVE_WCSNCAT@
-HAVE_WCSNCMP = @HAVE_WCSNCMP@
-HAVE_WCSNCPY = @HAVE_WCSNCPY@
-HAVE_WCSNLEN = @HAVE_WCSNLEN@
-HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
-HAVE_WCSPBRK = @HAVE_WCSPBRK@
-HAVE_WCSRCHR = @HAVE_WCSRCHR@
-HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
-HAVE_WCSSPN = @HAVE_WCSSPN@
-HAVE_WCSSTR = @HAVE_WCSSTR@
-HAVE_WCSTOK = @HAVE_WCSTOK@
-HAVE_WCSWIDTH = @HAVE_WCSWIDTH@
-HAVE_WCSXFRM = @HAVE_WCSXFRM@
-HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
-HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
-HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
-HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
-HAVE_WINT_T = @HAVE_WINT_T@
-HAVE_WMEMCHR = @HAVE_WMEMCHR@
-HAVE_WMEMCMP = @HAVE_WMEMCMP@
-HAVE_WMEMCPY = @HAVE_WMEMCPY@
-HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
-HAVE_WMEMSET = @HAVE_WMEMSET@
-HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
-HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
-HAVE__BOOL = @HAVE__BOOL@
-HAVE__EXIT = @HAVE__EXIT@
-HELP2MAN = @HELP2MAN@
-HOSTENT_LIB = @HOSTENT_LIB@
-ICONV_CONST = @ICONV_CONST@
-ICONV_H = @ICONV_H@
-IGNORE_UNUSED_LIBRARIES_CFLAGS = @IGNORE_UNUSED_LIBRARIES_CFLAGS@
-INCLUDE_NEXT = @INCLUDE_NEXT@
-INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
-INET_NTOP_LIB = @INET_NTOP_LIB@
-INET_PTON_LIB = @INET_PTON_LIB@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = $(cu_install_program)
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTALL_SU = @INSTALL_SU@
-INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
-INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@
-INTLLIBS = @INTLLIBS@
-INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
-LDFLAGS = @LDFLAGS@
-LIBCOREUTILS_LIBDEPS = @LIBCOREUTILS_LIBDEPS@
-LIBCOREUTILS_LTLIBDEPS = @LIBCOREUTILS_LTLIBDEPS@
-LIBICONV = @LIBICONV@
-LIBINTL = @LIBINTL@
-LIBMULTITHREAD = @LIBMULTITHREAD@
-LIBOBJS = @LIBOBJS@
-LIBPTH = @LIBPTH@
-LIBPTH_PREFIX = @LIBPTH_PREFIX@
-LIBS = @LIBS@
-LIBSOCKET = @LIBSOCKET@
-LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
-LIBTHREAD = @LIBTHREAD@
-LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@
-LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@
-LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@
-LIB_ACL = @LIB_ACL@
-LIB_CAP = @LIB_CAP@
-LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
-LIB_CRYPT = @LIB_CRYPT@
-LIB_EACCESS = @LIB_EACCESS@
-LIB_FDATASYNC = @LIB_FDATASYNC@
-LIB_GETHRXTIME = @LIB_GETHRXTIME@
-LIB_GMP = @LIB_GMP@
-LIB_NANOSLEEP = @LIB_NANOSLEEP@
-LIB_PTHREAD = @LIB_PTHREAD@
-LIB_SELECT = @LIB_SELECT@
-LIB_SELINUX = @LIB_SELINUX@
-LIB_TIMER_TIME = @LIB_TIMER_TIME@
-LIB_XATTR = @LIB_XATTR@
-LN_S = @LN_S@
-LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
-LOCALE_FR = @LOCALE_FR@
-LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
-LOCALE_JA = @LOCALE_JA@
-LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@
-LOCALE_ZH_CN = @LOCALE_ZH_CN@
-LTLIBICONV = @LTLIBICONV@
-LTLIBINTL = @LTLIBINTL@
-LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
-LTLIBOBJS = @LTLIBOBJS@
-LTLIBPTH = @LTLIBPTH@
-LTLIBTHREAD = @LTLIBTHREAD@
-MAKEINFO = @MAKEINFO@
-MAN = @MAN@
-MKDIR_P = @MKDIR_P@
-MSGFMT = @MSGFMT@
-MSGFMT_015 = @MSGFMT_015@
-MSGMERGE = @MSGMERGE@
-NETINET_IN_H = @NETINET_IN_H@
-NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@
-NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@
-NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
-NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
-NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
-NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
-NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
-NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
-NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@
-NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
-NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
-NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
-NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
-NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@
-NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@
-NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H = @NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H@
-NEXT_AS_FIRST_DIRECTIVE_SCHED_H = @NEXT_AS_FIRST_DIRECTIVE_SCHED_H@
-NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@
-NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
-NEXT_AS_FIRST_DIRECTIVE_SPAWN_H = @NEXT_AS_FIRST_DIRECTIVE_SPAWN_H@
-NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
-NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
-NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
-NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@
-NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
-NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@
-NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
-NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@
-NEXT_AS_FIRST_DIRECTIVE_SYS_RESOURCE_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_RESOURCE_H@
-NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@
-NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@
-NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
-NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@
-NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
-NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@
-NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@
-NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@
-NEXT_AS_FIRST_DIRECTIVE_TERMIOS_H = @NEXT_AS_FIRST_DIRECTIVE_TERMIOS_H@
-NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@
-NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
-NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
-NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
-NEXT_CTYPE_H = @NEXT_CTYPE_H@
-NEXT_DIRENT_H = @NEXT_DIRENT_H@
-NEXT_ERRNO_H = @NEXT_ERRNO_H@
-NEXT_FCNTL_H = @NEXT_FCNTL_H@
-NEXT_FLOAT_H = @NEXT_FLOAT_H@
-NEXT_GETOPT_H = @NEXT_GETOPT_H@
-NEXT_ICONV_H = @NEXT_ICONV_H@
-NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
-NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
-NEXT_LOCALE_H = @NEXT_LOCALE_H@
-NEXT_MATH_H = @NEXT_MATH_H@
-NEXT_NETDB_H = @NEXT_NETDB_H@
-NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
-NEXT_PTHREAD_H = @NEXT_PTHREAD_H@
-NEXT_SCHED_H = @NEXT_SCHED_H@
-NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@
-NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
-NEXT_SPAWN_H = @NEXT_SPAWN_H@
-NEXT_STDARG_H = @NEXT_STDARG_H@
-NEXT_STDDEF_H = @NEXT_STDDEF_H@
-NEXT_STDINT_H = @NEXT_STDINT_H@
-NEXT_STDIO_H = @NEXT_STDIO_H@
-NEXT_STDLIB_H = @NEXT_STDLIB_H@
-NEXT_STRINGS_H = @NEXT_STRINGS_H@
-NEXT_STRING_H = @NEXT_STRING_H@
-NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@
-NEXT_SYS_RESOURCE_H = @NEXT_SYS_RESOURCE_H@
-NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@
-NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
-NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
-NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
-NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
-NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@
-NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@
-NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@
-NEXT_TERMIOS_H = @NEXT_TERMIOS_H@
-NEXT_TIME_H = @NEXT_TIME_H@
-NEXT_UNISTD_H = @NEXT_UNISTD_H@
-NEXT_WCHAR_H = @NEXT_WCHAR_H@
-NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
-NO_INSTALL_PROGS_DEFAULT = @NO_INSTALL_PROGS_DEFAULT@
-OBJEXT = @OBJEXT@
-OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
-OPTIONAL_PKGLIB_PROGS = @OPTIONAL_PKGLIB_PROGS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-POSIX_SHELL = @POSIX_SHELL@
-POSUB = @POSUB@
-PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
-PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
-PREFERABLY_POSIX_SHELL = @PREFERABLY_POSIX_SHELL@
-PRIPTR_PREFIX = @PRIPTR_PREFIX@
-PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
-PTHREAD_H = @PTHREAD_H@
-PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
-PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
-RANLIB = @RANLIB@
-REPLACE_BTOWC = @REPLACE_BTOWC@
-REPLACE_CALLOC = @REPLACE_CALLOC@
-REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
-REPLACE_CBRTF = @REPLACE_CBRTF@
-REPLACE_CBRTL = @REPLACE_CBRTL@
-REPLACE_CEIL = @REPLACE_CEIL@
-REPLACE_CEILF = @REPLACE_CEILF@
-REPLACE_CEILL = @REPLACE_CEILL@
-REPLACE_CHOWN = @REPLACE_CHOWN@
-REPLACE_CLOSE = @REPLACE_CLOSE@
-REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
-REPLACE_DIRFD = @REPLACE_DIRFD@
-REPLACE_DPRINTF = @REPLACE_DPRINTF@
-REPLACE_DUP = @REPLACE_DUP@
-REPLACE_DUP2 = @REPLACE_DUP2@
-REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
-REPLACE_EXP2 = @REPLACE_EXP2@
-REPLACE_EXP2L = @REPLACE_EXP2L@
-REPLACE_EXPM1 = @REPLACE_EXPM1@
-REPLACE_EXPM1F = @REPLACE_EXPM1F@
-REPLACE_FABSL = @REPLACE_FABSL@
-REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
-REPLACE_FCLOSE = @REPLACE_FCLOSE@
-REPLACE_FCNTL = @REPLACE_FCNTL@
-REPLACE_FDOPEN = @REPLACE_FDOPEN@
-REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
-REPLACE_FFLUSH = @REPLACE_FFLUSH@
-REPLACE_FLOOR = @REPLACE_FLOOR@
-REPLACE_FLOORF = @REPLACE_FLOORF@
-REPLACE_FLOORL = @REPLACE_FLOORL@
-REPLACE_FMA = @REPLACE_FMA@
-REPLACE_FMAF = @REPLACE_FMAF@
-REPLACE_FMAL = @REPLACE_FMAL@
-REPLACE_FMOD = @REPLACE_FMOD@
-REPLACE_FMODF = @REPLACE_FMODF@
-REPLACE_FMODL = @REPLACE_FMODL@
-REPLACE_FOPEN = @REPLACE_FOPEN@
-REPLACE_FPRINTF = @REPLACE_FPRINTF@
-REPLACE_FPURGE = @REPLACE_FPURGE@
-REPLACE_FREOPEN = @REPLACE_FREOPEN@
-REPLACE_FREXP = @REPLACE_FREXP@
-REPLACE_FREXPF = @REPLACE_FREXPF@
-REPLACE_FREXPL = @REPLACE_FREXPL@
-REPLACE_FSEEK = @REPLACE_FSEEK@
-REPLACE_FSEEKO = @REPLACE_FSEEKO@
-REPLACE_FSTAT = @REPLACE_FSTAT@
-REPLACE_FSTATAT = @REPLACE_FSTATAT@
-REPLACE_FTELL = @REPLACE_FTELL@
-REPLACE_FTELLO = @REPLACE_FTELLO@
-REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
-REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
-REPLACE_GAI_STRERROR = @REPLACE_GAI_STRERROR@
-REPLACE_GETCWD = @REPLACE_GETCWD@
-REPLACE_GETDELIM = @REPLACE_GETDELIM@
-REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
-REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
-REPLACE_GETLINE = @REPLACE_GETLINE@
-REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
-REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
-REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
-REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
-REPLACE_HYPOT = @REPLACE_HYPOT@
-REPLACE_HYPOTF = @REPLACE_HYPOTF@
-REPLACE_HYPOTL = @REPLACE_HYPOTL@
-REPLACE_ICONV = @REPLACE_ICONV@
-REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@
-REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@
-REPLACE_ILOGB = @REPLACE_ILOGB@
-REPLACE_ILOGBF = @REPLACE_ILOGBF@
-REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
-REPLACE_INET_PTON = @REPLACE_INET_PTON@
-REPLACE_IOCTL = @REPLACE_IOCTL@
-REPLACE_ISATTY = @REPLACE_ISATTY@
-REPLACE_ISFINITE = @REPLACE_ISFINITE@
-REPLACE_ISINF = @REPLACE_ISINF@
-REPLACE_ISNAN = @REPLACE_ISNAN@
-REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
-REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
-REPLACE_ITOLD = @REPLACE_ITOLD@
-REPLACE_LCHOWN = @REPLACE_LCHOWN@
-REPLACE_LDEXPL = @REPLACE_LDEXPL@
-REPLACE_LINK = @REPLACE_LINK@
-REPLACE_LINKAT = @REPLACE_LINKAT@
-REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
-REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
-REPLACE_LOG = @REPLACE_LOG@
-REPLACE_LOG10 = @REPLACE_LOG10@
-REPLACE_LOG10F = @REPLACE_LOG10F@
-REPLACE_LOG10L = @REPLACE_LOG10L@
-REPLACE_LOG1P = @REPLACE_LOG1P@
-REPLACE_LOG1PF = @REPLACE_LOG1PF@
-REPLACE_LOG1PL = @REPLACE_LOG1PL@
-REPLACE_LOG2 = @REPLACE_LOG2@
-REPLACE_LOG2F = @REPLACE_LOG2F@
-REPLACE_LOG2L = @REPLACE_LOG2L@
-REPLACE_LOGB = @REPLACE_LOGB@
-REPLACE_LOGBF = @REPLACE_LOGBF@
-REPLACE_LOGBL = @REPLACE_LOGBL@
-REPLACE_LOGF = @REPLACE_LOGF@
-REPLACE_LOGL = @REPLACE_LOGL@
-REPLACE_LSEEK = @REPLACE_LSEEK@
-REPLACE_LSTAT = @REPLACE_LSTAT@
-REPLACE_MALLOC = @REPLACE_MALLOC@
-REPLACE_MBRLEN = @REPLACE_MBRLEN@
-REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
-REPLACE_MBSINIT = @REPLACE_MBSINIT@
-REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
-REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
-REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
-REPLACE_MBTOWC = @REPLACE_MBTOWC@
-REPLACE_MEMCHR = @REPLACE_MEMCHR@
-REPLACE_MEMMEM = @REPLACE_MEMMEM@
-REPLACE_MKDIR = @REPLACE_MKDIR@
-REPLACE_MKFIFO = @REPLACE_MKFIFO@
-REPLACE_MKNOD = @REPLACE_MKNOD@
-REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
-REPLACE_MKTIME = @REPLACE_MKTIME@
-REPLACE_MODF = @REPLACE_MODF@
-REPLACE_MODFF = @REPLACE_MODFF@
-REPLACE_MODFL = @REPLACE_MODFL@
-REPLACE_NAN = @REPLACE_NAN@
-REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
-REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
-REPLACE_NULL = @REPLACE_NULL@
-REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
-REPLACE_OPEN = @REPLACE_OPEN@
-REPLACE_OPENAT = @REPLACE_OPENAT@
-REPLACE_OPENDIR = @REPLACE_OPENDIR@
-REPLACE_PERROR = @REPLACE_PERROR@
-REPLACE_POPEN = @REPLACE_POPEN@
-REPLACE_POSIX_SPAWN = @REPLACE_POSIX_SPAWN@
-REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
-REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
-REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
-REPLACE_PREAD = @REPLACE_PREAD@
-REPLACE_PRINTF = @REPLACE_PRINTF@
-REPLACE_PSELECT = @REPLACE_PSELECT@
-REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
-REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
-REPLACE_PUTENV = @REPLACE_PUTENV@
-REPLACE_PWRITE = @REPLACE_PWRITE@
-REPLACE_RAISE = @REPLACE_RAISE@
-REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
-REPLACE_READ = @REPLACE_READ@
-REPLACE_READLINK = @REPLACE_READLINK@
-REPLACE_REALLOC = @REPLACE_REALLOC@
-REPLACE_REALPATH = @REPLACE_REALPATH@
-REPLACE_REMAINDER = @REPLACE_REMAINDER@
-REPLACE_REMAINDERF = @REPLACE_REMAINDERF@
-REPLACE_REMAINDERL = @REPLACE_REMAINDERL@
-REPLACE_REMOVE = @REPLACE_REMOVE@
-REPLACE_RENAME = @REPLACE_RENAME@
-REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
-REPLACE_RMDIR = @REPLACE_RMDIR@
-REPLACE_ROUND = @REPLACE_ROUND@
-REPLACE_ROUNDF = @REPLACE_ROUNDF@
-REPLACE_ROUNDL = @REPLACE_ROUNDL@
-REPLACE_SELECT = @REPLACE_SELECT@
-REPLACE_SETENV = @REPLACE_SETENV@
-REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
-REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
-REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
-REPLACE_SLEEP = @REPLACE_SLEEP@
-REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
-REPLACE_SPRINTF = @REPLACE_SPRINTF@
-REPLACE_SQRTL = @REPLACE_SQRTL@
-REPLACE_STAT = @REPLACE_STAT@
-REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
-REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
-REPLACE_STPNCPY = @REPLACE_STPNCPY@
-REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
-REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
-REPLACE_STRDUP = @REPLACE_STRDUP@
-REPLACE_STRERROR = @REPLACE_STRERROR@
-REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
-REPLACE_STRNCAT = @REPLACE_STRNCAT@
-REPLACE_STRNDUP = @REPLACE_STRNDUP@
-REPLACE_STRNLEN = @REPLACE_STRNLEN@
-REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
-REPLACE_STRSTR = @REPLACE_STRSTR@
-REPLACE_STRTOD = @REPLACE_STRTOD@
-REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
-REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
-REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
-REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
-REPLACE_SYMLINK = @REPLACE_SYMLINK@
-REPLACE_TIMEGM = @REPLACE_TIMEGM@
-REPLACE_TMPFILE = @REPLACE_TMPFILE@
-REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
-REPLACE_TRUNC = @REPLACE_TRUNC@
-REPLACE_TRUNCF = @REPLACE_TRUNCF@
-REPLACE_TRUNCL = @REPLACE_TRUNCL@
-REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
-REPLACE_UNLINK = @REPLACE_UNLINK@
-REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
-REPLACE_UNSETENV = @REPLACE_UNSETENV@
-REPLACE_USLEEP = @REPLACE_USLEEP@
-REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
-REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
-REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
-REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
-REPLACE_VPRINTF = @REPLACE_VPRINTF@
-REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
-REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
-REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
-REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
-REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
-REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
-REPLACE_WCTOB = @REPLACE_WCTOB@
-REPLACE_WCTOMB = @REPLACE_WCTOMB@
-REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
-REPLACE_WRITE = @REPLACE_WRITE@
-SCHED_H = @SCHED_H@
-SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@
-SEQ_LIBM = @SEQ_LIBM@
-SERVENT_LIB = @SERVENT_LIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
-SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
-STDALIGN_H = @STDALIGN_H@
-STDARG_H = @STDARG_H@
-STDBOOL_H = @STDBOOL_H@
-STDDEF_H = @STDDEF_H@
-STDINT_H = @STDINT_H@
-STRIP = @STRIP@
-SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@
-SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
-SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
-TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
-UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
-UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
-UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
-UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
-UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
-USE_ACL = @USE_ACL@
-USE_NLS = @USE_NLS@
-VERSION = @VERSION@
-WARN_CFLAGS = @WARN_CFLAGS@
-WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
-WERROR_CFLAGS = @WERROR_CFLAGS@
-WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
-WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@
-WINT_T_SUFFIX = @WINT_T_SUFFIX@
-XGETTEXT = @XGETTEXT@
-XGETTEXT_015 = @XGETTEXT_015@
-XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
-YACC = @YACC@
-YFLAGS = @YFLAGS@
-YIELD_LIB = @YIELD_LIB@
-abs_aux_dir = @abs_aux_dir@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-gl_LIBOBJS = @gl_LIBOBJS@
-gl_LTLIBOBJS = @gl_LTLIBOBJS@
-gltests_LIBOBJS = @gltests_LIBOBJS@
-gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
-gltests_WITNESS = @gltests_WITNESS@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-lispdir = @lispdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-
-# These are the names of programs that are not installed by default.
-# This list is *not* intended for programs like who, nice, chroot, etc.,
-# that are built only when certain requisite system features are detected.
-# Hence, if you want to install programs from this list anyway, say A and B,
-# use --enable-install-program=A,B
-no_install__progs = \
- arch hostname su
-
-build_if_possible__progs = \
- chroot \
- df \
- hostid \
- libstdbuf.so \
- nice \
- pinky \
- stdbuf \
- stty \
- su \
- uptime \
- users \
- who
-
-AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
-bin_PROGRAMS = $(OPTIONAL_BIN_PROGS)
-pkglibexec_PROGRAMS = $(OPTIONAL_PKGLIB_PROGS)
-noinst_HEADERS = \
- chown-core.h \
- copy.h \
- cp-hash.h \
- dircolors.h \
- fiemap.h \
- find-mount-point.h \
- fs.h \
- fs-is-local.h \
- group-list.h \
- ioblksize.h \
- ls.h \
- operand2sig.h \
- prog-fprintf.h \
- remove.h \
- system.h \
- wheel-size.h \
- wheel.h \
- uname.h
-
-EXTRA_DIST = dcgen dircolors.hin tac-pipe.c \
- wheel-gen.pl extract-magic c99-to-c89.diff
-
-BUILT_SOURCES = dircolors.h wheel-size.h wheel.h fs-is-local.h fs.h \
- version.c version.h
-
-# Also remove these sometimes-built programs.
-# For example, even when excluded, they're built via _sc_check-AUTHORS.
-CLEANFILES = $(SCRIPTS) su $(no_install__progs) fs-def fs-magic \
- fs-kernel-magic
-AM_CPPFLAGS = -I$(top_srcdir)/lib
-noinst_LIBRARIES = libver.a
-nodist_libver_a_SOURCES = version.c version.h
-
-# Tell the linker to omit references to unused shared libraries.
-AM_LDFLAGS = $(IGNORE_UNUSED_LIBRARIES_CFLAGS)
-
-# Sometimes, the expansion of $(LIBINTL) includes -lc which may
-# include modules defining variables like 'optind', so libcoreutils.a
-# must precede $(LIBINTL) in order to ensure we use GNU getopt.
-# But libcoreutils.a must also follow $(LIBINTL), since libintl uses
-# replacement functions defined in libcoreutils.a.
-LDADD = libver.a ../lib/libcoreutils.a $(LIBINTL) ../lib/libcoreutils.a
-
-# First, list all programs, to make listing per-program libraries easier.
-# See [ below.
-arch_LDADD = $(LDADD)
-base64_LDADD = $(LDADD)
-basename_LDADD = $(LDADD)
-
-# for print_unicode_char, proper_name_utf8
-cat_LDADD = $(LDADD) $(LIBICONV)
-
-# for selinux use
-chcon_LDADD = $(LDADD) $(LIB_SELINUX)
-chgrp_LDADD = $(LDADD)
-chmod_LDADD = $(LDADD)
-chown_LDADD = $(LDADD)
-chroot_LDADD = $(LDADD)
-cksum_LDADD = $(LDADD)
-comm_LDADD = $(LDADD)
-nproc_LDADD = $(LDADD)
-cp_LDADD = $(LDADD) $(copy_LDADD) $(LIBICONV)
-csplit_LDADD = $(LDADD)
-cut_LDADD = $(LDADD)
-date_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
-
-# for gethrxtime
-
-# for fdatasync
-dd_LDADD = $(LDADD) $(LIB_GETHRXTIME) $(LIB_FDATASYNC)
-df_LDADD = $(LDADD) $(LIBICONV)
-# See dir_LDADD below
-dircolors_LDADD = $(LDADD)
-dirname_LDADD = $(LDADD)
-du_LDADD = $(LDADD) $(LIBICONV)
-echo_LDADD = $(LDADD)
-env_LDADD = $(LDADD)
-expand_LDADD = $(LDADD)
-
-# for various GMP functions
-expr_LDADD = $(LDADD) $(LIB_GMP)
-factor_LDADD = $(LDADD) $(LIB_GMP)
-false_LDADD = $(LDADD)
-fmt_LDADD = $(LDADD)
-fold_LDADD = $(LDADD)
-getlimits_LDADD = $(LDADD) $(LIBICONV)
-ginstall_LDADD = $(LDADD) $(copy_LDADD) $(LIB_SELINUX) \
- $(LIB_CLOCK_GETTIME)
-groups_LDADD = $(LDADD)
-head_LDADD = $(LDADD)
-hostid_LDADD = $(LDADD)
-
-# for gethostname, uname
-hostname_LDADD = $(LDADD) $(GETHOSTNAME_LIB)
-id_LDADD = $(LDADD) $(LIB_SELINUX)
-join_LDADD = $(LDADD)
-
-# for strsignal
-kill_LDADD = $(LDADD) $(LIBTHREAD)
-link_LDADD = $(LDADD)
-ln_LDADD = $(LDADD)
-logname_LDADD = $(LDADD)
-
-# for cap_get_file
-ls_LDADD = $(LDADD) $(LIB_SELINUX) $(LIB_CLOCK_GETTIME) $(LIB_CAP) \
- $(LIB_ACL)
-md5sum_LDADD = $(LDADD)
-mkdir_LDADD = $(LDADD) $(LIB_SELINUX)
-mkfifo_LDADD = $(LDADD) $(LIB_SELINUX)
-mknod_LDADD = $(LDADD) $(LIB_SELINUX)
-mktemp_LDADD = $(LDADD)
-mv_LDADD = $(LDADD) $(copy_LDADD) $(remove_LDADD)
-nice_LDADD = $(LDADD)
-nl_LDADD = $(LDADD)
-nohup_LDADD = $(LDADD)
-od_LDADD = $(LDADD)
-paste_LDADD = $(LDADD)
-pathchk_LDADD = $(LDADD)
-
-# for canon_host
-pinky_LDADD = $(LDADD) $(GETADDRINFO_LIB)
-pr_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
-printenv_LDADD = $(LDADD)
-printf_LDADD = $(LDADD) $(LIBICONV)
-ptx_LDADD = $(LDADD) $(LIBICONV)
-pwd_LDADD = $(LDADD)
-readlink_LDADD = $(LDADD)
-realpath_LDADD = $(LDADD) $(LIBICONV)
-rm_LDADD = $(LDADD) $(remove_LDADD)
-rmdir_LDADD = $(LDADD)
-runcon_LDADD = $(LDADD) $(LIB_SELINUX)
-seq_LDADD = $(LDADD)
-setuidgid_LDADD = $(LDADD)
-sha1sum_LDADD = $(LDADD)
-sha224sum_LDADD = $(LDADD)
-sha256sum_LDADD = $(LDADD)
-sha384sum_LDADD = $(LDADD)
-sha512sum_LDADD = $(LDADD)
-shred_LDADD = $(LDADD) $(LIB_FDATASYNC)
-shuf_LDADD = $(LDADD)
-
-# for xnanosleep
-sleep_LDADD = $(LDADD) $(LIB_NANOSLEEP)
-
-# for pthread
-sort_LDADD = $(LDADD) $(LIB_NANOSLEEP) $(LIB_PTHREAD)
-split_LDADD = $(LDADD) $(LIBICONV)
-stat_LDADD = $(LDADD) $(LIB_SELINUX)
-stdbuf_LDADD = $(LDADD) $(LIBICONV)
-stty_LDADD = $(LDADD)
-
-# for crypt
-su_LDADD = $(LDADD) $(LIB_CRYPT)
-sum_LDADD = $(LDADD)
-sync_LDADD = $(LDADD)
-tac_LDADD = $(LDADD)
-tail_LDADD = $(LDADD) $(LIB_NANOSLEEP)
-tee_LDADD = $(LDADD)
-test_LDADD = $(LDADD) $(LIB_EACCESS)
-timeout_LDADD = $(LDADD) $(LIB_TIMER_TIME) $(LIBICONV)
-touch_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
-tr_LDADD = $(LDADD)
-true_LDADD = $(LDADD)
-truncate_LDADD = $(LDADD) $(LIBICONV)
-tsort_LDADD = $(LDADD)
-tty_LDADD = $(LDADD)
-uname_LDADD = $(LDADD) $(GETHOSTNAME_LIB)
-unexpand_LDADD = $(LDADD)
-uniq_LDADD = $(LDADD)
-unlink_LDADD = $(LDADD)
-
-# for getloadavg
-uptime_LDADD = $(LDADD) $(GETLOADAVG_LIBS)
-users_LDADD = $(LDADD)
-# See vdir_LDADD below
-wc_LDADD = $(LDADD)
-who_LDADD = $(LDADD) $(GETADDRINFO_LIB)
-whoami_LDADD = $(LDADD)
-yes_LDADD = $(LDADD)
-
-# Synonyms. Recall that Automake transliterates '[' to '_'.
-__LDADD = $(test_LDADD)
-dir_LDADD = $(ls_LDADD)
-vdir_LDADD = $(ls_LDADD)
-
-# Shared files
-
-# for eaccess, euidaccess
-
-# for gettime, settime, utimecmp, utimens
-
-# for various ACL functions
-
-# for various xattr functions
-copy_LDADD = $(LIB_EACCESS) $(LIB_SELINUX) $(LIB_CLOCK_GETTIME) \
- $(LIB_ACL) $(LIB_XATTR)
-remove_LDADD = $(LIB_EACCESS)
-
-# Get the release year from ../lib/version-etc.c.
-RELEASE_YEAR = \
- `sed -n '/.*COPYRIGHT_YEAR = \([0-9][0-9][0-9][0-9]\) };/s//\1/p' \
- $(top_srcdir)/lib/version-etc.c`
-
-installed_su = $(DESTDIR)$(bindir)/`echo su|sed '$(transform)'`
-setuid_root_mode = a=rx,u+s
-install_su = \
- if test "$(INSTALL_SU)" = yes; then \
- p=su; \
- echo " $(INSTALL_PROGRAM) $$p $(installed_su)"; \
- $(INSTALL_PROGRAM) $$p $(installed_su); \
- echo " chown root $(installed_su)"; \
- chown root $(installed_su); \
- echo " chmod $(setuid_root_mode) $(installed_su)"; \
- chmod $(setuid_root_mode) $(installed_su); \
- else \
- :; \
- fi
-
-copy_sources = copy.c cp-hash.c extent-scan.c extent-scan.h
-ginstall_SOURCES = install.c prog-fprintf.c $(copy_sources)
-
-# This is for the '[' program. Automake transliterates '[' to '_'.
-__SOURCES = lbracket.c
-cp_SOURCES = cp.c $(copy_sources)
-dir_SOURCES = ls.c ls-dir.c
-vdir_SOURCES = ls.c ls-vdir.c
-id_SOURCES = id.c group-list.c
-groups_SOURCES = groups.c group-list.c
-ls_SOURCES = ls.c ls-ls.c
-ln_SOURCES = ln.c relpath.c relpath.h
-chown_SOURCES = chown.c chown-core.c
-chgrp_SOURCES = chgrp.c chown-core.c
-kill_SOURCES = kill.c operand2sig.c
-realpath_SOURCES = realpath.c relpath.c relpath.h
-timeout_SOURCES = timeout.c operand2sig.c
-mv_SOURCES = mv.c remove.c $(copy_sources)
-rm_SOURCES = rm.c remove.c
-mkdir_SOURCES = mkdir.c prog-fprintf.c
-rmdir_SOURCES = rmdir.c prog-fprintf.c
-df_SOURCES = df.c find-mount-point.c
-stat_SOURCES = stat.c find-mount-point.c
-uname_SOURCES = uname.c uname-uname.c
-arch_SOURCES = uname.c uname-arch.c
-md5sum_CPPFLAGS = -DHASH_ALGO_MD5=1 $(AM_CPPFLAGS)
-sha1sum_SOURCES = md5sum.c
-sha1sum_CPPFLAGS = -DHASH_ALGO_SHA1=1 $(AM_CPPFLAGS)
-sha224sum_SOURCES = md5sum.c
-sha224sum_CPPFLAGS = -DHASH_ALGO_SHA224=1 $(AM_CPPFLAGS)
-sha256sum_SOURCES = md5sum.c
-sha256sum_CPPFLAGS = -DHASH_ALGO_SHA256=1 $(AM_CPPFLAGS)
-sha384sum_SOURCES = md5sum.c
-sha384sum_CPPFLAGS = -DHASH_ALGO_SHA384=1 $(AM_CPPFLAGS)
-sha512sum_SOURCES = md5sum.c
-sha512sum_CPPFLAGS = -DHASH_ALGO_SHA512=1 $(AM_CPPFLAGS)
-ginstall_CPPFLAGS = -DENABLE_MATCHPATHCON=1 $(AM_CPPFLAGS)
-
-# Ensure we don't link against libcoreutils.a as that lib is
-# not compiled with -fPIC which causes issues on 64 bit at least
-libstdbuf_so_LDADD =
-
-# Note libstdbuf is only compiled if GCC is available
-# (as per the check in configure.ac), so these flags should be available.
-# libtool is probably required to relax this dependency.
-libstdbuf_so_LDFLAGS = -shared
-libstdbuf_so_CFLAGS = -fPIC $(AM_CFLAGS)
-editpl = sed -e 's,@''PERL''@,$(PERL),g'
-wheel_size = 5
-
-# false exits nonzero even with --help or --version.
-# test doesn't support --help or --version.
-# Tell automake to exempt then from that installcheck test.
-AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = false test
-
-# Massage bits of the statfs man page and definitions from
-# /usr/include/linux/magic.h to be in a form consistent with what's in fs.h.
-fs_normalize_perl_subst = \
- -e 's/MINIX_SUPER_MAGIC\b/MINIX/;' \
- -e 's/MINIX_SUPER_MAGIC2\b/MINIX_30/;' \
- -e 's/MINIX2_SUPER_MAGIC\b/MINIX_V2/;' \
- -e 's/MINIX2_SUPER_MAGIC2\b/MINIX_V2_30/;' \
- -e 's/MINIX3_SUPER_MAGIC\b/MINIX_V3/;' \
- -e 's/CIFS_MAGIC_NUMBER/CIFS/;' \
- -e 's/(_SUPER)?_MAGIC//;' \
- -e 's/\s+0x(\S+)/" 0x" . uc $$1/e;' \
- -e 's/(\s+0x)(\X{3})\b/$${1}0$$2/;' \
- -e 's/(\s+0x)(\X{6})\b/$${1}00$$2/;' \
- -e 's/(\s+0x)(\X{7})\b/$${1}0$$2/;' \
- -e 's/^\s+//;' \
- -e 's/^\043define\s+//;' \
- -e 's/^_(XIAFS)/$$1/;' \
- -e 's/^USBDEVICE/USBDEVFS/;' \
- -e 's/NTFS_SB/NTFS/;' \
- -e 's/^/\043 define S_MAGIC_/;' \
- -e 's,\s*/\* .*? \*/,,;'
-
-DISTCLEANFILES = version.c version.h
-MAINTAINERCLEANFILES = $(BUILT_SOURCES)
-
-# Sort in traditional ASCII order, regardless of the current locale;
-# otherwise we may get into trouble with distinct strings that the
-# current locale considers to be equal.
-ASSORT = LC_ALL=C sort
-all_programs = \
- $(bin_PROGRAMS) \
- $(bin_SCRIPTS) \
- $(EXTRA_PROGRAMS)
-
-pm = progs-makefile
-pr = progs-readme
-
-# Ensure that the list of programs and author names is accurate.
-# We need a UTF8 locale. If a lack of locale support or a missing
-# translation inhibits printing of UTF-8 names, just skip this test.
-au_dotdot = authors-dotdot
-au_actual = authors-actual
-@CROSS_COMPILING_FALSE@cu_install_program = ./ginstall
-
-# Use the just-built ./ginstall, when not cross-compiling.
-@CROSS_COMPILING_TRUE@cu_install_program = @INSTALL_PROGRAM@
-all: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnu src/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-libver.a: $(libver_a_OBJECTS) $(libver_a_DEPENDENCIES) $(EXTRA_libver_a_DEPENDENCIES)
- $(AM_V_at)-rm -f libver.a
- $(AM_V_AR)$(libver_a_AR) libver.a $(libver_a_OBJECTS) $(libver_a_LIBADD)
- $(AM_V_at)$(RANLIB) libver.a
-install-binPROGRAMS: $(bin_PROGRAMS)
- @$(NORMAL_INSTALL)
- @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
- fi; \
- for p in $$list; do echo "$$p $$p"; done | \
- sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p; \
- then echo "$$p"; echo "$$p"; else :; fi; \
- done | \
- sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
- -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
- sed 'N;N;N;s,\n, ,g' | \
- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
- if ($$2 == $$4) files[d] = files[d] " " $$1; \
- else { print "f", $$3 "/" $$4, $$1; } } \
- END { for (d in files) print "f", d, files[d] }' | \
- while read type dir files; do \
- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- test -z "$$files" || { \
- echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
- $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
- } \
- ; done
-
-uninstall-binPROGRAMS:
- @$(NORMAL_UNINSTALL)
- @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
- files=`for p in $$list; do echo "$$p"; done | \
- sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- -e 's/$$/$(EXEEXT)/' `; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(bindir)" && rm -f $$files
-
-clean-binPROGRAMS:
- -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) > /dev/null 2>&1 || /bin/rm -f $(bin_PROGRAMS)
-
-clean-noinstPROGRAMS:
- -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-install-pkglibexecPROGRAMS: $(pkglibexec_PROGRAMS)
- @$(NORMAL_INSTALL)
- @list='$(pkglibexec_PROGRAMS)'; test -n "$(pkglibexecdir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(pkglibexecdir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(pkglibexecdir)" || exit 1; \
- fi; \
- for p in $$list; do echo "$$p $$p"; done | \
- sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p; \
- then echo "$$p"; echo "$$p"; else :; fi; \
- done | \
- sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
- -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
- sed 'N;N;N;s,\n, ,g' | \
- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
- if ($$2 == $$4) files[d] = files[d] " " $$1; \
- else { print "f", $$3 "/" $$4, $$1; } } \
- END { for (d in files) print "f", d, files[d] }' | \
- while read type dir files; do \
- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- test -z "$$files" || { \
- echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pkglibexecdir)$$dir'"; \
- $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pkglibexecdir)$$dir" || exit $$?; \
- } \
- ; done
-
-uninstall-pkglibexecPROGRAMS:
- @$(NORMAL_UNINSTALL)
- @list='$(pkglibexec_PROGRAMS)'; test -n "$(pkglibexecdir)" || list=; \
- files=`for p in $$list; do echo "$$p"; done | \
- sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- -e 's/$$/$(EXEEXT)/' `; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(pkglibexecdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(pkglibexecdir)" && rm -f $$files
-
-clean-pkglibexecPROGRAMS:
- -test -z "$(pkglibexec_PROGRAMS)" || rm -f $(pkglibexec_PROGRAMS)
-[$(EXEEXT): $(__OBJECTS) $(__DEPENDENCIES) $(EXTRA___DEPENDENCIES)
- @rm -f [$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(__OBJECTS) $(__LDADD) $(LIBS)
-arch$(EXEEXT): $(arch_OBJECTS) $(arch_DEPENDENCIES) $(EXTRA_arch_DEPENDENCIES)
- @rm -f arch$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(arch_OBJECTS) $(arch_LDADD) $(LIBS)
-base64$(EXEEXT): $(base64_OBJECTS) $(base64_DEPENDENCIES) $(EXTRA_base64_DEPENDENCIES)
- @rm -f base64$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(base64_OBJECTS) $(base64_LDADD) $(LIBS)
-basename$(EXEEXT): $(basename_OBJECTS) $(basename_DEPENDENCIES) $(EXTRA_basename_DEPENDENCIES)
- @rm -f basename$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(basename_OBJECTS) $(basename_LDADD) $(LIBS)
-cat$(EXEEXT): $(cat_OBJECTS) $(cat_DEPENDENCIES) $(EXTRA_cat_DEPENDENCIES)
- @rm -f cat$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(cat_OBJECTS) $(cat_LDADD) $(LIBS)
-chcon$(EXEEXT): $(chcon_OBJECTS) $(chcon_DEPENDENCIES) $(EXTRA_chcon_DEPENDENCIES)
- @rm -f chcon$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(chcon_OBJECTS) $(chcon_LDADD) $(LIBS)
-chgrp$(EXEEXT): $(chgrp_OBJECTS) $(chgrp_DEPENDENCIES) $(EXTRA_chgrp_DEPENDENCIES)
- @rm -f chgrp$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(chgrp_OBJECTS) $(chgrp_LDADD) $(LIBS)
-chmod$(EXEEXT): $(chmod_OBJECTS) $(chmod_DEPENDENCIES) $(EXTRA_chmod_DEPENDENCIES)
- @rm -f chmod$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(chmod_OBJECTS) $(chmod_LDADD) $(LIBS)
-chown$(EXEEXT): $(chown_OBJECTS) $(chown_DEPENDENCIES) $(EXTRA_chown_DEPENDENCIES)
- @rm -f chown$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(chown_OBJECTS) $(chown_LDADD) $(LIBS)
-chroot$(EXEEXT): $(chroot_OBJECTS) $(chroot_DEPENDENCIES) $(EXTRA_chroot_DEPENDENCIES)
- @rm -f chroot$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(chroot_OBJECTS) $(chroot_LDADD) $(LIBS)
-cksum$(EXEEXT): $(cksum_OBJECTS) $(cksum_DEPENDENCIES) $(EXTRA_cksum_DEPENDENCIES)
- @rm -f cksum$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(cksum_OBJECTS) $(cksum_LDADD) $(LIBS)
-comm$(EXEEXT): $(comm_OBJECTS) $(comm_DEPENDENCIES) $(EXTRA_comm_DEPENDENCIES)
- @rm -f comm$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(comm_OBJECTS) $(comm_LDADD) $(LIBS)
-cp$(EXEEXT): $(cp_OBJECTS) $(cp_DEPENDENCIES) $(EXTRA_cp_DEPENDENCIES)
- @rm -f cp$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(cp_OBJECTS) $(cp_LDADD) $(LIBS)
-csplit$(EXEEXT): $(csplit_OBJECTS) $(csplit_DEPENDENCIES) $(EXTRA_csplit_DEPENDENCIES)
- @rm -f csplit$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(csplit_OBJECTS) $(csplit_LDADD) $(LIBS)
-cut$(EXEEXT): $(cut_OBJECTS) $(cut_DEPENDENCIES) $(EXTRA_cut_DEPENDENCIES)
- @rm -f cut$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(cut_OBJECTS) $(cut_LDADD) $(LIBS)
-date$(EXEEXT): $(date_OBJECTS) $(date_DEPENDENCIES) $(EXTRA_date_DEPENDENCIES)
- @rm -f date$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(date_OBJECTS) $(date_LDADD) $(LIBS)
-dd$(EXEEXT): $(dd_OBJECTS) $(dd_DEPENDENCIES) $(EXTRA_dd_DEPENDENCIES)
- @rm -f dd$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(dd_OBJECTS) $(dd_LDADD) $(LIBS)
-df$(EXEEXT): $(df_OBJECTS) $(df_DEPENDENCIES) $(EXTRA_df_DEPENDENCIES)
- @rm -f df$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(df_OBJECTS) $(df_LDADD) $(LIBS)
-dir$(EXEEXT): $(dir_OBJECTS) $(dir_DEPENDENCIES) $(EXTRA_dir_DEPENDENCIES)
- @rm -f dir$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(dir_OBJECTS) $(dir_LDADD) $(LIBS)
-dircolors$(EXEEXT): $(dircolors_OBJECTS) $(dircolors_DEPENDENCIES) $(EXTRA_dircolors_DEPENDENCIES)
- @rm -f dircolors$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(dircolors_OBJECTS) $(dircolors_LDADD) $(LIBS)
-dirname$(EXEEXT): $(dirname_OBJECTS) $(dirname_DEPENDENCIES) $(EXTRA_dirname_DEPENDENCIES)
- @rm -f dirname$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(dirname_OBJECTS) $(dirname_LDADD) $(LIBS)
-du$(EXEEXT): $(du_OBJECTS) $(du_DEPENDENCIES) $(EXTRA_du_DEPENDENCIES)
- @rm -f du$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(du_OBJECTS) $(du_LDADD) $(LIBS)
-echo$(EXEEXT): $(echo_OBJECTS) $(echo_DEPENDENCIES) $(EXTRA_echo_DEPENDENCIES)
- @rm -f echo$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(echo_OBJECTS) $(echo_LDADD) $(LIBS)
-env$(EXEEXT): $(env_OBJECTS) $(env_DEPENDENCIES) $(EXTRA_env_DEPENDENCIES)
- @rm -f env$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(env_OBJECTS) $(env_LDADD) $(LIBS)
-expand$(EXEEXT): $(expand_OBJECTS) $(expand_DEPENDENCIES) $(EXTRA_expand_DEPENDENCIES)
- @rm -f expand$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(expand_OBJECTS) $(expand_LDADD) $(LIBS)
-expr$(EXEEXT): $(expr_OBJECTS) $(expr_DEPENDENCIES) $(EXTRA_expr_DEPENDENCIES)
- @rm -f expr$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(expr_OBJECTS) $(expr_LDADD) $(LIBS)
-factor$(EXEEXT): $(factor_OBJECTS) $(factor_DEPENDENCIES) $(EXTRA_factor_DEPENDENCIES)
- @rm -f factor$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(factor_OBJECTS) $(factor_LDADD) $(LIBS)
-false$(EXEEXT): $(false_OBJECTS) $(false_DEPENDENCIES) $(EXTRA_false_DEPENDENCIES)
- @rm -f false$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(false_OBJECTS) $(false_LDADD) $(LIBS)
-fmt$(EXEEXT): $(fmt_OBJECTS) $(fmt_DEPENDENCIES) $(EXTRA_fmt_DEPENDENCIES)
- @rm -f fmt$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(fmt_OBJECTS) $(fmt_LDADD) $(LIBS)
-fold$(EXEEXT): $(fold_OBJECTS) $(fold_DEPENDENCIES) $(EXTRA_fold_DEPENDENCIES)
- @rm -f fold$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(fold_OBJECTS) $(fold_LDADD) $(LIBS)
-getlimits$(EXEEXT): $(getlimits_OBJECTS) $(getlimits_DEPENDENCIES) $(EXTRA_getlimits_DEPENDENCIES)
- @rm -f getlimits$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(getlimits_OBJECTS) $(getlimits_LDADD) $(LIBS)
-ginstall$(EXEEXT): $(ginstall_OBJECTS) $(ginstall_DEPENDENCIES) $(EXTRA_ginstall_DEPENDENCIES)
- @rm -f ginstall$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(ginstall_OBJECTS) $(ginstall_LDADD) $(LIBS)
-groups$(EXEEXT): $(groups_OBJECTS) $(groups_DEPENDENCIES) $(EXTRA_groups_DEPENDENCIES)
- @rm -f groups$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(groups_OBJECTS) $(groups_LDADD) $(LIBS)
-head$(EXEEXT): $(head_OBJECTS) $(head_DEPENDENCIES) $(EXTRA_head_DEPENDENCIES)
- @rm -f head$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(head_OBJECTS) $(head_LDADD) $(LIBS)
-hostid$(EXEEXT): $(hostid_OBJECTS) $(hostid_DEPENDENCIES) $(EXTRA_hostid_DEPENDENCIES)
- @rm -f hostid$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(hostid_OBJECTS) $(hostid_LDADD) $(LIBS)
-hostname$(EXEEXT): $(hostname_OBJECTS) $(hostname_DEPENDENCIES) $(EXTRA_hostname_DEPENDENCIES)
- @rm -f hostname$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(hostname_OBJECTS) $(hostname_LDADD) $(LIBS)
-id$(EXEEXT): $(id_OBJECTS) $(id_DEPENDENCIES) $(EXTRA_id_DEPENDENCIES)
- @rm -f id$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(id_OBJECTS) $(id_LDADD) $(LIBS)
-join$(EXEEXT): $(join_OBJECTS) $(join_DEPENDENCIES) $(EXTRA_join_DEPENDENCIES)
- @rm -f join$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(join_OBJECTS) $(join_LDADD) $(LIBS)
-kill$(EXEEXT): $(kill_OBJECTS) $(kill_DEPENDENCIES) $(EXTRA_kill_DEPENDENCIES)
- @rm -f kill$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(kill_OBJECTS) $(kill_LDADD) $(LIBS)
-libstdbuf.so$(EXEEXT): $(libstdbuf_so_OBJECTS) $(libstdbuf_so_DEPENDENCIES) $(EXTRA_libstdbuf_so_DEPENDENCIES)
- @rm -f libstdbuf.so$(EXEEXT)
- $(AM_V_CCLD)$(libstdbuf_so_LINK) $(libstdbuf_so_OBJECTS) $(libstdbuf_so_LDADD) $(LIBS)
-link$(EXEEXT): $(link_OBJECTS) $(link_DEPENDENCIES) $(EXTRA_link_DEPENDENCIES)
- @rm -f link$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(link_OBJECTS) $(link_LDADD) $(LIBS)
-ln$(EXEEXT): $(ln_OBJECTS) $(ln_DEPENDENCIES) $(EXTRA_ln_DEPENDENCIES)
- @rm -f ln$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(ln_OBJECTS) $(ln_LDADD) $(LIBS)
-logname$(EXEEXT): $(logname_OBJECTS) $(logname_DEPENDENCIES) $(EXTRA_logname_DEPENDENCIES)
- @rm -f logname$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(logname_OBJECTS) $(logname_LDADD) $(LIBS)
-ls$(EXEEXT): $(ls_OBJECTS) $(ls_DEPENDENCIES) $(EXTRA_ls_DEPENDENCIES)
- @rm -f ls$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(ls_OBJECTS) $(ls_LDADD) $(LIBS)
-md5sum$(EXEEXT): $(md5sum_OBJECTS) $(md5sum_DEPENDENCIES) $(EXTRA_md5sum_DEPENDENCIES)
- @rm -f md5sum$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(md5sum_OBJECTS) $(md5sum_LDADD) $(LIBS)
-mkdir$(EXEEXT): $(mkdir_OBJECTS) $(mkdir_DEPENDENCIES) $(EXTRA_mkdir_DEPENDENCIES)
- @rm -f mkdir$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(mkdir_OBJECTS) $(mkdir_LDADD) $(LIBS)
-mkfifo$(EXEEXT): $(mkfifo_OBJECTS) $(mkfifo_DEPENDENCIES) $(EXTRA_mkfifo_DEPENDENCIES)
- @rm -f mkfifo$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(mkfifo_OBJECTS) $(mkfifo_LDADD) $(LIBS)
-mknod$(EXEEXT): $(mknod_OBJECTS) $(mknod_DEPENDENCIES) $(EXTRA_mknod_DEPENDENCIES)
- @rm -f mknod$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(mknod_OBJECTS) $(mknod_LDADD) $(LIBS)
-mktemp$(EXEEXT): $(mktemp_OBJECTS) $(mktemp_DEPENDENCIES) $(EXTRA_mktemp_DEPENDENCIES)
- @rm -f mktemp$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(mktemp_OBJECTS) $(mktemp_LDADD) $(LIBS)
-mv$(EXEEXT): $(mv_OBJECTS) $(mv_DEPENDENCIES) $(EXTRA_mv_DEPENDENCIES)
- @rm -f mv$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(mv_OBJECTS) $(mv_LDADD) $(LIBS)
-nice$(EXEEXT): $(nice_OBJECTS) $(nice_DEPENDENCIES) $(EXTRA_nice_DEPENDENCIES)
- @rm -f nice$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(nice_OBJECTS) $(nice_LDADD) $(LIBS)
-nl$(EXEEXT): $(nl_OBJECTS) $(nl_DEPENDENCIES) $(EXTRA_nl_DEPENDENCIES)
- @rm -f nl$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(nl_OBJECTS) $(nl_LDADD) $(LIBS)
-nohup$(EXEEXT): $(nohup_OBJECTS) $(nohup_DEPENDENCIES) $(EXTRA_nohup_DEPENDENCIES)
- @rm -f nohup$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(nohup_OBJECTS) $(nohup_LDADD) $(LIBS)
-nproc$(EXEEXT): $(nproc_OBJECTS) $(nproc_DEPENDENCIES) $(EXTRA_nproc_DEPENDENCIES)
- @rm -f nproc$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(nproc_OBJECTS) $(nproc_LDADD) $(LIBS)
-od$(EXEEXT): $(od_OBJECTS) $(od_DEPENDENCIES) $(EXTRA_od_DEPENDENCIES)
- @rm -f od$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(od_OBJECTS) $(od_LDADD) $(LIBS)
-paste$(EXEEXT): $(paste_OBJECTS) $(paste_DEPENDENCIES) $(EXTRA_paste_DEPENDENCIES)
- @rm -f paste$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(paste_OBJECTS) $(paste_LDADD) $(LIBS)
-pathchk$(EXEEXT): $(pathchk_OBJECTS) $(pathchk_DEPENDENCIES) $(EXTRA_pathchk_DEPENDENCIES)
- @rm -f pathchk$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(pathchk_OBJECTS) $(pathchk_LDADD) $(LIBS)
-pinky$(EXEEXT): $(pinky_OBJECTS) $(pinky_DEPENDENCIES) $(EXTRA_pinky_DEPENDENCIES)
- @rm -f pinky$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(pinky_OBJECTS) $(pinky_LDADD) $(LIBS)
-pr$(EXEEXT): $(pr_OBJECTS) $(pr_DEPENDENCIES) $(EXTRA_pr_DEPENDENCIES)
- @rm -f pr$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(pr_OBJECTS) $(pr_LDADD) $(LIBS)
-printenv$(EXEEXT): $(printenv_OBJECTS) $(printenv_DEPENDENCIES) $(EXTRA_printenv_DEPENDENCIES)
- @rm -f printenv$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(printenv_OBJECTS) $(printenv_LDADD) $(LIBS)
-printf$(EXEEXT): $(printf_OBJECTS) $(printf_DEPENDENCIES) $(EXTRA_printf_DEPENDENCIES)
- @rm -f printf$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(printf_OBJECTS) $(printf_LDADD) $(LIBS)
-ptx$(EXEEXT): $(ptx_OBJECTS) $(ptx_DEPENDENCIES) $(EXTRA_ptx_DEPENDENCIES)
- @rm -f ptx$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(ptx_OBJECTS) $(ptx_LDADD) $(LIBS)
-pwd$(EXEEXT): $(pwd_OBJECTS) $(pwd_DEPENDENCIES) $(EXTRA_pwd_DEPENDENCIES)
- @rm -f pwd$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(pwd_OBJECTS) $(pwd_LDADD) $(LIBS)
-readlink$(EXEEXT): $(readlink_OBJECTS) $(readlink_DEPENDENCIES) $(EXTRA_readlink_DEPENDENCIES)
- @rm -f readlink$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(readlink_OBJECTS) $(readlink_LDADD) $(LIBS)
-realpath$(EXEEXT): $(realpath_OBJECTS) $(realpath_DEPENDENCIES) $(EXTRA_realpath_DEPENDENCIES)
- @rm -f realpath$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(realpath_OBJECTS) $(realpath_LDADD) $(LIBS)
-rm$(EXEEXT): $(rm_OBJECTS) $(rm_DEPENDENCIES) $(EXTRA_rm_DEPENDENCIES)
- @rm -f rm > /dev/null 2>&1 || /bin/rm -f rm$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(rm_OBJECTS) $(rm_LDADD) $(LIBS)
-rmdir$(EXEEXT): $(rmdir_OBJECTS) $(rmdir_DEPENDENCIES) $(EXTRA_rmdir_DEPENDENCIES)
- @rm -f rmdir$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(rmdir_OBJECTS) $(rmdir_LDADD) $(LIBS)
-runcon$(EXEEXT): $(runcon_OBJECTS) $(runcon_DEPENDENCIES) $(EXTRA_runcon_DEPENDENCIES)
- @rm -f runcon$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(runcon_OBJECTS) $(runcon_LDADD) $(LIBS)
-seq$(EXEEXT): $(seq_OBJECTS) $(seq_DEPENDENCIES) $(EXTRA_seq_DEPENDENCIES)
- @rm -f seq$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(seq_OBJECTS) $(seq_LDADD) $(LIBS)
-setuidgid$(EXEEXT): $(setuidgid_OBJECTS) $(setuidgid_DEPENDENCIES) $(EXTRA_setuidgid_DEPENDENCIES)
- @rm -f setuidgid$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(setuidgid_OBJECTS) $(setuidgid_LDADD) $(LIBS)
-sha1sum$(EXEEXT): $(sha1sum_OBJECTS) $(sha1sum_DEPENDENCIES) $(EXTRA_sha1sum_DEPENDENCIES)
- @rm -f sha1sum$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sha1sum_OBJECTS) $(sha1sum_LDADD) $(LIBS)
-sha224sum$(EXEEXT): $(sha224sum_OBJECTS) $(sha224sum_DEPENDENCIES) $(EXTRA_sha224sum_DEPENDENCIES)
- @rm -f sha224sum$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sha224sum_OBJECTS) $(sha224sum_LDADD) $(LIBS)
-sha256sum$(EXEEXT): $(sha256sum_OBJECTS) $(sha256sum_DEPENDENCIES) $(EXTRA_sha256sum_DEPENDENCIES)
- @rm -f sha256sum$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sha256sum_OBJECTS) $(sha256sum_LDADD) $(LIBS)
-sha384sum$(EXEEXT): $(sha384sum_OBJECTS) $(sha384sum_DEPENDENCIES) $(EXTRA_sha384sum_DEPENDENCIES)
- @rm -f sha384sum$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sha384sum_OBJECTS) $(sha384sum_LDADD) $(LIBS)
-sha512sum$(EXEEXT): $(sha512sum_OBJECTS) $(sha512sum_DEPENDENCIES) $(EXTRA_sha512sum_DEPENDENCIES)
- @rm -f sha512sum$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sha512sum_OBJECTS) $(sha512sum_LDADD) $(LIBS)
-shred$(EXEEXT): $(shred_OBJECTS) $(shred_DEPENDENCIES) $(EXTRA_shred_DEPENDENCIES)
- @rm -f shred$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(shred_OBJECTS) $(shred_LDADD) $(LIBS)
-shuf$(EXEEXT): $(shuf_OBJECTS) $(shuf_DEPENDENCIES) $(EXTRA_shuf_DEPENDENCIES)
- @rm -f shuf$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(shuf_OBJECTS) $(shuf_LDADD) $(LIBS)
-sleep$(EXEEXT): $(sleep_OBJECTS) $(sleep_DEPENDENCIES) $(EXTRA_sleep_DEPENDENCIES)
- @rm -f sleep$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sleep_OBJECTS) $(sleep_LDADD) $(LIBS)
-sort$(EXEEXT): $(sort_OBJECTS) $(sort_DEPENDENCIES) $(EXTRA_sort_DEPENDENCIES)
- @rm -f sort$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sort_OBJECTS) $(sort_LDADD) $(LIBS)
-split$(EXEEXT): $(split_OBJECTS) $(split_DEPENDENCIES) $(EXTRA_split_DEPENDENCIES)
- @rm -f split$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(split_OBJECTS) $(split_LDADD) $(LIBS)
-stat$(EXEEXT): $(stat_OBJECTS) $(stat_DEPENDENCIES) $(EXTRA_stat_DEPENDENCIES)
- @rm -f stat$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(stat_OBJECTS) $(stat_LDADD) $(LIBS)
-stdbuf$(EXEEXT): $(stdbuf_OBJECTS) $(stdbuf_DEPENDENCIES) $(EXTRA_stdbuf_DEPENDENCIES)
- @rm -f stdbuf$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(stdbuf_OBJECTS) $(stdbuf_LDADD) $(LIBS)
-stty$(EXEEXT): $(stty_OBJECTS) $(stty_DEPENDENCIES) $(EXTRA_stty_DEPENDENCIES)
- @rm -f stty$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(stty_OBJECTS) $(stty_LDADD) $(LIBS)
-su$(EXEEXT): $(su_OBJECTS) $(su_DEPENDENCIES) $(EXTRA_su_DEPENDENCIES)
- @rm -f su$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(su_OBJECTS) $(su_LDADD) $(LIBS)
-sum$(EXEEXT): $(sum_OBJECTS) $(sum_DEPENDENCIES) $(EXTRA_sum_DEPENDENCIES)
- @rm -f sum$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sum_OBJECTS) $(sum_LDADD) $(LIBS)
-sync$(EXEEXT): $(sync_OBJECTS) $(sync_DEPENDENCIES) $(EXTRA_sync_DEPENDENCIES)
- @rm -f sync$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sync_OBJECTS) $(sync_LDADD) $(LIBS)
-tac$(EXEEXT): $(tac_OBJECTS) $(tac_DEPENDENCIES) $(EXTRA_tac_DEPENDENCIES)
- @rm -f tac$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(tac_OBJECTS) $(tac_LDADD) $(LIBS)
-tail$(EXEEXT): $(tail_OBJECTS) $(tail_DEPENDENCIES) $(EXTRA_tail_DEPENDENCIES)
- @rm -f tail$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(tail_OBJECTS) $(tail_LDADD) $(LIBS)
-tee$(EXEEXT): $(tee_OBJECTS) $(tee_DEPENDENCIES) $(EXTRA_tee_DEPENDENCIES)
- @rm -f tee$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(tee_OBJECTS) $(tee_LDADD) $(LIBS)
-test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) $(EXTRA_test_DEPENDENCIES)
- @rm -f test$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS)
-timeout$(EXEEXT): $(timeout_OBJECTS) $(timeout_DEPENDENCIES) $(EXTRA_timeout_DEPENDENCIES)
- @rm -f timeout$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(timeout_OBJECTS) $(timeout_LDADD) $(LIBS)
-touch$(EXEEXT): $(touch_OBJECTS) $(touch_DEPENDENCIES) $(EXTRA_touch_DEPENDENCIES)
- @rm -f touch$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(touch_OBJECTS) $(touch_LDADD) $(LIBS)
-tr$(EXEEXT): $(tr_OBJECTS) $(tr_DEPENDENCIES) $(EXTRA_tr_DEPENDENCIES)
- @rm -f tr$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(tr_OBJECTS) $(tr_LDADD) $(LIBS)
-true$(EXEEXT): $(true_OBJECTS) $(true_DEPENDENCIES) $(EXTRA_true_DEPENDENCIES)
- @rm -f true$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(true_OBJECTS) $(true_LDADD) $(LIBS)
-truncate$(EXEEXT): $(truncate_OBJECTS) $(truncate_DEPENDENCIES) $(EXTRA_truncate_DEPENDENCIES)
- @rm -f truncate$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(truncate_OBJECTS) $(truncate_LDADD) $(LIBS)
-tsort$(EXEEXT): $(tsort_OBJECTS) $(tsort_DEPENDENCIES) $(EXTRA_tsort_DEPENDENCIES)
- @rm -f tsort$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(tsort_OBJECTS) $(tsort_LDADD) $(LIBS)
-tty$(EXEEXT): $(tty_OBJECTS) $(tty_DEPENDENCIES) $(EXTRA_tty_DEPENDENCIES)
- @rm -f tty$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(tty_OBJECTS) $(tty_LDADD) $(LIBS)
-uname$(EXEEXT): $(uname_OBJECTS) $(uname_DEPENDENCIES) $(EXTRA_uname_DEPENDENCIES)
- @rm -f uname$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(uname_OBJECTS) $(uname_LDADD) $(LIBS)
-unexpand$(EXEEXT): $(unexpand_OBJECTS) $(unexpand_DEPENDENCIES) $(EXTRA_unexpand_DEPENDENCIES)
- @rm -f unexpand$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(unexpand_OBJECTS) $(unexpand_LDADD) $(LIBS)
-uniq$(EXEEXT): $(uniq_OBJECTS) $(uniq_DEPENDENCIES) $(EXTRA_uniq_DEPENDENCIES)
- @rm -f uniq$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(uniq_OBJECTS) $(uniq_LDADD) $(LIBS)
-unlink$(EXEEXT): $(unlink_OBJECTS) $(unlink_DEPENDENCIES) $(EXTRA_unlink_DEPENDENCIES)
- @rm -f unlink$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(unlink_OBJECTS) $(unlink_LDADD) $(LIBS)
-uptime$(EXEEXT): $(uptime_OBJECTS) $(uptime_DEPENDENCIES) $(EXTRA_uptime_DEPENDENCIES)
- @rm -f uptime$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(uptime_OBJECTS) $(uptime_LDADD) $(LIBS)
-users$(EXEEXT): $(users_OBJECTS) $(users_DEPENDENCIES) $(EXTRA_users_DEPENDENCIES)
- @rm -f users$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(users_OBJECTS) $(users_LDADD) $(LIBS)
-vdir$(EXEEXT): $(vdir_OBJECTS) $(vdir_DEPENDENCIES) $(EXTRA_vdir_DEPENDENCIES)
- @rm -f vdir$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(vdir_OBJECTS) $(vdir_LDADD) $(LIBS)
-wc$(EXEEXT): $(wc_OBJECTS) $(wc_DEPENDENCIES) $(EXTRA_wc_DEPENDENCIES)
- @rm -f wc$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(wc_OBJECTS) $(wc_LDADD) $(LIBS)
-who$(EXEEXT): $(who_OBJECTS) $(who_DEPENDENCIES) $(EXTRA_who_DEPENDENCIES)
- @rm -f who$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(who_OBJECTS) $(who_LDADD) $(LIBS)
-whoami$(EXEEXT): $(whoami_OBJECTS) $(whoami_DEPENDENCIES) $(EXTRA_whoami_DEPENDENCIES)
- @rm -f whoami$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(whoami_OBJECTS) $(whoami_LDADD) $(LIBS)
-yes$(EXEEXT): $(yes_OBJECTS) $(yes_DEPENDENCIES) $(EXTRA_yes_DEPENDENCIES)
- @rm -f yes$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(yes_OBJECTS) $(yes_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cat.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chcon.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chgrp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chmod.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chown-core.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chown.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chroot.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cksum.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/comm.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cp-hash.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csplit.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cut.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/date.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/df.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dircolors.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/du.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/echo.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/env.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expand.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extent-scan.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/factor.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/false.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find-mount-point.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmt.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fold.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getlimits.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ginstall-copy.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ginstall-cp-hash.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ginstall-extent-scan.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ginstall-install.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ginstall-prog-fprintf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/group-list.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/groups.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/head.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostid.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostname.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/id.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/join.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kill.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lbracket.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstdbuf_so-libstdbuf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ln.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logname.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ls-dir.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ls-ls.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ls-vdir.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ls.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5sum-md5sum.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdir.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkfifo.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mknod.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktemp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mv.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nice.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nohup.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nproc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/od.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/operand2sig.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/paste.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pathchk.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pinky.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printenv.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prog-fprintf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptx.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realpath.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/relpath.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remove.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rm.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runcon.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seq.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setuidgid.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1sum-md5sum.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha224sum-md5sum.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha256sum-md5sum.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha384sum-md5sum.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha512sum-md5sum.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shred.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shuf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sort.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/split.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdbuf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stty.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sum.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tac.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tail.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tee.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeout.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/touch.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/true.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/truncate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsort.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tty.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uname-arch.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uname-uname.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uname.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unexpand.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uniq.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlink.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uptime.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/users.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/who.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/whoami.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yes.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-ginstall-install.o: install.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ginstall-install.o -MD -MP -MF $(DEPDIR)/ginstall-install.Tpo -c -o ginstall-install.o `test -f 'install.c' || echo '$(srcdir)/'`install.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ginstall-install.Tpo $(DEPDIR)/ginstall-install.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='install.c' object='ginstall-install.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ginstall-install.o `test -f 'install.c' || echo '$(srcdir)/'`install.c
-
-ginstall-install.obj: install.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ginstall-install.obj -MD -MP -MF $(DEPDIR)/ginstall-install.Tpo -c -o ginstall-install.obj `if test -f 'install.c'; then $(CYGPATH_W) 'install.c'; else $(CYGPATH_W) '$(srcdir)/install.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ginstall-install.Tpo $(DEPDIR)/ginstall-install.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='install.c' object='ginstall-install.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ginstall-install.obj `if test -f 'install.c'; then $(CYGPATH_W) 'install.c'; else $(CYGPATH_W) '$(srcdir)/install.c'; fi`
-
-ginstall-prog-fprintf.o: prog-fprintf.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ginstall-prog-fprintf.o -MD -MP -MF $(DEPDIR)/ginstall-prog-fprintf.Tpo -c -o ginstall-prog-fprintf.o `test -f 'prog-fprintf.c' || echo '$(srcdir)/'`prog-fprintf.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ginstall-prog-fprintf.Tpo $(DEPDIR)/ginstall-prog-fprintf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='prog-fprintf.c' object='ginstall-prog-fprintf.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ginstall-prog-fprintf.o `test -f 'prog-fprintf.c' || echo '$(srcdir)/'`prog-fprintf.c
-
-ginstall-prog-fprintf.obj: prog-fprintf.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ginstall-prog-fprintf.obj -MD -MP -MF $(DEPDIR)/ginstall-prog-fprintf.Tpo -c -o ginstall-prog-fprintf.obj `if test -f 'prog-fprintf.c'; then $(CYGPATH_W) 'prog-fprintf.c'; else $(CYGPATH_W) '$(srcdir)/prog-fprintf.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ginstall-prog-fprintf.Tpo $(DEPDIR)/ginstall-prog-fprintf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='prog-fprintf.c' object='ginstall-prog-fprintf.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ginstall-prog-fprintf.obj `if test -f 'prog-fprintf.c'; then $(CYGPATH_W) 'prog-fprintf.c'; else $(CYGPATH_W) '$(srcdir)/prog-fprintf.c'; fi`
-
-ginstall-copy.o: copy.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ginstall-copy.o -MD -MP -MF $(DEPDIR)/ginstall-copy.Tpo -c -o ginstall-copy.o `test -f 'copy.c' || echo '$(srcdir)/'`copy.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ginstall-copy.Tpo $(DEPDIR)/ginstall-copy.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='copy.c' object='ginstall-copy.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ginstall-copy.o `test -f 'copy.c' || echo '$(srcdir)/'`copy.c
-
-ginstall-copy.obj: copy.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ginstall-copy.obj -MD -MP -MF $(DEPDIR)/ginstall-copy.Tpo -c -o ginstall-copy.obj `if test -f 'copy.c'; then $(CYGPATH_W) 'copy.c'; else $(CYGPATH_W) '$(srcdir)/copy.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ginstall-copy.Tpo $(DEPDIR)/ginstall-copy.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='copy.c' object='ginstall-copy.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ginstall-copy.obj `if test -f 'copy.c'; then $(CYGPATH_W) 'copy.c'; else $(CYGPATH_W) '$(srcdir)/copy.c'; fi`
-
-ginstall-cp-hash.o: cp-hash.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ginstall-cp-hash.o -MD -MP -MF $(DEPDIR)/ginstall-cp-hash.Tpo -c -o ginstall-cp-hash.o `test -f 'cp-hash.c' || echo '$(srcdir)/'`cp-hash.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ginstall-cp-hash.Tpo $(DEPDIR)/ginstall-cp-hash.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cp-hash.c' object='ginstall-cp-hash.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ginstall-cp-hash.o `test -f 'cp-hash.c' || echo '$(srcdir)/'`cp-hash.c
-
-ginstall-cp-hash.obj: cp-hash.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ginstall-cp-hash.obj -MD -MP -MF $(DEPDIR)/ginstall-cp-hash.Tpo -c -o ginstall-cp-hash.obj `if test -f 'cp-hash.c'; then $(CYGPATH_W) 'cp-hash.c'; else $(CYGPATH_W) '$(srcdir)/cp-hash.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ginstall-cp-hash.Tpo $(DEPDIR)/ginstall-cp-hash.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cp-hash.c' object='ginstall-cp-hash.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ginstall-cp-hash.obj `if test -f 'cp-hash.c'; then $(CYGPATH_W) 'cp-hash.c'; else $(CYGPATH_W) '$(srcdir)/cp-hash.c'; fi`
-
-ginstall-extent-scan.o: extent-scan.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ginstall-extent-scan.o -MD -MP -MF $(DEPDIR)/ginstall-extent-scan.Tpo -c -o ginstall-extent-scan.o `test -f 'extent-scan.c' || echo '$(srcdir)/'`extent-scan.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ginstall-extent-scan.Tpo $(DEPDIR)/ginstall-extent-scan.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='extent-scan.c' object='ginstall-extent-scan.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ginstall-extent-scan.o `test -f 'extent-scan.c' || echo '$(srcdir)/'`extent-scan.c
-
-ginstall-extent-scan.obj: extent-scan.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ginstall-extent-scan.obj -MD -MP -MF $(DEPDIR)/ginstall-extent-scan.Tpo -c -o ginstall-extent-scan.obj `if test -f 'extent-scan.c'; then $(CYGPATH_W) 'extent-scan.c'; else $(CYGPATH_W) '$(srcdir)/extent-scan.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ginstall-extent-scan.Tpo $(DEPDIR)/ginstall-extent-scan.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='extent-scan.c' object='ginstall-extent-scan.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ginstall-extent-scan.obj `if test -f 'extent-scan.c'; then $(CYGPATH_W) 'extent-scan.c'; else $(CYGPATH_W) '$(srcdir)/extent-scan.c'; fi`
-
-libstdbuf_so-libstdbuf.o: libstdbuf.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libstdbuf_so_CFLAGS) $(CFLAGS) -MT libstdbuf_so-libstdbuf.o -MD -MP -MF $(DEPDIR)/libstdbuf_so-libstdbuf.Tpo -c -o libstdbuf_so-libstdbuf.o `test -f 'libstdbuf.c' || echo '$(srcdir)/'`libstdbuf.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstdbuf_so-libstdbuf.Tpo $(DEPDIR)/libstdbuf_so-libstdbuf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libstdbuf.c' object='libstdbuf_so-libstdbuf.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libstdbuf_so_CFLAGS) $(CFLAGS) -c -o libstdbuf_so-libstdbuf.o `test -f 'libstdbuf.c' || echo '$(srcdir)/'`libstdbuf.c
-
-libstdbuf_so-libstdbuf.obj: libstdbuf.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libstdbuf_so_CFLAGS) $(CFLAGS) -MT libstdbuf_so-libstdbuf.obj -MD -MP -MF $(DEPDIR)/libstdbuf_so-libstdbuf.Tpo -c -o libstdbuf_so-libstdbuf.obj `if test -f 'libstdbuf.c'; then $(CYGPATH_W) 'libstdbuf.c'; else $(CYGPATH_W) '$(srcdir)/libstdbuf.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstdbuf_so-libstdbuf.Tpo $(DEPDIR)/libstdbuf_so-libstdbuf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libstdbuf.c' object='libstdbuf_so-libstdbuf.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libstdbuf_so_CFLAGS) $(CFLAGS) -c -o libstdbuf_so-libstdbuf.obj `if test -f 'libstdbuf.c'; then $(CYGPATH_W) 'libstdbuf.c'; else $(CYGPATH_W) '$(srcdir)/libstdbuf.c'; fi`
-
-md5sum-md5sum.o: md5sum.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(md5sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT md5sum-md5sum.o -MD -MP -MF $(DEPDIR)/md5sum-md5sum.Tpo -c -o md5sum-md5sum.o `test -f 'md5sum.c' || echo '$(srcdir)/'`md5sum.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/md5sum-md5sum.Tpo $(DEPDIR)/md5sum-md5sum.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='md5sum.c' object='md5sum-md5sum.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(md5sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o md5sum-md5sum.o `test -f 'md5sum.c' || echo '$(srcdir)/'`md5sum.c
-
-md5sum-md5sum.obj: md5sum.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(md5sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT md5sum-md5sum.obj -MD -MP -MF $(DEPDIR)/md5sum-md5sum.Tpo -c -o md5sum-md5sum.obj `if test -f 'md5sum.c'; then $(CYGPATH_W) 'md5sum.c'; else $(CYGPATH_W) '$(srcdir)/md5sum.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/md5sum-md5sum.Tpo $(DEPDIR)/md5sum-md5sum.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='md5sum.c' object='md5sum-md5sum.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(md5sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o md5sum-md5sum.obj `if test -f 'md5sum.c'; then $(CYGPATH_W) 'md5sum.c'; else $(CYGPATH_W) '$(srcdir)/md5sum.c'; fi`
-
-sha1sum-md5sum.o: md5sum.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha1sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sha1sum-md5sum.o -MD -MP -MF $(DEPDIR)/sha1sum-md5sum.Tpo -c -o sha1sum-md5sum.o `test -f 'md5sum.c' || echo '$(srcdir)/'`md5sum.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sha1sum-md5sum.Tpo $(DEPDIR)/sha1sum-md5sum.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='md5sum.c' object='sha1sum-md5sum.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha1sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha1sum-md5sum.o `test -f 'md5sum.c' || echo '$(srcdir)/'`md5sum.c
-
-sha1sum-md5sum.obj: md5sum.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha1sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sha1sum-md5sum.obj -MD -MP -MF $(DEPDIR)/sha1sum-md5sum.Tpo -c -o sha1sum-md5sum.obj `if test -f 'md5sum.c'; then $(CYGPATH_W) 'md5sum.c'; else $(CYGPATH_W) '$(srcdir)/md5sum.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sha1sum-md5sum.Tpo $(DEPDIR)/sha1sum-md5sum.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='md5sum.c' object='sha1sum-md5sum.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha1sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha1sum-md5sum.obj `if test -f 'md5sum.c'; then $(CYGPATH_W) 'md5sum.c'; else $(CYGPATH_W) '$(srcdir)/md5sum.c'; fi`
-
-sha224sum-md5sum.o: md5sum.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha224sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sha224sum-md5sum.o -MD -MP -MF $(DEPDIR)/sha224sum-md5sum.Tpo -c -o sha224sum-md5sum.o `test -f 'md5sum.c' || echo '$(srcdir)/'`md5sum.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sha224sum-md5sum.Tpo $(DEPDIR)/sha224sum-md5sum.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='md5sum.c' object='sha224sum-md5sum.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha224sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha224sum-md5sum.o `test -f 'md5sum.c' || echo '$(srcdir)/'`md5sum.c
-
-sha224sum-md5sum.obj: md5sum.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha224sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sha224sum-md5sum.obj -MD -MP -MF $(DEPDIR)/sha224sum-md5sum.Tpo -c -o sha224sum-md5sum.obj `if test -f 'md5sum.c'; then $(CYGPATH_W) 'md5sum.c'; else $(CYGPATH_W) '$(srcdir)/md5sum.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sha224sum-md5sum.Tpo $(DEPDIR)/sha224sum-md5sum.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='md5sum.c' object='sha224sum-md5sum.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha224sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha224sum-md5sum.obj `if test -f 'md5sum.c'; then $(CYGPATH_W) 'md5sum.c'; else $(CYGPATH_W) '$(srcdir)/md5sum.c'; fi`
-
-sha256sum-md5sum.o: md5sum.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha256sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sha256sum-md5sum.o -MD -MP -MF $(DEPDIR)/sha256sum-md5sum.Tpo -c -o sha256sum-md5sum.o `test -f 'md5sum.c' || echo '$(srcdir)/'`md5sum.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sha256sum-md5sum.Tpo $(DEPDIR)/sha256sum-md5sum.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='md5sum.c' object='sha256sum-md5sum.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha256sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha256sum-md5sum.o `test -f 'md5sum.c' || echo '$(srcdir)/'`md5sum.c
-
-sha256sum-md5sum.obj: md5sum.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha256sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sha256sum-md5sum.obj -MD -MP -MF $(DEPDIR)/sha256sum-md5sum.Tpo -c -o sha256sum-md5sum.obj `if test -f 'md5sum.c'; then $(CYGPATH_W) 'md5sum.c'; else $(CYGPATH_W) '$(srcdir)/md5sum.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sha256sum-md5sum.Tpo $(DEPDIR)/sha256sum-md5sum.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='md5sum.c' object='sha256sum-md5sum.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha256sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha256sum-md5sum.obj `if test -f 'md5sum.c'; then $(CYGPATH_W) 'md5sum.c'; else $(CYGPATH_W) '$(srcdir)/md5sum.c'; fi`
-
-sha384sum-md5sum.o: md5sum.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha384sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sha384sum-md5sum.o -MD -MP -MF $(DEPDIR)/sha384sum-md5sum.Tpo -c -o sha384sum-md5sum.o `test -f 'md5sum.c' || echo '$(srcdir)/'`md5sum.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sha384sum-md5sum.Tpo $(DEPDIR)/sha384sum-md5sum.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='md5sum.c' object='sha384sum-md5sum.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha384sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha384sum-md5sum.o `test -f 'md5sum.c' || echo '$(srcdir)/'`md5sum.c
-
-sha384sum-md5sum.obj: md5sum.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha384sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sha384sum-md5sum.obj -MD -MP -MF $(DEPDIR)/sha384sum-md5sum.Tpo -c -o sha384sum-md5sum.obj `if test -f 'md5sum.c'; then $(CYGPATH_W) 'md5sum.c'; else $(CYGPATH_W) '$(srcdir)/md5sum.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sha384sum-md5sum.Tpo $(DEPDIR)/sha384sum-md5sum.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='md5sum.c' object='sha384sum-md5sum.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha384sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha384sum-md5sum.obj `if test -f 'md5sum.c'; then $(CYGPATH_W) 'md5sum.c'; else $(CYGPATH_W) '$(srcdir)/md5sum.c'; fi`
-
-sha512sum-md5sum.o: md5sum.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha512sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sha512sum-md5sum.o -MD -MP -MF $(DEPDIR)/sha512sum-md5sum.Tpo -c -o sha512sum-md5sum.o `test -f 'md5sum.c' || echo '$(srcdir)/'`md5sum.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sha512sum-md5sum.Tpo $(DEPDIR)/sha512sum-md5sum.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='md5sum.c' object='sha512sum-md5sum.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha512sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha512sum-md5sum.o `test -f 'md5sum.c' || echo '$(srcdir)/'`md5sum.c
-
-sha512sum-md5sum.obj: md5sum.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha512sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sha512sum-md5sum.obj -MD -MP -MF $(DEPDIR)/sha512sum-md5sum.Tpo -c -o sha512sum-md5sum.obj `if test -f 'md5sum.c'; then $(CYGPATH_W) 'md5sum.c'; else $(CYGPATH_W) '$(srcdir)/md5sum.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sha512sum-md5sum.Tpo $(DEPDIR)/sha512sum-md5sum.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='md5sum.c' object='sha512sum-md5sum.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha512sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha512sum-md5sum.obj `if test -f 'md5sum.c'; then $(CYGPATH_W) 'md5sum.c'; else $(CYGPATH_W) '$(srcdir)/md5sum.c'; fi`
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- set x; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-
-cscopelist: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP)'; \
- case "$(srcdir)" in \
- [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
- *) sdir=$(subdir)/$(srcdir) ;; \
- esac; \
- for i in $$list; do \
- if test -f "$$i"; then \
- echo "$(subdir)/$$i"; \
- else \
- echo "$$sdir/$$i"; \
- fi; \
- done >> $(top_builddir)/cscope.files
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$(top_distdir)" distdir="$(distdir)" \
- dist-hook
-check-am: all-am
-check: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS) all-local
-installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- if test -z '$(STRIP)'; then \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- install; \
- else \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
- fi
-mostlyclean-generic:
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
- -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic clean-noinstLIBRARIES \
- clean-noinstPROGRAMS clean-pkglibexecPROGRAMS mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-binPROGRAMS install-pkglibexecPROGRAMS
- @$(NORMAL_INSTALL)
- $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS uninstall-local \
- uninstall-pkglibexecPROGRAMS
-
-.MAKE: all check install install-am install-exec-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \
- clean-binPROGRAMS clean-generic clean-noinstLIBRARIES \
- clean-noinstPROGRAMS clean-pkglibexecPROGRAMS cscopelist ctags \
- dist-hook distclean distclean-compile distclean-generic \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-binPROGRAMS install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-exec-hook install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-pkglibexecPROGRAMS install-ps \
- install-ps-am install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
- ps ps-am tags uninstall uninstall-am uninstall-binPROGRAMS \
- uninstall-local uninstall-pkglibexecPROGRAMS
-
-
-$(PROGRAMS): ../lib/libcoreutils.a
-
-all-local: su$(EXEEXT)
-
-install-root: su$(EXEEXT)
- @$(install_su)
-
-install-exec-hook: su$(EXEEXT)
- @if test "$(INSTALL_SU)" = yes; then \
- TMPFILE=$(DESTDIR)$(bindir)/.su-$$$$; \
- rm -f $$TMPFILE; \
- echo > $$TMPFILE; \
- can_create_suid_root_executable=no; \
- chown root $$TMPFILE > /dev/null 2>&1 \
- && chmod $(setuid_root_mode) $$TMPFILE > /dev/null 2>&1 \
- && can_create_suid_root_executable=yes; \
- rm -f $$TMPFILE; \
- if test $$can_create_suid_root_executable = yes; then \
- $(install_su); \
- else \
- echo "WARNING: insufficient access; not installing su"; \
- echo "NOTE: to install su, run 'make install-root' as root"; \
- rm -f $(installed_su); \
- fi; \
- else :; \
- fi
-
-uninstall-local:
-# Remove su only if it's one we installed.
- @if test "$(INSTALL_SU)" = yes; then \
- if grep '$(PACKAGE_NAME)' $(installed_su) > /dev/null 2>&1; then \
- echo " rm -f $(installed_su)"; \
- rm -f $(installed_su); \
- else :; \
- fi; \
- fi
-dircolors.h: dcgen dircolors.hin
- $(AM_V_GEN)rm -f $@ $@-t
- $(AM_V_at)$(PERL) -w -- $(srcdir)/dcgen $(srcdir)/dircolors.hin > $@-t
- $(AM_V_at)chmod a-w $@-t
- $(AM_V_at)mv $@-t $@
-wheel-size.h: Makefile.am
- $(AM_V_GEN)rm -f $@ $@-t
- $(AM_V_at)echo '#define WHEEL_SIZE $(wheel_size)' > $@-t
- $(AM_V_at)chmod a-w $@-t
- $(AM_V_at)mv $@-t $@
-wheel.h: wheel-gen.pl Makefile.am
- $(AM_V_GEN)rm -f $@ $@-t
- $(AM_V_at)$(srcdir)/wheel-gen.pl $(wheel_size) > $@-t
- $(AM_V_at)chmod a-w $@-t
- $(AM_V_at)mv $@-t $@
-
-# Compare fs.h with the list of file system names/magic-numbers in the
-# Linux statfs man page. This target prints any new name/number pairs.
-# Also compare against /usr/include/linux/magic.h
-.PHONY: fs-magic-compare
-fs-magic-compare: fs-magic fs-kernel-magic fs-def
- join -v1 -t@ fs-magic fs-def
- join -v1 -t@ fs-kernel-magic fs-def
-fs-def: fs.h
- grep '^# *define ' $< | $(ASSORT) > $@-t && mv $@-t $@
-fs-magic: Makefile
- man statfs \
- |perl -ne '/File system types:/.../Nobody kno/ and print' \
- |grep 0x | perl -p \
- $(fs_normalize_perl_subst) \
- | grep -Ev 'S_MAGIC_EXT[34]|STACK_END' \
- | LC_ALL=C sort \
- > $@-t && mv $@-t $@
-fs-kernel-magic: Makefile
- perl -ne '/^#define.*0x/ and print' /usr/include/linux/magic.h \
- | perl -p \
- $(fs_normalize_perl_subst) \
- | grep -Ev 'S_MAGIC_EXT[34]|STACK_END' \
- | LC_ALL=C sort \
- > $@-t && mv $@-t $@
-fs-is-local.h: stat.c extract-magic
- $(AM_V_GEN)rm -f $@
- $(AM_V_at)$(PERL) $(srcdir)/extract-magic --local $(srcdir)/stat.c \
- > $@t
- $(AM_V_at)chmod a-w $@t
- $(AM_V_at)mv $@t $@
-fs.h: stat.c extract-magic
- $(AM_V_GEN)rm -f $@
- $(AM_V_at)$(PERL) $(srcdir)/extract-magic $(srcdir)/stat.c > $@t
- $(AM_V_at)chmod a-w $@t
- $(AM_V_at)mv $@t $@
-version.c: Makefile
- $(AM_V_GEN)rm -f $@
- $(AM_V_at)printf '#include <config.h>\n' > $@t
- $(AM_V_at)printf 'char const *Version = "$(PACKAGE_VERSION)";\n' >> $@t
- $(AM_V_at)chmod a-w $@t
- $(AM_V_at)mv $@t $@
-version.h: Makefile
- $(AM_V_GEN)rm -f $@
- $(AM_V_at)printf 'extern char const *Version;\n' > $@t
- $(AM_V_at)chmod a-w $@t
- $(AM_V_at)mv $@t $@
-
-built_programs.list:
- @echo $(bin_PROGRAMS) $(bin_SCRIPTS) | tr ' ' '\n' \
- | sed -e 's,$(EXEEXT)$$,,' | $(ASSORT) -u | tr '\n' ' '
-
-all_programs.list:
- @echo $(all_programs) | tr ' ' '\n' | sed -e 's,$(EXEEXT)$$,,' \
- | sed /libstdbuf/d \
- | $(ASSORT) -u
-
-# This is required because we have broken inter-directory dependencies:
-# in order to generate all man pages, even those for which we don't
-# install a binary, require that all programs be built at distribution time.
-dist-hook: $(all_programs)
-
-# Ensure that all programs are built so we can for example
-# subsequently syntax check all man pages.
-.PHONY: all_programs
-all_programs: $(all_programs)
-# Ensure that the list of programs in README matches the list
-# of programs we can build.
-check: check-README check-duplicate-no-install
-.PHONY: check-README
-check-README:
- $(AM_V_GEN)rm -rf $(pr) $(pm)
- $(AM_V_at)echo $(all_programs) \
- | tr -s ' ' '\n' | sed -e 's,$(EXEEXT)$$,,;s/ginstall/install/' \
- | sed /libstdbuf/d \
- | $(ASSORT) -u > $(pm) && \
- sed -n '/^The programs .* are:/,/^[a-zA-Z]/p' $(top_srcdir)/README \
- | sed -n '/^ */s///p' | tr -s ' ' '\n' > $(pr)
- $(AM_V_at)diff $(pm) $(pr) && rm -rf $(pr) $(pm)
-
-# Ensure that a by-default-not-installed program (listed in
-# $(no_install__progs) is not also listed in $(EXTRA_PROGRAMS), because
-# if that were to happen, it *would* be installed by default.
-.PHONY: check-duplicate-no-install
-check-duplicate-no-install: tr
- $(AM_V_GEN)test -z "`echo '$(EXTRA_PROGRAMS)'| ./tr ' ' '\n' | uniq -d`"
-.PHONY: _sc_check-AUTHORS
-_sc_check-AUTHORS: $(all_programs)
- @locale=en_US.UTF-8; \
- LC_ALL=$$locale ./cat --version \
- | grep ' Torbjorn ' > /dev/null \
- && { echo "$@: skipping this check"; exit 0; }; \
- rm -f $(au_actual) $(au_dotdot); \
- for i in `ls $(all_programs) | sed -e 's,$(EXEEXT)$$,,' \
- | sed /libstdbuf/d \
- | $(ASSORT) -u`; do \
- test "$$i" = '[' && continue; \
- exe=$$i; \
- if test "$$i" = install; then \
- exe=ginstall; \
- elif test "$$i" = test; then \
- exe='['; \
- fi; \
- LC_ALL=$$locale ./$$exe --version \
- | perl -0 -pi -e 's/,\n/, /gm' \
- | sed -n -e '/Written by /{ s//'"$$i"': /;' \
- -e 's/,* and /, /; s/\.$$//; p; }'; \
- done > $(au_actual) && \
- sed -n '/^[^ ][^ ]*:/p' $(top_srcdir)/AUTHORS > $(au_dotdot) && \
- diff $(au_actual) $(au_dotdot) && rm -f $(au_actual) $(au_dotdot)
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/base64.c b/src/base64.c
index 682cb913..0a400680 100644
--- a/src/base64.c
+++ b/src/base64.c
@@ -1,5 +1,5 @@
/* Base64 encode/decode strings or files.
- Copyright (C) 2004-2012 Free Software Foundation, Inc.
+ Copyright (C) 2004-2013 Free Software Foundation, Inc.
This file is part of Base64.
@@ -60,7 +60,10 @@ usage (int status)
printf (_("\
Usage: %s [OPTION]... [FILE]\n\
Base64 encode or decode FILE, or standard input, to standard output.\n\
-\n"), program_name);
+"), program_name);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-d, --decode decode data\n\
-i, --ignore-garbage when decoding, ignore non-alphabet characters\n\
diff --git a/src/basename.c b/src/basename.c
index 353ff084..074d284d 100644
--- a/src/basename.c
+++ b/src/basename.c
@@ -1,5 +1,5 @@
/* basename -- strip directory and suffix from file names
- Copyright (C) 1990-2012 Free Software Foundation, Inc.
+ Copyright (C) 1990-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -53,9 +53,10 @@ Usage: %s NAME [SUFFIX]\n\
fputs (_("\
Print NAME with any leading directory components removed.\n\
If specified, also remove a trailing SUFFIX.\n\
-\n\
"), stdout);
+ emit_mandatory_arg_note ();
+
fputs (_("\
-a, --multiple support multiple arguments and treat each as a NAME\n\
-s, --suffix=SUFFIX remove a trailing SUFFIX\n\
diff --git a/src/cat.c b/src/cat.c
index 9e901e0c..650cb20f 100644
--- a/src/cat.c
+++ b/src/cat.c
@@ -1,5 +1,5 @@
/* cat -- concatenate files and print on the standard output.
- Copyright (C) 1988-2012 Free Software Foundation, Inc.
+ Copyright (C) 1988-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/chcon.c b/src/chcon.c
index 34e92e41..56f2caa5 100644
--- a/src/chcon.c
+++ b/src/chcon.c
@@ -1,5 +1,5 @@
/* chcon -- change security context of files
- Copyright (C) 2005-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -357,8 +357,10 @@ Usage: %s [OPTION]... CONTEXT FILE...\n\
fputs (_("\
Change the security context of each FILE to CONTEXT.\n\
With --reference, change the security context of each FILE to that of RFILE.\n\
-\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
--dereference affect the referent of each symbolic link (this is\n\
the default), rather than the symbolic link itself\n\
@@ -371,6 +373,10 @@ With --reference, change the security context of each FILE to that of RFILE.\n\
-l, --range=RANGE set range RANGE in the target security context\n\
"), stdout);
fputs (_("\
+ --no-preserve-root do not treat '/' specially (the default)\n\
+ --preserve-root fail to operate recursively on '/'\n\
+"), stdout);
+ fputs (_("\
--reference=RFILE use RFILE's security context rather than specifying\n\
a CONTEXT value\n\
"), stdout);
diff --git a/src/chgrp.c b/src/chgrp.c
index 16b5e96d..c70855d3 100644
--- a/src/chgrp.c
+++ b/src/chgrp.c
@@ -1,5 +1,5 @@
/* chgrp -- change group ownership of files
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/chmod.c b/src/chmod.c
index a54078c0..2c25ce6d 100644
--- a/src/chmod.c
+++ b/src/chmod.c
@@ -1,5 +1,5 @@
/* chmod -- change permission modes of files
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/chown-core.c b/src/chown-core.c
index b7de4320..3a3044e0 100644
--- a/src/chown-core.c
+++ b/src/chown-core.c
@@ -1,5 +1,5 @@
/* chown-core.c -- core functions for changing ownership.
- Copyright (C) 2000-2012 Free Software Foundation, Inc.
+ Copyright (C) 2000-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/chown-core.h b/src/chown-core.h
index 38b3ba11..f6c808bc 100644
--- a/src/chown-core.h
+++ b/src/chown-core.h
@@ -1,6 +1,6 @@
/* chown-core.h -- types and prototypes shared by chown and chgrp.
- Copyright (C) 2000-2012 Free Software Foundation, Inc.
+ Copyright (C) 2000-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/chown.c b/src/chown.c
index 8b4add79..9db0a569 100644
--- a/src/chown.c
+++ b/src/chown.c
@@ -1,5 +1,5 @@
/* chown -- change user and group ownership of files
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/chroot.c b/src/chroot.c
index dbb5c6da..1c1a9769 100644
--- a/src/chroot.c
+++ b/src/chroot.c
@@ -1,5 +1,5 @@
/* chroot -- run command or shell with special root directory
- Copyright (C) 1995-2012 Free Software Foundation, Inc.
+ Copyright (C) 1995-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/cksum.c b/src/cksum.c
index d3ce0f8e..26571c7c 100644
--- a/src/cksum.c
+++ b/src/cksum.c
@@ -1,5 +1,5 @@
/* cksum -- calculate and print POSIX checksums and sizes of files
- Copyright (C) 1992-2012 Free Software Foundation, Inc.
+ Copyright (C) 1992-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -290,6 +290,10 @@ main (int argc, char **argv)
atexit (close_stdout);
+ /* Line buffer stdout to ensure lines are written atomically and immediately
+ so that processes running in parallel do not intersperse their output. */
+ setvbuf (stdout, NULL, _IOLBF, 0);
+
parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, Version,
usage, AUTHORS, (char const *) NULL);
if (getopt_long (argc, argv, "", NULL, NULL) != -1)
diff --git a/src/comm.c b/src/comm.c
index 748147aa..b3248101 100644
--- a/src/comm.c
+++ b/src/comm.c
@@ -1,5 +1,5 @@
/* comm -- compare two sorted files line by line.
- Copyright (C) 1986-2012 Free Software Foundation, Inc.
+ Copyright (C) 1986-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/copy.c b/src/copy.c
index 2558fea1..3f2cc2b0 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -1,5 +1,5 @@
/* copy.c -- core functions for copying files and directories
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -165,7 +165,7 @@ sparse_copy (int src_fd, int dest_fd, char *buf, size_t buf_size,
{
if (errno == EINTR)
continue;
- error (0, errno, _("reading %s"), quote (src_name));
+ error (0, errno, _("error reading %s"), quote (src_name));
return false;
}
if (n_read == 0)
@@ -203,7 +203,7 @@ sparse_copy (int src_fd, int dest_fd, char *buf, size_t buf_size,
size_t n = n_read;
if (full_write (dest_fd, buf, n) != n)
{
- error (0, errno, _("writing %s"), quote (dst_name));
+ error (0, errno, _("error writing %s"), quote (dst_name));
return false;
}
@@ -1151,6 +1151,11 @@ preserve_metadata:
if (set_acl (dst_name, dest_desc, x->mode) != 0)
return_val = false;
}
+ else if (x->explicit_no_preserve_mode)
+ {
+ if (set_acl (dst_name, dest_desc, 0666 & ~cached_umask ()) != 0)
+ return_val = false;
+ }
else if (omitted_permissions)
{
omitted_permissions &= ~ cached_umask ();
@@ -1167,13 +1172,13 @@ preserve_metadata:
close_src_and_dst_desc:
if (close (dest_desc) < 0)
{
- error (0, errno, _("closing %s"), quote (dst_name));
+ error (0, errno, _("failed to close %s"), quote (dst_name));
return_val = false;
}
close_src_desc:
if (close (source_desc) < 0)
{
- error (0, errno, _("closing %s"), quote (src_name));
+ error (0, errno, _("failed to close %s"), quote (src_name));
return_val = false;
}
@@ -2389,8 +2394,13 @@ copy_internal (char const *src_name, char const *dst_name,
/* POSIX says the permission bits of the source file must be
used as the 3rd argument in the open call. Historical
practice passed all the source mode bits to 'open', but the extra
- bits were ignored, so it should be the same either way. */
- if (! copy_reg (src_name, dst_name, x, src_mode & S_IRWXUGO,
+ bits were ignored, so it should be the same either way.
+
+ This call uses DST_MODE_BITS, not SRC_MODE. These are
+ normally the same, and the exception (where x->set_mode) is
+ used only by 'install', which POSIX does not specify and
+ where DST_MODE_BITS is what's wanted. */
+ if (! copy_reg (src_name, dst_name, x, dst_mode_bits & S_IRWXUGO,
omitted_permissions, &new_dst, &src_sb))
goto un_backup;
}
@@ -2570,6 +2580,11 @@ copy_internal (char const *src_name, char const *dst_name,
if (set_acl (dst_name, -1, x->mode) != 0)
return false;
}
+ else if (x->explicit_no_preserve_mode)
+ {
+ if (set_acl (dst_name, -1, 0777 & ~cached_umask ()) != 0)
+ return false;
+ }
else
{
if (omitted_permissions)
diff --git a/src/copy.h b/src/copy.h
index d70c09ea..cf72d3cc 100644
--- a/src/copy.h
+++ b/src/copy.h
@@ -1,5 +1,5 @@
/* core functions for copying files and directories
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -157,6 +157,7 @@ struct cp_options
bool preserve_ownership;
bool preserve_mode;
bool preserve_timestamps;
+ bool explicit_no_preserve_mode;
/* Enabled for mv, and for cp by the --preserve=links option.
If true, attempt to preserve in the destination files any
diff --git a/src/cp-hash.c b/src/cp-hash.c
index 77fd993c..9ef23fc4 100644
--- a/src/cp-hash.c
+++ b/src/cp-hash.c
@@ -1,5 +1,5 @@
/* cp-hash.c -- file copying (hash search routines)
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/cp.c b/src/cp.c
index 6649af2e..e235b326 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -1,5 +1,5 @@
/* cp.c -- file copying (main routines)
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -161,11 +161,10 @@ Usage: %s [OPTION]... [-T] SOURCE DEST\n\
program_name, program_name, program_name);
fputs (_("\
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-a, --archive same as -dR --preserve=all\n\
--attributes-only don't copy the file data, just the attributes\n\
@@ -177,9 +176,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
fputs (_("\
-f, --force if an existing destination file cannot be\n\
- opened, remove it and try again (redundant if\
-\n\
- the -n option is used)\n\
+ opened, remove it and try again (this option\n\
+ is ignored when the -n option is also used)\n\
-i, --interactive prompt before overwrite (overrides a previous -n\
\n\
option)\n\
@@ -569,7 +567,7 @@ target_directory_operand (char const *file, struct stat *st, bool *new_dst)
if (err)
{
if (err != ENOENT)
- error (EXIT_FAILURE, err, _("accessing %s"), quote (file));
+ error (EXIT_FAILURE, err, _("failed to access %s"), quote (file));
*new_dst = true;
}
return is_a_dir;
@@ -783,6 +781,7 @@ cp_option_init (struct cp_options *x)
x->preserve_links = false;
x->preserve_mode = false;
x->preserve_timestamps = false;
+ x->explicit_no_preserve_mode = false;
x->preserve_security_context = false;
x->require_preserve_context = false;
x->preserve_xattr = false;
@@ -860,6 +859,7 @@ decode_preserve_arg (char const *arg, struct cp_options *x, bool on_off)
{
case PRESERVE_MODE:
x->preserve_mode = on_off;
+ x->explicit_no_preserve_mode = !on_off;
break;
case PRESERVE_TIMESTAMPS:
@@ -889,6 +889,7 @@ decode_preserve_arg (char const *arg, struct cp_options *x, bool on_off)
x->preserve_timestamps = on_off;
x->preserve_ownership = on_off;
x->preserve_links = on_off;
+ x->explicit_no_preserve_mode = !on_off;
if (selinux_enabled)
x->preserve_security_context = on_off;
x->preserve_xattr = on_off;
@@ -1065,7 +1066,8 @@ main (int argc, char **argv)
{
struct stat st;
if (stat (optarg, &st) != 0)
- error (EXIT_FAILURE, errno, _("accessing %s"), quote (optarg));
+ error (EXIT_FAILURE, errno, _("failed to access %s"),
+ quote (optarg));
if (! S_ISDIR (st.st_mode))
error (EXIT_FAILURE, 0, _("target %s is not a directory"),
quote (optarg));
diff --git a/src/csplit.c b/src/csplit.c
index fb43350a..22f3ad4b 100644
--- a/src/csplit.c
+++ b/src/csplit.c
@@ -1,5 +1,5 @@
/* csplit - split a file into sections determined by context lines
- Copyright (C) 1991-2012 Free Software Foundation, Inc.
+ Copyright (C) 1991-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -425,6 +425,7 @@ free_buffer (struct buffer_record *buf)
free (l);
l = n;
}
+ buf->line_start = NULL;
free (buf->buffer);
buf->buffer = NULL;
}
@@ -499,8 +500,6 @@ load_buffer (void)
b->bytes_used += read_input (p, bytes_avail);
lines_found = record_line_starts (b);
- if (!lines_found)
- free_buffer (b);
if (lines_found || have_read_eof)
break;
@@ -515,7 +514,10 @@ load_buffer (void)
if (lines_found)
save_buffer (b);
else
- free (b);
+ {
+ free_buffer (b);
+ free (b);
+ }
return lines_found != 0;
}
@@ -1453,11 +1455,10 @@ Usage: %s [OPTION]... FILE PATTERN...\n\
fputs (_("\
Output pieces of FILE separated by PATTERN(s) to files 'xx00', 'xx01', ...,\n\
and output byte counts of each piece to standard output.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-b, --suffix-format=FORMAT use sprintf FORMAT instead of %02d\n\
-f, --prefix=PREFIX use PREFIX instead of 'xx'\n\
diff --git a/src/cu-progs.mk b/src/cu-progs.mk
new file mode 100644
index 00000000..dba03ad0
--- /dev/null
+++ b/src/cu-progs.mk
@@ -0,0 +1,110 @@
+## Automatically generated by gen-lists-of-programs.sh. DO NOT EDIT BY HAND!
+no_install__progs =
+no_install__progs += src/arch
+no_install__progs += src/hostname
+build_if_possible__progs =
+build_if_possible__progs += src/chroot
+build_if_possible__progs += src/df
+build_if_possible__progs += src/hostid
+build_if_possible__progs += src/libstdbuf.so
+build_if_possible__progs += src/nice
+build_if_possible__progs += src/pinky
+build_if_possible__progs += src/stdbuf
+build_if_possible__progs += src/stty
+build_if_possible__progs += src/uptime
+build_if_possible__progs += src/users
+build_if_possible__progs += src/who
+default__progs =
+default__progs += src/[
+default__progs += src/base64
+default__progs += src/basename
+default__progs += src/cat
+default__progs += src/chcon
+default__progs += src/chgrp
+default__progs += src/chmod
+default__progs += src/chown
+default__progs += src/cksum
+default__progs += src/comm
+default__progs += src/cp
+default__progs += src/csplit
+default__progs += src/cut
+default__progs += src/date
+default__progs += src/dd
+default__progs += src/dir
+default__progs += src/dircolors
+default__progs += src/dirname
+default__progs += src/du
+default__progs += src/echo
+default__progs += src/env
+default__progs += src/expand
+default__progs += src/expr
+default__progs += src/factor
+default__progs += src/false
+default__progs += src/fmt
+default__progs += src/fold
+default__progs += src/ginstall
+default__progs += src/groups
+default__progs += src/head
+default__progs += src/id
+default__progs += src/join
+default__progs += src/kill
+default__progs += src/link
+default__progs += src/ln
+default__progs += src/logname
+default__progs += src/ls
+default__progs += src/md5sum
+default__progs += src/mkdir
+default__progs += src/mkfifo
+default__progs += src/mknod
+default__progs += src/mktemp
+default__progs += src/mv
+default__progs += src/nl
+default__progs += src/nproc
+default__progs += src/nohup
+default__progs += src/numfmt
+default__progs += src/od
+default__progs += src/paste
+default__progs += src/pathchk
+default__progs += src/pr
+default__progs += src/printenv
+default__progs += src/printf
+default__progs += src/ptx
+default__progs += src/pwd
+default__progs += src/readlink
+default__progs += src/realpath
+default__progs += src/rm
+default__progs += src/rmdir
+default__progs += src/runcon
+default__progs += src/seq
+default__progs += src/sha1sum
+default__progs += src/sha224sum
+default__progs += src/sha256sum
+default__progs += src/sha384sum
+default__progs += src/sha512sum
+default__progs += src/shred
+default__progs += src/shuf
+default__progs += src/sleep
+default__progs += src/sort
+default__progs += src/split
+default__progs += src/stat
+default__progs += src/sum
+default__progs += src/sync
+default__progs += src/tac
+default__progs += src/tail
+default__progs += src/tee
+default__progs += src/test
+default__progs += src/timeout
+default__progs += src/touch
+default__progs += src/tr
+default__progs += src/true
+default__progs += src/truncate
+default__progs += src/tsort
+default__progs += src/tty
+default__progs += src/uname
+default__progs += src/unexpand
+default__progs += src/uniq
+default__progs += src/unlink
+default__progs += src/vdir
+default__progs += src/wc
+default__progs += src/whoami
+default__progs += src/yes
diff --git a/src/cut.c b/src/cut.c
index 87380ac6..494aad77 100644
--- a/src/cut.c
+++ b/src/cut.c
@@ -1,5 +1,5 @@
/* cut - remove parts of lines of files
- Copyright (C) 1997-2012 Free Software Foundation, Inc.
+ Copyright (C) 1997-2013 Free Software Foundation, Inc.
Copyright (C) 1984 David M. Ihnat
This program is free software: you can redistribute it and/or modify
@@ -192,11 +192,10 @@ Usage: %s OPTION... [FILE]...\n\
program_name);
fputs (_("\
Print selected parts of lines from each FILE to standard output.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-b, --bytes=LIST select only these bytes\n\
-c, --characters=LIST select only these characters\n\
@@ -365,10 +364,13 @@ set_fields (const char *fieldstr)
in_digits = false;
/* Starting a range. */
if (dash_found)
- FATAL_ERROR (_("invalid byte or field list"));
+ FATAL_ERROR (_("invalid byte, character or field list"));
dash_found = true;
fieldstr++;
+ if (lhs_specified && !value)
+ FATAL_ERROR (_("fields and positions are numbered from 1"));
+
initial = (lhs_specified ? value : 1);
value = 0;
}
@@ -388,8 +390,10 @@ set_fields (const char *fieldstr)
In any case, 'initial' contains the start of the range. */
if (!rhs_specified)
{
- /* 'n-'. From 'initial' to end of line. */
- eol_range_start = initial;
+ /* 'n-'. From 'initial' to end of line. If we've already
+ seen an M- range, ignore subsequent N- unless N < M. */
+ if (eol_range_start == 0 || initial < eol_range_start)
+ eol_range_start = initial;
field_found = true;
}
else
@@ -486,7 +490,7 @@ set_fields (const char *fieldstr)
fieldstr++;
}
else
- FATAL_ERROR (_("invalid byte or field list"));
+ FATAL_ERROR (_("invalid byte, character or field list"));
}
max_range_endpoint = 0;
@@ -495,37 +499,40 @@ set_fields (const char *fieldstr)
if (rp[i].hi > max_range_endpoint)
max_range_endpoint = rp[i].hi;
}
- if (max_range_endpoint < eol_range_start)
- max_range_endpoint = eol_range_start;
/* Allocate an array large enough so that it may be indexed by
the field numbers corresponding to all finite ranges
(i.e. '2-6' or '-4', but not '5-') in FIELDSTR. */
- printable_field = xzalloc (max_range_endpoint / CHAR_BIT + 1);
+ if (max_range_endpoint)
+ printable_field = xzalloc (max_range_endpoint / CHAR_BIT + 1);
qsort (rp, n_rp, sizeof (rp[0]), compare_ranges);
/* Set the array entries corresponding to integers in the ranges of RP. */
for (i = 0; i < n_rp; i++)
{
- size_t j;
- size_t rsi_candidate;
+ /* Ignore any range that is subsumed by the to-EOL range. */
+ if (eol_range_start && eol_range_start <= rp[i].lo)
+ continue;
/* Record the range-start indices, i.e., record each start
index that is not part of any other (lo..hi] range. */
- rsi_candidate = complement ? rp[i].hi + 1 : rp[i].lo;
+ size_t rsi_candidate = complement ? rp[i].hi + 1 : rp[i].lo;
if (output_delimiter_specified
&& !is_printable_field (rsi_candidate))
mark_range_start (rsi_candidate);
- for (j = rp[i].lo; j <= rp[i].hi; j++)
+ for (size_t j = rp[i].lo; j <= rp[i].hi; j++)
mark_printable_field (j);
}
if (output_delimiter_specified
&& !complement
- && eol_range_start && !is_printable_field (eol_range_start))
+ && eol_range_start
+ && max_range_endpoint
+ && (max_range_endpoint < eol_range_start
+ || !is_printable_field (eol_range_start)))
mark_range_start (eol_range_start);
free (rp);
@@ -596,6 +603,7 @@ cut_fields (FILE *stream)
return;
ungetc (c, stream);
+ c = 0;
/* To support the semantics of the -s flag, we may have to buffer
all of the first field to determine whether it is 'delimited.'
@@ -611,6 +619,7 @@ cut_fields (FILE *stream)
{
ssize_t len;
size_t n_bytes;
+ bool got_line;
len = getndelim2 (&field_1_buffer, &field_1_bufsize, 0,
GETNLINE_NO_LIMIT, delim, '\n', stream);
@@ -626,12 +635,15 @@ cut_fields (FILE *stream)
n_bytes = len;
assert (n_bytes != 0);
+ c = 0;
+ got_line = field_1_buffer[n_bytes - 1] == '\n';
+
/* If the first field extends to the end of line (it is not
delimited) and we are printing all non-delimited lines,
print this one. */
- if (to_uchar (field_1_buffer[n_bytes - 1]) != delim)
+ if (to_uchar (field_1_buffer[n_bytes - 1]) != delim || got_line)
{
- if (suppress_non_delimited)
+ if (suppress_non_delimited && !(got_line && delim == '\n'))
{
/* Empty. */
}
@@ -639,8 +651,9 @@ cut_fields (FILE *stream)
{
fwrite (field_1_buffer, sizeof (char), n_bytes, stdout);
/* Make sure the output line is newline terminated. */
- if (field_1_buffer[n_bytes - 1] != '\n')
+ if (! got_line)
putchar ('\n');
+ c = '\n';
}
continue;
}
@@ -653,53 +666,46 @@ cut_fields (FILE *stream)
++field_idx;
}
- if (c != EOF)
+ int prev_c = c;
+
+ if (print_kth (field_idx, NULL))
{
- if (print_kth (field_idx, NULL))
+ if (found_any_selected_field)
{
- if (found_any_selected_field)
- {
- fwrite (output_delimiter_string, sizeof (char),
- output_delimiter_length, stdout);
- }
- found_any_selected_field = true;
-
- while ((c = getc (stream)) != delim && c != '\n' && c != EOF)
- {
- putchar (c);
- }
+ fwrite (output_delimiter_string, sizeof (char),
+ output_delimiter_length, stdout);
}
- else
+ found_any_selected_field = true;
+
+ while ((c = getc (stream)) != delim && c != '\n' && c != EOF)
{
- while ((c = getc (stream)) != delim && c != '\n' && c != EOF)
- {
- /* Empty. */
- }
+ putchar (c);
+ prev_c = c;
}
}
-
- if (c == '\n')
+ else
{
- c = getc (stream);
- if (c != EOF)
+ while ((c = getc (stream)) != delim && c != '\n' && c != EOF)
{
- ungetc (c, stream);
- c = '\n';
+ prev_c = c;
}
}
- if (c == delim)
- ++field_idx;
- else if (c == '\n' || c == EOF)
+ if (c == '\n' || c == EOF)
{
if (found_any_selected_field
|| !(suppress_non_delimited && field_idx == 1))
- putchar ('\n');
+ {
+ if (c == '\n' || prev_c != '\n')
+ putchar ('\n');
+ }
if (c == EOF)
break;
field_idx = 1;
found_any_selected_field = false;
}
+ else if (c == delim)
+ field_idx++;
}
}
@@ -840,7 +846,7 @@ main (int argc, char **argv)
if (operating_mode == undefined_mode)
FATAL_ERROR (_("you must specify a list of bytes, characters, or fields"));
- if (delim != '\0' && operating_mode != field_mode)
+ if (delim_specified && operating_mode != field_mode)
FATAL_ERROR (_("an input delimiter may be specified only\
when operating on fields"));
diff --git a/src/date.c b/src/date.c
index b03efff6..ec66f767 100644
--- a/src/date.c
+++ b/src/date.c
@@ -1,5 +1,5 @@
/* date - print or set the system date and time
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -127,7 +127,11 @@ Usage: %s [OPTION]... [+FORMAT]\n\
program_name, program_name);
fputs (_("\
Display the current time in the given FORMAT, or set the system date.\n\
-\n\
+"), stdout);
+
+ emit_mandatory_arg_note ();
+
+ fputs (_("\
-d, --date=STRING display time described by STRING, not 'now'\n\
-f, --file=DATEFILE like --date once for each line of DATEFILE\n\
-I[TIMESPEC], --iso-8601[=TIMESPEC] output date/time in ISO 8601 format.\n\
diff --git a/src/dcgen b/src/dcgen
index 17efffc7..233fefd0 100755
--- a/src/dcgen
+++ b/src/dcgen
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
# dcgen -- convert dircolors.hin to dircolors.h.
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/src/dd.c b/src/dd.c
index 163d514c..c98e578f 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -1,5 +1,5 @@
/* dd -- convert a file while copying it.
- Copyright (C) 1985-2012 Free Software Foundation, Inc.
+ Copyright (C) 1985-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -135,7 +135,10 @@ enum
/* Status bit masks. */
enum
{
- STATUS_NOXFER = 01
+ STATUS_NOXFER = 01,
+ STATUS_NOCOUNTS = 02,
+ STATUS_LAST = STATUS_NOCOUNTS,
+ STATUS_NONE = STATUS_LAST | (STATUS_LAST - 1)
};
/* The name of the input file, or NULL for the standard input. */
@@ -370,6 +373,7 @@ static struct symbol_value const flags[] =
static struct symbol_value const statuses[] =
{
{"noxfer", STATUS_NOXFER},
+ {"none", STATUS_NONE},
{"", 0}
};
@@ -536,11 +540,12 @@ Copy a file, converting and formatting according to the operands.\n\
oflag=FLAGS write as per the comma separated symbol list\n\
seek=N skip N obs-sized blocks at start of output\n\
skip=N skip N ibs-sized blocks at start of input\n\
- status=noxfer suppress transfer statistics\n\
+ status=WHICH WHICH info to suppress outputting to stderr;\n\
+ 'noxfer' suppresses transfer stats, 'none' suppresses all\n\
"), stdout);
fputs (_("\
\n\
-BLOCKS and BYTES may be followed by the following multiplicative suffixes:\n\
+N and BYTES may be followed by the following multiplicative suffixes:\n\
c =1, w =2, b =512, kB =1000, K =1024, MB =1000*1000, M =1024*1024, xM =M\n\
GB =1000*1000*1000, G =1024*1024*1024, and so on for T, P, E, Z, Y.\n\
\n\
@@ -664,7 +669,6 @@ multiple_bits_set (int i)
static void
print_stats (void)
{
- xtime_t now = gethrxtime ();
char hbuf[LONGEST_HUMAN_READABLE + 1];
int human_opts =
(human_autoscale | human_round_to_nearest
@@ -672,6 +676,9 @@ print_stats (void)
double delta_s;
char const *bytes_per_second;
+ if ((status_flags & STATUS_NONE) == STATUS_NONE)
+ return;
+
fprintf (stderr,
_("%"PRIuMAX"+%"PRIuMAX" records in\n"
"%"PRIuMAX"+%"PRIuMAX" records out\n"),
@@ -697,6 +704,7 @@ print_stats (void)
w_bytes,
human_readable (w_bytes, hbuf, human_opts, 1, 1));
+ xtime_t now = gethrxtime ();
if (start_time < now)
{
double XTIME_PRECISIONe0 = XTIME_PRECISION;
@@ -1606,7 +1614,7 @@ skip (int fdesc, char const *file, uintmax_t records, size_t blocksize,
{
if (fdesc == STDIN_FILENO)
{
- error (0, errno, _("reading %s"), quote (file));
+ error (0, errno, _("error reading %s"), quote (file));
if (conversions_mask & C_NOERROR)
print_stats ();
}
@@ -1973,7 +1981,7 @@ dd_copy (void)
if (nread < 0)
{
- error (0, errno, _("reading %s"), quote (input_file));
+ error (0, errno, _("error reading %s"), quote (input_file));
if (conversions_mask & C_NOERROR)
{
print_stats ();
@@ -2036,7 +2044,7 @@ dd_copy (void)
w_bytes += nwritten;
if (nwritten != n_bytes_read)
{
- error (0, errno, _("writing %s"), quote (output_file));
+ error (0, errno, _("error writing %s"), quote (output_file));
return EXIT_FAILURE;
}
else if (n_bytes_read == input_blocksize)
@@ -2099,7 +2107,7 @@ dd_copy (void)
w_partial++;
if (nwritten != oc)
{
- error (0, errno, _("writing %s"), quote (output_file));
+ error (0, errno, _("error writing %s"), quote (output_file));
return EXIT_FAILURE;
}
}
@@ -2122,9 +2130,9 @@ dd_copy (void)
if (ftruncate (STDOUT_FILENO, output_offset) != 0)
{
error (0, errno,
- _("failed to truncate to %"PRIuMAX" bytes"
+ _("failed to truncate to %" PRIdMAX " bytes"
" in output file %s"),
- output_offset, quote (output_file));
+ (intmax_t) output_offset, quote (output_file));
return EXIT_FAILURE;
}
}
@@ -2196,7 +2204,7 @@ main (int argc, char **argv)
else
{
if (fd_reopen (STDIN_FILENO, input_file, O_RDONLY | input_flags, 0) < 0)
- error (EXIT_FAILURE, errno, _("opening %s"), quote (input_file));
+ error (EXIT_FAILURE, errno, _("failed to open %s"), quote (input_file));
}
offset = lseek (STDIN_FILENO, 0, SEEK_CUR);
@@ -2211,7 +2219,7 @@ main (int argc, char **argv)
}
else
{
- mode_t perms = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
+ mode_t perms = MODE_RW_UGO;
int opts
= (output_flags
| (conversions_mask & C_NOCREAT ? 0 : O_CREAT)
@@ -2225,7 +2233,8 @@ main (int argc, char **argv)
|| fd_reopen (STDOUT_FILENO, output_file, O_RDWR | opts, perms) < 0)
&& (fd_reopen (STDOUT_FILENO, output_file, O_WRONLY | opts, perms)
< 0))
- error (EXIT_FAILURE, errno, _("opening %s"), quote (output_file));
+ error (EXIT_FAILURE, errno, _("failed to open %s"),
+ quote (output_file));
if (seek_records != 0 && !(conversions_mask & C_NOTRUNC))
{
diff --git a/src/df.c b/src/df.c
index e99fedff..05151319 100644
--- a/src/df.c
+++ b/src/df.c
@@ -1,5 +1,5 @@
/* df - summarize free disk space
- Copyright (C) 1991-2012 Free Software Foundation, Inc.
+ Copyright (C) 1991-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -43,11 +43,17 @@
proper_name ("David MacKenzie"), \
proper_name ("Paul Eggert")
-/* If true, show inode information. */
-static bool inode_format;
+/* Filled with device numbers of examined file systems to avoid
+ duplicities in output. */
+struct devlist
+{
+ dev_t dev_num;
+ struct mount_entry *me;
+ struct devlist *next;
+};
/* If true, show even file systems with zero size or
- uninteresting types. */
+ uninteresting types. */
static bool show_all_fs;
/* If true, show only local file systems. */
@@ -63,9 +69,6 @@ static int human_output_opts;
/* The units to use when printing sizes. */
static uintmax_t output_block_size;
-/* If true, use the POSIX output format. */
-static bool posix_format;
-
/* True if a file system has been processed for output. */
static bool file_systems_processed;
@@ -78,7 +81,7 @@ static bool require_sync;
/* Desired exit status. */
static int exit_status;
-/* A file system type to display. */
+/* A file system type to display. */
struct fs_type_list
{
@@ -104,7 +107,7 @@ static struct fs_type_list *fs_select_list;
static struct fs_type_list *fs_exclude_list;
-/* Linked list of mounted file systems. */
+/* Linked list of mounted file systems. */
static struct mount_entry *mount_list;
/* If true, print file system type as well. */
@@ -113,48 +116,113 @@ static bool print_type;
/* If true, print a grand total at the end. */
static bool print_grand_total;
-/* Grand total data. */
+/* Grand total data. */
static struct fs_usage grand_fsu;
/* Display modes. */
-enum { DEFAULT_MODE, INODES_MODE, HUMAN_MODE, POSIX_MODE, NMODES };
+enum
+{
+ DEFAULT_MODE,
+ INODES_MODE,
+ HUMAN_MODE,
+ POSIX_MODE,
+ OUTPUT_MODE
+};
static int header_mode = DEFAULT_MODE;
/* Displayable fields. */
-enum
+typedef enum
{
- DEV_FIELD, /* file system */
- TYPE_FIELD, /* FS type */
- TOTAL_FIELD, /* blocks or inodes */
- USED_FIELD, /* ditto */
- FREE_FIELD, /* ditto */
- PCENT_FIELD, /* percent used */
- MNT_FIELD, /* mount point */
- NFIELDS
-};
+ SOURCE_FIELD, /* file system */
+ FSTYPE_FIELD, /* FS type */
+ SIZE_FIELD, /* FS size */
+ USED_FIELD, /* FS size used */
+ AVAIL_FIELD, /* FS size available */
+ PCENT_FIELD, /* percent used */
+ ITOTAL_FIELD, /* inode total */
+ IUSED_FIELD, /* inodes used */
+ IAVAIL_FIELD, /* inodes available */
+ IPCENT_FIELD, /* inodes used in percent */
+ TARGET_FIELD /* mount point */
+} display_field_t;
+
+/* Flag if a field contains a block, an inode or another value. */
+typedef enum
+{
+ BLOCK_FLD, /* Block values field */
+ INODE_FLD, /* Inode values field */
+ OTHER_FLD /* Neutral field, e.g. target */
+} field_type_t;
-/* Header strings for the above fields in each mode.
- NULL means to use the header for the default mode. */
-static const char *headers[NFIELDS][NMODES] = {
-/* DEFAULT_MODE INODES_MODE HUMAN_MODE POSIX_MODE */
- { N_("Filesystem"), NULL, NULL, NULL },
- { N_("Type"), NULL, NULL, NULL },
- { N_("blocks"), N_("Inodes"), N_("Size"), NULL },
- { N_("Used"), N_("IUsed"), NULL, NULL },
- { N_("Available"), N_("IFree"), N_("Avail"), NULL },
- { N_("Use%"), N_("IUse%"), NULL, N_("Capacity") },
- { N_("Mounted on"), NULL, NULL, NULL }
+/* Attributes of a display field. */
+struct field_data_t
+{
+ display_field_t field;
+ char const *arg;
+ field_type_t field_type;
+ const char *caption;/* NULL means to use the default header of this field. */
+ size_t width; /* Auto adjusted (up) widths used to align columns. */
+ mbs_align_t align; /* Alignment for this field. */
+ bool used;
};
-/* Alignments for the 3 textual and 4 numeric fields. */
-static mbs_align_t alignments[NFIELDS] = {
- MBS_ALIGN_LEFT, MBS_ALIGN_LEFT,
- MBS_ALIGN_RIGHT, MBS_ALIGN_RIGHT, MBS_ALIGN_RIGHT, MBS_ALIGN_RIGHT,
- MBS_ALIGN_LEFT
+/* Header strings, minimum width and alignment for the above fields. */
+static struct field_data_t field_data[] = {
+ [SOURCE_FIELD] = { SOURCE_FIELD,
+ "source", OTHER_FLD, N_("Filesystem"), 14, MBS_ALIGN_LEFT, false },
+
+ [FSTYPE_FIELD] = { FSTYPE_FIELD,
+ "fstype", OTHER_FLD, N_("Type"), 4, MBS_ALIGN_LEFT, false },
+
+ [SIZE_FIELD] = { SIZE_FIELD,
+ "size", BLOCK_FLD, N_("blocks"), 5, MBS_ALIGN_RIGHT, false },
+
+ [USED_FIELD] = { USED_FIELD,
+ "used", BLOCK_FLD, N_("Used"), 5, MBS_ALIGN_RIGHT, false },
+
+ [AVAIL_FIELD] = { AVAIL_FIELD,
+ "avail", BLOCK_FLD, N_("Available"), 5, MBS_ALIGN_RIGHT, false },
+
+ [PCENT_FIELD] = { PCENT_FIELD,
+ "pcent", BLOCK_FLD, N_("Use%"), 4, MBS_ALIGN_RIGHT, false },
+
+ [ITOTAL_FIELD] = { ITOTAL_FIELD,
+ "itotal", INODE_FLD, N_("Inodes"), 5, MBS_ALIGN_RIGHT, false },
+
+ [IUSED_FIELD] = { IUSED_FIELD,
+ "iused", INODE_FLD, N_("IUsed"), 5, MBS_ALIGN_RIGHT, false },
+
+ [IAVAIL_FIELD] = { IAVAIL_FIELD,
+ "iavail", INODE_FLD, N_("IFree"), 5, MBS_ALIGN_RIGHT, false },
+
+ [IPCENT_FIELD] = { IPCENT_FIELD,
+ "ipcent", INODE_FLD, N_("IUse%"), 4, MBS_ALIGN_RIGHT, false },
+
+ [TARGET_FIELD] = { TARGET_FIELD,
+ "target", OTHER_FLD, N_("Mounted on"), 0, MBS_ALIGN_LEFT, false }
};
-/* Auto adjusted (up) widths used to align columns. */
-static size_t widths[NFIELDS] = { 14, 4, 5, 5, 5, 4, 0 };
+static char const *all_args_string =
+ "source,fstype,itotal,iused,iavail,ipcent,size,used,avail,pcent,target";
+
+/* Storage for the definition of output columns. */
+static struct field_data_t **columns;
+
+/* The current number of output columns. */
+static size_t ncolumns;
+
+/* Field values. */
+struct field_values_t
+{
+ uintmax_t input_units;
+ uintmax_t output_units;
+ uintmax_t total;
+ uintmax_t available;
+ bool negate_available;
+ uintmax_t available_to_root;
+ uintmax_t used;
+ bool negate_used;
+};
/* Storage for pointers for each string (cell of table). */
static char ***table;
@@ -167,7 +235,10 @@ static size_t nrows;
enum
{
NO_SYNC_OPTION = CHAR_MAX + 1,
- SYNC_OPTION
+ SYNC_OPTION,
+ TOTAL_OPTION,
+ OUTPUT_OPTION,
+ MEGABYTES_OPTION /* FIXME: remove long opt in Aug 2013 */
};
static struct option const long_options[] =
@@ -178,12 +249,13 @@ static struct option const long_options[] =
{"human-readable", no_argument, NULL, 'h'},
{"si", no_argument, NULL, 'H'},
{"local", no_argument, NULL, 'l'},
- {"megabytes", no_argument, NULL, 'm'}, /* obsolescent */
+ {"megabytes", no_argument, NULL, MEGABYTES_OPTION}, /* obsolescent, */
+ {"output", optional_argument, NULL, OUTPUT_OPTION},
{"portability", no_argument, NULL, 'P'},
{"print-type", no_argument, NULL, 'T'},
{"sync", no_argument, NULL, SYNC_OPTION},
{"no-sync", no_argument, NULL, NO_SYNC_OPTION},
- {"total", no_argument, NULL, 'c'},
+ {"total", no_argument, NULL, TOTAL_OPTION},
{"type", required_argument, NULL, 't'},
{"exclude-type", required_argument, NULL, 'x'},
{GETOPT_HELP_OPTION_DECL},
@@ -191,6 +263,23 @@ static struct option const long_options[] =
{NULL, 0, NULL, 0}
};
+/* Replace problematic chars with '?'.
+ Since only control characters are currently considered,
+ this should work in all encodings. */
+
+static char*
+hide_problematic_chars (char *cell)
+{
+ char *p = cell;
+ while (*p)
+ {
+ if (iscntrl (to_uchar (*p)))
+ *p = '?';
+ p++;
+ }
+ return cell;
+}
+
/* Dynamically allocate a row of pointers in TABLE, which
can then be accessed with standard 2D array notation. */
@@ -199,7 +288,7 @@ alloc_table_row (void)
{
nrows++;
table = xnrealloc (table, nrows, sizeof (char *));
- table[nrows-1] = xnmalloc (NFIELDS, sizeof (char *));
+ table[nrows - 1] = xnmalloc (ncolumns, sizeof (char *));
}
/* Output each cell in the table, accounting for the
@@ -208,32 +297,33 @@ alloc_table_row (void)
static void
print_table (void)
{
- size_t field, row;
+ size_t row;
- for (row = 0; row < nrows; row ++)
+ for (row = 0; row < nrows; row++)
{
- for (field = 0; field < NFIELDS; field++)
+ size_t col;
+ for (col = 0; col < ncolumns; col++)
{
- size_t width = widths[field];
- char *cell = table[row][field];
- if (!cell) /* Missing type column, or mount point etc. */
- continue;
+ char *cell = table[row][col];
- /* Note the DEV_FIELD used to be displayed on it's own line
+ /* Note the SOURCE_FIELD used to be displayed on it's own line
if (!posix_format && mbswidth (cell) > 20), but that
- functionality is probably more problematic than helpful. */
- if (field != 0)
+ functionality was probably more problematic than helpful,
+ hence changed in commit v8.10-40-g99679ff. */
+ if (col != 0)
putchar (' ');
- if (field == MNT_FIELD) /* The last one. */
- fputs (cell, stdout);
- else
- {
- cell = ambsalign (cell, &width, alignments[field], 0);
- /* When ambsalign fails, output unaligned data. */
- fputs (cell ? cell : table[row][field], stdout);
- free (cell);
- }
- IF_LINT (free (table[row][field]));
+
+ int flags = 0;
+ if (col == ncolumns - 1) /* The last one. */
+ flags = MBA_NO_RIGHT_PAD;
+
+ size_t width = columns[col]->width;
+ cell = ambsalign (cell, &width, columns[col]->align, flags);
+ /* When ambsalign fails, output unaligned data. */
+ fputs (cell ? cell : table[row][col], stdout);
+ free (cell);
+
+ IF_LINT (free (table[row][col]));
}
putchar ('\n');
IF_LINT (free (table[row]));
@@ -242,29 +332,180 @@ print_table (void)
IF_LINT (free (table));
}
-/* Obtain the appropriate header entries. */
+/* Dynamically allocate a struct field_t in COLUMNS, which
+ can then be accessed with standard array notation. */
static void
-get_header (void)
+alloc_field (int f, const char *c)
{
- size_t field;
+ ncolumns++;
+ columns = xnrealloc (columns, ncolumns, sizeof (struct field_data_t *));
+ columns[ncolumns - 1] = &field_data[f];
+ if (c != NULL)
+ columns[ncolumns - 1]->caption = c;
- alloc_table_row ();
+ if (field_data[f].used)
+ assert (!"field used");
+
+ /* Mark field as used. */
+ field_data[f].used = true;
+}
+
+
+/* Given a string, ARG, containing a comma-separated list of arguments
+ to the --output option, add the appropriate fields to columns. */
+static void
+decode_output_arg (char const *arg)
+{
+ char *arg_writable = xstrdup (arg);
+ char *s = arg_writable;
+ do
+ {
+ /* find next comma */
+ char *comma = strchr (s, ',');
+
+ /* If we found a comma, put a NUL in its place and advance. */
+ if (comma)
+ *comma++ = 0;
+
+ /* process S. */
+ display_field_t field = -1;
+ for (unsigned int i = 0; i < ARRAY_CARDINALITY (field_data); i++)
+ {
+ if (STREQ (field_data[i].arg, s))
+ {
+ field = i;
+ break;
+ }
+ }
+ if (field == -1)
+ {
+ error (0, 0, _("option --output: field '%s' unknown"), s);
+ usage (EXIT_FAILURE);
+ }
- for (field = 0; field < NFIELDS; field++)
+ if (field_data[field].used)
+ {
+ /* Prevent the fields from being used more than once. */
+ error (0, 0, _("option --output: field '%s' used more than once"),
+ field_data[field].arg);
+ usage (EXIT_FAILURE);
+ }
+
+ switch (field)
+ {
+ case SOURCE_FIELD:
+ case FSTYPE_FIELD:
+ case USED_FIELD:
+ case PCENT_FIELD:
+ case ITOTAL_FIELD:
+ case IUSED_FIELD:
+ case IAVAIL_FIELD:
+ case IPCENT_FIELD:
+ case TARGET_FIELD:
+ alloc_field (field, NULL);
+ break;
+
+ case SIZE_FIELD:
+ alloc_field (field, N_("Size"));
+ break;
+
+ case AVAIL_FIELD:
+ alloc_field (field, N_("Avail"));
+ break;
+
+ default:
+ assert (!"invalid field");
+ }
+ s = comma;
+ }
+ while (s);
+
+ free (arg_writable);
+}
+
+/* Get the appropriate columns for the mode. */
+static void
+get_field_list (void)
+{
+ switch (header_mode)
{
- if (field == TYPE_FIELD && !print_type)
+ case DEFAULT_MODE:
+ alloc_field (SOURCE_FIELD, NULL);
+ if (print_type)
+ alloc_field (FSTYPE_FIELD, NULL);
+ alloc_field (SIZE_FIELD, NULL);
+ alloc_field (USED_FIELD, NULL);
+ alloc_field (AVAIL_FIELD, NULL);
+ alloc_field (PCENT_FIELD, NULL);
+ alloc_field (TARGET_FIELD, NULL);
+ break;
+
+ case HUMAN_MODE:
+ alloc_field (SOURCE_FIELD, NULL);
+ if (print_type)
+ alloc_field (FSTYPE_FIELD, NULL);
+
+ alloc_field (SIZE_FIELD, N_("Size"));
+ alloc_field (USED_FIELD, NULL);
+ alloc_field (AVAIL_FIELD, N_("Avail"));
+ alloc_field (PCENT_FIELD, NULL);
+ alloc_field (TARGET_FIELD, NULL);
+ break;
+
+ case INODES_MODE:
+ alloc_field (SOURCE_FIELD, NULL);
+ if (print_type)
+ alloc_field (FSTYPE_FIELD, NULL);
+ alloc_field (ITOTAL_FIELD, NULL);
+ alloc_field (IUSED_FIELD, NULL);
+ alloc_field (IAVAIL_FIELD, NULL);
+ alloc_field (IPCENT_FIELD, NULL);
+ alloc_field (TARGET_FIELD, NULL);
+ break;
+
+ case POSIX_MODE:
+ alloc_field (SOURCE_FIELD, NULL);
+ if (print_type)
+ alloc_field (FSTYPE_FIELD, NULL);
+ alloc_field (SIZE_FIELD, NULL);
+ alloc_field (USED_FIELD, NULL);
+ alloc_field (AVAIL_FIELD, NULL);
+ alloc_field (PCENT_FIELD, N_("Capacity"));
+ alloc_field (TARGET_FIELD, NULL);
+ break;
+
+ case OUTPUT_MODE:
+ if (!ncolumns)
{
- table[nrows-1][field] = NULL;
- continue;
+ /* Add all fields if --output was given without a field list. */
+ decode_output_arg (all_args_string);
}
+ break;
+ default:
+ assert (!"invalid header_mode");
+ }
+}
+
+/* Obtain the appropriate header entries. */
+
+static void
+get_header (void)
+{
+ size_t col;
+
+ alloc_table_row ();
+
+ for (col = 0; col < ncolumns; col++)
+ {
char *cell = NULL;
- char const *header = _(headers[field][header_mode]);
- if (!header)
- header = _(headers[field][DEFAULT_MODE]);
+ char const *header = _(columns[col]->caption);
- if (header_mode == DEFAULT_MODE && field == TOTAL_FIELD)
+ if (columns[col]->field == SIZE_FIELD
+ && (header_mode == DEFAULT_MODE
+ || (header_mode == OUTPUT_MODE
+ && !(human_output_opts & human_autoscale))))
{
char buf[LONGEST_HUMAN_READABLE + 1];
@@ -297,15 +538,20 @@ get_header (void)
char *num = human_readable (output_block_size, buf, opts, 1, 1);
- if (asprintf (&cell, "%s-%s", num, header) == -1)
+ /* Reset the header back to the default in OUTPUT_MODE. */
+ header = N_("blocks");
+
+ /* TRANSLATORS: this is the "1K-blocks" header in "df" output. */
+ if (asprintf (&cell, _("%s-%s"), num, header) == -1)
cell = NULL;
}
- else if (header_mode == POSIX_MODE && field == TOTAL_FIELD)
+ else if (header_mode == POSIX_MODE && columns[col]->field == SIZE_FIELD)
{
char buf[INT_BUFSIZE_BOUND (uintmax_t)];
char *num = umaxtostr (output_block_size, buf);
- if (asprintf (&cell, "%s-%s", num, header) == -1)
+ /* TRANSLATORS: this is the "1024-blocks" header in "df -P". */
+ if (asprintf (&cell, _("%s-%s"), num, header) == -1)
cell = NULL;
}
else
@@ -314,9 +560,11 @@ get_header (void)
if (!cell)
xalloc_die ();
- table[nrows-1][field] = cell;
+ hide_problematic_chars (cell);
+
+ table[nrows - 1][col] = cell;
- widths[field] = MAX (widths[field], mbswidth (cell, 0));
+ columns[col]->width = MAX (columns[col]->width, mbswidth (cell, 0));
}
}
@@ -350,6 +598,78 @@ excluded_fstype (const char *fstype)
return false;
}
+/* Filter mount list by skipping duplicate entries.
+ In the case of duplicities - based on to the device number - the mount entry
+ with a '/' in its me_devname (i.e. not pseudo name like tmpfs) wins.
+ If both have a real devname (e.g. bind mounts), then that with the shorter
+ me_mountdir wins. */
+
+static void
+filter_mount_list (void)
+{
+ struct mount_entry *me;
+
+ /* Store of already-processed device numbers. */
+ struct devlist *devlist_head = NULL;
+
+ /* Sort all 'wanted' entries into the list devlist_head. */
+ for (me = mount_list; me; me = me->me_next)
+ {
+ struct stat buf;
+ struct devlist *devlist;
+
+ if (-1 == stat (me->me_mountdir, &buf))
+ {
+ ; /* Stat failed - add ME to be able to complain about it later. */
+ }
+ else
+ {
+ /* If the device name is a real path name ... */
+ if (strchr (me->me_devname, '/'))
+ {
+ /* ... try to find its device number in the devlist. */
+ for (devlist = devlist_head; devlist; devlist = devlist->next)
+ if (devlist->dev_num == buf.st_dev)
+ break;
+
+ if (devlist)
+ {
+ /* Let the shorter mountdir win. */
+ if ( !strchr (devlist->me->me_devname, '/')
+ || ( strlen (devlist->me->me_mountdir)
+ > strlen (me->me_mountdir)))
+ {
+ /* FIXME: free ME - the others are also not free()d. */
+ devlist->me = me;
+ }
+ continue; /* ... with the loop over the mount_list. */
+ }
+ }
+ }
+
+ /* Add the device number to the global list devlist. */
+ devlist = xmalloc (sizeof *devlist);
+ devlist->me = me;
+ devlist->dev_num = buf.st_dev;
+ devlist->next = devlist_head;
+ devlist_head = devlist;
+ }
+
+ /* Finally rebuild the mount_list from the devlist. */
+ mount_list = NULL;
+ while (devlist_head)
+ {
+ /* Add the mount entry. */
+ me = devlist_head->me;
+ me->me_next = mount_list;
+ mount_list = me;
+ /* Free devlist entry and advance. */
+ struct devlist *devlist = devlist_head->next;
+ free (devlist_head);
+ devlist_head = devlist;
+ }
+}
+
/* Return true if N is a known integer value. On many file systems,
UINTMAX_MAX represents an unknown value; on AIX, UINTMAX_MAX - 1
represents unknown. Use a rule that works on AIX file systems, and
@@ -387,7 +707,7 @@ df_readable (bool negative, uintmax_t n, char *buf,
#define LOG_EQ(a, b) (!(a) == !(b))
/* Add integral value while using uintmax_t for value part and separate
- negation flag. It adds value of SRC and SRC_NEG to DEST and DEST_NEG.
+ negation flag. It adds value of SRC and SRC_NEG to DEST and DEST_NEG.
The result will be in DEST and DEST_NEG. See df_readable to understand
how the negation flag is used. */
static void
@@ -429,6 +749,65 @@ has_uuid_suffix (char const *s)
&& strspn (s + len - 36, "-0123456789abcdefABCDEF") == 36);
}
+/* Obtain the block values BV and inode values IV
+ from the file system usage FSU. */
+static void
+get_field_values (struct field_values_t *bv,
+ struct field_values_t *iv,
+ const struct fs_usage *fsu)
+{
+ /* Inode values. */
+ iv->input_units = iv->output_units = 1;
+ iv->total = fsu->fsu_files;
+ iv->available = iv->available_to_root = fsu->fsu_ffree;
+ iv->negate_available = false;
+
+ iv->used = UINTMAX_MAX;
+ iv->negate_used = false;
+ if (known_value (iv->total) && known_value (iv->available_to_root))
+ {
+ iv->used = iv->total - iv->available_to_root;
+ iv->negate_used = (iv->total < iv->available_to_root);
+ }
+
+ /* Block values. */
+ bv->input_units = fsu->fsu_blocksize;
+ bv->output_units = output_block_size;
+ bv->total = fsu->fsu_blocks;
+ bv->available = fsu->fsu_bavail;
+ bv->available_to_root = fsu->fsu_bfree;
+ bv->negate_available = (fsu->fsu_bavail_top_bit_set
+ && known_value (fsu->fsu_bavail));
+
+ bv->used = UINTMAX_MAX;
+ bv->negate_used = false;
+ if (known_value (bv->total) && known_value (bv->available_to_root))
+ {
+ bv->used = bv->total - bv->available_to_root;
+ bv->negate_used = (bv->total < bv->available_to_root);
+ }
+}
+
+/* Add block and inode values to grand total. */
+static void
+add_to_grand_total (struct field_values_t *bv, struct field_values_t *iv)
+{
+ if (known_value (iv->total))
+ grand_fsu.fsu_files += iv->total;
+ if (known_value (iv->available))
+ grand_fsu.fsu_ffree += iv->available;
+
+ if (known_value (bv->total))
+ grand_fsu.fsu_blocks += bv->input_units * bv->total;
+ if (known_value (bv->available_to_root))
+ grand_fsu.fsu_bfree += bv->input_units * bv->available_to_root;
+ if (known_value (bv->available))
+ add_uint_with_neg_flag (&grand_fsu.fsu_bavail,
+ &grand_fsu.fsu_bavail_top_bit_set,
+ bv->input_units * bv->available,
+ bv->negate_available);
+}
+
/* Obtain a space listing for the disk device with absolute file name DISK.
If MOUNT_POINT is non-NULL, it is the name of the root of the
file system on DISK.
@@ -451,20 +830,6 @@ get_dev (char const *disk, char const *mount_point,
const struct fs_usage *force_fsu,
bool process_all)
{
- struct fs_usage fsu;
- char buf[LONGEST_HUMAN_READABLE + 2];
- uintmax_t input_units;
- uintmax_t output_units;
- uintmax_t total;
- uintmax_t available;
- bool negate_available;
- uintmax_t available_to_root;
- uintmax_t used;
- bool negate_used;
- double pct = -1;
- char* cell;
- size_t field;
-
if (me_remote && show_local_fs)
return;
@@ -481,6 +846,7 @@ get_dev (char const *disk, char const *mount_point,
if (!stat_file)
stat_file = mount_point ? mount_point : disk;
+ struct fs_usage fsu;
if (force_fsu)
fsu = *force_fsu;
else if (get_fs_usage (stat_file, disk, &fsu))
@@ -493,11 +859,8 @@ get_dev (char const *disk, char const *mount_point,
if (fsu.fsu_blocks == 0 && !show_all_fs && !show_listed_fs)
return;
- if (! file_systems_processed)
- {
- file_systems_processed = true;
- get_header ();
- }
+ if (! force_fsu)
+ file_systems_processed = true;
alloc_table_row ();
@@ -524,145 +887,142 @@ get_dev (char const *disk, char const *mount_point,
if (! fstype)
fstype = "-"; /* unknown */
- if (inode_format)
- {
- input_units = output_units = 1;
- total = fsu.fsu_files;
- available = fsu.fsu_ffree;
- negate_available = false;
- available_to_root = available;
-
- if (known_value (total))
- grand_fsu.fsu_files += total;
- if (known_value (available))
- grand_fsu.fsu_ffree += available;
- }
- else
- {
- input_units = fsu.fsu_blocksize;
- output_units = output_block_size;
- total = fsu.fsu_blocks;
- available = fsu.fsu_bavail;
- negate_available = (fsu.fsu_bavail_top_bit_set
- && known_value (available));
- available_to_root = fsu.fsu_bfree;
-
- if (known_value (total))
- grand_fsu.fsu_blocks += input_units * total;
- if (known_value (available_to_root))
- grand_fsu.fsu_bfree += input_units * available_to_root;
- if (known_value (available))
- add_uint_with_neg_flag (&grand_fsu.fsu_bavail,
- &grand_fsu.fsu_bavail_top_bit_set,
- input_units * available, negate_available);
- }
+ struct field_values_t block_values;
+ struct field_values_t inode_values;
+ get_field_values (&block_values, &inode_values, &fsu);
- used = UINTMAX_MAX;
- negate_used = false;
- if (known_value (total) && known_value (available_to_root))
- {
- used = total - available_to_root;
- negate_used = (total < available_to_root);
- }
+ /* Add to grand total unless processing grand total line. */
+ if (print_grand_total && ! force_fsu)
+ add_to_grand_total (&block_values, &inode_values);
- for (field = 0; field < NFIELDS; field++)
+ size_t col;
+ for (col = 0; col < ncolumns; col++)
{
- switch (field)
+ char buf[LONGEST_HUMAN_READABLE + 2];
+ char *cell;
+
+ struct field_values_t *v;
+ switch (columns[col]->field_type)
+ {
+ case BLOCK_FLD:
+ v = &block_values;
+ break;
+ case INODE_FLD:
+ v = &inode_values;
+ break;
+ case OTHER_FLD:
+ v = NULL;
+ break;
+ default:
+ assert (!"bad field_type");
+ }
+
+ switch (columns[col]->field)
{
- case DEV_FIELD:
- cell = dev_name;
+ case SOURCE_FIELD:
+ cell = xstrdup (dev_name);
break;
- case TYPE_FIELD:
- cell = print_type ? xstrdup (fstype) : NULL;
+ case FSTYPE_FIELD:
+ cell = xstrdup (fstype);
break;
- case TOTAL_FIELD:
- cell = xstrdup (df_readable (false, total, buf,
- input_units, output_units));
+ case SIZE_FIELD:
+ case ITOTAL_FIELD:
+ cell = xstrdup (df_readable (false, v->total, buf,
+ v->input_units, v->output_units));
break;
+
case USED_FIELD:
- cell = xstrdup (df_readable (negate_used, used, buf,
- input_units, output_units));
+ case IUSED_FIELD:
+ cell = xstrdup (df_readable (v->negate_used, v->used, buf,
+ v->input_units, v->output_units));
break;
- case FREE_FIELD:
- cell = xstrdup (df_readable (negate_available, available, buf,
- input_units, output_units));
+
+ case AVAIL_FIELD:
+ case IAVAIL_FIELD:
+ cell = xstrdup (df_readable (v->negate_available, v->available, buf,
+ v->input_units, v->output_units));
break;
case PCENT_FIELD:
- if (! known_value (used) || ! known_value (available))
- ;
- else if (!negate_used
- && used <= TYPE_MAXIMUM (uintmax_t) / 100
- && used + available != 0
- && (used + available < used) == negate_available)
- {
- uintmax_t u100 = used * 100;
- uintmax_t nonroot_total = used + available;
- pct = u100 / nonroot_total + (u100 % nonroot_total != 0);
- }
- else
- {
- /* The calculation cannot be done easily with integer
- arithmetic. Fall back on floating point. This can suffer
- from minor rounding errors, but doing it exactly requires
- multiple precision arithmetic, and it's not worth the
- aggravation. */
- double u = negate_used ? - (double) - used : used;
- double a = negate_available ? - (double) - available : available;
- double nonroot_total = u + a;
- if (nonroot_total)
- {
- long int lipct = pct = u * 100 / nonroot_total;
- double ipct = lipct;
+ case IPCENT_FIELD:
+ {
+ double pct = -1;
+ if (! known_value (v->used) || ! known_value (v->available))
+ ;
+ else if (!v->negate_used
+ && v->used <= TYPE_MAXIMUM (uintmax_t) / 100
+ && v->used + v->available != 0
+ && (v->used + v->available < v->used)
+ == v->negate_available)
+ {
+ uintmax_t u100 = v->used * 100;
+ uintmax_t nonroot_total = v->used + v->available;
+ pct = u100 / nonroot_total + (u100 % nonroot_total != 0);
+ }
+ else
+ {
+ /* The calculation cannot be done easily with integer
+ arithmetic. Fall back on floating point. This can suffer
+ from minor rounding errors, but doing it exactly requires
+ multiple precision arithmetic, and it's not worth the
+ aggravation. */
+ double u = v->negate_used ? - (double) - v->used : v->used;
+ double a = v->negate_available
+ ? - (double) - v->available : v->available;
+ double nonroot_total = u + a;
+ if (nonroot_total)
+ {
+ long int lipct = pct = u * 100 / nonroot_total;
+ double ipct = lipct;
- /* Like 'pct = ceil (dpct);', but avoid ceil so that
- the math library needn't be linked. */
- if (ipct - 1 < pct && pct <= ipct + 1)
- pct = ipct + (ipct < pct);
- }
- }
+ /* Like 'pct = ceil (dpct);', but avoid ceil so that
+ the math library needn't be linked. */
+ if (ipct - 1 < pct && pct <= ipct + 1)
+ pct = ipct + (ipct < pct);
+ }
+ }
- if (0 <= pct)
- {
- if (asprintf (&cell, "%.0f%%", pct) == -1)
- cell = NULL;
- }
- else
- cell = strdup ("-");
+ if (0 <= pct)
+ {
+ if (asprintf (&cell, "%.0f%%", pct) == -1)
+ cell = NULL;
+ }
+ else
+ cell = strdup ("-");
- if (!cell)
- xalloc_die ();
+ if (!cell)
+ xalloc_die ();
- break;
+ break;
+ }
- case MNT_FIELD:
- if (mount_point)
- {
+ case TARGET_FIELD:
#ifdef HIDE_AUTOMOUNT_PREFIX
- /* Don't print the first directory name in MOUNT_POINT if it's an
- artifact of an automounter. This is a bit too aggressive to be
- the default. */
- if (STRNCMP_LIT (mount_point, "/auto/") == 0)
- mount_point += 5;
- else if (STRNCMP_LIT (mount_point, "/tmp_mnt/") == 0)
- mount_point += 8;
+ /* Don't print the first directory name in MOUNT_POINT if it's an
+ artifact of an automounter. This is a bit too aggressive to be
+ the default. */
+ if (STRNCMP_LIT (mount_point, "/auto/") == 0)
+ mount_point += 5;
+ else if (STRNCMP_LIT (mount_point, "/tmp_mnt/") == 0)
+ mount_point += 8;
#endif
- cell = xstrdup (mount_point);
- }
- else
- cell = NULL;
+ cell = xstrdup (mount_point);
break;
default:
assert (!"unhandled field");
}
- if (cell)
- widths[field] = MAX (widths[field], mbswidth (cell, 0));
- table[nrows-1][field] = cell;
+ if (!cell)
+ assert (!"empty cell");
+
+ hide_problematic_chars (cell);
+ columns[col]->width = MAX (columns[col]->width, mbswidth (cell, 0));
+ table[nrows - 1][col] = cell;
}
+ free (dev_name);
}
/* If DISK corresponds to a mount point, show its usage
@@ -746,7 +1106,7 @@ get_point (const char *point, const struct stat *statp)
exit_status = EXIT_FAILURE;
}
- /* So we won't try and fail repeatedly. */
+ /* So we won't try and fail repeatedly. */
me->me_dev = (dev_t) -2;
}
}
@@ -798,19 +1158,22 @@ get_entry (char const *name, struct stat const *statp)
}
/* Show all mounted file systems, except perhaps those that are of
- an unselected type or are empty. */
+ an unselected type or are empty. */
static void
get_all_entries (void)
{
struct mount_entry *me;
+ if (!show_all_fs)
+ filter_mount_list ();
+
for (me = mount_list; me; me = me->me_next)
get_dev (me->me_devname, me->me_mountdir, NULL, me->me_type,
me->me_dummy, me->me_remote, NULL, true);
}
-/* Add FSTYPE to the list of file system types to display. */
+/* Add FSTYPE to the list of file system types to display. */
static void
add_fs_type (const char *fstype)
@@ -823,7 +1186,7 @@ add_fs_type (const char *fstype)
fs_select_list = fsp;
}
-/* Add FSTYPE to the list of file system types to be omitted. */
+/* Add FSTYPE to the list of file system types to be omitted. */
static void
add_excluded_fs_type (const char *fstype)
@@ -847,11 +1210,10 @@ usage (int status)
fputs (_("\
Show information about the file system on which each FILE resides,\n\
or all file systems by default.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-a, --all include dummy file systems\n\
-B, --block-size=SIZE scale sizes by SIZE before printing them. E.g.,\n\
@@ -870,6 +1232,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
\n\
"), stdout);
fputs (_("\
+ --output[=FIELD_LIST] use the output format defined by FIELD_LIST,\n\
+ or print all fields if FIELD_LIST is omitted.\n\
-P, --portability use the POSIX output format\n\
--sync invoke sync before getting usage info\n\
-t, --type=TYPE limit listing to file systems of type TYPE\n\
@@ -881,6 +1245,11 @@ Mandatory arguments to long options are mandatory for short options too.\n\
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_blocksize_note ("DF");
emit_size_note ();
+ fputs (_("\n\
+FIELD_LIST is a comma-separated list of columns to be included. Valid\n\
+field names are: 'source', 'fstype', 'itotal', 'iused', 'iavail', 'ipcent',\n\
+'size', 'used', 'avail', 'pcent' and 'target' (see info page).\n\
+"), stdout);
emit_ancillary_info ();
}
exit (status);
@@ -901,17 +1270,20 @@ main (int argc, char **argv)
fs_select_list = NULL;
fs_exclude_list = NULL;
- inode_format = false;
show_all_fs = false;
show_listed_fs = false;
human_output_opts = -1;
print_type = false;
file_systems_processed = false;
- posix_format = false;
exit_status = EXIT_SUCCESS;
print_grand_total = false;
grand_fsu.fsu_blocksize = 1;
+ /* If true, use the POSIX output format. */
+ bool posix_format = false;
+
+ const char *msg_mut_excl = _("options %s and %s are mutually exclusive");
+
while (true)
{
int oi = -1;
@@ -934,7 +1306,12 @@ main (int argc, char **argv)
}
break;
case 'i':
- inode_format = true;
+ if (header_mode == OUTPUT_MODE)
+ {
+ error (0, 0, msg_mut_excl, "-i", "--output");
+ usage (EXIT_FAILURE);
+ }
+ header_mode = INODES_MODE;
break;
case 'h':
human_output_opts = human_autoscale | human_SI | human_base_1024;
@@ -951,14 +1328,31 @@ main (int argc, char **argv)
case 'l':
show_local_fs = true;
break;
- case 'm': /* obsolescent */
+ case MEGABYTES_OPTION:
+ /* Distinguish between the long and the short option.
+ As we want to remove the long option soon,
+ give a warning when the long form is used. */
+ error (0, 0, "%s%s", _("warning: "),
+ _("long option '--megabytes' is deprecated"
+ " and will soon be removed"));
+ case 'm': /* obsolescent, exists for BSD compatibility */
human_output_opts = 0;
output_block_size = 1024 * 1024;
break;
case 'T':
+ if (header_mode == OUTPUT_MODE)
+ {
+ error (0, 0, msg_mut_excl, "-T", "--output");
+ usage (EXIT_FAILURE);
+ }
print_type = true;
break;
case 'P':
+ if (header_mode == OUTPUT_MODE)
+ {
+ error (0, 0, msg_mut_excl, "-P", "--output");
+ usage (EXIT_FAILURE);
+ }
posix_format = true;
break;
case SYNC_OPTION:
@@ -974,14 +1368,35 @@ main (int argc, char **argv)
add_fs_type (optarg);
break;
- case 'v': /* For SysV compatibility. */
+ case 'v': /* For SysV compatibility. */
/* ignore */
break;
case 'x':
add_excluded_fs_type (optarg);
break;
- case 'c':
+ case OUTPUT_OPTION:
+ if (header_mode == INODES_MODE)
+ {
+ error (0, 0, msg_mut_excl, "-i", "--output");
+ usage (EXIT_FAILURE);
+ }
+ if (posix_format && header_mode == DEFAULT_MODE)
+ {
+ error (0, 0, msg_mut_excl, "-P", "--output");
+ usage (EXIT_FAILURE);
+ }
+ if (print_type)
+ {
+ error (0, 0, msg_mut_excl, "-T", "--output");
+ usage (EXIT_FAILURE);
+ }
+ header_mode = OUTPUT_MODE;
+ if (optarg)
+ decode_output_arg (optarg);
+ break;
+
+ case TOTAL_OPTION:
print_grand_total = true;
break;
@@ -1005,8 +1420,8 @@ main (int argc, char **argv)
&human_output_opts, &output_block_size);
}
- if (inode_format)
- header_mode = INODES_MODE;
+ if (header_mode == INODES_MODE || header_mode == OUTPUT_MODE)
+ ;
else if (human_output_opts & human_autoscale)
header_mode = HUMAN_MODE;
else if (posix_format)
@@ -1064,15 +1479,25 @@ main (int argc, char **argv)
read_file_system_list ((fs_select_list != NULL
|| fs_exclude_list != NULL
|| print_type
+ || field_data[FSTYPE_FIELD].used
|| show_local_fs));
if (mount_list == NULL)
{
/* Couldn't read the table of mounted file systems.
- Fail if df was invoked with no file name arguments;
- Otherwise, merely give a warning and proceed. */
- int status = (optind < argc ? 0 : EXIT_FAILURE);
- const char *warning = (optind < argc ? _("Warning: ") : "");
+ Fail if df was invoked with no file name arguments,
+ or when either of -a, -l, -t or -x is used with file name
+ arguments. Otherwise, merely give a warning and proceed. */
+ int status = 0;
+ if ( ! (optind < argc)
+ || (show_all_fs
+ || show_local_fs
+ || fs_select_list != NULL
+ || fs_exclude_list != NULL))
+ {
+ status = EXIT_FAILURE;
+ }
+ const char *warning = (status == 0 ? _("Warning: ") : "");
error (status, errno, "%s%s", warning,
_("cannot read table of mounted file systems"));
}
@@ -1080,11 +1505,14 @@ main (int argc, char **argv)
if (require_sync)
sync ();
+ get_field_list ();
+ get_header ();
+
if (optind < argc)
{
int i;
- /* Display explicitly requested empty file systems. */
+ /* Display explicitly requested empty file systems. */
show_listed_fs = true;
for (i = optind; i < argc; ++i)
@@ -1094,17 +1522,24 @@ main (int argc, char **argv)
else
get_all_entries ();
- if (print_grand_total)
+ if (file_systems_processed)
{
- if (inode_format)
- grand_fsu.fsu_blocks = 1;
- get_dev ("total", NULL, NULL, NULL, false, false, &grand_fsu, false);
- }
+ if (print_grand_total)
+ get_dev ("total",
+ (field_data[SOURCE_FIELD].used ? "-" : "total"),
+ NULL, NULL, false, false, &grand_fsu, false);
- print_table ();
+ print_table ();
+ }
+ else
+ {
+ /* Print the "no FS processed" diagnostic only if there was no preceding
+ diagnostic, e.g., if all have been excluded. */
+ if (exit_status == EXIT_SUCCESS)
+ error (EXIT_FAILURE, 0, _("no file systems processed"));
+ }
- if (! file_systems_processed)
- error (EXIT_FAILURE, 0, _("no file systems processed"));
+ IF_LINT (free (columns));
exit (exit_status);
}
diff --git a/src/dircolors.c b/src/dircolors.c
index cc68d6fa..5610f083 100644
--- a/src/dircolors.c
+++ b/src/dircolors.c
@@ -1,5 +1,5 @@
/* dircolors - output commands to set the LS_COLOR environment variable
- Copyright (C) 1996-2012 Free Software Foundation, Inc.
+ Copyright (C) 1996-2013 Free Software Foundation, Inc.
Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000 H. Peter Anvin
This program is free software: you can redistribute it and/or modify
diff --git a/src/dircolors.h b/src/dircolors.h
index 5f01f7ee..f243c192 100644
--- a/src/dircolors.h
+++ b/src/dircolors.h
@@ -2,7 +2,7 @@ static char const G_line[] =
{
'#',' ','C','o','n','f','i','g','u','r','a','t','i','o','n',' ','f','i','l','e',' ','f','o','r',' ','d','i','r','c','o','l','o','r','s',',',' ','a',' ','u','t','i','l','i','t','y',' ','t','o',' ','h','e','l','p',' ','y','o','u',' ','s','e','t',' ','t','h','e',0,
'#',' ','L','S','_','C','O','L','O','R','S',' ','e','n','v','i','r','o','n','m','e','n','t',' ','v','a','r','i','a','b','l','e',' ','u','s','e','d',' ','b','y',' ','G','N','U',' ','l','s',' ','w','i','t','h',' ','t','h','e',' ','-','-','c','o','l','o','r',' ','o','p','t','i','o','n','.',0,
- '#',' ','C','o','p','y','r','i','g','h','t',' ','(','C',')',' ','1','9','9','6','-','2','0','1','2',' ','F','r','e','e',' ','S','o','f','t','w','a','r','e',' ','F','o','u','n','d','a','t','i','o','n',',',' ','I','n','c','.',0,
+ '#',' ','C','o','p','y','r','i','g','h','t',' ','(','C',')',' ','1','9','9','6','-','2','0','1','3',' ','F','r','e','e',' ','S','o','f','t','w','a','r','e',' ','F','o','u','n','d','a','t','i','o','n',',',' ','I','n','c','.',0,
'#',' ','C','o','p','y','i','n','g',' ','a','n','d',' ','d','i','s','t','r','i','b','u','t','i','o','n',' ','o','f',' ','t','h','i','s',' ','f','i','l','e',',',' ','w','i','t','h',' ','o','r',' ','w','i','t','h','o','u','t',' ','m','o','d','i','f','i','c','a','t','i','o','n',',',0,
'#',' ','a','r','e',' ','p','e','r','m','i','t','t','e','d',' ','p','r','o','v','i','d','e','d',' ','t','h','e',' ','c','o','p','y','r','i','g','h','t',' ','n','o','t','i','c','e',' ','a','n','d',' ','t','h','i','s',' ','n','o','t','i','c','e',' ','a','r','e',' ','p','r','e','s','e','r','v','e','d','.',0,
'#',' ','T','h','e',' ','k','e','y','w','o','r','d','s',' ','C','O','L','O','R',',',' ','O','P','T','I','O','N','S',',',' ','a','n','d',' ','E','I','G','H','T','B','I','T',' ','(','h','o','n','o','r','e','d',' ','b','y',' ','t','h','e',0,
@@ -51,6 +51,8 @@ static char const G_line[] =
'T','E','R','M',' ','s','c','r','e','e','n','.','E','t','e','r','m',0,
'T','E','R','M',' ','s','c','r','e','e','n','.','r','x','v','t',0,
'T','E','R','M',' ','s','c','r','e','e','n','.','l','i','n','u','x',0,
+ 'T','E','R','M',' ','s','t',0,
+ 'T','E','R','M',' ','s','t','-','2','5','6','c','o','l','o','r',0,
'T','E','R','M',' ','t','e','r','m','i','n','a','t','o','r',0,
'T','E','R','M',' ','v','t','1','0','0',0,
'T','E','R','M',' ','x','t','e','r','m',0,
diff --git a/src/dircolors.hin b/src/dircolors.hin
index 4606d1a2..6dfd1136 100644
--- a/src/dircolors.hin
+++ b/src/dircolors.hin
@@ -1,7 +1,7 @@
# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# Copying and distribution of this file, with or without modification,
# are permitted provided the copyright notice and this notice are preserved.
@@ -52,6 +52,8 @@ TERM screen-w
TERM screen.Eterm
TERM screen.rxvt
TERM screen.linux
+TERM st
+TERM st-256color
TERM terminator
TERM vt100
TERM xterm
diff --git a/src/dirname.c b/src/dirname.c
index ac218d5d..94eec9de 100644
--- a/src/dirname.c
+++ b/src/dirname.c
@@ -1,6 +1,6 @@
/* dirname -- strip suffix from file name
- Copyright (C) 1990-2012 Free Software Foundation, Inc.
+ Copyright (C) 1990-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/du.c b/src/du.c
index 73339412..a80a1770 100644
--- a/src/du.c
+++ b/src/du.c
@@ -1,5 +1,5 @@
/* du -- summarize disk usage
- Copyright (C) 1988-2012 Free Software Foundation, Inc.
+ Copyright (C) 1988-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -35,6 +35,7 @@
#include "exclude.h"
#include "fprintftime.h"
#include "human.h"
+#include "mountlist.h"
#include "quote.h"
#include "quotearg.h"
#include "stat-size.h"
@@ -60,8 +61,12 @@ extern bool fts_debug;
# define FTS_CROSS_CHECK(Fts)
#endif
-/* A set of dev/ino pairs. */
-static struct di_set *di_set;
+/* A set of dev/ino pairs to help identify files and directories
+ whose sizes have already been counted. */
+static struct di_set *di_files;
+
+/* A set containing a dev/ino pair for each local mount point directory. */
+static struct di_set *di_mnt;
/* Keep track of the preceding "level" (depth in hierarchy)
from one call of process_file to the next. */
@@ -142,6 +147,10 @@ static bool opt_separate_dirs = false;
is at level 0, so 'du --max-depth=0' is equivalent to 'du -s'. */
static size_t max_depth = SIZE_MAX;
+/* Only output entries with at least this SIZE if positive,
+ or at most if negative. See --threshold option. */
+static intmax_t opt_threshold = 0;
+
/* Human-readable options for output. */
static int human_output_opts;
@@ -213,6 +222,7 @@ static struct option const long_options[] =
{"separate-dirs", no_argument, NULL, 'S'},
{"summarize", no_argument, NULL, 's'},
{"total", no_argument, NULL, 'c'},
+ {"threshold", required_argument, NULL, 't'},
{"time", optional_argument, NULL, TIME_OPTION},
{"time-style", required_argument, NULL, TIME_STYLE_OPTION},
{GETOPT_HELP_OPTION_DECL},
@@ -263,12 +273,12 @@ Usage: %s [OPTION]... [FILE]...\n\
"), program_name, program_name);
fputs (_("\
Summarize disk usage of each FILE, recursively for directories.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
+ -0, --null end each output line with 0 byte rather than newline\n\
-a, --all write counts for all files, not just directories\n\
--apparent-size print apparent sizes, rather than disk usage; although\
\n\
@@ -284,6 +294,10 @@ Mandatory arguments to long options are mandatory for short options too.\n\
-c, --total produce a grand total\n\
-D, --dereference-args dereference only symlinks that are listed on the\n\
command line\n\
+ -d, --max-depth=N print the total for a directory (or file, with --all)\n\
+ only if it is N or fewer levels below the command\n\
+ line argument; --max-depth=0 is the same as\n\
+ --summarize\n\
"), stdout);
fputs (_("\
--files0-from=F summarize disk usage of the NUL-terminated file\n\
@@ -292,30 +306,22 @@ Mandatory arguments to long options are mandatory for short options too.\n\
-H equivalent to --dereference-args (-D)\n\
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)\
\n\
- --si like -h, but use powers of 1000 not 1024\n\
"), stdout);
fputs (_("\
-k like --block-size=1K\n\
+ -L, --dereference dereference all symbolic links\n\
-l, --count-links count sizes many times if hard linked\n\
-m like --block-size=1M\n\
"), stdout);
fputs (_("\
- -L, --dereference dereference all symbolic links\n\
-P, --no-dereference don't follow any symbolic links (this is the default)\n\
- -0, --null end each output line with 0 byte rather than newline\n\
-S, --separate-dirs do not include size of subdirectories\n\
+ --si like -h, but use powers of 1000 not 1024\n\
-s, --summarize display only a total for each argument\n\
"), stdout);
fputs (_("\
- -x, --one-file-system skip directories on different file systems\n\
- -X, --exclude-from=FILE exclude files that match any pattern in FILE\n\
- --exclude=PATTERN exclude files that match PATTERN\n\
- -d, --max-depth=N print the total for a directory (or file, with --all)\n\
- only if it is N or fewer levels below the command\n\
- line argument; --max-depth=0 is the same as\n\
- --summarize\n\
-"), stdout);
- fputs (_("\
+ -t, --threshold=SIZE exclude entries smaller than SIZE if positive,\n\
+ or entries greater than SIZE if negative\n\
--time show time of the last modification of any file in the\n\
directory, or any of its subdirectories\n\
--time=WORD show time as WORD instead of modification time:\n\
@@ -324,6 +330,11 @@ Mandatory arguments to long options are mandatory for short options too.\n\
full-iso, long-iso, iso, +FORMAT\n\
FORMAT is interpreted like 'date'\n\
"), stdout);
+ fputs (_("\
+ -X, --exclude-from=FILE exclude files that match any pattern in FILE\n\
+ --exclude=PATTERN exclude files that match PATTERN\n\
+ -x, --one-file-system skip directories on different file systems\n\
+"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_blocksize_note ("DU");
@@ -333,11 +344,11 @@ Mandatory arguments to long options are mandatory for short options too.\n\
exit (status);
}
-/* Try to insert the INO/DEV pair into the global table, HTAB.
+/* Try to insert the INO/DEV pair into DI_SET.
Return true if the pair is successfully inserted,
- false if the pair is already in the table. */
+ false if the pair was already there. */
static bool
-hash_ins (ino_t ino, dev_t dev)
+hash_ins (struct di_set *di_set, ino_t ino, dev_t dev)
{
int inserted = di_set_insert (di_set, dev, ino);
if (inserted < 0)
@@ -461,7 +472,7 @@ process_file (FTS *fts, FTSENT *ent)
if (excluded
|| (! opt_count_all
&& (hash_all || (! S_ISDIR (sb->st_mode) && 1 < sb->st_nlink))
- && ! hash_ins (sb->st_ino, sb->st_dev)))
+ && ! hash_ins (di_files, sb->st_ino, sb->st_dev)))
{
/* If ignoring a directory in preorder, skip its children.
Ignore the next fts_read output too, as it's a postorder
@@ -490,7 +501,13 @@ process_file (FTS *fts, FTSENT *ent)
case FTS_DC:
if (cycle_warning_required (fts, ent))
{
- emit_cycle_warning (file);
+ /* If this is a mount point, then diagnose it and avoid
+ the cycle. */
+ if (di_set_lookup (di_mnt, sb->st_dev, sb->st_ino))
+ error (0, 0, _("mount point %s already traversed"),
+ quote (file));
+ else
+ emit_cycle_warning (file);
return false;
}
return true;
@@ -568,8 +585,15 @@ process_file (FTS *fts, FTSENT *ent)
duinfo_add (&tot_dui, &dui);
if ((IS_DIR_TYPE (info) && level <= max_depth)
- || ((opt_all && level <= max_depth) || level == 0))
- print_size (&dui_to_print, file);
+ || (opt_all && level <= max_depth)
+ || level == 0)
+ {
+ /* Print or elide this entry according to the --threshold option. */
+ if (opt_threshold < 0
+ ? dui_to_print.size <= -opt_threshold
+ : dui_to_print.size >= opt_threshold)
+ print_size (&dui_to_print, file);
+ }
return ok;
}
@@ -623,6 +647,38 @@ du_files (char **files, int bit_flags)
return ok;
}
+/* Fill the di_mnt set with local mount point dev/ino pairs. */
+
+static void
+fill_mount_table (void)
+{
+ struct mount_entry *mnt_ent = read_file_system_list (false);
+ while (mnt_ent)
+ {
+ struct mount_entry *mnt_free;
+ if (!mnt_ent->me_remote && !mnt_ent->me_dummy)
+ {
+ struct stat buf;
+ if (!stat (mnt_ent->me_mountdir, &buf))
+ hash_ins (di_mnt, buf.st_ino, buf.st_dev);
+ else
+ {
+ /* Ignore stat failure. False positives are too common.
+ E.g., "Permission denied" on /run/user/<name>/gvfs. */
+ }
+ }
+
+ mnt_free = mnt_ent;
+ mnt_ent = mnt_ent->me_next;
+
+ free (mnt_free->me_devname);
+ free (mnt_free->me_mountdir);
+ if (mnt_free->me_type_malloced)
+ free (mnt_free->me_type);
+ free (mnt_free);
+ }
+}
+
int
main (int argc, char **argv)
{
@@ -660,7 +716,7 @@ main (int argc, char **argv)
while (true)
{
int oi = -1;
- int c = getopt_long (argc, argv, "0abd:chHklmsxB:DLPSX:",
+ int c = getopt_long (argc, argv, "0abd:chHklmst:xB:DLPSX:",
long_options, &oi);
if (c == -1)
break;
@@ -741,6 +797,20 @@ main (int argc, char **argv)
opt_summarize_only = true;
break;
+ case 't':
+ {
+ enum strtol_error e;
+ e = xstrtoimax (optarg, NULL, 0, &opt_threshold, "kKmMGTPEZY0");
+ if (e != LONGINT_OK)
+ xstrtol_fatal (e, oi, c, long_options, optarg);
+ if (opt_threshold == 0 && *optarg == '-')
+ {
+ /* Do not allow -0, as this wouldn't make sense anyway. */
+ error (EXIT_FAILURE, 0, _("invalid --threshold argument '-0'"));
+ }
+ }
+ break;
+
case 'x':
bit_flags |= FTS_XDEV;
break;
@@ -922,8 +992,15 @@ main (int argc, char **argv)
xalloc_die ();
/* Initialize the set of dev,inode pairs. */
- di_set = di_set_alloc ();
- if (!di_set)
+
+ di_mnt = di_set_alloc ();
+ if (!di_mnt)
+ xalloc_die ();
+
+ fill_mount_table ();
+
+ di_files = di_set_alloc ();
+ if (!di_files)
xalloc_die ();
/* If not hashing everything, process_file won't find cycles on its
@@ -1001,7 +1078,8 @@ main (int argc, char **argv)
argv_iter_done:
argv_iter_free (ai);
- di_set_free (di_set);
+ di_set_free (di_files);
+ di_set_free (di_mnt);
if (files_from && (ferror (stdin) || fclose (stdin) != 0) && ok)
error (EXIT_FAILURE, 0, _("error reading %s"), quote (files_from));
diff --git a/src/echo.c b/src/echo.c
index 8c3da597..58e69751 100644
--- a/src/echo.c
+++ b/src/echo.c
@@ -1,5 +1,5 @@
/* echo.c, derived from code echo.c in Bash.
- Copyright (C) 1987-2012 Free Software Foundation, Inc.
+ Copyright (C) 1987-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/env.c b/src/env.c
index 20d5fb8b..c31d1658 100644
--- a/src/env.c
+++ b/src/env.c
@@ -1,5 +1,5 @@
/* env - run a program in a modified environment
- Copyright (C) 1986-2012 Free Software Foundation, Inc.
+ Copyright (C) 1986-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -54,7 +54,11 @@ Usage: %s [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]\n"),
program_name);
fputs (_("\
Set each NAME to VALUE in the environment and run COMMAND.\n\
-\n\
+"), stdout);
+
+ emit_mandatory_arg_note ();
+
+ fputs (_("\
-i, --ignore-environment start with an empty environment\n\
-0, --null end each output line with 0 byte rather than newline\n\
-u, --unset=NAME remove variable from the environment\n\
diff --git a/src/expand.c b/src/expand.c
index 56e5db6f..0b12b025 100644
--- a/src/expand.c
+++ b/src/expand.c
@@ -1,5 +1,5 @@
/* expand - convert tabs to spaces
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -107,11 +107,10 @@ Usage: %s [OPTION]... [FILE]...\n\
fputs (_("\
Convert tabs in each FILE to spaces, writing to standard output.\n\
With no FILE, or when FILE is -, read standard input.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-i, --initial do not convert tabs after non blanks\n\
-t, --tabs=NUMBER have tabs NUMBER characters apart, not 8\n\
diff --git a/src/expr.c b/src/expr.c
index 700e4afd..b4fa808a 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -1,5 +1,5 @@
/* expr -- evaluate expressions.
- Copyright (C) 1986-2012 Free Software Foundation, Inc.
+ Copyright (C) 1986-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/extent-scan.c b/src/extent-scan.c
index 0c25c570..5d25b9aa 100644
--- a/src/extent-scan.c
+++ b/src/extent-scan.c
@@ -1,5 +1,5 @@
/* extent-scan.c -- core functions for scanning extents
- Copyright (C) 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -89,7 +89,7 @@ extern bool
extent_scan_read (struct extent_scan *scan)
{
unsigned int si = 0;
- struct extent_info *last_ei IF_LINT ( = scan->ext_info);
+ struct extent_info *last_ei = scan->ext_info;
while (true)
{
@@ -127,8 +127,14 @@ extent_scan_read (struct extent_scan *scan)
assert (scan->ei_count <= SIZE_MAX - fiemap->fm_mapped_extents);
scan->ei_count += fiemap->fm_mapped_extents;
- scan->ext_info = xnrealloc (scan->ext_info, scan->ei_count,
- sizeof (struct extent_info));
+ {
+ /* last_ei points into a buffer that may be freed via xnrealloc.
+ Record its offset and adjust after allocation. */
+ size_t prev_idx = last_ei - scan->ext_info;
+ scan->ext_info = xnrealloc (scan->ext_info, scan->ei_count,
+ sizeof (struct extent_info));
+ last_ei = scan->ext_info + prev_idx;
+ }
unsigned int i = 0;
for (i = 0; i < fiemap->fm_mapped_extents; i++)
diff --git a/src/extent-scan.h b/src/extent-scan.h
index d3d57457..c2c318c9 100644
--- a/src/extent-scan.h
+++ b/src/extent-scan.h
@@ -1,5 +1,5 @@
/* core functions for efficient reading sparse files
- Copyright (C) 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/extract-magic b/src/extract-magic
index 9601ddd1..98e9d871 100644
--- a/src/extract-magic
+++ b/src/extract-magic
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
# Derive #define directives from specially formatted 'case ...:' statements.
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/src/factor.c b/src/factor.c
index 1d558050..8f1542a2 100644
--- a/src/factor.c
+++ b/src/factor.c
@@ -1,5 +1,5 @@
/* factor -- print prime factors of n.
- Copyright (C) 1986-2012 Free Software Foundation, Inc.
+ Copyright (C) 1986-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,19 +14,84 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-/* Written by Paul Rubin <phr@ocf.berkeley.edu>.
+/* Originally written by Paul Rubin <phr@ocf.berkeley.edu>.
Adapted for GNU, fixed to factor UINT_MAX by Jim Meyering.
Arbitrary-precision code adapted by James Youngman from Torbjörn
Granlund's factorize.c, from GNU MP version 4.2.2.
+ In 2012, the core was rewritten by Torbjörn Granlund and Niels Möller.
+ Contains code from GNU MP. */
+
+/* Efficiently factor numbers that fit in one or two words (word = uintmax_t),
+ or, with GMP, numbers of any size.
+
+ Code organisation:
+
+ There are several variants of many functions, for handling one word, two
+ words, and GMP's mpz_t type. If the one-word variant is called foo, the
+ two-word variant will be foo2, and the one for mpz_t will be mp_foo. In
+ some cases, the plain function variants will handle both one-word and
+ two-word numbers, evidenced by function arguments.
+
+ The factoring code for two words will fall into the code for one word when
+ progress allows that.
+
+ Using GMP is optional. Define HAVE_GMP to make this code include GMP
+ factoring code. The GMP factoring code is based on GMP's demos/factorize.c
+ (last synched 2012-09-07). The GMP-based factoring code will stay in GMP
+ factoring code even if numbers get small enough for using the two-word
+ code.
+
+ Algorithm:
+
+ (1) Perform trial division using a small primes table, but without hardware
+ division since the primes table store inverses modulo the word base.
+ (The GMP variant of this code doesn't make use of the precomputed
+ inverses, but instead relies on GMP for fast divisibility testing.)
+ (2) Check the nature of any non-factored part using Miller-Rabin for
+ detecting composites, and Lucas for detecting primes.
+ (3) Factor any remaining composite part using the Pollard-Brent rho
+ algorithm or the SQUFOF algorithm, checking status of found factors
+ again using Miller-Rabin and Lucas.
+
+ We prefer using Hensel norm in the divisions, not the more familiar
+ Euclidian norm, since the former leads to much faster code. In the
+ Pollard-Brent rho code and the prime testing code, we use Montgomery's
+ trick of multiplying all n-residues by the word base, allowing cheap Hensel
+ reductions mod n.
+
+ Improvements:
+
+ * Use modular inverses also for exact division in the Lucas code, and
+ elsewhere. A problem is to locate the inverses not from an index, but
+ from a prime. We might instead compute the inverse on-the-fly.
+
+ * Tune trial division table size (not forgetting that this is a standalone
+ program where the table will be read from disk for each invocation).
+
+ * Implement less naive powm, using k-ary exponentiation for k = 3 or
+ perhaps k = 4.
+
+ * Try to speed trial division code for single uintmax_t numbers, i.e., the
+ code using DIVBLOCK. It currently runs at 2 cycles per prime (Intel SBR,
+ IBR), 3 cycles per prime (AMD Stars) and 5 cycles per prime (AMD BD) when
+ using gcc 4.6 and 4.7. Some software pipelining should help; 1, 2, and 4
+ respectively cycles ought to be possible.
+
+ * The redcify function could be vastly improved by using (plain Euclidian)
+ pre-inversion (such as GMP's invert_limb) and udiv_qrnnd_preinv (from
+ GMP's gmp-impl.h). The redcify2 function could be vastly improved using
+ similar methoods. These functions currently dominate run time when using
+ the -w option.
*/
#include <config.h>
#include <getopt.h>
-#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
#if HAVE_GMP
# include <gmp.h>
+# if !HAVE_DECL_MPZ_INITS
+# include <stdarg.h>
+# endif
#endif
#include <assert.h>
@@ -40,22 +105,598 @@
/* The official name of this program (e.g., no 'g' prefix). */
#define PROGRAM_NAME "factor"
-#define AUTHORS proper_name ("Paul Rubin")
+#define AUTHORS \
+ proper_name ("Paul Rubin"), \
+ proper_name_utf8 ("Torbjorn Granlund", "Torbj\303\266rn Granlund"), \
+ proper_name_utf8 ("Niels Moller", "Niels M\303\266ller")
/* Token delimiters when reading from a file. */
#define DELIM "\n\t "
-static bool verbose = false;
+#ifndef STAT_SQUFOF
+# define STAT_SQUFOF 0
+#endif
+
+#ifndef USE_LONGLONG_H
+/* With the way we use longlong.h, it's only safe to use
+ when UWtype = UHWtype, as there were various cases
+ (as can be seen in the history for longlong.h) where
+ for example, _LP64 was required to enable W_TYPE_SIZE==64 code,
+ to avoid compile time or run time issues. */
+# if LONG_MAX == INTMAX_MAX
+# define USE_LONGLONG_H 1
+# endif
+#endif
+
+#if USE_LONGLONG_H
+
+/* Make definitions for longlong.h to make it do what it can do for us */
+
+/* bitcount for uintmax_t */
+# if UINTMAX_MAX == UINT32_MAX
+# define W_TYPE_SIZE 32
+# elif UINTMAX_MAX == UINT64_MAX
+# define W_TYPE_SIZE 64
+# elif UINTMAX_MAX == UINT128_MAX
+# define W_TYPE_SIZE 128
+# endif
+
+# define UWtype uintmax_t
+# define UHWtype unsigned long int
+# undef UDWtype
+# if HAVE_ATTRIBUTE_MODE
+typedef unsigned int UQItype __attribute__ ((mode (QI)));
+typedef int SItype __attribute__ ((mode (SI)));
+typedef unsigned int USItype __attribute__ ((mode (SI)));
+typedef int DItype __attribute__ ((mode (DI)));
+typedef unsigned int UDItype __attribute__ ((mode (DI)));
+# else
+typedef unsigned char UQItype;
+typedef long SItype;
+typedef unsigned long int USItype;
+# if HAVE_LONG_LONG_INT
+typedef long long int DItype;
+typedef unsigned long long int UDItype;
+# else /* Assume `long' gives us a wide enough type. Needed for hppa2.0w. */
+typedef long int DItype;
+typedef unsigned long int UDItype;
+# endif
+# endif
+# define LONGLONG_STANDALONE /* Don't require GMP's longlong.h mdep files */
+# define ASSERT(x) /* FIXME make longlong.h really standalone */
+# define __GMP_DECLSPEC /* FIXME make longlong.h really standalone */
+# define __clz_tab factor_clz_tab /* Rename to avoid glibc collision */
+# ifndef __GMP_GNUC_PREREQ
+# define __GMP_GNUC_PREREQ(a,b) 1
+# endif
+
+/* These stub macros are only used in longlong.h in certain system compiler
+ combinations, so ensure usage to avoid -Wunused-macros warnings. */
+# if __GMP_GNUC_PREREQ (1,1) && defined __clz_tab
+ASSERT (1)
+__GMP_DECLSPEC
+# endif
+
+# if _ARCH_PPC
+# define HAVE_HOST_CPU_FAMILY_powerpc 1
+# endif
+# include "longlong.h"
+# ifdef COUNT_LEADING_ZEROS_NEED_CLZ_TAB
+const unsigned char factor_clz_tab[129] =
+{
+ 1,2,3,3,4,4,4,4,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+ 9
+};
+# endif
+
+#else /* not USE_LONGLONG_H */
+
+# define W_TYPE_SIZE (8 * sizeof (uintmax_t))
+# define __ll_B ((uintmax_t) 1 << (W_TYPE_SIZE / 2))
+# define __ll_lowpart(t) ((uintmax_t) (t) & (__ll_B - 1))
+# define __ll_highpart(t) ((uintmax_t) (t) >> (W_TYPE_SIZE / 2))
+
+#endif
+
+#if !defined __clz_tab && !defined UHWtype
+/* Without this seemingly useless conditional, gcc -Wunused-macros
+ warns that each of the two tested macros is unused on Fedora 18.
+ FIXME: this is just an ugly band-aid. Fix it properly. */
+#endif
+
+enum alg_type { ALG_POLLARD_RHO = 1, ALG_SQUFOF = 2 };
+
+static enum alg_type alg;
+
+/* 2*3*5*7*11...*101 is 128 bits, and has 26 prime factors */
+#define MAX_NFACTS 26
+
+enum
+{
+ DEV_DEBUG_OPTION = CHAR_MAX + 1
+};
+
+static struct option const long_options[] =
+{
+ {"-debug", no_argument, NULL, DEV_DEBUG_OPTION},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
+ {NULL, 0, NULL, 0}
+};
+
+struct factors
+{
+ uintmax_t plarge[2]; /* Can have a single large factor */
+ uintmax_t p[MAX_NFACTS];
+ unsigned char e[MAX_NFACTS];
+ unsigned char nfactors;
+};
+
+#if HAVE_GMP
+struct mp_factors
+{
+ mpz_t *p;
+ unsigned long int *e;
+ unsigned long int nfactors;
+};
+#endif
+
+static void factor (uintmax_t, uintmax_t, struct factors *);
+
+#ifndef umul_ppmm
+# define umul_ppmm(w1, w0, u, v) \
+ do { \
+ uintmax_t __x0, __x1, __x2, __x3; \
+ unsigned long int __ul, __vl, __uh, __vh; \
+ uintmax_t __u = (u), __v = (v); \
+ \
+ __ul = __ll_lowpart (__u); \
+ __uh = __ll_highpart (__u); \
+ __vl = __ll_lowpart (__v); \
+ __vh = __ll_highpart (__v); \
+ \
+ __x0 = (uintmax_t) __ul * __vl; \
+ __x1 = (uintmax_t) __ul * __vh; \
+ __x2 = (uintmax_t) __uh * __vl; \
+ __x3 = (uintmax_t) __uh * __vh; \
+ \
+ __x1 += __ll_highpart (__x0);/* this can't give carry */ \
+ __x1 += __x2; /* but this indeed can */ \
+ if (__x1 < __x2) /* did we get it? */ \
+ __x3 += __ll_B; /* yes, add it in the proper pos. */ \
+ \
+ (w1) = __x3 + __ll_highpart (__x1); \
+ (w0) = (__x1 << W_TYPE_SIZE / 2) + __ll_lowpart (__x0); \
+ } while (0)
+#endif
+
+#if !defined udiv_qrnnd || defined UDIV_NEEDS_NORMALIZATION
+/* Define our own, not needing normalization. This function is
+ currently not performance critical, so keep it simple. Similar to
+ the mod macro below. */
+# undef udiv_qrnnd
+# define udiv_qrnnd(q, r, n1, n0, d) \
+ do { \
+ uintmax_t __d1, __d0, __q, __r1, __r0; \
+ \
+ assert ((n1) < (d)); \
+ __d1 = (d); __d0 = 0; \
+ __r1 = (n1); __r0 = (n0); \
+ __q = 0; \
+ for (unsigned int __i = W_TYPE_SIZE; __i > 0; __i--) \
+ { \
+ rsh2 (__d1, __d0, __d1, __d0, 1); \
+ __q <<= 1; \
+ if (ge2 (__r1, __r0, __d1, __d0)) \
+ { \
+ __q++; \
+ sub_ddmmss (__r1, __r0, __r1, __r0, __d1, __d0); \
+ } \
+ } \
+ (r) = __r0; \
+ (q) = __q; \
+ } while (0)
+#endif
+
+#if !defined add_ssaaaa
+# define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ do { \
+ uintmax_t _add_x; \
+ _add_x = (al) + (bl); \
+ (sh) = (ah) + (bh) + (_add_x < (al)); \
+ (sl) = _add_x; \
+ } while (0)
+#endif
+
+#define rsh2(rh, rl, ah, al, cnt) \
+ do { \
+ (rl) = ((ah) << (W_TYPE_SIZE - (cnt))) | ((al) >> (cnt)); \
+ (rh) = (ah) >> (cnt); \
+ } while (0)
+
+#define lsh2(rh, rl, ah, al, cnt) \
+ do { \
+ (rh) = ((ah) << cnt) | ((al) >> (W_TYPE_SIZE - (cnt))); \
+ (rl) = (al) << (cnt); \
+ } while (0)
+
+#define ge2(ah, al, bh, bl) \
+ ((ah) > (bh) || ((ah) == (bh) && (al) >= (bl)))
+
+#define gt2(ah, al, bh, bl) \
+ ((ah) > (bh) || ((ah) == (bh) && (al) > (bl)))
+
+#ifndef sub_ddmmss
+# define sub_ddmmss(rh, rl, ah, al, bh, bl) \
+ do { \
+ uintmax_t _cy; \
+ _cy = (al) < (bl); \
+ (rl) = (al) - (bl); \
+ (rh) = (ah) - (bh) - _cy; \
+ } while (0)
+#endif
+
+#ifndef count_leading_zeros
+# define count_leading_zeros(count, x) do { \
+ uintmax_t __clz_x = (x); \
+ unsigned int __clz_c; \
+ for (__clz_c = 0; \
+ (__clz_x & ((uintmax_t) 0xff << (W_TYPE_SIZE - 8))) == 0; \
+ __clz_c += 8) \
+ __clz_x <<= 8; \
+ for (; (intmax_t)__clz_x >= 0; __clz_c++) \
+ __clz_x <<= 1; \
+ (count) = __clz_c; \
+ } while (0)
+#endif
+
+#ifndef count_trailing_zeros
+# define count_trailing_zeros(count, x) do { \
+ uintmax_t __ctz_x = (x); \
+ unsigned int __ctz_c = 0; \
+ while ((__ctz_x & 1) == 0) \
+ { \
+ __ctz_x >>= 1; \
+ __ctz_c++; \
+ } \
+ (count) = __ctz_c; \
+ } while (0)
+#endif
+
+/* Requires that a < n and b <= n */
+#define submod(r,a,b,n) \
+ do { \
+ uintmax_t _t = - (uintmax_t) (a < b); \
+ (r) = ((n) & _t) + (a) - (b); \
+ } while (0)
+
+#define addmod(r,a,b,n) \
+ submod ((r), (a), ((n) - (b)), (n))
+
+/* Modular two-word addition and subtraction. For performance reasons, the
+ most significant bit of n1 must be clear. The destination variables must be
+ distinct from the mod operand. */
+#define addmod2(r1, r0, a1, a0, b1, b0, n1, n0) \
+ do { \
+ add_ssaaaa ((r1), (r0), (a1), (a0), (b1), (b0)); \
+ if (ge2 ((r1), (r0), (n1), (n0))) \
+ sub_ddmmss ((r1), (r0), (r1), (r0), (n1), (n0)); \
+ } while (0)
+#define submod2(r1, r0, a1, a0, b1, b0, n1, n0) \
+ do { \
+ sub_ddmmss ((r1), (r0), (a1), (a0), (b1), (b0)); \
+ if ((intmax_t) (r1) < 0) \
+ add_ssaaaa ((r1), (r0), (r1), (r0), (n1), (n0)); \
+ } while (0)
+
+#define HIGHBIT_TO_MASK(x) \
+ (((intmax_t)-1 >> 1) < 0 \
+ ? (uintmax_t)((intmax_t)(x) >> (W_TYPE_SIZE - 1)) \
+ : ((x) & ((uintmax_t) 1 << (W_TYPE_SIZE - 1)) \
+ ? UINTMAX_MAX : (uintmax_t) 0))
+
+/* Compute r = a mod d, where r = <*t1,retval>, a = <a1,a0>, d = <d1,d0>.
+ Requires that d1 != 0. */
+static uintmax_t
+mod2 (uintmax_t *r1, uintmax_t a1, uintmax_t a0, uintmax_t d1, uintmax_t d0)
+{
+ int cntd, cnta;
+
+ assert (d1 != 0);
+
+ if (a1 == 0)
+ {
+ *r1 = 0;
+ return a0;
+ }
+
+ count_leading_zeros (cntd, d1);
+ count_leading_zeros (cnta, a1);
+ int cnt = cntd - cnta;
+ lsh2 (d1, d0, d1, d0, cnt);
+ for (int i = 0; i < cnt; i++)
+ {
+ if (ge2 (a1, a0, d1, d0))
+ sub_ddmmss (a1, a0, a1, a0, d1, d0);
+ rsh2 (d1, d0, d1, d0, 1);
+ }
+
+ *r1 = a1;
+ return a0;
+}
+
+static uintmax_t _GL_ATTRIBUTE_CONST
+gcd_odd (uintmax_t a, uintmax_t b)
+{
+ if ( (b & 1) == 0)
+ {
+ uintmax_t t = b;
+ b = a;
+ a = t;
+ }
+ if (a == 0)
+ return b;
+
+ /* Take out least significant one bit, to make room for sign */
+ b >>= 1;
+
+ for (;;)
+ {
+ uintmax_t t;
+ uintmax_t bgta;
+
+ while ((a & 1) == 0)
+ a >>= 1;
+ a >>= 1;
+
+ t = a - b;
+ if (t == 0)
+ return (a << 1) + 1;
+
+ bgta = HIGHBIT_TO_MASK (t);
+
+ /* b <-- min (a, b) */
+ b += (bgta & t);
+
+ /* a <-- |a - b| */
+ a = (t ^ bgta) - bgta;
+ }
+}
+
+static uintmax_t
+gcd2_odd (uintmax_t *r1, uintmax_t a1, uintmax_t a0, uintmax_t b1, uintmax_t b0)
+{
+ while ((a0 & 1) == 0)
+ rsh2 (a1, a0, a1, a0, 1);
+ while ((b0 & 1) == 0)
+ rsh2 (b1, b0, b1, b0, 1);
+
+ for (;;)
+ {
+ if ((b1 | a1) == 0)
+ {
+ *r1 = 0;
+ return gcd_odd (b0, a0);
+ }
+
+ if (gt2 (a1, a0, b1, b0))
+ {
+ sub_ddmmss (a1, a0, a1, a0, b1, b0);
+ do
+ rsh2 (a1, a0, a1, a0, 1);
+ while ((a0 & 1) == 0);
+ }
+ else if (gt2 (b1, b0, a1, a0))
+ {
+ sub_ddmmss (b1, b0, b1, b0, a1, a0);
+ do
+ rsh2 (b1, b0, b1, b0, 1);
+ while ((b0 & 1) == 0);
+ }
+ else
+ break;
+ }
+
+ *r1 = a1;
+ return a0;
+}
+
+static void
+factor_insert_multiplicity (struct factors *factors,
+ uintmax_t prime, unsigned int m)
+{
+ unsigned int nfactors = factors->nfactors;
+ uintmax_t *p = factors->p;
+ unsigned char *e = factors->e;
+
+ /* Locate position for insert new or increment e. */
+ int i;
+ for (i = nfactors - 1; i >= 0; i--)
+ {
+ if (p[i] <= prime)
+ break;
+ }
+
+ if (i < 0 || p[i] != prime)
+ {
+ for (int j = nfactors - 1; j > i; j--)
+ {
+ p[j + 1] = p[j];
+ e[j + 1] = e[j];
+ }
+ p[i + 1] = prime;
+ e[i + 1] = m;
+ factors->nfactors = nfactors + 1;
+ }
+ else
+ {
+ e[i] += m;
+ }
+}
+
+#define factor_insert(f, p) factor_insert_multiplicity (f, p, 1)
+
+static void
+factor_insert_large (struct factors *factors,
+ uintmax_t p1, uintmax_t p0)
+{
+ if (p1 > 0)
+ {
+ assert (factors->plarge[1] == 0);
+ factors->plarge[0] = p0;
+ factors->plarge[1] = p1;
+ }
+ else
+ factor_insert (factors, p0);
+}
#if HAVE_GMP
-static mpz_t *factor = NULL;
-static size_t nfactors_found = 0;
-static size_t nfactors_allocated = 0;
+
+# if !HAVE_DECL_MPZ_INITS
+
+# define mpz_inits(...) mpz_va_init (mpz_init, __VA_ARGS__)
+# define mpz_clears(...) mpz_va_init (mpz_clear, __VA_ARGS__)
static void
-debug (char const *fmt, ...)
+mpz_va_init (void (*mpz_single_init)(mpz_t), ...)
+{
+ va_list ap;
+
+ va_start (ap, mpz_single_init);
+
+ mpz_t *mpz;
+ while ((mpz = va_arg (ap, mpz_t *)))
+ mpz_single_init (*mpz);
+
+ va_end (ap);
+}
+# endif
+
+static void mp_factor (mpz_t, struct mp_factors *);
+
+static void
+mp_factor_init (struct mp_factors *factors)
+{
+ factors->p = NULL;
+ factors->e = NULL;
+ factors->nfactors = 0;
+}
+
+static void
+mp_factor_clear (struct mp_factors *factors)
+{
+ for (unsigned int i = 0; i < factors->nfactors; i++)
+ mpz_clear (factors->p[i]);
+
+ free (factors->p);
+ free (factors->e);
+}
+
+static void
+mp_factor_insert (struct mp_factors *factors, mpz_t prime)
+{
+ unsigned long int nfactors = factors->nfactors;
+ mpz_t *p = factors->p;
+ unsigned long int *e = factors->e;
+ long i;
+
+ /* Locate position for insert new or increment e. */
+ for (i = nfactors - 1; i >= 0; i--)
+ {
+ if (mpz_cmp (p[i], prime) <= 0)
+ break;
+ }
+
+ if (i < 0 || mpz_cmp (p[i], prime) != 0)
+ {
+ p = xrealloc (p, (nfactors + 1) * sizeof p[0]);
+ e = xrealloc (e, (nfactors + 1) * sizeof e[0]);
+
+ mpz_init (p[nfactors]);
+ for (long j = nfactors - 1; j > i; j--)
+ {
+ mpz_set (p[j + 1], p[j]);
+ e[j + 1] = e[j];
+ }
+ mpz_set (p[i + 1], prime);
+ e[i + 1] = 1;
+
+ factors->p = p;
+ factors->e = e;
+ factors->nfactors = nfactors + 1;
+ }
+ else
+ {
+ e[i] += 1;
+ }
+}
+
+static void
+mp_factor_insert_ui (struct mp_factors *factors, unsigned long int prime)
+{
+ mpz_t pz;
+
+ mpz_init_set_ui (pz, prime);
+ mp_factor_insert (factors, pz);
+ mpz_clear (pz);
+}
+#endif /* HAVE_GMP */
+
+
+/* Number of bits in an uintmax_t. */
+enum { W = sizeof (uintmax_t) * CHAR_BIT };
+
+/* Verify that uintmax_t does not have holes in its representation. */
+verify (UINTMAX_MAX >> (W - 1) == 1);
+
+#define P(a,b,c,d) a,
+static const unsigned char primes_diff[] = {
+#include "primes.h"
+0,0,0,0,0,0,0 /* 7 sentinels for 8-way loop */
+};
+#undef P
+
+#define PRIMES_PTAB_ENTRIES \
+ (sizeof (primes_diff) / sizeof (primes_diff[0]) - 8 + 1)
+
+#define P(a,b,c,d) b,
+static const unsigned char primes_diff8[] = {
+#include "primes.h"
+0,0,0,0,0,0,0 /* 7 sentinels for 8-way loop */
+};
+#undef P
+
+struct primes_dtab
+{
+ uintmax_t binv, lim;
+};
+
+#define P(a,b,c,d) {c,d},
+static const struct primes_dtab primes_dtab[] = {
+#include "primes.h"
+{1,0},{1,0},{1,0},{1,0},{1,0},{1,0},{1,0} /* 7 sentinels for 8-way loop */
+};
+#undef P
+
+/* Verify that uintmax_t is not wider than
+ the integers used to generate primes.h. */
+verify (W <= WIDE_UINT_BITS);
+
+/* debugging for developers. Enables devmsg().
+ This flag is used only in the GMP code. */
+static bool dev_debug = false;
+
+/* Like error(0, 0, ...), but without an implicit newline.
+ Also a noop unless the global DEV_DEBUG is set.
+ TODO: Replace with variadic macro in system.h or
+ move to a separate module. */
+static inline void
+devmsg (char const *fmt, ...)
{
- if (verbose)
+ if (dev_debug)
{
va_list ap;
va_start (ap, fmt);
@@ -64,366 +705,1684 @@ debug (char const *fmt, ...)
}
}
+/* Prove primality or run probabilistic tests. */
+static bool flag_prove_primality = true;
+
+/* Number of Miller-Rabin tests to run when not proving primality. */
+#define MR_REPS 25
+
+#ifdef __GNUC__
+# define LIKELY(cond) __builtin_expect ((cond), 1)
+# define UNLIKELY(cond) __builtin_expect ((cond), 0)
+#else
+# define LIKELY(cond) (cond)
+# define UNLIKELY(cond) (cond)
+#endif
+
static void
-emit_factor (mpz_t n)
+factor_insert_refind (struct factors *factors, uintmax_t p, unsigned int i,
+ unsigned int off)
{
- if (nfactors_found == nfactors_allocated)
- factor = X2NREALLOC (factor, &nfactors_allocated);
- mpz_init (factor[nfactors_found]);
- mpz_set (factor[nfactors_found], n);
- ++nfactors_found;
+ for (unsigned int j = 0; j < off; j++)
+ p += primes_diff[i + j];
+ factor_insert (factors, p);
}
-static void
-emit_ul_factor (unsigned long int i)
+/* Trial division with odd primes uses the following trick.
+
+ Let p be an odd prime, and B = 2^{W_TYPE_SIZE}. For simplicity,
+ consider the case t < B (this is the second loop below).
+
+ From our tables we get
+
+ binv = p^{-1} (mod B)
+ lim = floor ( (B-1) / p ).
+
+ First assume that t is a multiple of p, t = q * p. Then 0 <= q <= lim
+ (and all quotients in this range occur for some t).
+
+ Then t = q * p is true also (mod B), and p is invertible we get
+
+ q = t * binv (mod B).
+
+ Next, assume that t is *not* divisible by p. Since multiplication
+ by binv (mod B) is a one-to-one mapping,
+
+ t * binv (mod B) > lim,
+
+ because all the smaller values are already taken.
+
+ This can be summed up by saying that the function
+
+ q(t) = binv * t (mod B)
+
+ is a permutation of the range 0 <= t < B, with the curious property
+ that it maps the multiples of p onto the range 0 <= q <= lim, in
+ order, and the non-multiples of p onto the range lim < q < B.
+ */
+
+static uintmax_t
+factor_using_division (uintmax_t *t1p, uintmax_t t1, uintmax_t t0,
+ struct factors *factors)
{
- mpz_t t;
- mpz_init (t);
- mpz_set_ui (t, i);
- emit_factor (t);
- mpz_clear (t);
+ if (t0 % 2 == 0)
+ {
+ unsigned int cnt;
+
+ if (t0 == 0)
+ {
+ count_trailing_zeros (cnt, t1);
+ t0 = t1 >> cnt;
+ t1 = 0;
+ cnt += W_TYPE_SIZE;
+ }
+ else
+ {
+ count_trailing_zeros (cnt, t0);
+ rsh2 (t1, t0, t1, t0, cnt);
+ }
+
+ factor_insert_multiplicity (factors, 2, cnt);
+ }
+
+ uintmax_t p = 3;
+ unsigned int i;
+ for (i = 0; t1 > 0 && i < PRIMES_PTAB_ENTRIES; i++)
+ {
+ for (;;)
+ {
+ uintmax_t q1, q0, hi, lo ATTRIBUTE_UNUSED;
+
+ q0 = t0 * primes_dtab[i].binv;
+ umul_ppmm (hi, lo, q0, p);
+ if (hi > t1)
+ break;
+ hi = t1 - hi;
+ q1 = hi * primes_dtab[i].binv;
+ if (LIKELY (q1 > primes_dtab[i].lim))
+ break;
+ t1 = q1; t0 = q0;
+ factor_insert (factors, p);
+ }
+ p += primes_diff[i + 1];
+ }
+ if (t1p)
+ *t1p = t1;
+
+#define DIVBLOCK(I) \
+ do { \
+ for (;;) \
+ { \
+ q = t0 * pd[I].binv; \
+ if (LIKELY (q > pd[I].lim)) \
+ break; \
+ t0 = q; \
+ factor_insert_refind (factors, p, i + 1, I); \
+ } \
+ } while (0)
+
+ for (; i < PRIMES_PTAB_ENTRIES; i += 8)
+ {
+ uintmax_t q;
+ const struct primes_dtab *pd = &primes_dtab[i];
+ DIVBLOCK (0);
+ DIVBLOCK (1);
+ DIVBLOCK (2);
+ DIVBLOCK (3);
+ DIVBLOCK (4);
+ DIVBLOCK (5);
+ DIVBLOCK (6);
+ DIVBLOCK (7);
+
+ p += primes_diff8[i];
+ if (p * p > t0)
+ break;
+ }
+
+ return t0;
}
+#if HAVE_GMP
static void
-factor_using_division (mpz_t t, unsigned int limit)
+mp_factor_using_division (mpz_t t, struct mp_factors *factors)
{
- mpz_t q, r;
- unsigned long int f;
- int ai;
- static unsigned int const add[] = {4, 2, 4, 2, 4, 6, 2, 6};
- unsigned int const *addv = add;
- unsigned int failures;
+ mpz_t q;
+ unsigned long int p;
- debug ("[trial division (%u)] ", limit);
+ devmsg ("[trial division] ");
mpz_init (q);
- mpz_init (r);
- f = mpz_scan1 (t, 0);
- mpz_div_2exp (t, t, f);
- while (f)
+ p = mpz_scan1 (t, 0);
+ mpz_div_2exp (t, t, p);
+ while (p)
{
- emit_ul_factor (2);
- --f;
+ mp_factor_insert_ui (factors, 2);
+ --p;
}
- while (true)
+ p = 3;
+ for (unsigned int i = 1; i <= PRIMES_PTAB_ENTRIES;)
{
- mpz_tdiv_qr_ui (q, r, t, 3);
- if (mpz_cmp_ui (r, 0) != 0)
- break;
- mpz_set (t, q);
- emit_ul_factor (3);
+ if (! mpz_divisible_ui_p (t, p))
+ {
+ p += primes_diff[i++];
+ if (mpz_cmp_ui (t, p * p) < 0)
+ break;
+ }
+ else
+ {
+ mpz_tdiv_q_ui (t, t, p);
+ mp_factor_insert_ui (factors, p);
+ }
}
- while (true)
+ mpz_clear (q);
+}
+#endif
+
+/* Entry i contains (2i+1)^(-1) mod 2^8. */
+static const unsigned char binvert_table[128] =
+{
+ 0x01, 0xAB, 0xCD, 0xB7, 0x39, 0xA3, 0xC5, 0xEF,
+ 0xF1, 0x1B, 0x3D, 0xA7, 0x29, 0x13, 0x35, 0xDF,
+ 0xE1, 0x8B, 0xAD, 0x97, 0x19, 0x83, 0xA5, 0xCF,
+ 0xD1, 0xFB, 0x1D, 0x87, 0x09, 0xF3, 0x15, 0xBF,
+ 0xC1, 0x6B, 0x8D, 0x77, 0xF9, 0x63, 0x85, 0xAF,
+ 0xB1, 0xDB, 0xFD, 0x67, 0xE9, 0xD3, 0xF5, 0x9F,
+ 0xA1, 0x4B, 0x6D, 0x57, 0xD9, 0x43, 0x65, 0x8F,
+ 0x91, 0xBB, 0xDD, 0x47, 0xC9, 0xB3, 0xD5, 0x7F,
+ 0x81, 0x2B, 0x4D, 0x37, 0xB9, 0x23, 0x45, 0x6F,
+ 0x71, 0x9B, 0xBD, 0x27, 0xA9, 0x93, 0xB5, 0x5F,
+ 0x61, 0x0B, 0x2D, 0x17, 0x99, 0x03, 0x25, 0x4F,
+ 0x51, 0x7B, 0x9D, 0x07, 0x89, 0x73, 0x95, 0x3F,
+ 0x41, 0xEB, 0x0D, 0xF7, 0x79, 0xE3, 0x05, 0x2F,
+ 0x31, 0x5B, 0x7D, 0xE7, 0x69, 0x53, 0x75, 0x1F,
+ 0x21, 0xCB, 0xED, 0xD7, 0x59, 0xC3, 0xE5, 0x0F,
+ 0x11, 0x3B, 0x5D, 0xC7, 0x49, 0x33, 0x55, 0xFF
+};
+
+/* Compute n^(-1) mod B, using a Newton iteration. */
+#define binv(inv,n) \
+ do { \
+ uintmax_t __n = (n); \
+ uintmax_t __inv; \
+ \
+ __inv = binvert_table[(__n / 2) & 0x7F]; /* 8 */ \
+ if (W_TYPE_SIZE > 8) __inv = 2 * __inv - __inv * __inv * __n; \
+ if (W_TYPE_SIZE > 16) __inv = 2 * __inv - __inv * __inv * __n; \
+ if (W_TYPE_SIZE > 32) __inv = 2 * __inv - __inv * __inv * __n; \
+ \
+ if (W_TYPE_SIZE > 64) \
+ { \
+ int __invbits = 64; \
+ do { \
+ __inv = 2 * __inv - __inv * __inv * __n; \
+ __invbits *= 2; \
+ } while (__invbits < W_TYPE_SIZE); \
+ } \
+ \
+ (inv) = __inv; \
+ } while (0)
+
+/* q = u / d, assuming d|u. */
+#define divexact_21(q1, q0, u1, u0, d) \
+ do { \
+ uintmax_t _di, _q0; \
+ binv (_di, (d)); \
+ _q0 = (u0) * _di; \
+ if ((u1) >= (d)) \
+ { \
+ uintmax_t _p1, _p0 ATTRIBUTE_UNUSED; \
+ umul_ppmm (_p1, _p0, _q0, d); \
+ (q1) = ((u1) - _p1) * _di; \
+ (q0) = _q0; \
+ } \
+ else \
+ { \
+ (q0) = _q0; \
+ (q1) = 0; \
+ } \
+ } while (0)
+
+/* x B (mod n). */
+#define redcify(r_prim, r, n) \
+ do { \
+ uintmax_t _redcify_q ATTRIBUTE_UNUSED; \
+ udiv_qrnnd (_redcify_q, r_prim, r, 0, n); \
+ } while (0)
+
+/* x B^2 (mod n). Requires x > 0, n1 < B/2 */
+#define redcify2(r1, r0, x, n1, n0) \
+ do { \
+ uintmax_t _r1, _r0, _i; \
+ if ((x) < (n1)) \
+ { \
+ _r1 = (x); _r0 = 0; \
+ _i = W_TYPE_SIZE; \
+ } \
+ else \
+ { \
+ _r1 = 0; _r0 = (x); \
+ _i = 2*W_TYPE_SIZE; \
+ } \
+ while (_i-- > 0) \
+ { \
+ lsh2 (_r1, _r0, _r1, _r0, 1); \
+ if (ge2 (_r1, _r0, (n1), (n0))) \
+ sub_ddmmss (_r1, _r0, _r1, _r0, (n1), (n0)); \
+ } \
+ (r1) = _r1; \
+ (r0) = _r0; \
+ } while (0)
+
+/* Modular two-word multiplication, r = a * b mod m, with mi = m^(-1) mod B.
+ Both a and b must be in redc form, the result will be in redc form too. */
+static inline uintmax_t
+mulredc (uintmax_t a, uintmax_t b, uintmax_t m, uintmax_t mi)
+{
+ uintmax_t rh, rl, q, th, tl ATTRIBUTE_UNUSED, xh;
+
+ umul_ppmm (rh, rl, a, b);
+ q = rl * mi;
+ umul_ppmm (th, tl, q, m);
+ xh = rh - th;
+ if (rh < th)
+ xh += m;
+
+ return xh;
+}
+
+/* Modular two-word multiplication, r = a * b mod m, with mi = m^(-1) mod B.
+ Both a and b must be in redc form, the result will be in redc form too.
+ For performance reasons, the most significant bit of m must be clear. */
+static uintmax_t
+mulredc2 (uintmax_t *r1p,
+ uintmax_t a1, uintmax_t a0, uintmax_t b1, uintmax_t b0,
+ uintmax_t m1, uintmax_t m0, uintmax_t mi)
+{
+ uintmax_t r1, r0, q, p1, p0 ATTRIBUTE_UNUSED, t1, t0, s1, s0;
+ mi = -mi;
+ assert ( (a1 >> (W_TYPE_SIZE - 1)) == 0);
+ assert ( (b1 >> (W_TYPE_SIZE - 1)) == 0);
+ assert ( (m1 >> (W_TYPE_SIZE - 1)) == 0);
+
+ /* First compute a0 * <b1, b0> B^{-1}
+ +-----+
+ |a0 b0|
+ +--+--+--+
+ |a0 b1|
+ +--+--+--+
+ |q0 m0|
+ +--+--+--+
+ |q0 m1|
+ -+--+--+--+
+ |r1|r0| 0|
+ +--+--+--+
+ */
+ umul_ppmm (t1, t0, a0, b0);
+ umul_ppmm (r1, r0, a0, b1);
+ q = mi * t0;
+ umul_ppmm (p1, p0, q, m0);
+ umul_ppmm (s1, s0, q, m1);
+ r0 += (t0 != 0); /* Carry */
+ add_ssaaaa (r1, r0, r1, r0, 0, p1);
+ add_ssaaaa (r1, r0, r1, r0, 0, t1);
+ add_ssaaaa (r1, r0, r1, r0, s1, s0);
+
+ /* Next, (a1 * <b1, b0> + <r1, r0> B^{-1}
+ +-----+
+ |a1 b0|
+ +--+--+
+ |r1|r0|
+ +--+--+--+
+ |a1 b1|
+ +--+--+--+
+ |q1 m0|
+ +--+--+--+
+ |q1 m1|
+ -+--+--+--+
+ |r1|r0| 0|
+ +--+--+--+
+ */
+ umul_ppmm (t1, t0, a1, b0);
+ umul_ppmm (s1, s0, a1, b1);
+ add_ssaaaa (t1, t0, t1, t0, 0, r0);
+ q = mi * t0;
+ add_ssaaaa (r1, r0, s1, s0, 0, r1);
+ umul_ppmm (p1, p0, q, m0);
+ umul_ppmm (s1, s0, q, m1);
+ r0 += (t0 != 0); /* Carry */
+ add_ssaaaa (r1, r0, r1, r0, 0, p1);
+ add_ssaaaa (r1, r0, r1, r0, 0, t1);
+ add_ssaaaa (r1, r0, r1, r0, s1, s0);
+
+ if (ge2 (r1, r0, m1, m0))
+ sub_ddmmss (r1, r0, r1, r0, m1, m0);
+
+ *r1p = r1;
+ return r0;
+}
+
+static uintmax_t _GL_ATTRIBUTE_CONST
+powm (uintmax_t b, uintmax_t e, uintmax_t n, uintmax_t ni, uintmax_t one)
+{
+ uintmax_t y = one;
+
+ if (e & 1)
+ y = b;
+
+ while (e != 0)
{
- mpz_tdiv_qr_ui (q, r, t, 5);
- if (mpz_cmp_ui (r, 0) != 0)
- break;
- mpz_set (t, q);
- emit_ul_factor (5);
+ b = mulredc (b, b, n, ni);
+ e >>= 1;
+
+ if (e & 1)
+ y = mulredc (y, b, n, ni);
}
- failures = 0;
- f = 7;
- ai = 0;
- while (mpz_cmp_ui (t, 1) != 0)
+ return y;
+}
+
+static uintmax_t
+powm2 (uintmax_t *r1m,
+ const uintmax_t *bp, const uintmax_t *ep, const uintmax_t *np,
+ uintmax_t ni, const uintmax_t *one)
+{
+ uintmax_t r1, r0, b1, b0, n1, n0;
+ unsigned int i;
+ uintmax_t e;
+
+ b0 = bp[0];
+ b1 = bp[1];
+ n0 = np[0];
+ n1 = np[1];
+
+ r0 = one[0];
+ r1 = one[1];
+
+ for (e = ep[0], i = W_TYPE_SIZE; i > 0; i--, e >>= 1)
{
- mpz_tdiv_qr_ui (q, r, t, f);
- if (mpz_cmp_ui (r, 0) != 0)
+ if (e & 1)
{
- f += addv[ai];
- if (mpz_cmp_ui (q, f) < 0)
- break;
- ai = (ai + 1) & 7;
- failures++;
- if (failures > limit)
- break;
+ r0 = mulredc2 (r1m, r1, r0, b1, b0, n1, n0, ni);
+ r1 = *r1m;
+ }
+ b0 = mulredc2 (r1m, b1, b0, b1, b0, n1, n0, ni);
+ b1 = *r1m;
+ }
+ for (e = ep[1]; e > 0; e >>= 1)
+ {
+ if (e & 1)
+ {
+ r0 = mulredc2 (r1m, r1, r0, b1, b0, n1, n0, ni);
+ r1 = *r1m;
+ }
+ b0 = mulredc2 (r1m, b1, b0, b1, b0, n1, n0, ni);
+ b1 = *r1m;
+ }
+ *r1m = r1;
+ return r0;
+}
+
+static bool _GL_ATTRIBUTE_CONST
+millerrabin (uintmax_t n, uintmax_t ni, uintmax_t b, uintmax_t q,
+ unsigned int k, uintmax_t one)
+{
+ uintmax_t y = powm (b, q, n, ni, one);
+
+ uintmax_t nm1 = n - one; /* -1, but in redc representation. */
+
+ if (y == one || y == nm1)
+ return true;
+
+ for (unsigned int i = 1; i < k; i++)
+ {
+ y = mulredc (y, y, n, ni);
+
+ if (y == nm1)
+ return true;
+ if (y == one)
+ return false;
+ }
+ return false;
+}
+
+static bool
+millerrabin2 (const uintmax_t *np, uintmax_t ni, const uintmax_t *bp,
+ const uintmax_t *qp, unsigned int k, const uintmax_t *one)
+{
+ uintmax_t y1, y0, nm1_1, nm1_0, r1m;
+
+ y0 = powm2 (&r1m, bp, qp, np, ni, one);
+ y1 = r1m;
+
+ if (y0 == one[0] && y1 == one[1])
+ return true;
+
+ sub_ddmmss (nm1_1, nm1_0, np[1], np[0], one[1], one[0]);
+
+ if (y0 == nm1_0 && y1 == nm1_1)
+ return true;
+
+ for (unsigned int i = 1; i < k; i++)
+ {
+ y0 = mulredc2 (&r1m, y1, y0, y1, y0, np[1], np[0], ni);
+ y1 = r1m;
+
+ if (y0 == nm1_0 && y1 == nm1_1)
+ return true;
+ if (y0 == one[0] && y1 == one[1])
+ return false;
+ }
+ return false;
+}
+
+#if HAVE_GMP
+static bool
+mp_millerrabin (mpz_srcptr n, mpz_srcptr nm1, mpz_ptr x, mpz_ptr y,
+ mpz_srcptr q, unsigned long int k)
+{
+ mpz_powm (y, x, q, n);
+
+ if (mpz_cmp_ui (y, 1) == 0 || mpz_cmp (y, nm1) == 0)
+ return true;
+
+ for (unsigned long int i = 1; i < k; i++)
+ {
+ mpz_powm_ui (y, y, 2, n);
+ if (mpz_cmp (y, nm1) == 0)
+ return true;
+ if (mpz_cmp_ui (y, 1) == 0)
+ return false;
+ }
+ return false;
+}
+#endif
+
+/* Lucas' prime test. The number of iterations vary greatly, up to a few dozen
+ have been observed. The average seem to be about 2. */
+static bool
+prime_p (uintmax_t n)
+{
+ int k;
+ bool is_prime;
+ uintmax_t a_prim, one, ni;
+ struct factors factors;
+
+ if (n <= 1)
+ return false;
+
+ /* We have already casted out small primes. */
+ if (n < (uintmax_t) FIRST_OMITTED_PRIME * FIRST_OMITTED_PRIME)
+ return true;
+
+ /* Precomputation for Miller-Rabin. */
+ uintmax_t q = n - 1;
+ for (k = 0; (q & 1) == 0; k++)
+ q >>= 1;
+
+ uintmax_t a = 2;
+ binv (ni, n); /* ni <- 1/n mod B */
+ redcify (one, 1, n);
+ addmod (a_prim, one, one, n); /* i.e., redcify a = 2 */
+
+ /* Perform a Miller-Rabin test, finds most composites quickly. */
+ if (!millerrabin (n, ni, a_prim, q, k, one))
+ return false;
+
+ if (flag_prove_primality)
+ {
+ /* Factor n-1 for Lucas. */
+ factor (0, n - 1, &factors);
+ }
+
+ /* Loop until Lucas proves our number prime, or Miller-Rabin proves our
+ number composite. */
+ for (unsigned int r = 0; r < PRIMES_PTAB_ENTRIES; r++)
+ {
+ if (flag_prove_primality)
+ {
+ is_prime = true;
+ for (unsigned int i = 0; i < factors.nfactors && is_prime; i++)
+ {
+ is_prime
+ = powm (a_prim, (n - 1) / factors.p[i], n, ni, one) != one;
+ }
}
else
{
- mpz_swap (t, q);
- emit_ul_factor (f);
- failures = 0;
+ /* After enough Miller-Rabin runs, be content. */
+ is_prime = (r == MR_REPS - 1);
}
+
+ if (is_prime)
+ return true;
+
+ a += primes_diff[r]; /* Establish new base. */
+
+ /* The following is equivalent to redcify (a_prim, a, n). It runs faster
+ on most processors, since it avoids udiv_qrnnd. If we go down the
+ udiv_qrnnd_preinv path, this code should be replaced. */
+ {
+ uintmax_t s1, s0;
+ umul_ppmm (s1, s0, one, a);
+ if (LIKELY (s1 == 0))
+ a_prim = s0 % n;
+ else
+ {
+ uintmax_t dummy ATTRIBUTE_UNUSED;
+ udiv_qrnnd (dummy, a_prim, s1, s0, n);
+ }
+ }
+
+ if (!millerrabin (n, ni, a_prim, q, k, one))
+ return false;
}
- mpz_clear (q);
- mpz_clear (r);
+ error (0, 0, _("Lucas prime test failure. This should not happen"));
+ abort ();
}
-static void
-factor_using_pollard_rho (mpz_t n, int a_int)
+static bool
+prime2_p (uintmax_t n1, uintmax_t n0)
{
- mpz_t x, x1, y, P;
- mpz_t a;
- mpz_t g;
- mpz_t t1, t2;
- int k, l, c;
+ uintmax_t q[2], nm1[2];
+ uintmax_t a_prim[2];
+ uintmax_t one[2];
+ uintmax_t na[2];
+ uintmax_t ni;
+ unsigned int k;
+ struct factors factors;
+
+ if (n1 == 0)
+ return prime_p (n0);
+
+ nm1[1] = n1 - (n0 == 0);
+ nm1[0] = n0 - 1;
+ if (nm1[0] == 0)
+ {
+ count_trailing_zeros (k, nm1[1]);
- debug ("[pollard-rho (%d)] ", a_int);
+ q[0] = nm1[1] >> k;
+ q[1] = 0;
+ k += W_TYPE_SIZE;
+ }
+ else
+ {
+ count_trailing_zeros (k, nm1[0]);
+ rsh2 (q[1], q[0], nm1[1], nm1[0], k);
+ }
- mpz_init (g);
- mpz_init (t1);
- mpz_init (t2);
+ uintmax_t a = 2;
+ binv (ni, n0);
+ redcify2 (one[1], one[0], 1, n1, n0);
+ addmod2 (a_prim[1], a_prim[0], one[1], one[0], one[1], one[0], n1, n0);
- mpz_init_set_si (a, a_int);
- mpz_init_set_si (y, 2);
- mpz_init_set_si (x, 2);
- mpz_init_set_si (x1, 2);
- k = 1;
- l = 1;
- mpz_init_set_ui (P, 1);
- c = 0;
+ /* FIXME: Use scalars or pointers in arguments? Some consistency needed. */
+ na[0] = n0;
+ na[1] = n1;
- while (mpz_cmp_ui (n, 1) != 0)
+ if (!millerrabin2 (na, ni, a_prim, q, k, one))
+ return false;
+
+ if (flag_prove_primality)
+ {
+ /* Factor n-1 for Lucas. */
+ factor (nm1[1], nm1[0], &factors);
+ }
+
+ /* Loop until Lucas proves our number prime, or Miller-Rabin proves our
+ number composite. */
+ for (unsigned int r = 0; r < PRIMES_PTAB_ENTRIES; r++)
{
-S2:
- mpz_mul (x, x, x); mpz_add (x, x, a); mpz_mod (x, x, n);
+ bool is_prime;
+ uintmax_t e[2], y[2];
- mpz_sub (t1, x1, x); mpz_mul (t2, P, t1); mpz_mod (P, t2, n);
- c++;
- if (c == 20)
+ if (flag_prove_primality)
{
- c = 0;
- mpz_gcd (g, P, n);
- if (mpz_cmp_ui (g, 1) != 0)
- goto S4;
- mpz_set (y, x);
+ is_prime = true;
+ if (factors.plarge[1])
+ {
+ uintmax_t pi;
+ binv (pi, factors.plarge[0]);
+ e[0] = pi * nm1[0];
+ e[1] = 0;
+ y[0] = powm2 (&y[1], a_prim, e, na, ni, one);
+ is_prime = (y[0] != one[0] || y[1] != one[1]);
+ }
+ for (unsigned int i = 0; i < factors.nfactors && is_prime; i++)
+ {
+ /* FIXME: We always have the factor 2. Do we really need to
+ handle it here? We have done the same powering as part
+ of millerrabin. */
+ if (factors.p[i] == 2)
+ rsh2 (e[1], e[0], nm1[1], nm1[0], 1);
+ else
+ divexact_21 (e[1], e[0], nm1[1], nm1[0], factors.p[i]);
+ y[0] = powm2 (&y[1], a_prim, e, na, ni, one);
+ is_prime = (y[0] != one[0] || y[1] != one[1]);
+ }
+ }
+ else
+ {
+ /* After enough Miller-Rabin runs, be content. */
+ is_prime = (r == MR_REPS - 1);
}
- k--;
- if (k > 0)
- goto S2;
+ if (is_prime)
+ return true;
- mpz_gcd (g, P, n);
- if (mpz_cmp_ui (g, 1) != 0)
- goto S4;
+ a += primes_diff[r]; /* Establish new base. */
+ redcify2 (a_prim[1], a_prim[0], a, n1, n0);
- mpz_set (x1, x);
- k = l;
- l = 2 * l;
- unsigned int i;
- for (i = 0; i < k; i++)
+ if (!millerrabin2 (na, ni, a_prim, q, k, one))
+ return false;
+ }
+
+ error (0, 0, _("Lucas prime test failure. This should not happen"));
+ abort ();
+}
+
+#if HAVE_GMP
+static bool
+mp_prime_p (mpz_t n)
+{
+ bool is_prime;
+ mpz_t q, a, nm1, tmp;
+ struct mp_factors factors;
+
+ if (mpz_cmp_ui (n, 1) <= 0)
+ return false;
+
+ /* We have already casted out small primes. */
+ if (mpz_cmp_ui (n, (long) FIRST_OMITTED_PRIME * FIRST_OMITTED_PRIME) < 0)
+ return true;
+
+ mpz_inits (q, a, nm1, tmp, NULL);
+
+ /* Precomputation for Miller-Rabin. */
+ mpz_sub_ui (nm1, n, 1);
+
+ /* Find q and k, where q is odd and n = 1 + 2**k * q. */
+ unsigned long int k = mpz_scan1 (nm1, 0);
+ mpz_tdiv_q_2exp (q, nm1, k);
+
+ mpz_set_ui (a, 2);
+
+ /* Perform a Miller-Rabin test, finds most composites quickly. */
+ if (!mp_millerrabin (n, nm1, a, tmp, q, k))
+ {
+ is_prime = false;
+ goto ret2;
+ }
+
+ if (flag_prove_primality)
+ {
+ /* Factor n-1 for Lucas. */
+ mpz_set (tmp, nm1);
+ mp_factor (tmp, &factors);
+ }
+
+ /* Loop until Lucas proves our number prime, or Miller-Rabin proves our
+ number composite. */
+ for (unsigned int r = 0; r < PRIMES_PTAB_ENTRIES; r++)
+ {
+ if (flag_prove_primality)
+ {
+ is_prime = true;
+ for (unsigned long int i = 0; i < factors.nfactors && is_prime; i++)
+ {
+ mpz_divexact (tmp, nm1, factors.p[i]);
+ mpz_powm (tmp, a, tmp, n);
+ is_prime = mpz_cmp_ui (tmp, 1) != 0;
+ }
+ }
+ else
{
- mpz_mul (x, x, x); mpz_add (x, x, a); mpz_mod (x, x, n);
+ /* After enough Miller-Rabin runs, be content. */
+ is_prime = (r == MR_REPS - 1);
}
- mpz_set (y, x);
- c = 0;
- goto S2;
-S4:
+
+ if (is_prime)
+ goto ret1;
+
+ mpz_add_ui (a, a, primes_diff[r]); /* Establish new base. */
+
+ if (!mp_millerrabin (n, nm1, a, tmp, q, k))
+ {
+ is_prime = false;
+ goto ret1;
+ }
+ }
+
+ error (0, 0, _("Lucas prime test failure. This should not happen"));
+ abort ();
+
+ ret1:
+ if (flag_prove_primality)
+ mp_factor_clear (&factors);
+ ret2:
+ mpz_clears (q, a, nm1, tmp, NULL);
+
+ return is_prime;
+}
+#endif
+
+static void
+factor_using_pollard_rho (uintmax_t n, unsigned long int a,
+ struct factors *factors)
+{
+ uintmax_t x, z, y, P, t, ni, g;
+
+ unsigned long int k = 1;
+ unsigned long int l = 1;
+
+ redcify (P, 1, n);
+ addmod (x, P, P, n); /* i.e., redcify(2) */
+ y = z = x;
+
+ while (n != 1)
+ {
+ assert (a < n);
+
+ binv (ni, n); /* FIXME: when could we use old 'ni' value? */
+
+ for (;;)
+ {
+ do
+ {
+ x = mulredc (x, x, n, ni);
+ addmod (x, x, a, n);
+
+ submod (t, z, x, n);
+ P = mulredc (P, t, n, ni);
+
+ if (k % 32 == 1)
+ {
+ if (gcd_odd (P, n) != 1)
+ goto factor_found;
+ y = x;
+ }
+ }
+ while (--k != 0);
+
+ z = x;
+ k = l;
+ l = 2 * l;
+ for (unsigned long int i = 0; i < k; i++)
+ {
+ x = mulredc (x, x, n, ni);
+ addmod (x, x, a, n);
+ }
+ y = x;
+ }
+
+ factor_found:
do
{
- mpz_mul (y, y, y); mpz_add (y, y, a); mpz_mod (y, y, n);
- mpz_sub (t1, x1, y); mpz_gcd (g, t1, n);
+ y = mulredc (y, y, n, ni);
+ addmod (y, y, a, n);
+
+ submod (t, z, y, n);
+ g = gcd_odd (t, n);
}
- while (mpz_cmp_ui (g, 1) == 0);
+ while (g == 1);
- mpz_div (n, n, g); /* divide by g, before g is overwritten */
+ n = n / g;
+
+ if (!prime_p (g))
+ factor_using_pollard_rho (g, a + 1, factors);
+ else
+ factor_insert (factors, g);
- if (!mpz_probab_prime_p (g, 3))
+ if (prime_p (n))
+ {
+ factor_insert (factors, n);
+ break;
+ }
+
+ x = x % n;
+ z = z % n;
+ y = y % n;
+ }
+}
+
+static void
+factor_using_pollard_rho2 (uintmax_t n1, uintmax_t n0, unsigned long int a,
+ struct factors *factors)
+{
+ uintmax_t x1, x0, z1, z0, y1, y0, P1, P0, t1, t0, ni, g1, g0, r1m;
+
+ unsigned long int k = 1;
+ unsigned long int l = 1;
+
+ redcify2 (P1, P0, 1, n1, n0);
+ addmod2 (x1, x0, P1, P0, P1, P0, n1, n0); /* i.e., redcify(2) */
+ y1 = z1 = x1;
+ y0 = z0 = x0;
+
+ while (n1 != 0 || n0 != 1)
+ {
+ binv (ni, n0);
+
+ for (;;)
{
do
{
- mp_limb_t a_limb;
- mpn_random (&a_limb, (mp_size_t) 1);
- a_int = (int) a_limb;
+ x0 = mulredc2 (&r1m, x1, x0, x1, x0, n1, n0, ni);
+ x1 = r1m;
+ addmod2 (x1, x0, x1, x0, 0, (uintmax_t) a, n1, n0);
+
+ submod2 (t1, t0, z1, z0, x1, x0, n1, n0);
+ P0 = mulredc2 (&r1m, P1, P0, t1, t0, n1, n0, ni);
+ P1 = r1m;
+
+ if (k % 32 == 1)
+ {
+ g0 = gcd2_odd (&g1, P1, P0, n1, n0);
+ if (g1 != 0 || g0 != 1)
+ goto factor_found;
+ y1 = x1; y0 = x0;
+ }
+ }
+ while (--k != 0);
+
+ z1 = x1; z0 = x0;
+ k = l;
+ l = 2 * l;
+ for (unsigned long int i = 0; i < k; i++)
+ {
+ x0 = mulredc2 (&r1m, x1, x0, x1, x0, n1, n0, ni);
+ x1 = r1m;
+ addmod2 (x1, x0, x1, x0, 0, (uintmax_t) a, n1, n0);
}
- while (a_int == -2 || a_int == 0);
+ y1 = x1; y0 = x0;
+ }
+
+ factor_found:
+ do
+ {
+ y0 = mulredc2 (&r1m, y1, y0, y1, y0, n1, n0, ni);
+ y1 = r1m;
+ addmod2 (y1, y0, y1, y0, 0, (uintmax_t) a, n1, n0);
+
+ submod2 (t1, t0, z1, z0, y1, y0, n1, n0);
+ g0 = gcd2_odd (&g1, t1, t0, n1, n0);
+ }
+ while (g1 == 0 && g0 == 1);
+
+ if (g1 == 0)
+ {
+ /* The found factor is one word. */
+ divexact_21 (n1, n0, n1, n0, g0); /* n = n / g */
- debug ("[composite factor--restarting pollard-rho] ");
- factor_using_pollard_rho (g, a_int);
+ if (!prime_p (g0))
+ factor_using_pollard_rho (g0, a + 1, factors);
+ else
+ factor_insert (factors, g0);
}
else
{
- emit_factor (g);
+ /* The found factor is two words. This is highly unlikely, thus hard
+ to trigger. Please be careful before you change this code! */
+ uintmax_t ginv;
+
+ binv (ginv, g0); /* Compute n = n / g. Since the result will */
+ n0 = ginv * n0; /* fit one word, we can compute the quotient */
+ n1 = 0; /* modulo B, ignoring the high divisor word. */
+
+ if (!prime2_p (g1, g0))
+ factor_using_pollard_rho2 (g1, g0, a + 1, factors);
+ else
+ factor_insert_large (factors, g1, g0);
}
- mpz_mod (x, x, n);
- mpz_mod (x1, x1, n);
- mpz_mod (y, y, n);
- if (mpz_probab_prime_p (n, 3))
+
+ if (n1 == 0)
{
- emit_factor (n);
+ if (prime_p (n0))
+ {
+ factor_insert (factors, n0);
+ break;
+ }
+
+ factor_using_pollard_rho (n0, a, factors);
+ return;
+ }
+
+ if (prime2_p (n1, n0))
+ {
+ factor_insert_large (factors, n1, n0);
break;
}
- }
- mpz_clear (g);
- mpz_clear (P);
- mpz_clear (t2);
- mpz_clear (t1);
- mpz_clear (a);
- mpz_clear (x1);
- mpz_clear (x);
- mpz_clear (y);
+ x0 = mod2 (&x1, x1, x0, n1, n0);
+ z0 = mod2 (&z1, z1, z0, n1, n0);
+ y0 = mod2 (&y1, y1, y0, n1, n0);
+ }
}
-#else
-
+#if HAVE_GMP
static void
-debug (char const *fmt ATTRIBUTE_UNUSED, ...)
+mp_factor_using_pollard_rho (mpz_t n, unsigned long int a,
+ struct mp_factors *factors)
{
-}
+ mpz_t x, z, y, P;
+ mpz_t t, t2;
+
+ devmsg ("[pollard-rho (%lu)] ", a);
+
+ mpz_inits (t, t2, NULL);
+ mpz_init_set_si (y, 2);
+ mpz_init_set_si (x, 2);
+ mpz_init_set_si (z, 2);
+ mpz_init_set_ui (P, 1);
+
+ unsigned long long int k = 1;
+ unsigned long long int l = 1;
+
+ while (mpz_cmp_ui (n, 1) != 0)
+ {
+ for (;;)
+ {
+ do
+ {
+ mpz_mul (t, x, x);
+ mpz_mod (x, t, n);
+ mpz_add_ui (x, x, a);
+
+ mpz_sub (t, z, x);
+ mpz_mul (t2, P, t);
+ mpz_mod (P, t2, n);
+
+ if (k % 32 == 1)
+ {
+ mpz_gcd (t, P, n);
+ if (mpz_cmp_ui (t, 1) != 0)
+ goto factor_found;
+ mpz_set (y, x);
+ }
+ }
+ while (--k != 0);
+
+ mpz_set (z, x);
+ k = l;
+ l = 2 * l;
+ for (unsigned long long int i = 0; i < k; i++)
+ {
+ mpz_mul (t, x, x);
+ mpz_mod (x, t, n);
+ mpz_add_ui (x, x, a);
+ }
+ mpz_set (y, x);
+ }
+ factor_found:
+ do
+ {
+ mpz_mul (t, y, y);
+ mpz_mod (y, t, n);
+ mpz_add_ui (y, y, a);
+
+ mpz_sub (t, z, y);
+ mpz_gcd (t, t, n);
+ }
+ while (mpz_cmp_ui (t, 1) == 0);
+
+ mpz_divexact (n, n, t); /* divide by t, before t is overwritten */
+
+ if (!mp_prime_p (t))
+ {
+ devmsg ("[composite factor--restarting pollard-rho] ");
+ mp_factor_using_pollard_rho (t, a + 1, factors);
+ }
+ else
+ {
+ mp_factor_insert (factors, t);
+ }
+
+ if (mp_prime_p (n))
+ {
+ mp_factor_insert (factors, n);
+ break;
+ }
+
+ mpz_mod (x, x, n);
+ mpz_mod (z, z, n);
+ mpz_mod (y, y, n);
+ }
+
+ mpz_clears (P, t2, t, z, x, y, NULL);
+}
#endif
-/* The maximum number of factors, including -1, for negative numbers. */
-#define MAX_N_FACTORS (sizeof (uintmax_t) * CHAR_BIT)
+/* FIXME: Maybe better to use an iteration converging to 1/sqrt(n)? If
+ algorithm is replaced, consider also returning the remainder. */
+static uintmax_t _GL_ATTRIBUTE_CONST
+isqrt (uintmax_t n)
+{
+ uintmax_t x;
+ unsigned c;
+ if (n == 0)
+ return 0;
+
+ count_leading_zeros (c, n);
+
+ /* Make x > sqrt(n). This will be invariant through the loop. */
+ x = (uintmax_t) 1 << ((W_TYPE_SIZE + 1 - c) / 2);
+
+ for (;;)
+ {
+ uintmax_t y = (x + n/x) / 2;
+ if (y >= x)
+ return x;
+
+ x = y;
+ }
+}
+
+static uintmax_t _GL_ATTRIBUTE_CONST
+isqrt2 (uintmax_t nh, uintmax_t nl)
+{
+ unsigned int shift;
+ uintmax_t x;
-/* The trial divisor increment wheel. Use it to skip over divisors that
- are composites of 2, 3, 5, 7, or 11. The part from WHEEL_START up to
- WHEEL_END is reused periodically, while the "lead in" is used to test
- for those primes and to jump onto the wheel. For more information, see
- http://www.utm.edu/research/primes/glossary/WheelFactorization.html */
+ /* Ensures the remainder fits in an uintmax_t. */
+ assert (nh < ((uintmax_t) 1 << (W_TYPE_SIZE - 2)));
-#include "wheel-size.h" /* For the definition of WHEEL_SIZE. */
-static const unsigned char wheel_tab[] =
+ if (nh == 0)
+ return isqrt (nl);
+
+ count_leading_zeros (shift, nh);
+ shift &= ~1;
+
+ /* Make x > sqrt(n) */
+ x = isqrt ( (nh << shift) + (nl >> (W_TYPE_SIZE - shift))) + 1;
+ x <<= (W_TYPE_SIZE - shift) / 2;
+
+ /* Do we need more than one iteration? */
+ for (;;)
+ {
+ uintmax_t r ATTRIBUTE_UNUSED;
+ uintmax_t q, y;
+ udiv_qrnnd (q, r, nh, nl, x);
+ y = (x + q) / 2;
+
+ if (y >= x)
+ {
+ uintmax_t hi, lo;
+ umul_ppmm (hi, lo, x + 1, x + 1);
+ assert (gt2 (hi, lo, nh, nl));
+
+ umul_ppmm (hi, lo, x, x);
+ assert (ge2 (nh, nl, hi, lo));
+ sub_ddmmss (hi, lo, nh, nl, hi, lo);
+ assert (hi == 0);
+
+ return x;
+ }
+
+ x = y;
+ }
+}
+
+/* MAGIC[N] has a bit i set iff i is a quadratic residue mod N. */
+#define MAGIC64 ((uint64_t) 0x0202021202030213ULL)
+#define MAGIC63 ((uint64_t) 0x0402483012450293ULL)
+#define MAGIC65 ((uint64_t) 0x218a019866014613ULL)
+#define MAGIC11 0x23b
+
+/* Return the square root if the input is a square, otherwise 0. */
+static uintmax_t _GL_ATTRIBUTE_CONST
+is_square (uintmax_t x)
+{
+ /* Uses the tests suggested by Cohen. Excludes 99% of the non-squares before
+ computing the square root. */
+ if (((MAGIC64 >> (x & 63)) & 1)
+ && ((MAGIC63 >> (x % 63)) & 1)
+ /* Both 0 and 64 are squares mod (65) */
+ && ((MAGIC65 >> ((x % 65) & 63)) & 1)
+ && ((MAGIC11 >> (x % 11) & 1)))
+ {
+ uintmax_t r = isqrt (x);
+ if (r*r == x)
+ return r;
+ }
+ return 0;
+}
+
+/* invtab[i] = floor(0x10000 / (0x100 + i) */
+static const unsigned short invtab[0x81] =
{
-#include "wheel.h"
+ 0x200,
+ 0x1fc, 0x1f8, 0x1f4, 0x1f0, 0x1ec, 0x1e9, 0x1e5, 0x1e1,
+ 0x1de, 0x1da, 0x1d7, 0x1d4, 0x1d0, 0x1cd, 0x1ca, 0x1c7,
+ 0x1c3, 0x1c0, 0x1bd, 0x1ba, 0x1b7, 0x1b4, 0x1b2, 0x1af,
+ 0x1ac, 0x1a9, 0x1a6, 0x1a4, 0x1a1, 0x19e, 0x19c, 0x199,
+ 0x197, 0x194, 0x192, 0x18f, 0x18d, 0x18a, 0x188, 0x186,
+ 0x183, 0x181, 0x17f, 0x17d, 0x17a, 0x178, 0x176, 0x174,
+ 0x172, 0x170, 0x16e, 0x16c, 0x16a, 0x168, 0x166, 0x164,
+ 0x162, 0x160, 0x15e, 0x15c, 0x15a, 0x158, 0x157, 0x155,
+ 0x153, 0x151, 0x150, 0x14e, 0x14c, 0x14a, 0x149, 0x147,
+ 0x146, 0x144, 0x142, 0x141, 0x13f, 0x13e, 0x13c, 0x13b,
+ 0x139, 0x138, 0x136, 0x135, 0x133, 0x132, 0x130, 0x12f,
+ 0x12e, 0x12c, 0x12b, 0x129, 0x128, 0x127, 0x125, 0x124,
+ 0x123, 0x121, 0x120, 0x11f, 0x11e, 0x11c, 0x11b, 0x11a,
+ 0x119, 0x118, 0x116, 0x115, 0x114, 0x113, 0x112, 0x111,
+ 0x10f, 0x10e, 0x10d, 0x10c, 0x10b, 0x10a, 0x109, 0x108,
+ 0x107, 0x106, 0x105, 0x104, 0x103, 0x102, 0x101, 0x100,
};
-#define WHEEL_START (wheel_tab + WHEEL_SIZE)
-#define WHEEL_END (wheel_tab + ARRAY_CARDINALITY (wheel_tab))
+/* Compute q = [u/d], r = u mod d. Avoids slow hardware division for the case
+ that q < 0x40; here it instead uses a table of (Euclidian) inverses. */
+#define div_smallq(q, r, u, d) \
+ do { \
+ if ((u) / 0x40 < (d)) \
+ { \
+ int _cnt; \
+ uintmax_t _dinv, _mask, _q, _r; \
+ count_leading_zeros (_cnt, (d)); \
+ _r = (u); \
+ if (UNLIKELY (_cnt > (W_TYPE_SIZE - 8))) \
+ { \
+ _dinv = invtab[((d) << (_cnt + 8 - W_TYPE_SIZE)) - 0x80]; \
+ _q = _dinv * _r >> (8 + W_TYPE_SIZE - _cnt); \
+ } \
+ else \
+ { \
+ _dinv = invtab[((d) >> (W_TYPE_SIZE - 8 - _cnt)) - 0x7f]; \
+ _q = _dinv * (_r >> (W_TYPE_SIZE - 3 - _cnt)) >> 11; \
+ } \
+ _r -= _q*(d); \
+ \
+ _mask = -(uintmax_t) (_r >= (d)); \
+ (r) = _r - (_mask & (d)); \
+ (q) = _q - _mask; \
+ assert ( (q) * (d) + (r) == u); \
+ } \
+ else \
+ { \
+ uintmax_t _q = (u) / (d); \
+ (r) = (u) - _q * (d); \
+ (q) = _q; \
+ } \
+ } while (0)
+
+/* Notes: Example N = 22117019. After first phase we find Q1 = 6314, Q
+ = 3025, P = 1737, representing F_{18} = (-6314, 2* 1737, 3025),
+ with 3025 = 55^2.
+
+ Constructing the square root, we get Q1 = 55, Q = 8653, P = 4652,
+ representing G_0 = (-55, 2*4652, 8653).
+
+ In the notation of the paper:
+
+ S_{-1} = 55, S_0 = 8653, R_0 = 4652
+
+ Put
+
+ t_0 = floor([q_0 + R_0] / S0) = 1
+ R_1 = t_0 * S_0 - R_0 = 4001
+ S_1 = S_{-1} +t_0 (R_0 - R_1) = 706
+*/
-/* FIXME: comment */
+/* Multipliers, in order of efficiency:
+ 0.7268 3*5*7*11 = 1155 = 3 (mod 4)
+ 0.7317 3*5*7 = 105 = 1
+ 0.7820 3*5*11 = 165 = 1
+ 0.7872 3*5 = 15 = 3
+ 0.8101 3*7*11 = 231 = 3
+ 0.8155 3*7 = 21 = 1
+ 0.8284 5*7*11 = 385 = 1
+ 0.8339 5*7 = 35 = 3
+ 0.8716 3*11 = 33 = 1
+ 0.8774 3 = 3 = 3
+ 0.8913 5*11 = 55 = 3
+ 0.8972 5 = 5 = 1
+ 0.9233 7*11 = 77 = 1
+ 0.9295 7 = 7 = 3
+ 0.9934 11 = 11 = 3
+*/
+#define QUEUE_SIZE 50
+
+#if STAT_SQUFOF
+# define Q_FREQ_SIZE 50
+/* Element 0 keeps the total */
+static unsigned int q_freq[Q_FREQ_SIZE + 1];
+# define MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
-static size_t
-factor_wheel (uintmax_t n0, size_t max_n_factors, uintmax_t *factors)
+/* Return true on success. Expected to fail only for numbers
+ >= 2^{2*W_TYPE_SIZE - 2}, or close to that limit. */
+static bool
+factor_using_squfof (uintmax_t n1, uintmax_t n0, struct factors *factors)
{
- uintmax_t n = n0, d, q;
- size_t n_factors = 0;
- unsigned char const *w = wheel_tab;
+ /* Uses algorithm and notation from
- if (n <= 1)
- return n_factors;
+ SQUARE FORM FACTORIZATION
+ JASON E. GOWER AND SAMUEL S. WAGSTAFF, JR.
+
+ http://homes.cerias.purdue.edu/~ssw/squfof.pdf
+ */
- /* The exit condition in the following loop is correct because
- any time it is tested one of these 3 conditions holds:
- (1) d divides n
- (2) n is prime
- (3) n is composite but has no factors less than d.
- If (1) or (2) obviously the right thing happens.
- If (3), then since n is composite it is >= d^2. */
+ static const unsigned int multipliers_1[] =
+ { /* = 1 (mod 4) */
+ 105, 165, 21, 385, 33, 5, 77, 1, 0
+ };
+ static const unsigned int multipliers_3[] =
+ { /* = 3 (mod 4) */
+ 1155, 15, 231, 35, 3, 55, 7, 11, 0
+ };
- d = 2;
- do
+ const unsigned int *m;
+
+ struct { uintmax_t Q; uintmax_t P; } queue[QUEUE_SIZE];
+
+ if (n1 >= ((uintmax_t) 1 << (W_TYPE_SIZE - 2)))
+ return false;
+
+ uintmax_t sqrt_n = isqrt2 (n1, n0);
+
+ if (n0 == sqrt_n * sqrt_n)
{
- q = n / d;
- while (n == q * d)
+ uintmax_t p1, p0;
+
+ umul_ppmm (p1, p0, sqrt_n, sqrt_n);
+ assert (p0 == n0);
+
+ if (n1 == p1)
{
- assert (n_factors < max_n_factors);
- factors[n_factors++] = d;
- n = q;
- q = n / d;
+ if (prime_p (sqrt_n))
+ factor_insert_multiplicity (factors, sqrt_n, 2);
+ else
+ {
+ struct factors f;
+
+ f.nfactors = 0;
+ if (!factor_using_squfof (0, sqrt_n, &f))
+ {
+ /* Try pollard rho instead */
+ factor_using_pollard_rho (sqrt_n, 1, &f);
+ }
+ /* Duplicate the new factors */
+ for (unsigned int i = 0; i < f.nfactors; i++)
+ factor_insert_multiplicity (factors, f.p[i], 2*f.e[i]);
+ }
+ return true;
}
- d += *(w++);
- if (w == WHEEL_END)
- w = WHEEL_START;
}
- while (d <= q);
- if (n != 1 || n0 == 1)
+ /* Select multipliers so we always get n * mu = 3 (mod 4) */
+ for (m = (n0 % 4 == 1) ? multipliers_3 : multipliers_1;
+ *m; m++)
{
- assert (n_factors < max_n_factors);
- factors[n_factors++] = n;
- }
+ uintmax_t S, Dh, Dl, Q1, Q, P, L, L1, B;
+ unsigned int i;
+ unsigned int mu = *m;
+ unsigned int qpos = 0;
+
+ assert (mu * n0 % 4 == 3);
+
+ /* In the notation of the paper, with mu * n == 3 (mod 4), we
+ get \Delta = 4 mu * n, and the paper's \mu is 2 mu. As far as
+ I understand it, the necessary bound is 4 \mu^3 < n, or 32
+ mu^3 < n.
+
+ However, this seems insufficient: With n = 37243139 and mu =
+ 105, we get a trivial factor, from the square 38809 = 197^2,
+ without any corresponding Q earlier in the iteration.
- return n_factors;
+ Requiring 64 mu^3 < n seems sufficient. */
+ if (n1 == 0)
+ {
+ if ((uintmax_t) mu*mu*mu >= n0 / 64)
+ continue;
+ }
+ else
+ {
+ if (n1 > ((uintmax_t) 1 << (W_TYPE_SIZE - 2)) / mu)
+ continue;
+ }
+ umul_ppmm (Dh, Dl, n0, mu);
+ Dh += n1 * mu;
+
+ assert (Dl % 4 != 1);
+ assert (Dh < (uintmax_t) 1 << (W_TYPE_SIZE - 2));
+
+ S = isqrt2 (Dh, Dl);
+
+ Q1 = 1;
+ P = S;
+
+ /* Square root remainder fits in one word, so ignore high part. */
+ Q = Dl - P*P;
+ /* FIXME: When can this differ from floor(sqrt(2 sqrt(D)))? */
+ L = isqrt (2*S);
+ B = 2*L;
+ L1 = mu * 2 * L;
+
+ /* The form is (+/- Q1, 2P, -/+ Q), of discriminant 4 (P^2 + Q Q1) =
+ 4 D. */
+
+ for (i = 0; i <= B; i++)
+ {
+ uintmax_t q, P1, t, rem;
+
+ div_smallq (q, rem, S+P, Q);
+ P1 = S - rem; /* P1 = q*Q - P */
+
+#if STAT_SQUFOF
+ assert (q > 0);
+ q_freq[0]++;
+ q_freq[MIN (q, Q_FREQ_SIZE)]++;
+#endif
+
+ if (Q <= L1)
+ {
+ uintmax_t g = Q;
+
+ if ( (Q & 1) == 0)
+ g /= 2;
+
+ g /= gcd_odd (g, mu);
+
+ if (g <= L)
+ {
+ if (qpos >= QUEUE_SIZE)
+ error (EXIT_FAILURE, 0, _("squfof queue overflow"));
+ queue[qpos].Q = g;
+ queue[qpos].P = P % g;
+ qpos++;
+ }
+ }
+
+ /* I think the difference can be either sign, but mod
+ 2^W_TYPE_SIZE arithmetic should be fine. */
+ t = Q1 + q * (P - P1);
+ Q1 = Q;
+ Q = t;
+ P = P1;
+
+ if ( (i & 1) == 0)
+ {
+ uintmax_t r = is_square (Q);
+ if (r)
+ {
+ for (unsigned int j = 0; j < qpos; j++)
+ {
+ if (queue[j].Q == r)
+ {
+ if (r == 1)
+ /* Traversed entire cycle. */
+ goto next_multiplier;
+
+ /* Need the absolute value for divisibility test. */
+ if (P >= queue[j].P)
+ t = P - queue[j].P;
+ else
+ t = queue[j].P - P;
+ if (t % r == 0)
+ {
+ /* Delete entries up to and including entry
+ j, which matched. */
+ memmove (queue, queue + j + 1,
+ (qpos - j - 1) * sizeof (queue[0]));
+ qpos -= (j + 1);
+ }
+ goto next_i;
+ }
+ }
+
+ /* We have found a square form, which should give a
+ factor. */
+ Q1 = r;
+ assert (S >= P); /* What signs are possible? */
+ P += r * ((S - P) / r);
+
+ /* Note: Paper says (N - P*P) / Q1, that seems incorrect
+ for the case D = 2N. */
+ /* Compute Q = (D - P*P) / Q1, but we need double
+ precision. */
+ uintmax_t hi, lo;
+ umul_ppmm (hi, lo, P, P);
+ sub_ddmmss (hi, lo, Dh, Dl, hi, lo);
+ udiv_qrnnd (Q, rem, hi, lo, Q1);
+ assert (rem == 0);
+
+ for (;;)
+ {
+ /* Note: There appears to by a typo in the paper,
+ Step 4a in the algorithm description says q <--
+ floor([S+P]/\hat Q), but looking at the equations
+ in Sec. 3.1, it should be q <-- floor([S+P] / Q).
+ (In this code, \hat Q is Q1). */
+ div_smallq (q, rem, S+P, Q);
+ P1 = S - rem; /* P1 = q*Q - P */
+
+#if STAT_SQUFOF
+ q_freq[0]++;
+ q_freq[MIN (q, Q_FREQ_SIZE)]++;
+#endif
+ if (P == P1)
+ break;
+ t = Q1 + q * (P - P1);
+ Q1 = Q;
+ Q = t;
+ P = P1;
+ }
+
+ if ( (Q & 1) == 0)
+ Q /= 2;
+ Q /= gcd_odd (Q, mu);
+
+ assert (Q > 1 && (n1 || Q < n0));
+
+ if (prime_p (Q))
+ factor_insert (factors, Q);
+ else if (!factor_using_squfof (0, Q, factors))
+ factor_using_pollard_rho (Q, 2, factors);
+
+ divexact_21 (n1, n0, n1, n0, Q);
+
+ if (prime2_p (n1, n0))
+ factor_insert_large (factors, n1, n0);
+ else
+ {
+ if (!factor_using_squfof (n1, n0, factors))
+ {
+ if (n1 == 0)
+ factor_using_pollard_rho (n0, 1, factors);
+ else
+ factor_using_pollard_rho2 (n1, n0, 1, factors);
+ }
+ }
+
+ return true;
+ }
+ }
+ next_i:;
+ }
+ next_multiplier:;
+ }
+ return false;
}
-/* Single-precision factoring */
+/* Compute the prime factors of the 128-bit number (T1,T0), and put the
+ results in FACTORS. Use the algorithm selected by the global ALG. */
static void
-print_factors_single (uintmax_t n)
+factor (uintmax_t t1, uintmax_t t0, struct factors *factors)
{
- uintmax_t factors[MAX_N_FACTORS];
- size_t n_factors = factor_wheel (n, MAX_N_FACTORS, factors);
- size_t i;
- char buf[INT_BUFSIZE_BOUND (uintmax_t)];
+ factors->nfactors = 0;
+ factors->plarge[1] = 0;
- printf ("%s:", umaxtostr (n, buf));
- for (i = 0; i < n_factors; i++)
- printf (" %s", umaxtostr (factors[i], buf));
- putchar ('\n');
+ if (t1 == 0 && t0 < 2)
+ return;
+
+ t0 = factor_using_division (&t1, t1, t0, factors);
+
+ if (t1 == 0 && t0 < 2)
+ return;
+
+ if (prime2_p (t1, t0))
+ factor_insert_large (factors, t1, t0);
+ else
+ {
+ if (alg == ALG_SQUFOF)
+ if (factor_using_squfof (t1, t0, factors))
+ return;
+
+ if (t1 == 0)
+ factor_using_pollard_rho (t0, 1, factors);
+ else
+ factor_using_pollard_rho2 (t1, t0, 1, factors);
+ }
}
#if HAVE_GMP
-static int
-mpcompare (const void *av, const void *bv)
+/* Use Pollard-rho to compute the prime factors of
+ arbitrary-precision T, and put the results in FACTORS. */
+static void
+mp_factor (mpz_t t, struct mp_factors *factors)
{
- mpz_t *const *a = av;
- mpz_t *const *b = bv;
- return mpz_cmp (**a, **b);
+ mp_factor_init (factors);
+
+ if (mpz_sgn (t) != 0)
+ {
+ mp_factor_using_division (t, factors);
+
+ if (mpz_cmp_ui (t, 1) != 0)
+ {
+ devmsg ("[is number prime?] ");
+ if (mp_prime_p (t))
+ mp_factor_insert (factors, t);
+ else
+ mp_factor_using_pollard_rho (t, 1, factors);
+ }
+ }
}
+#endif
-static void
-sort_and_print_factors (void)
+static strtol_error
+strto2uintmax (uintmax_t *hip, uintmax_t *lop, const char *s)
{
- mpz_t **faclist;
- size_t i;
+ unsigned int lo_carry;
+ uintmax_t hi = 0, lo = 0;
- faclist = xcalloc (nfactors_found, sizeof *faclist);
- for (i = 0; i < nfactors_found; ++i)
+ strtol_error err = LONGINT_INVALID;
+
+ /* Skip initial spaces and '+'. */
+ for (;;)
{
- faclist[i] = &factor[i];
+ char c = *s;
+ if (c == ' ')
+ s++;
+ else if (c == '+')
+ {
+ s++;
+ break;
+ }
+ else
+ break;
}
- qsort (faclist, nfactors_found, sizeof *faclist, mpcompare);
- for (i = 0; i < nfactors_found; ++i)
+ /* Initial scan for invalid digits. */
+ const char *p = s;
+ for (;;)
{
- fputc (' ', stdout);
- mpz_out_str (stdout, 10, *faclist[i]);
+ unsigned int c = *p++;
+ if (c == 0)
+ break;
+
+ if (UNLIKELY (!ISDIGIT (c)))
+ {
+ err = LONGINT_INVALID;
+ break;
+ }
+
+ err = LONGINT_OK; /* we've seen at least one valid digit */
}
- putchar ('\n');
- free (faclist);
+
+ for (;err == LONGINT_OK;)
+ {
+ unsigned int c = *s++;
+ if (c == 0)
+ break;
+
+ c -= '0';
+
+ if (UNLIKELY (hi > ~(uintmax_t)0 / 10))
+ {
+ err = LONGINT_OVERFLOW;
+ break;
+ }
+ hi = 10 * hi;
+
+ lo_carry = (lo >> (W_TYPE_SIZE - 3)) + (lo >> (W_TYPE_SIZE - 1));
+ lo_carry += 10 * lo < 2 * lo;
+
+ lo = 10 * lo;
+ lo += c;
+
+ lo_carry += lo < c;
+ hi += lo_carry;
+ if (UNLIKELY (hi < lo_carry))
+ {
+ err = LONGINT_OVERFLOW;
+ break;
+ }
+ }
+
+ *hip = hi;
+ *lop = lo;
+
+ return err;
}
static void
-free_factors (void)
+print_uintmaxes (uintmax_t t1, uintmax_t t0)
{
- size_t i;
+ uintmax_t q, r;
- for (i = 0; i < nfactors_found; ++i)
+ if (t1 == 0)
+ printf ("%"PRIuMAX, t0);
+ else
{
- mpz_clear (factor[i]);
+ /* Use very plain code here since it seems hard to write fast code
+ without assuming a specific word size. */
+ q = t1 / 1000000000;
+ r = t1 % 1000000000;
+ udiv_qrnnd (t0, r, r, t0, 1000000000);
+ print_uintmaxes (q, t0);
+ printf ("%09u", (int) r);
}
- /* Don't actually free factor[] because in the case where we are
- reading numbers from stdin, we may be about to use it again. */
- nfactors_found = 0;
}
-/* Arbitrary-precision factoring */
+/* Single-precision factoring */
static void
-print_factors_multi (mpz_t t)
+print_factors_single (uintmax_t t1, uintmax_t t0)
{
- mpz_out_str (stdout, 10, t);
+ struct factors factors;
+
+ print_uintmaxes (t1, t0);
putchar (':');
- if (mpz_sgn (t) != 0)
- {
- /* Set the trial division limit according to the size of t. */
- size_t n_bits = mpz_sizeinbase (t, 2);
- unsigned int division_limit = MIN (n_bits, 1000);
- division_limit *= division_limit;
+ factor (t1, t0, &factors);
- factor_using_division (t, division_limit);
+ for (unsigned int j = 0; j < factors.nfactors; j++)
+ for (unsigned int k = 0; k < factors.e[j]; k++)
+ {
+ char buf[INT_BUFSIZE_BOUND (uintmax_t)];
+ putchar (' ');
+ fputs (umaxtostr (factors.p[j], buf), stdout);
+ }
- if (mpz_cmp_ui (t, 1) != 0)
- {
- debug ("[is number prime?] ");
- if (mpz_probab_prime_p (t, 3))
- emit_factor (t);
- else
- factor_using_pollard_rho (t, 1);
- }
+ if (factors.plarge[1])
+ {
+ putchar (' ');
+ print_uintmaxes (factors.plarge[1], factors.plarge[0]);
}
-
- mpz_clear (t);
- sort_and_print_factors ();
- free_factors ();
+ putchar ('\n');
}
-#endif
-
/* Emit the factors of the indicated number. If we have the option of using
either algorithm, we select on the basis of the length of the number.
@@ -431,58 +2390,59 @@ print_factors_multi (mpz_t t)
has enough digits, because the algorithm is better. The turnover point
depends on the value. */
static bool
-print_factors (char const *s)
+print_factors (const char *input)
{
- uintmax_t n;
- strtol_error err = xstrtoumax (s, NULL, 10, &n, "");
+ uintmax_t t1, t0;
-#if HAVE_GMP
- enum { GMP_TURNOVER_POINT = 100000 };
+ /* Try converting the number to one or two words. If it fails, use GMP or
+ print an error message. The 2nd condition checks that the most
+ significant bit of the two-word number is clear, in a typesize neutral
+ way. */
+ strtol_error err = strto2uintmax (&t1, &t0, input);
- if (err == LONGINT_OVERFLOW
- || (err == LONGINT_OK && GMP_TURNOVER_POINT <= n))
+ switch (err)
{
- mpz_t t;
- mpz_init (t);
- if (gmp_sscanf (s, "%Zd", t) == 1)
+ case LONGINT_OK:
+ if (((t1 << 1) >> 1) == t1)
{
- debug ("[%s]", _("using arbitrary-precision arithmetic"));
- print_factors_multi (t);
+ devmsg ("[using single-precision arithmetic] ");
+ print_factors_single (t1, t0);
return true;
}
- err = LONGINT_INVALID;
- }
-#endif
-
- switch (err)
- {
- case LONGINT_OK:
- debug ("[%s]", _("using single-precision arithmetic"));
- print_factors_single (n);
- return true;
+ break;
case LONGINT_OVERFLOW:
- error (0, 0, _("%s is too large"), quote (s));
- return false;
+ /* Try GMP. */
+ break;
default:
- error (0, 0, _("%s is not a valid positive integer"), quote (s));
+ error (0, 0, _("%s is not a valid positive integer"), quote (input));
return false;
}
-}
-enum
-{
- VERBOSE_OPTION = CHAR_MAX + 1
-};
+#if HAVE_GMP
+ devmsg ("[using arbitrary-precision arithmetic] ");
+ mpz_t t;
+ struct mp_factors factors;
-static struct option const long_options[] =
-{
- {"verbose", no_argument, NULL, VERBOSE_OPTION},
- {GETOPT_HELP_OPTION_DECL},
- {GETOPT_VERSION_OPTION_DECL},
- {NULL, 0, NULL, 0}
-};
+ mpz_init_set_str (t, input, 10);
+
+ gmp_printf ("%Zd:", t);
+ mp_factor (t, &factors);
+
+ for (unsigned int j = 0; j < factors.nfactors; j++)
+ for (unsigned int k = 0; k < factors.e[j]; k++)
+ gmp_printf (" %Zd", factors.p[j]);
+
+ mp_factor_clear (&factors);
+ mpz_clear (t);
+ putchar ('\n');
+ return true;
+#else
+ error (0, 0, _("%s is too large"), quote (input));
+ return false;
+#endif
+}
void
usage (int status)
@@ -532,9 +2492,6 @@ do_stdin (void)
int
main (int argc, char **argv)
{
- bool ok;
- int c;
-
initialize_main (&argc, &argv);
set_program_name (argv[0]);
setlocale (LC_ALL, "");
@@ -543,12 +2500,23 @@ main (int argc, char **argv)
atexit (close_stdout);
+ alg = ALG_POLLARD_RHO; /* Default to Pollard rho */
+
+ int c;
while ((c = getopt_long (argc, argv, "", long_options, NULL)) != -1)
{
switch (c)
{
- case VERBOSE_OPTION:
- verbose = true;
+ case DEV_DEBUG_OPTION:
+ dev_debug = true;
+ break;
+
+ case 's':
+ alg = ALG_SQUFOF;
+ break;
+
+ case 'w':
+ flag_prove_primality = false;
break;
case_GETOPT_HELP_CHAR;
@@ -560,18 +2528,36 @@ main (int argc, char **argv)
}
}
+#if STAT_SQUFOF
+ if (alg == ALG_SQUFOF)
+ memset (q_freq, 0, sizeof (q_freq));
+#endif
+
+ bool ok;
if (argc <= optind)
ok = do_stdin ();
else
{
- int i;
ok = true;
- for (i = optind; i < argc; i++)
+ for (int i = optind; i < argc; i++)
if (! print_factors (argv[i]))
ok = false;
}
-#if HAVE_GMP
- free (factor);
+
+#if STAT_SQUFOF
+ if (alg == ALG_SQUFOF && q_freq[0] > 0)
+ {
+ double acc_f;
+ printf ("q freq. cum. freq.(total: %d)\n", q_freq[0]);
+ for (unsigned int i = 1, acc_f = 0.0; i <= Q_FREQ_SIZE; i++)
+ {
+ double f = (double) q_freq[i] / q_freq[0];
+ acc_f += f;
+ printf ("%s%d %.2f%% %.2f%%\n", i == Q_FREQ_SIZE ? ">=" : "", i,
+ 100.0 * f, 100.0 * acc_f);
+ }
+ }
#endif
+
exit (ok ? EXIT_SUCCESS : EXIT_FAILURE);
}
diff --git a/src/find-mount-point.c b/src/find-mount-point.c
index 28735e99..662e46fc 100644
--- a/src/find-mount-point.c
+++ b/src/find-mount-point.c
@@ -1,5 +1,5 @@
/* find-mount-point.c -- find the root mount point for a file.
- Copyright (C) 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/find-mount-point.h b/src/find-mount-point.h
index cf501590..52213db7 100644
--- a/src/find-mount-point.h
+++ b/src/find-mount-point.h
@@ -1,5 +1,5 @@
/* find-mount-point.h -- find the root mount point for a file.
- Copyright (C) 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/fmt.c b/src/fmt.c
index 308b6455..d3f53690 100644
--- a/src/fmt.c
+++ b/src/fmt.c
@@ -1,5 +1,5 @@
/* GNU fmt -- simple text formatter.
- Copyright (C) 1994-2012 Free Software Foundation, Inc.
+ Copyright (C) 1994-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <sys/types.h>
#include <getopt.h>
+#include <assert.h>
/* Redefine. Otherwise, systems (Unicos for one) with headers that define
it to be a type get syntax errors for the variable declaration below. */
@@ -270,11 +271,10 @@ usage (int status)
fputs (_("\
Reformat each paragraph in the FILE(s), writing to standard output.\n\
The option -WIDTH is an abbreviated form of --width=DIGITS.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-c, --crown-margin preserve indentation of first two lines\n\
-p, --prefix=STRING reformat only lines beginning with STRING,\n\
@@ -282,6 +282,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
-s, --split-only split long lines, but do not refill\n\
"),
stdout);
+ /* Tell xgettext that the "% o" below is not a printf-style
+ format string: xgettext:no-c-format */
fputs (_("\
-t, --tagged-paragraph indentation of first line different from second\n\
-u, --uniform-spacing one space between words, two after sentences\n\
@@ -610,6 +612,11 @@ get_paragraph (FILE *f)
while (same_para (c) && in_column == other_indent)
c = get_line (f, c);
}
+
+ /* Tell static analysis tools that using word_limit[-1] is ok.
+ word_limit is guaranteed to have been incremented by get_line. */
+ assert (word < word_limit);
+
(word_limit - 1)->period = (word_limit - 1)->final = true;
next_char = c;
return true;
diff --git a/src/fold.c b/src/fold.c
index d2291503..e2358651 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -1,5 +1,5 @@
/* fold -- wrap each input line to fit in specified width.
- Copyright (C) 1991-2012 Free Software Foundation, Inc.
+ Copyright (C) 1991-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -70,11 +70,10 @@ Usage: %s [OPTION]... [FILE]...\n\
fputs (_("\
Wrap input lines in each FILE (standard input by default), writing to\n\
standard output.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-b, --bytes count bytes rather than columns\n\
-s, --spaces break at spaces\n\
diff --git a/src/fs-is-local.h b/src/fs-is-local.h
index aba1607f..f44f1e72 100644
--- a/src/fs-is-local.h
+++ b/src/fs-is-local.h
@@ -10,12 +10,14 @@ is_local_fs_type (unsigned long int magic)
case S_MAGIC_AFFS: return 1;
case S_MAGIC_AFS: return 0;
case S_MAGIC_ANON_INODE_FS: return 1;
+ case S_MAGIC_AUFS: return 0;
case S_MAGIC_AUTOFS: return 1;
case S_MAGIC_BEFS: return 1;
case S_MAGIC_BDEVFS: return 1;
case S_MAGIC_BFS: return 1;
case S_MAGIC_BINFMTFS: return 1;
case S_MAGIC_BTRFS: return 1;
+ case S_MAGIC_CEPH: return 0;
case S_MAGIC_CGROUP: return 1;
case S_MAGIC_CIFS: return 0;
case S_MAGIC_CODA: return 0;
@@ -64,6 +66,7 @@ is_local_fs_type (unsigned long int magic)
case S_MAGIC_NTFS: return 1;
case S_MAGIC_OPENPROM: return 1;
case S_MAGIC_OCFS2: return 0;
+ case S_MAGIC_PANFS: return 0;
case S_MAGIC_PIPEFS: return 0;
case S_MAGIC_PROC: return 1;
case S_MAGIC_PSTOREFS: return 1;
@@ -87,11 +90,14 @@ is_local_fs_type (unsigned long int magic)
case S_MAGIC_UFS_BYTESWAPPED: return 1;
case S_MAGIC_USBDEVFS: return 1;
case S_MAGIC_V9FS: return 1;
+ case S_MAGIC_VMHGFS: return 0;
case S_MAGIC_VXFS: return 1;
+ case S_MAGIC_VZFS: return 1;
case S_MAGIC_XENFS: return 1;
case S_MAGIC_XENIX: return 1;
case S_MAGIC_XFS: return 1;
case S_MAGIC_XIAFS: return 1;
+ case S_MAGIC_ZFS: return 1;
default: return -1;
}
}
diff --git a/src/fs.h b/src/fs.h
index ee845335..721f1516 100644
--- a/src/fs.h
+++ b/src/fs.h
@@ -1,18 +1,20 @@
/* Define the magic numbers as given by statfs(2).
Please send additions to bug-coreutils@gnu.org and meskes@debian.org.
- This file is generated automatically from ./stat.c. */
+ This file is generated automatically from ./src/stat.c. */
#if defined __linux__
# define S_MAGIC_ADFS 0xADF5
# define S_MAGIC_AFFS 0xADFF
# define S_MAGIC_AFS 0x5346414F
# define S_MAGIC_ANON_INODE_FS 0x09041934
+# define S_MAGIC_AUFS 0x61756673
# define S_MAGIC_AUTOFS 0x0187
# define S_MAGIC_BEFS 0x42465331
# define S_MAGIC_BDEVFS 0x62646576
# define S_MAGIC_BFS 0x1BADFACE
# define S_MAGIC_BINFMTFS 0x42494E4D
# define S_MAGIC_BTRFS 0x9123683E
+# define S_MAGIC_CEPH 0x00C36400
# define S_MAGIC_CGROUP 0x0027E0EB
# define S_MAGIC_CIFS 0xFF534D42
# define S_MAGIC_CODA 0x73757245
@@ -61,6 +63,7 @@
# define S_MAGIC_NTFS 0x5346544E
# define S_MAGIC_OPENPROM 0x9FA1
# define S_MAGIC_OCFS2 0x7461636f
+# define S_MAGIC_PANFS 0xAAD7AAEA
# define S_MAGIC_PIPEFS 0x50495045
# define S_MAGIC_PROC 0x9FA0
# define S_MAGIC_PSTOREFS 0x6165676C
@@ -84,11 +87,14 @@
# define S_MAGIC_UFS_BYTESWAPPED 0x54190100
# define S_MAGIC_USBDEVFS 0x9FA2
# define S_MAGIC_V9FS 0x01021997
+# define S_MAGIC_VMHGFS 0xBACBACBC
# define S_MAGIC_VXFS 0xA501FCF5
+# define S_MAGIC_VZFS 0x565A4653
# define S_MAGIC_XENFS 0xABBA1974
# define S_MAGIC_XENIX 0x012FF7B4
# define S_MAGIC_XFS 0x58465342
# define S_MAGIC_XIAFS 0x012FD16D
+# define S_MAGIC_ZFS 0x2FC12FC1
#elif defined __GNU__
# include <hurd/hurd_types.h>
#endif
diff --git a/src/getlimits.c b/src/getlimits.c
index 1403ee58..7c1fbe26 100644
--- a/src/getlimits.c
+++ b/src/getlimits.c
@@ -1,5 +1,5 @@
/* getlimits - print various platform dependent limits.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/group-list.c b/src/group-list.c
index edbb3421..7d4995b5 100644
--- a/src/group-list.c
+++ b/src/group-list.c
@@ -1,5 +1,5 @@
/* group-list.c --Print a list of group IDs or names.
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -88,6 +88,16 @@ print_group_list (const char *username,
return ok;
}
+/* Convert a gid_t to string. Do not use this function directly.
+ Instead, use it via the gidtostr macro.
+ Beware that it returns a pointer to static storage. */
+static char *
+gidtostr_ptr (gid_t const *gid)
+{
+ static char buf[INT_BUFSIZE_BOUND (uintmax_t)];
+ return umaxtostr (*gid, buf);
+}
+#define gidtostr(g) gidtostr_ptr (&(g))
/* Print the name or value of group ID GID. */
extern bool
@@ -107,9 +117,7 @@ print_group (gid_t gid, bool use_name)
}
}
- if (grp == NULL)
- printf ("%lu", (unsigned long int) gid);
- else
- printf ("%s", grp->gr_name);
+ char *s = grp ? grp->gr_name : gidtostr (gid);
+ fputs (s, stdout);
return ok;
}
diff --git a/src/group-list.h b/src/group-list.h
index c6fb6b44..3fac8871 100644
--- a/src/group-list.h
+++ b/src/group-list.h
@@ -1,6 +1,6 @@
/* group-list.h -- prototypes shared by id and groups.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/groups.c b/src/groups.c
index 0449fa78..53332d56 100644
--- a/src/groups.c
+++ b/src/groups.c
@@ -1,5 +1,5 @@
/* groups -- print the groups a user is in
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/head.c b/src/head.c
index d7e83b71..d79d5f7d 100644
--- a/src/head.c
+++ b/src/head.c
@@ -1,5 +1,5 @@
/* head -- output first part of file(s)
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -110,11 +110,10 @@ Usage: %s [OPTION]... [FILE]...\n\
Print the first 10 lines of each FILE to standard output.\n\
With more than one FILE, precede each with a header giving the file name.\n\
With no FILE, or when FILE is -, read standard input.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-c, --bytes=[-]K print the first K bytes of each file;\n\
with the leading '-', print all but the last\n\
@@ -667,6 +666,14 @@ elide_tail_lines_seekable (const char *pretty_filename, int fd,
Don't bother testing for failure for such a small amount.
Any failure will be detected upon close. */
fwrite (buffer, 1, n + 1, stdout);
+
+ /* Set file pointer to the byte after what we've output. */
+ if (lseek (fd, pos + n + 1, SEEK_SET) < 0)
+ {
+ error (0, errno, _("%s: failed to reset file pointer"),
+ quote (pretty_filename));
+ return false;
+ }
return true;
}
}
@@ -852,7 +859,7 @@ head_file (const char *filename, uintmax_t n_units, bool count_lines,
ok = head (filename, fd, n_units, count_lines, elide_from_end);
if (!is_stdin && close (fd) != 0)
{
- error (0, errno, _("closing %s"), quote (filename));
+ error (0, errno, _("failed to close %s"), quote (filename));
return false;
}
return ok;
diff --git a/src/hostid.c b/src/hostid.c
index 622a3d71..b2d218cc 100644
--- a/src/hostid.c
+++ b/src/hostid.c
@@ -1,6 +1,6 @@
/* print the hexadecimal identifier for the current host
- Copyright (C) 1997-2012 Free Software Foundation, Inc.
+ Copyright (C) 1997-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/hostname.c b/src/hostname.c
index f6d91568..d0a4d754 100644
--- a/src/hostname.c
+++ b/src/hostname.c
@@ -1,5 +1,5 @@
/* hostname - set or print the name of current host system
- Copyright (C) 1994-2012 Free Software Foundation, Inc.
+ Copyright (C) 1994-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/id.c b/src/id.c
index 41ae0249..b5a7214d 100644
--- a/src/id.c
+++ b/src/id.c
@@ -1,5 +1,5 @@
/* id -- print real and effective UIDs and GIDs
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -274,6 +274,28 @@ main (int argc, char **argv)
exit (ok ? EXIT_SUCCESS : EXIT_FAILURE);
}
+/* Convert a gid_t to string. Do not use this function directly.
+ Instead, use it via the gidtostr macro.
+ Beware that it returns a pointer to static storage. */
+static char *
+gidtostr_ptr (gid_t const *gid)
+{
+ static char buf[INT_BUFSIZE_BOUND (uintmax_t)];
+ return umaxtostr (*gid, buf);
+}
+#define gidtostr(g) gidtostr_ptr (&(g))
+
+/* Convert a uid_t to string. Do not use this function directly.
+ Instead, use it via the uidtostr macro.
+ Beware that it returns a pointer to static storage. */
+static char *
+uidtostr_ptr (uid_t const *uid)
+{
+ static char buf[INT_BUFSIZE_BOUND (uintmax_t)];
+ return umaxtostr (*uid, buf);
+}
+#define uidtostr(u) uidtostr_ptr (&(u))
+
/* Print the name or value of user ID UID. */
static void
@@ -286,16 +308,14 @@ print_user (uid_t uid)
pwd = getpwuid (uid);
if (pwd == NULL)
{
- error (0, 0, _("cannot find name for user ID %lu"),
- (unsigned long int) uid);
+ error (0, 0, _("cannot find name for user ID %s"),
+ uidtostr (uid));
ok = false;
}
}
- if (pwd == NULL)
- printf ("%lu", (unsigned long int) uid);
- else
- printf ("%s", pwd->pw_name);
+ char *s = pwd ? pwd->pw_name : uidtostr (uid);
+ fputs (s, stdout);
}
/* Print all of the info about the user's user and group IDs. */
@@ -306,19 +326,19 @@ print_full_info (const char *username)
struct passwd *pwd;
struct group *grp;
- printf (_("uid=%lu"), (unsigned long int) ruid);
+ printf (_("uid=%s"), uidtostr (ruid));
pwd = getpwuid (ruid);
if (pwd)
printf ("(%s)", pwd->pw_name);
- printf (_(" gid=%lu"), (unsigned long int) rgid);
+ printf (_(" gid=%s"), gidtostr (rgid));
grp = getgrgid (rgid);
if (grp)
printf ("(%s)", grp->gr_name);
if (euid != ruid)
{
- printf (_(" euid=%lu"), (unsigned long int) euid);
+ printf (_(" euid=%s"), uidtostr (euid));
pwd = getpwuid (euid);
if (pwd)
printf ("(%s)", pwd->pw_name);
@@ -326,7 +346,7 @@ print_full_info (const char *username)
if (egid != rgid)
{
- printf (_(" egid=%lu"), (unsigned long int) egid);
+ printf (_(" egid=%s"), gidtostr (egid));
grp = getgrgid (egid);
if (grp)
printf ("(%s)", grp->gr_name);
@@ -359,7 +379,7 @@ print_full_info (const char *username)
{
if (i > 0)
putchar (',');
- printf ("%lu", (unsigned long int) groups[i]);
+ fputs (gidtostr (groups[i]), stdout);
grp = getgrgid (groups[i]);
if (grp)
printf ("(%s)", grp->gr_name);
diff --git a/src/install.c b/src/install.c
index 854436aa..94374df3 100644
--- a/src/install.c
+++ b/src/install.c
@@ -1,5 +1,5 @@
/* install - copy files and set attributes
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -275,6 +275,7 @@ cp_option_init (struct cp_options *x)
x->preserve_links = false;
x->preserve_mode = false;
x->preserve_timestamps = false;
+ x->explicit_no_preserve_mode = false;
x->reduce_diagnostics=false;
x->data_copy_required = true;
x->require_preserve = false;
@@ -398,7 +399,7 @@ target_directory_operand (char const *file)
int err = (stat (file, &st) == 0 ? 0 : errno);
bool is_a_dir = !err && S_ISDIR (st.st_mode);
if (err && err != ENOENT)
- error (EXIT_FAILURE, err, _("accessing %s"), quote (file));
+ error (EXIT_FAILURE, err, _("failed to access %s"), quote (file));
if (is_a_dir < looks_like_a_dir)
error (EXIT_FAILURE, err, _("target %s is not a directory"), quote (file));
return is_a_dir;
@@ -607,11 +608,10 @@ like yum(1) or apt-get(1).\n\
In the first three forms, copy SOURCE to DEST or multiple SOURCE(s) to\n\
the existing DIRECTORY, while setting permission modes and owner/group.\n\
In the 4th form, create all components of the given DIRECTORY(ies).\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
--backup[=CONTROL] make a backup of each existing destination file\n\
-b like --backup but does not accept an argument\n\
@@ -841,7 +841,8 @@ main (int argc, char **argv)
{
struct stat st;
if (stat (optarg, &st) != 0)
- error (EXIT_FAILURE, errno, _("accessing %s"), quote (optarg));
+ error (EXIT_FAILURE, errno, _("failed to access %s"),
+ quote (optarg));
if (! S_ISDIR (st.st_mode))
error (EXIT_FAILURE, 0, _("target %s is not a directory"),
quote (optarg));
diff --git a/src/ioblksize.h b/src/ioblksize.h
index aaea9fff..1ae93255 100644
--- a/src/ioblksize.h
+++ b/src/ioblksize.h
@@ -1,5 +1,5 @@
/* I/O block size definitions for coreutils
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/join.c b/src/join.c
index e39ed872..11e647cf 100644
--- a/src/join.c
+++ b/src/join.c
@@ -1,5 +1,5 @@
/* join - join lines of two files on a common field
- Copyright (C) 1991-2012 Free Software Foundation, Inc.
+ Copyright (C) 1991-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -400,7 +400,7 @@ check_order (const struct line *prev,
error ((check_input_order == CHECK_ORDER_ENABLED
? EXIT_FAILURE : 0),
- 0, _("%s:%ju: is not sorted: %.*s"),
+ 0, _("%s:%"PRIuMAX": is not sorted: %.*s"),
g_names[whatfile - 1], line_no[whatfile - 1],
(int) len, current->buf.buffer);
diff --git a/src/kill.c b/src/kill.c
index ad09321d..d1b836b6 100644
--- a/src/kill.c
+++ b/src/kill.c
@@ -1,5 +1,5 @@
/* kill -- send a signal to a process
- Copyright (C) 2002-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -81,11 +81,10 @@ Usage: %s [-s SIGNAL | -SIGNAL] PID...\n\
program_name, program_name, program_name);
fputs (_("\
Send signals to processes, or list signals.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-s, --signal=SIGNAL, -SIGNAL\n\
specify the name or number of the signal to be sent\n\
diff --git a/src/libstdbuf.c b/src/libstdbuf.c
index 9d464f10..ac7a1339 100644
--- a/src/libstdbuf.c
+++ b/src/libstdbuf.c
@@ -1,5 +1,5 @@
/* libstdbuf -- a shared lib to preload to setup stdio buffering for a command
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/link.c b/src/link.c
index 84911b6f..4611107a 100644
--- a/src/link.c
+++ b/src/link.c
@@ -1,5 +1,5 @@
/* link utility for GNU.
- Copyright (C) 2001-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/ln.c b/src/ln.c
index e7ab3487..1aa14732 100644
--- a/src/ln.c
+++ b/src/ln.c
@@ -1,5 +1,5 @@
/* 'ln' program to create links between files.
- Copyright (C) 1986-2012 Free Software Foundation, Inc.
+ Copyright (C) 1986-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -120,7 +120,7 @@ target_directory_operand (char const *file)
int err = (stat_result == 0 ? 0 : errno);
bool is_a_dir = !err && S_ISDIR (st.st_mode);
if (err && err != ENOENT)
- error (EXIT_FAILURE, err, _("accessing %s"), quote (file));
+ error (EXIT_FAILURE, err, _("failed to access %s"), quote (file));
if (is_a_dir < looks_like_a_dir)
error (EXIT_FAILURE, err, _("target %s is not a directory"), quote (file));
return is_a_dir;
@@ -178,7 +178,7 @@ do_link (const char *source, const char *dest)
: lstat (source, &source_stats))
!= 0)
{
- error (0, errno, _("accessing %s"), quote (source));
+ error (0, errno, _("failed to access %s"), quote (source));
return false;
}
@@ -199,7 +199,7 @@ do_link (const char *source, const char *dest)
dest_lstat_ok = (lstat (dest, &dest_stats) == 0);
if (!dest_lstat_ok && errno != ENOENT)
{
- error (0, errno, _("accessing %s"), quote (dest));
+ error (0, errno, _("failed to access %s"), quote (dest));
return false;
}
}
@@ -387,11 +387,10 @@ By default, each destination (name of new link) should not already exist.\n\
When creating hard links, each TARGET must exist. Symbolic links\n\
can hold arbitrary text; if later resolved, a relative link is\n\
interpreted in relation to its parent directory.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
--backup[=CONTROL] make a backup of each existing destination file\n\
-b like --backup but does not accept an argument\n\
@@ -430,9 +429,9 @@ the VERSION_CONTROL environment variable. Here are the values:\n\
numbered, t make numbered backups\n\
existing, nil numbered if numbered backups exist, simple otherwise\n\
simple, never always make simple backups\n\
-\n\
"), stdout);
printf (_("\
+\n\
Using -s ignores -L and -P. Otherwise, the last option specified controls\n\
behavior when a TARGET is a symbolic link, defaulting to %s.\n\
"), LINK_FOLLOWS_SYMLINKS ? "-L" : "-P");
@@ -513,7 +512,8 @@ main (int argc, char **argv)
{
struct stat st;
if (stat (optarg, &st) != 0)
- error (EXIT_FAILURE, errno, _("accessing %s"), quote (optarg));
+ error (EXIT_FAILURE, errno, _("failed to access %s"),
+ quote (optarg));
if (! S_ISDIR (st.st_mode))
error (EXIT_FAILURE, 0, _("target %s is not a directory"),
quote (optarg));
diff --git a/src/local.mk b/src/local.mk
new file mode 100644
index 00000000..982cd4da
--- /dev/null
+++ b/src/local.mk
@@ -0,0 +1,526 @@
+# Make coreutils programs. -*-Makefile-*-
+# This is included by the top-level Makefile.am.
+
+## Copyright (C) 1990-2013 Free Software Foundation, Inc.
+
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# FIXME: once lib/ and gnulib-tests/ are also converted, hoist to Makefile.am
+AM_CFLAGS = $(WERROR_CFLAGS)
+
+# The list of all programs (separated in different variables to express
+# the how and when they should be installed) is defined in this makefile
+# fragment, autogenerated by the 'gen-lists-of-programs.sh' auxiliary
+# script.
+include $(srcdir)/src/cu-progs.mk
+
+EXTRA_PROGRAMS = \
+ $(no_install__progs) \
+ $(build_if_possible__progs) \
+ $(default__progs)
+
+# The user can tweak these lists at configure time.
+bin_PROGRAMS = @bin_PROGRAMS@
+pkglibexec_PROGRAMS = @pkglibexec_PROGRAMS@
+
+# Needed by the testsuite.
+noinst_PROGRAMS = \
+ src/getlimits \
+ src/make-prime-list \
+ src/setuidgid
+
+noinst_HEADERS = \
+ src/chown-core.h \
+ src/copy.h \
+ src/cp-hash.h \
+ src/dircolors.h \
+ src/fiemap.h \
+ src/find-mount-point.h \
+ src/fs.h \
+ src/fs-is-local.h \
+ src/group-list.h \
+ src/ioblksize.h \
+ src/longlong.h \
+ src/ls.h \
+ src/operand2sig.h \
+ src/prog-fprintf.h \
+ src/remove.h \
+ src/system.h \
+ src/uname.h
+
+EXTRA_DIST += \
+ src/dcgen \
+ src/dircolors.hin \
+ src/primes.h \
+ src/tac-pipe.c \
+ src/extract-magic \
+ src/c99-to-c89.diff
+
+CLEANFILES += $(SCRIPTS)
+
+# Also remove these sometimes-built programs.
+# For example, even when excluded, they're built via 'sc_check-AUTHORS'
+# or 'dist'.
+CLEANFILES += $(no_install__progs)
+
+noinst_LIBRARIES += src/libver.a
+nodist_src_libver_a_SOURCES = src/version.c src/version.h
+
+# Tell the linker to omit references to unused shared libraries.
+AM_LDFLAGS = $(IGNORE_UNUSED_LIBRARIES_CFLAGS)
+
+# Extra libraries needed by more than one program. Will be updated later.
+copy_ldadd =
+remove_ldadd =
+
+# Sometimes, the expansion of $(LIBINTL) includes -lc which may
+# include modules defining variables like 'optind', so libcoreutils.a
+# must precede $(LIBINTL) in order to ensure we use GNU getopt.
+# But libcoreutils.a must also follow $(LIBINTL), since libintl uses
+# replacement functions defined in libcoreutils.a.
+LDADD = src/libver.a lib/libcoreutils.a $(LIBINTL) lib/libcoreutils.a
+
+# First, list all programs, to make listing per-program libraries easier.
+# See [ below.
+src_arch_LDADD = $(LDADD)
+src_base64_LDADD = $(LDADD)
+src_basename_LDADD = $(LDADD)
+src_cat_LDADD = $(LDADD)
+src_chcon_LDADD = $(LDADD)
+src_chgrp_LDADD = $(LDADD)
+src_chmod_LDADD = $(LDADD)
+src_chown_LDADD = $(LDADD)
+src_chroot_LDADD = $(LDADD)
+src_cksum_LDADD = $(LDADD)
+src_comm_LDADD = $(LDADD)
+src_nproc_LDADD = $(LDADD)
+src_cp_LDADD = $(LDADD)
+src_csplit_LDADD = $(LDADD)
+src_cut_LDADD = $(LDADD)
+src_date_LDADD = $(LDADD)
+src_dd_LDADD = $(LDADD)
+src_df_LDADD = $(LDADD)
+# See dir_LDADD below
+src_dircolors_LDADD = $(LDADD)
+src_dirname_LDADD = $(LDADD)
+src_du_LDADD = $(LDADD)
+src_echo_LDADD = $(LDADD)
+src_env_LDADD = $(LDADD)
+src_expand_LDADD = $(LDADD)
+src_expr_LDADD = $(LDADD)
+src_factor_LDADD = $(LDADD)
+src_false_LDADD = $(LDADD)
+src_fmt_LDADD = $(LDADD)
+src_fold_LDADD = $(LDADD)
+src_getlimits_LDADD = $(LDADD)
+src_ginstall_LDADD = $(LDADD)
+src_groups_LDADD = $(LDADD)
+src_head_LDADD = $(LDADD)
+src_hostid_LDADD = $(LDADD)
+src_hostname_LDADD = $(LDADD)
+src_id_LDADD = $(LDADD)
+src_join_LDADD = $(LDADD)
+src_kill_LDADD = $(LDADD)
+src_link_LDADD = $(LDADD)
+src_ln_LDADD = $(LDADD)
+src_logname_LDADD = $(LDADD)
+src_ls_LDADD = $(LDADD)
+
+# This must *not* depend on anything in lib/, since it is used to generate
+# src/primes.h. If it depended on libcoreutils.a, that would pull all lib/*.c
+# into BUILT_SOURCES.
+src_make_prime_list_LDADD =
+
+src_md5sum_LDADD = $(LDADD)
+src_mkdir_LDADD = $(LDADD)
+src_mkfifo_LDADD = $(LDADD)
+src_mknod_LDADD = $(LDADD)
+src_mktemp_LDADD = $(LDADD)
+src_mv_LDADD = $(LDADD)
+src_nice_LDADD = $(LDADD)
+src_nl_LDADD = $(LDADD)
+src_nohup_LDADD = $(LDADD)
+src_od_LDADD = $(LDADD)
+src_paste_LDADD = $(LDADD)
+src_pathchk_LDADD = $(LDADD)
+src_pinky_LDADD = $(LDADD)
+src_pr_LDADD = $(LDADD)
+src_printenv_LDADD = $(LDADD)
+src_printf_LDADD = $(LDADD)
+src_ptx_LDADD = $(LDADD)
+src_pwd_LDADD = $(LDADD)
+src_readlink_LDADD = $(LDADD)
+src_realpath_LDADD = $(LDADD)
+src_rm_LDADD = $(LDADD)
+src_rmdir_LDADD = $(LDADD)
+src_runcon_LDADD = $(LDADD)
+src_seq_LDADD = $(LDADD)
+src_setuidgid_LDADD = $(LDADD)
+src_sha1sum_LDADD = $(LDADD)
+src_sha224sum_LDADD = $(LDADD)
+src_sha256sum_LDADD = $(LDADD)
+src_sha384sum_LDADD = $(LDADD)
+src_sha512sum_LDADD = $(LDADD)
+src_shred_LDADD = $(LDADD)
+src_shuf_LDADD = $(LDADD)
+src_sleep_LDADD = $(LDADD)
+src_sort_LDADD = $(LDADD)
+src_split_LDADD = $(LDADD)
+src_stat_LDADD = $(LDADD)
+src_stdbuf_LDADD = $(LDADD)
+src_stty_LDADD = $(LDADD)
+src_sum_LDADD = $(LDADD)
+src_sync_LDADD = $(LDADD)
+src_tac_LDADD = $(LDADD)
+src_tail_LDADD = $(LDADD)
+src_tee_LDADD = $(LDADD)
+src_test_LDADD = $(LDADD)
+src_timeout_LDADD = $(LDADD)
+src_touch_LDADD = $(LDADD)
+src_tr_LDADD = $(LDADD)
+src_true_LDADD = $(LDADD)
+src_truncate_LDADD = $(LDADD)
+src_tsort_LDADD = $(LDADD)
+src_tty_LDADD = $(LDADD)
+src_uname_LDADD = $(LDADD)
+src_unexpand_LDADD = $(LDADD)
+src_uniq_LDADD = $(LDADD)
+src_unlink_LDADD = $(LDADD)
+src_uptime_LDADD = $(LDADD)
+src_users_LDADD = $(LDADD)
+# See vdir_LDADD below
+src_wc_LDADD = $(LDADD)
+src_who_LDADD = $(LDADD)
+src_whoami_LDADD = $(LDADD)
+src_yes_LDADD = $(LDADD)
+
+# Synonyms. Recall that Automake transliterates '[' and '/' to '_'.
+src___LDADD = $(src_test_LDADD)
+src_dir_LDADD = $(src_ls_LDADD)
+src_vdir_LDADD = $(src_ls_LDADD)
+
+src_cp_LDADD += $(copy_ldadd)
+src_ginstall_LDADD += $(copy_ldadd)
+src_mv_LDADD += $(copy_ldadd)
+
+src_mv_LDADD += $(remove_ldadd)
+src_rm_LDADD += $(remove_ldadd)
+
+# for eaccess, euidaccess
+copy_ldadd += $(LIB_EACCESS)
+remove_ldadd += $(LIB_EACCESS)
+src_sort_LDADD += $(LIB_EACCESS)
+src_test_LDADD += $(LIB_EACCESS)
+
+# for selinux use
+copy_ldadd += $(LIB_SELINUX)
+src_chcon_LDADD += $(LIB_SELINUX)
+src_ginstall_LDADD += $(LIB_SELINUX)
+src_id_LDADD += $(LIB_SELINUX)
+src_ls_LDADD += $(LIB_SELINUX)
+src_mkdir_LDADD += $(LIB_SELINUX)
+src_mkfifo_LDADD += $(LIB_SELINUX)
+src_mknod_LDADD += $(LIB_SELINUX)
+src_runcon_LDADD += $(LIB_SELINUX)
+src_stat_LDADD += $(LIB_SELINUX)
+
+# for gettime, settime, utimecmp, utimens
+copy_ldadd += $(LIB_CLOCK_GETTIME)
+src_date_LDADD += $(LIB_CLOCK_GETTIME)
+src_ginstall_LDADD += $(LIB_CLOCK_GETTIME)
+src_ls_LDADD += $(LIB_CLOCK_GETTIME)
+src_pr_LDADD += $(LIB_CLOCK_GETTIME)
+src_timeout_LDADD += $(LIB_TIMER_TIME)
+src_touch_LDADD += $(LIB_CLOCK_GETTIME)
+
+# for gethrxtime
+src_dd_LDADD += $(LIB_GETHRXTIME)
+
+# for cap_get_file
+src_ls_LDADD += $(LIB_CAP)
+
+# for fdatasync
+src_dd_LDADD += $(LIB_FDATASYNC)
+src_shred_LDADD += $(LIB_FDATASYNC)
+
+# for xnanosleep
+src_sleep_LDADD += $(LIB_NANOSLEEP)
+src_sort_LDADD += $(LIB_NANOSLEEP)
+src_tail_LDADD += $(LIB_NANOSLEEP)
+
+# for various GMP functions
+src_expr_LDADD += $(LIB_GMP)
+src_factor_LDADD += $(LIB_GMP)
+
+# for getloadavg
+src_uptime_LDADD += $(GETLOADAVG_LIBS)
+
+# for various ACL functions
+copy_ldadd += $(LIB_ACL)
+src_ls_LDADD += $(LIB_ACL)
+
+# for various xattr functions
+copy_ldadd += $(LIB_XATTR)
+
+# for print_unicode_char, proper_name_utf8
+src_cat_LDADD += $(LIBICONV)
+src_cp_LDADD += $(LIBICONV)
+src_df_LDADD += $(LIBICONV)
+src_du_LDADD += $(LIBICONV)
+src_factor_LDADD += $(LIBICONV)
+src_getlimits_LDADD += $(LIBICONV)
+src_printf_LDADD += $(LIBICONV)
+src_ptx_LDADD += $(LIBICONV)
+src_realpath_LDADD += $(LIBICONV)
+src_split_LDADD += $(LIBICONV)
+src_stdbuf_LDADD += $(LIBICONV)
+src_timeout_LDADD += $(LIBICONV)
+src_truncate_LDADD += $(LIBICONV)
+
+# for canon_host
+src_pinky_LDADD += $(GETADDRINFO_LIB)
+src_who_LDADD += $(GETADDRINFO_LIB)
+
+# for gethostname, uname
+src_hostname_LDADD += $(GETHOSTNAME_LIB)
+src_uname_LDADD += $(GETHOSTNAME_LIB)
+
+# for strsignal
+src_kill_LDADD += $(LIBTHREAD)
+
+# for pthread
+src_sort_LDADD += $(LIB_PTHREAD)
+
+# Get the release year from lib/version-etc.c.
+RELEASE_YEAR = \
+ `sed -n '/.*COPYRIGHT_YEAR = \([0-9][0-9][0-9][0-9]\) };/s//\1/p' \
+ $(top_srcdir)/lib/version-etc.c`
+
+copy_sources = \
+ src/copy.c \
+ src/cp-hash.c \
+ src/extent-scan.c \
+ src/extent-scan.h
+
+# Use 'ginstall' in the definition of PROGRAMS and in dependencies to avoid
+# confusion with the 'install' target. The install rule transforms 'ginstall'
+# to install before applying any user-specified name transformations.
+
+transform = s/ginstall/install/; $(program_transform_name)
+src_ginstall_SOURCES = src/install.c src/prog-fprintf.c $(copy_sources)
+
+# This is for the '[' program. Automake transliterates '[' and '/' to '_'.
+src___SOURCES = src/lbracket.c
+
+src_cp_SOURCES = src/cp.c $(copy_sources)
+src_dir_SOURCES = src/ls.c src/ls-dir.c
+src_vdir_SOURCES = src/ls.c src/ls-vdir.c
+src_id_SOURCES = src/id.c src/group-list.c
+src_groups_SOURCES = src/groups.c src/group-list.c
+src_ls_SOURCES = src/ls.c src/ls-ls.c
+src_ln_SOURCES = src/ln.c src/relpath.c src/relpath.h
+src_chown_SOURCES = src/chown.c src/chown-core.c
+src_chgrp_SOURCES = src/chgrp.c src/chown-core.c
+src_kill_SOURCES = src/kill.c src/operand2sig.c
+src_realpath_SOURCES = src/realpath.c src/relpath.c src/relpath.h
+src_timeout_SOURCES = src/timeout.c src/operand2sig.c
+
+src_mv_SOURCES = src/mv.c src/remove.c $(copy_sources)
+src_rm_SOURCES = src/rm.c src/remove.c
+
+src_mkdir_SOURCES = src/mkdir.c src/prog-fprintf.c
+src_rmdir_SOURCES = src/rmdir.c src/prog-fprintf.c
+
+src_df_SOURCES = src/df.c src/find-mount-point.c
+src_stat_SOURCES = src/stat.c src/find-mount-point.c
+
+src_uname_SOURCES = src/uname.c src/uname-uname.c
+src_arch_SOURCES = src/uname.c src/uname-arch.c
+
+src_md5sum_CPPFLAGS = -DHASH_ALGO_MD5=1 $(AM_CPPFLAGS)
+src_sha1sum_SOURCES = src/md5sum.c
+src_sha1sum_CPPFLAGS = -DHASH_ALGO_SHA1=1 $(AM_CPPFLAGS)
+src_sha224sum_SOURCES = src/md5sum.c
+src_sha224sum_CPPFLAGS = -DHASH_ALGO_SHA224=1 $(AM_CPPFLAGS)
+src_sha256sum_SOURCES = src/md5sum.c
+src_sha256sum_CPPFLAGS = -DHASH_ALGO_SHA256=1 $(AM_CPPFLAGS)
+src_sha384sum_SOURCES = src/md5sum.c
+src_sha384sum_CPPFLAGS = -DHASH_ALGO_SHA384=1 $(AM_CPPFLAGS)
+src_sha512sum_SOURCES = src/md5sum.c
+src_sha512sum_CPPFLAGS = -DHASH_ALGO_SHA512=1 $(AM_CPPFLAGS)
+
+src_ginstall_CPPFLAGS = -DENABLE_MATCHPATHCON=1 $(AM_CPPFLAGS)
+
+# Ensure we don't link against libcoreutils.a as that lib is
+# not compiled with -fPIC which causes issues on 64 bit at least
+src_libstdbuf_so_LDADD =
+
+# Note libstdbuf is only compiled if GCC is available
+# (as per the check in configure.ac), so these flags should be available.
+# libtool is probably required to relax this dependency.
+src_libstdbuf_so_LDFLAGS = -shared
+src_libstdbuf_so_CFLAGS = -fPIC $(AM_CFLAGS)
+
+BUILT_SOURCES += src/dircolors.h
+src/dircolors.h: src/dcgen src/dircolors.hin
+ $(AM_V_GEN)rm -f $@ $@-t
+ $(AM_V_at)$(PERL) -w -- $(srcdir)/src/dcgen \
+ $(srcdir)/src/dircolors.hin > $@-t
+ $(AM_V_at)chmod a-w $@-t
+ $(AM_V_at)mv $@-t $@
+
+# This file is built by maintainers. It's architecture-independent,
+# and it needs to be built on a widest-known-int architecture, so it's
+# built only if absent. It is not cleaned because we don't want to
+# insist that maintainers must build on hosts that support the widest
+# known ints (currently 128-bit).
+BUILT_SOURCES += $(top_srcdir)/src/primes.h
+$(top_srcdir)/src/primes.h:
+ $(MAKE) src/make-prime-list$(EXEEXT)
+ $(AM_V_GEN)rm -f $@ $@-t
+ $(AM_V_at)src/make-prime-list$(EXEEXT) 5000 > $@-t
+ $(AM_V_at)chmod a-w $@-t
+ $(AM_V_at)mv $@-t $@
+
+# false exits nonzero even with --help or --version.
+# test doesn't support --help or --version.
+# Tell automake to exempt then from that installcheck test.
+AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = src/false src/test
+
+# Compare fs.h with the list of file system names/magic-numbers in the
+# Linux statfs man page. This target prints any new name/number pairs.
+# Also compare against /usr/include/linux/magic.h
+.PHONY: src/fs-magic-compare
+src/fs-magic-compare: src/fs-magic src/fs-kernel-magic src/fs-def
+ join -v1 -t@ src/fs-magic src/fs-def
+ join -v1 -t@ src/fs-kernel-magic src/fs-def
+
+CLEANFILES += src/fs-def
+src/fs-def: src/fs.h
+ grep '^# *define ' src/fs.h | $(ASSORT) > $@-t && mv $@-t $@
+
+# Massage bits of the statfs man page and definitions from
+# /usr/include/linux/magic.h to be in a form consistent with what's in fs.h.
+fs_normalize_perl_subst = \
+ -e 's/MINIX_SUPER_MAGIC\b/MINIX/;' \
+ -e 's/MINIX_SUPER_MAGIC2\b/MINIX_30/;' \
+ -e 's/MINIX2_SUPER_MAGIC\b/MINIX_V2/;' \
+ -e 's/MINIX2_SUPER_MAGIC2\b/MINIX_V2_30/;' \
+ -e 's/MINIX3_SUPER_MAGIC\b/MINIX_V3/;' \
+ -e 's/CIFS_MAGIC_NUMBER/CIFS/;' \
+ -e 's/(_SUPER)?_MAGIC//;' \
+ -e 's/\s+0x(\S+)/" 0x" . uc $$1/e;' \
+ -e 's/(\s+0x)(\X{3})\b/$${1}0$$2/;' \
+ -e 's/(\s+0x)(\X{6})\b/$${1}00$$2/;' \
+ -e 's/(\s+0x)(\X{7})\b/$${1}0$$2/;' \
+ -e 's/^\s+//;' \
+ -e 's/^\043define\s+//;' \
+ -e 's/^_(XIAFS)/$$1/;' \
+ -e 's/^USBDEVICE/USBDEVFS/;' \
+ -e 's/NTFS_SB/NTFS/;' \
+ -e 's/^/\043 define S_MAGIC_/;' \
+ -e 's,\s*/\* .*? \*/,,;'
+
+CLEANFILES += src/fs-magic
+src/fs-magic: Makefile
+ man statfs \
+ |perl -ne '/File system types:/.../Nobody kno/ and print' \
+ |grep 0x | perl -p \
+ $(fs_normalize_perl_subst) \
+ | grep -Ev 'S_MAGIC_EXT[34]|STACK_END' \
+ | $(ASSORT) \
+ > $@-t && mv $@-t $@
+
+CLEANFILES += src/fs-kernel-magic
+src/fs-kernel-magic: Makefile
+ perl -ne '/^#define.*0x/ and print' /usr/include/linux/magic.h \
+ | perl -p \
+ $(fs_normalize_perl_subst) \
+ | grep -Ev 'S_MAGIC_EXT[34]|STACK_END' \
+ | $(ASSORT) \
+ > $@-t && mv $@-t $@
+
+BUILT_SOURCES += src/fs-is-local.h
+src/fs-is-local.h: src/stat.c src/extract-magic
+ $(AM_V_GEN)rm -f $@
+ $(AM_V_at)$(PERL) $(srcdir)/src/extract-magic \
+ --local $(srcdir)/src/stat.c > $@t
+ $(AM_V_at)chmod a-w $@t
+ $(AM_V_at)mv $@t $@
+
+BUILT_SOURCES += src/fs.h
+src/fs.h: src/stat.c src/extract-magic
+ $(AM_V_GEN)rm -f $@
+ $(AM_V_at)$(PERL) $(srcdir)/src/extract-magic \
+ $(srcdir)/src/stat.c > $@t
+ $(AM_V_at)chmod a-w $@t
+ $(AM_V_at)mv $@t $@
+
+BUILT_SOURCES += src/version.c
+src/version.c: Makefile
+ $(AM_V_GEN)rm -f $@
+ $(AM_V_at)printf '#include <config.h>\n' > $@t
+ $(AM_V_at)printf 'char const *Version = "$(PACKAGE_VERSION)";\n' >> $@t
+ $(AM_V_at)chmod a-w $@t
+ $(AM_V_at)mv $@t $@
+
+BUILT_SOURCES += src/version.h
+src/version.h: Makefile
+ $(AM_V_GEN)rm -f $@
+ $(AM_V_at)printf 'extern char const *Version;\n' > $@t
+ $(AM_V_at)chmod a-w $@t
+ $(AM_V_at)mv $@t $@
+
+DISTCLEANFILES += src/version.c src/version.h
+MAINTAINERCLEANFILES += $(BUILT_SOURCES)
+
+all_programs = \
+ $(bin_PROGRAMS) \
+ $(bin_SCRIPTS) \
+ $(EXTRA_PROGRAMS)
+
+pm = progs-makefile
+pr = progs-readme
+# Ensure that the list of programs in README matches the list
+# of programs we can build.
+check-local: check-README check-duplicate-no-install
+.PHONY: check-README
+check-README:
+ $(AM_V_GEN)rm -rf $(pr) $(pm)
+ $(AM_V_at)echo $(all_programs) \
+ | tr -s ' ' '\n' \
+ | sed -e 's,$(EXEEXT)$$,,' \
+ -e 's,^src/,,' \
+ -e 's/^ginstall$$/install/' \
+ | sed /libstdbuf/d \
+ | $(ASSORT) -u > $(pm) && \
+ sed -n '/^The programs .* are:/,/^[a-zA-Z]/p' $(top_srcdir)/README \
+ | sed -n '/^ */s///p' | tr -s ' ' '\n' > $(pr)
+ $(AM_V_at)diff $(pm) $(pr) && rm -rf $(pr) $(pm)
+
+# Ensure that a by-default-not-installed program (listed in
+# $(no_install__progs) is not also listed as another $(EXTRA_PROGRAMS)
+# entry, because if that were to happen, it *would* be installed
+# by default.
+.PHONY: check-duplicate-no-install
+check-duplicate-no-install: src/tr
+ $(AM_V_GEN)test -z "`echo '$(EXTRA_PROGRAMS)' | tr ' ' '\n' | uniq -d`"
+
+# Use the just-built 'ginstall', when not cross-compiling.
+if CROSS_COMPILING
+cu_install_program = @INSTALL_PROGRAM@
+else
+cu_install_program = src/ginstall
+endif
+INSTALL_PROGRAM = $(cu_install_program)
diff --git a/src/logname.c b/src/logname.c
index a7aa2fa9..b655e4a2 100644
--- a/src/logname.c
+++ b/src/logname.c
@@ -1,5 +1,5 @@
/* logname -- print user's login name
- Copyright (C) 1990-2012 Free Software Foundation, Inc.
+ Copyright (C) 1990-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/longlong.h b/src/longlong.h
new file mode 100644
index 00000000..46816429
--- /dev/null
+++ b/src/longlong.h
@@ -0,0 +1,2155 @@
+/* longlong.h -- definitions for mixed size 32/64 bit arithmetic.
+
+Copyright 1991-2013 Free Software Foundation, Inc.
+
+This file is free software; you can redistribute it and/or modify it under the
+terms of the GNU Lesser General Public License as published by the Free
+Software Foundation; either version 3 of the License, or (at your option) any
+later version.
+
+This file is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this file. If not, see http://www.gnu.org/licenses/. */
+
+/* You have to define the following before including this file:
+
+ UWtype -- An unsigned type, default type for operations (typically a "word")
+ UHWtype -- An unsigned type, at least half the size of UWtype
+ UDWtype -- An unsigned type, at least twice as large a UWtype
+ W_TYPE_SIZE -- size in bits of UWtype
+
+ SItype, USItype -- Signed and unsigned 32 bit types
+ DItype, UDItype -- Signed and unsigned 64 bit types
+
+ On a 32 bit machine UWtype should typically be USItype;
+ on a 64 bit machine, UWtype should typically be UDItype.
+
+ Optionally, define:
+
+ LONGLONG_STANDALONE -- Avoid code that needs machine-dependent support files
+ NO_ASM -- Disable inline asm
+
+
+ CAUTION! Using this version of longlong.h outside of GMP is not safe. You
+ need to include gmp.h and gmp-impl.h, or certain things might not work as
+ expected.
+*/
+
+#define __BITS4 (W_TYPE_SIZE / 4)
+#define __ll_B ((UWtype) 1 << (W_TYPE_SIZE / 2))
+#define __ll_lowpart(t) ((UWtype) (t) & (__ll_B - 1))
+#define __ll_highpart(t) ((UWtype) (t) >> (W_TYPE_SIZE / 2))
+
+/* This is used to make sure no undesirable sharing between different libraries
+ that use this file takes place. */
+#ifndef __MPN
+#define __MPN(x) __##x
+#endif
+
+/* Define auxiliary asm macros.
+
+ 1) umul_ppmm(high_prod, low_prod, multiplier, multiplicand) multiplies two
+ UWtype integers MULTIPLIER and MULTIPLICAND, and generates a two UWtype
+ word product in HIGH_PROD and LOW_PROD.
+
+ 2) __umulsidi3(a,b) multiplies two UWtype integers A and B, and returns a
+ UDWtype product. This is just a variant of umul_ppmm.
+
+ 3) udiv_qrnnd(quotient, remainder, high_numerator, low_numerator,
+ denominator) divides a UDWtype, composed by the UWtype integers
+ HIGH_NUMERATOR and LOW_NUMERATOR, by DENOMINATOR and places the quotient
+ in QUOTIENT and the remainder in REMAINDER. HIGH_NUMERATOR must be less
+ than DENOMINATOR for correct operation. If, in addition, the most
+ significant bit of DENOMINATOR must be 1, then the pre-processor symbol
+ UDIV_NEEDS_NORMALIZATION is defined to 1.
+
+ 4) sdiv_qrnnd(quotient, remainder, high_numerator, low_numerator,
+ denominator). Like udiv_qrnnd but the numbers are signed. The quotient
+ is rounded towards 0.
+
+ 5) count_leading_zeros(count, x) counts the number of zero-bits from the
+ msb to the first non-zero bit in the UWtype X. This is the number of
+ steps X needs to be shifted left to set the msb. Undefined for X == 0,
+ unless the symbol COUNT_LEADING_ZEROS_0 is defined to some value.
+
+ 6) count_trailing_zeros(count, x) like count_leading_zeros, but counts
+ from the least significant end.
+
+ 7) add_ssaaaa(high_sum, low_sum, high_addend_1, low_addend_1,
+ high_addend_2, low_addend_2) adds two UWtype integers, composed by
+ HIGH_ADDEND_1 and LOW_ADDEND_1, and HIGH_ADDEND_2 and LOW_ADDEND_2
+ respectively. The result is placed in HIGH_SUM and LOW_SUM. Overflow
+ (i.e. carry out) is not stored anywhere, and is lost.
+
+ 8) sub_ddmmss(high_difference, low_difference, high_minuend, low_minuend,
+ high_subtrahend, low_subtrahend) subtracts two two-word UWtype integers,
+ composed by HIGH_MINUEND_1 and LOW_MINUEND_1, and HIGH_SUBTRAHEND_2 and
+ LOW_SUBTRAHEND_2 respectively. The result is placed in HIGH_DIFFERENCE
+ and LOW_DIFFERENCE. Overflow (i.e. carry out) is not stored anywhere,
+ and is lost.
+
+ If any of these macros are left undefined for a particular CPU,
+ C macros are used.
+
+
+ Notes:
+
+ For add_ssaaaa the two high and two low addends can both commute, but
+ unfortunately gcc only supports one "%" commutative in each asm block.
+ This has always been so but is only documented in recent versions
+ (eg. pre-release 3.3). Having two or more "%"s can cause an internal
+ compiler error in certain rare circumstances.
+
+ Apparently it was only the last "%" that was ever actually respected, so
+ the code has been updated to leave just that. Clearly there's a free
+ choice whether high or low should get it, if there's a reason to favour
+ one over the other. Also obviously when the constraints on the two
+ operands are identical there's no benefit to the reloader in any "%" at
+ all.
+
+ */
+
+/* The CPUs come in alphabetical order below.
+
+ Please add support for more CPUs here, or improve the current support
+ for the CPUs below! */
+
+
+/* count_leading_zeros_gcc_clz is count_leading_zeros implemented with gcc
+ 3.4 __builtin_clzl or __builtin_clzll, according to our limb size.
+ Similarly count_trailing_zeros_gcc_ctz using __builtin_ctzl or
+ __builtin_ctzll.
+
+ These builtins are only used when we check what code comes out, on some
+ chips they're merely libgcc calls, where we will instead want an inline
+ in that case (either asm or generic C).
+
+ These builtins are better than an asm block of the same insn, since an
+ asm block doesn't give gcc any information about scheduling or resource
+ usage. We keep an asm block for use on prior versions of gcc though.
+
+ For reference, __builtin_ffs existed in gcc prior to __builtin_clz, but
+ it's not used (for count_leading_zeros) because it generally gives extra
+ code to ensure the result is 0 when the input is 0, which we don't need
+ or want. */
+
+#ifdef _LONG_LONG_LIMB
+#define count_leading_zeros_gcc_clz(count,x) \
+ do { \
+ ASSERT ((x) != 0); \
+ (count) = __builtin_clzll (x); \
+ } while (0)
+#else
+#define count_leading_zeros_gcc_clz(count,x) \
+ do { \
+ ASSERT ((x) != 0); \
+ (count) = __builtin_clzl (x); \
+ } while (0)
+#endif
+
+#ifdef _LONG_LONG_LIMB
+#define count_trailing_zeros_gcc_ctz(count,x) \
+ do { \
+ ASSERT ((x) != 0); \
+ (count) = __builtin_ctzll (x); \
+ } while (0)
+#else
+#define count_trailing_zeros_gcc_ctz(count,x) \
+ do { \
+ ASSERT ((x) != 0); \
+ (count) = __builtin_ctzl (x); \
+ } while (0)
+#endif
+
+
+/* FIXME: The macros using external routines like __MPN(count_leading_zeros)
+ don't need to be under !NO_ASM */
+#if ! defined (NO_ASM)
+
+#if defined (__alpha) && W_TYPE_SIZE == 64
+/* Most alpha-based machines, except Cray systems. */
+#if defined (__GNUC__)
+#if __GMP_GNUC_PREREQ (3,3)
+#define umul_ppmm(ph, pl, m0, m1) \
+ do { \
+ UDItype __m0 = (m0), __m1 = (m1); \
+ (ph) = __builtin_alpha_umulh (__m0, __m1); \
+ (pl) = __m0 * __m1; \
+ } while (0)
+#else
+#define umul_ppmm(ph, pl, m0, m1) \
+ do { \
+ UDItype __m0 = (m0), __m1 = (m1); \
+ __asm__ ("umulh %r1,%2,%0" \
+ : "=r" (ph) \
+ : "%rJ" (m0), "rI" (m1)); \
+ (pl) = __m0 * __m1; \
+ } while (0)
+#endif
+#define UMUL_TIME 18
+#else /* ! __GNUC__ */
+#include <machine/builtins.h>
+#define umul_ppmm(ph, pl, m0, m1) \
+ do { \
+ UDItype __m0 = (m0), __m1 = (m1); \
+ (ph) = __UMULH (m0, m1); \
+ (pl) = __m0 * __m1; \
+ } while (0)
+#endif
+#ifndef LONGLONG_STANDALONE
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ do { UWtype __di; \
+ __di = __MPN(invert_limb) (d); \
+ udiv_qrnnd_preinv (q, r, n1, n0, d, __di); \
+ } while (0)
+#define UDIV_PREINV_ALWAYS 1
+#define UDIV_NEEDS_NORMALIZATION 1
+#define UDIV_TIME 220
+#endif /* LONGLONG_STANDALONE */
+
+/* clz_tab is required in all configurations, since mpn/alpha/cntlz.asm
+ always goes into libgmp.so, even when not actually used. */
+#define COUNT_LEADING_ZEROS_NEED_CLZ_TAB
+
+#if defined (__GNUC__) && HAVE_HOST_CPU_alpha_CIX
+#define count_leading_zeros(COUNT,X) \
+ __asm__("ctlz %1,%0" : "=r"(COUNT) : "r"(X))
+#define count_trailing_zeros(COUNT,X) \
+ __asm__("cttz %1,%0" : "=r"(COUNT) : "r"(X))
+#endif /* clz/ctz using cix */
+
+#if ! defined (count_leading_zeros) \
+ && defined (__GNUC__) && ! defined (LONGLONG_STANDALONE)
+/* ALPHA_CMPBGE_0 gives "cmpbge $31,src,dst", ie. test src bytes == 0.
+ "$31" is written explicitly in the asm, since an "r" constraint won't
+ select reg 31. There seems no need to worry about "r31" syntax for cray,
+ since gcc itself (pre-release 3.4) emits just $31 in various places. */
+#define ALPHA_CMPBGE_0(dst, src) \
+ do { asm ("cmpbge $31, %1, %0" : "=r" (dst) : "r" (src)); } while (0)
+/* Zero bytes are turned into bits with cmpbge, a __clz_tab lookup counts
+ them, locating the highest non-zero byte. A second __clz_tab lookup
+ counts the leading zero bits in that byte, giving the result. */
+#define count_leading_zeros(count, x) \
+ do { \
+ UWtype __clz__b, __clz__c, __clz__x = (x); \
+ ALPHA_CMPBGE_0 (__clz__b, __clz__x); /* zero bytes */ \
+ __clz__b = __clz_tab [(__clz__b >> 1) ^ 0x7F]; /* 8 to 1 byte */ \
+ __clz__b = __clz__b * 8 - 7; /* 57 to 1 shift */ \
+ __clz__x >>= __clz__b; \
+ __clz__c = __clz_tab [__clz__x]; /* 8 to 1 bit */ \
+ __clz__b = 65 - __clz__b; \
+ (count) = __clz__b - __clz__c; \
+ } while (0)
+#define COUNT_LEADING_ZEROS_NEED_CLZ_TAB
+#endif /* clz using cmpbge */
+
+#if ! defined (count_leading_zeros) && ! defined (LONGLONG_STANDALONE)
+#if HAVE_ATTRIBUTE_CONST
+long __MPN(count_leading_zeros) (UDItype) __attribute__ ((const));
+#else
+long __MPN(count_leading_zeros) (UDItype);
+#endif
+#define count_leading_zeros(count, x) \
+ ((count) = __MPN(count_leading_zeros) (x))
+#endif /* clz using mpn */
+#endif /* __alpha */
+
+#if defined (__AVR) && W_TYPE_SIZE == 8
+#define umul_ppmm(ph, pl, m0, m1) \
+ do { \
+ unsigned short __p = (unsigned short) (m0) * (m1); \
+ (ph) = __p >> 8; \
+ (pl) = __p; \
+ } while (0)
+#endif /* AVR */
+
+#if defined (_CRAY) && W_TYPE_SIZE == 64
+#include <intrinsics.h>
+#define UDIV_PREINV_ALWAYS 1
+#define UDIV_NEEDS_NORMALIZATION 1
+#define UDIV_TIME 220
+long __MPN(count_leading_zeros) (UDItype);
+#define count_leading_zeros(count, x) \
+ ((count) = _leadz ((UWtype) (x)))
+#if defined (_CRAYIEEE) /* I.e., Cray T90/ieee, T3D, and T3E */
+#define umul_ppmm(ph, pl, m0, m1) \
+ do { \
+ UDItype __m0 = (m0), __m1 = (m1); \
+ (ph) = _int_mult_upper (m0, m1); \
+ (pl) = __m0 * __m1; \
+ } while (0)
+#ifndef LONGLONG_STANDALONE
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ do { UWtype __di; \
+ __di = __MPN(invert_limb) (d); \
+ udiv_qrnnd_preinv (q, r, n1, n0, d, __di); \
+ } while (0)
+#endif /* LONGLONG_STANDALONE */
+#endif /* _CRAYIEEE */
+#endif /* _CRAY */
+
+#if defined (__ia64) && W_TYPE_SIZE == 64
+/* This form encourages gcc (pre-release 3.4 at least) to emit predicated
+ "sub r=r,r" and "sub r=r,r,1", giving a 2 cycle latency. The generic
+ code using "al<bl" arithmetically comes out making an actual 0 or 1 in a
+ register, which takes an extra cycle. */
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ do { \
+ UWtype __x; \
+ __x = (al) - (bl); \
+ if ((al) < (bl)) \
+ (sh) = (ah) - (bh) - 1; \
+ else \
+ (sh) = (ah) - (bh); \
+ (sl) = __x; \
+ } while (0)
+#if defined (__GNUC__) && ! defined (__INTEL_COMPILER)
+/* Do both product parts in assembly, since that gives better code with
+ all gcc versions. Some callers will just use the upper part, and in
+ that situation we waste an instruction, but not any cycles. */
+#define umul_ppmm(ph, pl, m0, m1) \
+ __asm__ ("xma.hu %0 = %2, %3, f0\n\txma.l %1 = %2, %3, f0" \
+ : "=&f" (ph), "=f" (pl) \
+ : "f" (m0), "f" (m1))
+#define UMUL_TIME 14
+#define count_leading_zeros(count, x) \
+ do { \
+ UWtype _x = (x), _y, _a, _c; \
+ __asm__ ("mux1 %0 = %1, @rev" : "=r" (_y) : "r" (_x)); \
+ __asm__ ("czx1.l %0 = %1" : "=r" (_a) : "r" (-_y | _y)); \
+ _c = (_a - 1) << 3; \
+ _x >>= _c; \
+ if (_x >= 1 << 4) \
+ _x >>= 4, _c += 4; \
+ if (_x >= 1 << 2) \
+ _x >>= 2, _c += 2; \
+ _c += _x >> 1; \
+ (count) = W_TYPE_SIZE - 1 - _c; \
+ } while (0)
+/* similar to what gcc does for __builtin_ffs, but 0 based rather than 1
+ based, and we don't need a special case for x==0 here */
+#define count_trailing_zeros(count, x) \
+ do { \
+ UWtype __ctz_x = (x); \
+ __asm__ ("popcnt %0 = %1" \
+ : "=r" (count) \
+ : "r" ((__ctz_x-1) & ~__ctz_x)); \
+ } while (0)
+#endif
+#if defined (__INTEL_COMPILER)
+#include <ia64intrin.h>
+#define umul_ppmm(ph, pl, m0, m1) \
+ do { \
+ UWtype _m0 = (m0), _m1 = (m1); \
+ ph = _m64_xmahu (_m0, _m1, 0); \
+ pl = _m0 * _m1; \
+ } while (0)
+#endif
+#ifndef LONGLONG_STANDALONE
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ do { UWtype __di; \
+ __di = __MPN(invert_limb) (d); \
+ udiv_qrnnd_preinv (q, r, n1, n0, d, __di); \
+ } while (0)
+#define UDIV_PREINV_ALWAYS 1
+#define UDIV_NEEDS_NORMALIZATION 1
+#endif
+#define UDIV_TIME 220
+#endif
+
+
+#if defined (__GNUC__)
+
+/* We sometimes need to clobber "cc" with gcc2, but that would not be
+ understood by gcc1. Use cpp to avoid major code duplication. */
+#if __GNUC__ < 2
+#define __CLOBBER_CC
+#define __AND_CLOBBER_CC
+#else /* __GNUC__ >= 2 */
+#define __CLOBBER_CC : "cc"
+#define __AND_CLOBBER_CC , "cc"
+#endif /* __GNUC__ < 2 */
+
+#if (defined (__a29k__) || defined (_AM29K)) && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("add %1,%4,%5\n\taddc %0,%2,%3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "r" (ah), "rI" (bh), "%r" (al), "rI" (bl))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("sub %1,%4,%5\n\tsubc %0,%2,%3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "r" (ah), "rI" (bh), "r" (al), "rI" (bl))
+#define umul_ppmm(xh, xl, m0, m1) \
+ do { \
+ USItype __m0 = (m0), __m1 = (m1); \
+ __asm__ ("multiplu %0,%1,%2" \
+ : "=r" (xl) \
+ : "r" (__m0), "r" (__m1)); \
+ __asm__ ("multmu %0,%1,%2" \
+ : "=r" (xh) \
+ : "r" (__m0), "r" (__m1)); \
+ } while (0)
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ __asm__ ("dividu %0,%3,%4" \
+ : "=r" (q), "=q" (r) \
+ : "1" (n1), "r" (n0), "r" (d))
+#define count_leading_zeros(count, x) \
+ __asm__ ("clz %0,%1" \
+ : "=r" (count) \
+ : "r" (x))
+#define COUNT_LEADING_ZEROS_0 32
+#endif /* __a29k__ */
+
+#if defined (__arc__)
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("add.f\t%1, %4, %5\n\tadc\t%0, %2, %3" \
+ : "=r" (sh), \
+ "=&r" (sl) \
+ : "r" ((USItype) (ah)), \
+ "rIJ" ((USItype) (bh)), \
+ "%r" ((USItype) (al)), \
+ "rIJ" ((USItype) (bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("sub.f\t%1, %4, %5\n\tsbc\t%0, %2, %3" \
+ : "=r" (sh), \
+ "=&r" (sl) \
+ : "r" ((USItype) (ah)), \
+ "rIJ" ((USItype) (bh)), \
+ "r" ((USItype) (al)), \
+ "rIJ" ((USItype) (bl)))
+#endif
+
+#if defined (__arm__) && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("adds\t%1, %4, %5\n\tadc\t%0, %2, %3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "r" (ah), "rI" (bh), "%r" (al), "rI" (bl) __CLOBBER_CC)
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ do { \
+ if (__builtin_constant_p (al)) \
+ { \
+ if (__builtin_constant_p (ah)) \
+ __asm__ ("rsbs\t%1, %5, %4\n\trsc\t%0, %3, %2" \
+ : "=r" (sh), "=&r" (sl) \
+ : "rI" (ah), "r" (bh), "rI" (al), "r" (bl) __CLOBBER_CC); \
+ else \
+ __asm__ ("rsbs\t%1, %5, %4\n\tsbc\t%0, %2, %3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "r" (ah), "rI" (bh), "rI" (al), "r" (bl) __CLOBBER_CC); \
+ } \
+ else if (__builtin_constant_p (ah)) \
+ { \
+ if (__builtin_constant_p (bl)) \
+ __asm__ ("subs\t%1, %4, %5\n\trsc\t%0, %3, %2" \
+ : "=r" (sh), "=&r" (sl) \
+ : "rI" (ah), "r" (bh), "r" (al), "rI" (bl) __CLOBBER_CC); \
+ else \
+ __asm__ ("rsbs\t%1, %5, %4\n\trsc\t%0, %3, %2" \
+ : "=r" (sh), "=&r" (sl) \
+ : "rI" (ah), "r" (bh), "rI" (al), "r" (bl) __CLOBBER_CC); \
+ } \
+ else if (__builtin_constant_p (bl)) \
+ { \
+ if (__builtin_constant_p (bh)) \
+ __asm__ ("subs\t%1, %4, %5\n\tsbc\t%0, %2, %3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "r" (ah), "rI" (bh), "r" (al), "rI" (bl) __CLOBBER_CC); \
+ else \
+ __asm__ ("subs\t%1, %4, %5\n\trsc\t%0, %3, %2" \
+ : "=r" (sh), "=&r" (sl) \
+ : "rI" (ah), "r" (bh), "r" (al), "rI" (bl) __CLOBBER_CC); \
+ } \
+ else /* only bh might be a constant */ \
+ __asm__ ("subs\t%1, %4, %5\n\tsbc\t%0, %2, %3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "r" (ah), "rI" (bh), "r" (al), "rI" (bl) __CLOBBER_CC);\
+ } while (0)
+#if 1 || defined (__arm_m__) /* `M' series has widening multiply support */
+#define umul_ppmm(xh, xl, a, b) \
+ __asm__ ("umull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b))
+#define UMUL_TIME 5
+#define smul_ppmm(xh, xl, a, b) \
+ __asm__ ("smull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b))
+#ifndef LONGLONG_STANDALONE
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ do { UWtype __di; \
+ __di = __MPN(invert_limb) (d); \
+ udiv_qrnnd_preinv (q, r, n1, n0, d, __di); \
+ } while (0)
+#define UDIV_PREINV_ALWAYS 1
+#define UDIV_NEEDS_NORMALIZATION 1
+#define UDIV_TIME 70
+#endif /* LONGLONG_STANDALONE */
+#else
+#define umul_ppmm(xh, xl, a, b) \
+ __asm__ ("%@ Inlined umul_ppmm\n" \
+" mov %|r0, %2, lsr #16\n" \
+" mov %|r2, %3, lsr #16\n" \
+" bic %|r1, %2, %|r0, lsl #16\n" \
+" bic %|r2, %3, %|r2, lsl #16\n" \
+" mul %1, %|r1, %|r2\n" \
+" mul %|r2, %|r0, %|r2\n" \
+" mul %|r1, %0, %|r1\n" \
+" mul %0, %|r0, %0\n" \
+" adds %|r1, %|r2, %|r1\n" \
+" addcs %0, %0, #65536\n" \
+" adds %1, %1, %|r1, lsl #16\n" \
+" adc %0, %0, %|r1, lsr #16" \
+ : "=&r" (xh), "=r" (xl) \
+ : "r" (a), "r" (b) \
+ : "r0", "r1", "r2")
+#define UMUL_TIME 20
+#ifndef LONGLONG_STANDALONE
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ do { UWtype __r; \
+ (q) = __MPN(udiv_qrnnd) (&__r, (n1), (n0), (d)); \
+ (r) = __r; \
+ } while (0)
+extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, UWtype, UWtype);
+#define UDIV_TIME 200
+#endif /* LONGLONG_STANDALONE */
+#endif
+/* This is a bizarre test, but GCC doesn't define useful common symbol. */
+#if defined (__ARM_ARCH_5__) || defined (__ARM_ARCH_5T__) || \
+ defined (__ARM_ARCH_5E__) || defined (__ARM_ARCH_5TE__)|| \
+ defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6J__) || \
+ defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6Z__) || \
+ defined (__ARM_ARCH_6ZK__)|| defined (__ARM_ARCH_6T2__)|| \
+ defined (__ARM_ARCH_6M__) || defined (__ARM_ARCH_7__) || \
+ defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7R__) || \
+ defined (__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__)
+#define count_leading_zeros(count, x) \
+ __asm__ ("clz\t%0, %1" : "=r" (count) : "r" (x))
+#define COUNT_LEADING_ZEROS_0 32
+#endif
+#endif /* __arm__ */
+
+#if defined (__aarch64__) && W_TYPE_SIZE == 64
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("adds\t%1, %4, %5\n\tadc\t%0, %2, %3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "r" (ah), "rZ" (bh), "%r" (al), "rI" (bl) __CLOBBER_CC)
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ do { \
+ if (__builtin_constant_p (bl)) \
+ { \
+ __asm__ ("subs\t%1, %4, %5\n\tsbc\t%0, %2, %3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "r" (ah), "r" (bh), "r" (al), "rI" (bl) __CLOBBER_CC); \
+ } \
+ else /* only bh might be a constant */ \
+ __asm__ ("subs\t%1, %4, %5\n\tsbc\t%0, %2, %3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "r" (ah), "rZ" (bh), "r" (al), "rI" (bl) __CLOBBER_CC);\
+ } while (0)
+#define umul_ppmm(ph, pl, m0, m1) \
+ do { \
+ UDItype __m0 = (m0), __m1 = (m1); \
+ __asm__ ("umulh\t%0, %1, %2" : "=r" (ph) : "r" (m0), "r" (m1)); \
+ (pl) = __m0 * __m1; \
+ } while (0)
+#define count_leading_zeros(count, x) \
+ __asm__ ("clz\t%0, %1" : "=r" (count) : "r" (x))
+#define COUNT_LEADING_ZEROS_0 64
+#endif /* __aarch64__ */
+
+#if defined (__clipper__) && W_TYPE_SIZE == 32
+#define umul_ppmm(w1, w0, u, v) \
+ ({union {UDItype __ll; \
+ struct {USItype __l, __h;} __i; \
+ } __x; \
+ __asm__ ("mulwux %2,%0" \
+ : "=r" (__x.__ll) \
+ : "%0" ((USItype)(u)), "r" ((USItype)(v))); \
+ (w1) = __x.__i.__h; (w0) = __x.__i.__l;})
+#define smul_ppmm(w1, w0, u, v) \
+ ({union {DItype __ll; \
+ struct {SItype __l, __h;} __i; \
+ } __x; \
+ __asm__ ("mulwx %2,%0" \
+ : "=r" (__x.__ll) \
+ : "%0" ((SItype)(u)), "r" ((SItype)(v))); \
+ (w1) = __x.__i.__h; (w0) = __x.__i.__l;})
+#define __umulsidi3(u, v) \
+ ({UDItype __w; \
+ __asm__ ("mulwux %2,%0" \
+ : "=r" (__w) : "%0" ((USItype)(u)), "r" ((USItype)(v))); \
+ __w; })
+#endif /* __clipper__ */
+
+/* Fujitsu vector computers. */
+#if defined (__uxp__) && W_TYPE_SIZE == 32
+#define umul_ppmm(ph, pl, u, v) \
+ do { \
+ union {UDItype __ll; \
+ struct {USItype __h, __l;} __i; \
+ } __x; \
+ __asm__ ("mult.lu %1,%2,%0" : "=r" (__x.__ll) : "%r" (u), "rK" (v));\
+ (ph) = __x.__i.__h; \
+ (pl) = __x.__i.__l; \
+ } while (0)
+#define smul_ppmm(ph, pl, u, v) \
+ do { \
+ union {UDItype __ll; \
+ struct {USItype __h, __l;} __i; \
+ } __x; \
+ __asm__ ("mult.l %1,%2,%0" : "=r" (__x.__ll) : "%r" (u), "rK" (v)); \
+ (ph) = __x.__i.__h; \
+ (pl) = __x.__i.__l; \
+ } while (0)
+#endif
+
+#if defined (__gmicro__) && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("add.w %5,%1\n\taddx %3,%0" \
+ : "=g" (sh), "=&g" (sl) \
+ : "0" ((USItype)(ah)), "g" ((USItype)(bh)), \
+ "%1" ((USItype)(al)), "g" ((USItype)(bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("sub.w %5,%1\n\tsubx %3,%0" \
+ : "=g" (sh), "=&g" (sl) \
+ : "0" ((USItype)(ah)), "g" ((USItype)(bh)), \
+ "1" ((USItype)(al)), "g" ((USItype)(bl)))
+#define umul_ppmm(ph, pl, m0, m1) \
+ __asm__ ("mulx %3,%0,%1" \
+ : "=g" (ph), "=r" (pl) \
+ : "%0" ((USItype)(m0)), "g" ((USItype)(m1)))
+#define udiv_qrnnd(q, r, nh, nl, d) \
+ __asm__ ("divx %4,%0,%1" \
+ : "=g" (q), "=r" (r) \
+ : "1" ((USItype)(nh)), "0" ((USItype)(nl)), "g" ((USItype)(d)))
+#define count_leading_zeros(count, x) \
+ __asm__ ("bsch/1 %1,%0" \
+ : "=g" (count) : "g" ((USItype)(x)), "0" ((USItype)0))
+#endif
+
+#if defined (__hppa) && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("add%I5 %5,%r4,%1\n\taddc %r2,%r3,%0" \
+ : "=r" (sh), "=&r" (sl) \
+ : "rM" (ah), "rM" (bh), "%rM" (al), "rI" (bl))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("sub%I4 %4,%r5,%1\n\tsubb %r2,%r3,%0" \
+ : "=r" (sh), "=&r" (sl) \
+ : "rM" (ah), "rM" (bh), "rI" (al), "rM" (bl))
+#if defined (_PA_RISC1_1)
+#define umul_ppmm(wh, wl, u, v) \
+ do { \
+ union {UDItype __ll; \
+ struct {USItype __h, __l;} __i; \
+ } __x; \
+ __asm__ ("xmpyu %1,%2,%0" : "=*f" (__x.__ll) : "*f" (u), "*f" (v)); \
+ (wh) = __x.__i.__h; \
+ (wl) = __x.__i.__l; \
+ } while (0)
+#define UMUL_TIME 8
+#define UDIV_TIME 60
+#else
+#define UMUL_TIME 40
+#define UDIV_TIME 80
+#endif
+#define count_leading_zeros(count, x) \
+ do { \
+ USItype __tmp; \
+ __asm__ ( \
+ "ldi 1,%0\n" \
+" extru,= %1,15,16,%%r0 ; Bits 31..16 zero?\n" \
+" extru,tr %1,15,16,%1 ; No. Shift down, skip add.\n" \
+" ldo 16(%0),%0 ; Yes. Perform add.\n" \
+" extru,= %1,23,8,%%r0 ; Bits 15..8 zero?\n" \
+" extru,tr %1,23,8,%1 ; No. Shift down, skip add.\n" \
+" ldo 8(%0),%0 ; Yes. Perform add.\n" \
+" extru,= %1,27,4,%%r0 ; Bits 7..4 zero?\n" \
+" extru,tr %1,27,4,%1 ; No. Shift down, skip add.\n" \
+" ldo 4(%0),%0 ; Yes. Perform add.\n" \
+" extru,= %1,29,2,%%r0 ; Bits 3..2 zero?\n" \
+" extru,tr %1,29,2,%1 ; No. Shift down, skip add.\n" \
+" ldo 2(%0),%0 ; Yes. Perform add.\n" \
+" extru %1,30,1,%1 ; Extract bit 1.\n" \
+" sub %0,%1,%0 ; Subtract it.\n" \
+ : "=r" (count), "=r" (__tmp) : "1" (x)); \
+ } while (0)
+#endif /* hppa */
+
+/* These macros are for ABI=2.0w. In ABI=2.0n they can't be used, since GCC
+ (3.2) puts longlong into two adjacent 32-bit registers. Presumably this
+ is just a case of no direct support for 2.0n but treating it like 1.0. */
+#if defined (__hppa) && W_TYPE_SIZE == 64 && ! defined (_LONG_LONG_LIMB)
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("add%I5 %5,%r4,%1\n\tadd,dc %r2,%r3,%0" \
+ : "=r" (sh), "=&r" (sl) \
+ : "rM" (ah), "rM" (bh), "%rM" (al), "rI" (bl))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("sub%I4 %4,%r5,%1\n\tsub,db %r2,%r3,%0" \
+ : "=r" (sh), "=&r" (sl) \
+ : "rM" (ah), "rM" (bh), "rI" (al), "rM" (bl))
+#endif /* hppa */
+
+#if (defined (__i370__) || defined (__s390__) || defined (__mvs__)) && W_TYPE_SIZE == 32
+#if defined (__zarch__) || defined (HAVE_HOST_CPU_s390_zarch)
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ do { \
+/* if (__builtin_constant_p (bl)) \
+ __asm__ ("alfi\t%1,%o5\n\talcr\t%0,%3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "0" (ah), "r" (bh), "%1" (al), "n" (bl) __CLOBBER_CC);\
+ else \
+*/ __asm__ ("alr\t%1,%5\n\talcr\t%0,%3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "0" (ah), "r" (bh), "%1" (al), "r" (bl)__CLOBBER_CC); \
+ } while (0)
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ do { \
+/* if (__builtin_constant_p (bl)) \
+ __asm__ ("slfi\t%1,%o5\n\tslbr\t%0,%3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "0" (ah), "r" (bh), "1" (al), "n" (bl) __CLOBBER_CC); \
+ else \
+*/ __asm__ ("slr\t%1,%5\n\tslbr\t%0,%3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "0" (ah), "r" (bh), "1" (al), "r" (bl) __CLOBBER_CC); \
+ } while (0)
+#if __GMP_GNUC_PREREQ (4,5)
+#define umul_ppmm(xh, xl, m0, m1) \
+ do { \
+ union {UDItype __ll; \
+ struct {USItype __h, __l;} __i; \
+ } __x; \
+ __x.__ll = (UDItype) (m0) * (UDItype) (m1); \
+ (xh) = __x.__i.__h; (xl) = __x.__i.__l; \
+ } while (0)
+#else
+#if 0
+/* FIXME: this fails if gcc knows about the 64-bit registers. Use only
+ with a new enough processor pretending we have 32-bit registers. */
+#define umul_ppmm(xh, xl, m0, m1) \
+ do { \
+ union {UDItype __ll; \
+ struct {USItype __h, __l;} __i; \
+ } __x; \
+ __asm__ ("mlr\t%0,%2" \
+ : "=r" (__x.__ll) \
+ : "%0" (m0), "r" (m1)); \
+ (xh) = __x.__i.__h; (xl) = __x.__i.__l; \
+ } while (0)
+#else
+#define umul_ppmm(xh, xl, m0, m1) \
+ do { \
+ /* When we have 64-bit regs and gcc is aware of that, we cannot simply use
+ DImode for the product, since that would be allocated to a single 64-bit
+ register, whereas mlr uses the low 32-bits of an even-odd register pair.
+ */ \
+ register USItype __r0 __asm__ ("0"); \
+ register USItype __r1 __asm__ ("1") = (m0); \
+ __asm__ ("mlr\t%0,%3" \
+ : "=r" (__r0), "=r" (__r1) \
+ : "r" (__r1), "r" (m1)); \
+ (xh) = __r0; (xl) = __r1; \
+ } while (0)
+#endif /* if 0 */
+#endif
+#if 0
+/* FIXME: this fails if gcc knows about the 64-bit registers. Use only
+ with a new enough processor pretending we have 32-bit registers. */
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ do { \
+ union {UDItype __ll; \
+ struct {USItype __h, __l;} __i; \
+ } __x; \
+ __x.__i.__h = n1; __x.__i.__l = n0; \
+ __asm__ ("dlr\t%0,%2" \
+ : "=r" (__x.__ll) \
+ : "0" (__x.__ll), "r" (d)); \
+ (q) = __x.__i.__l; (r) = __x.__i.__h; \
+ } while (0)
+#else
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ do { \
+ register USItype __r0 __asm__ ("0") = (n1); \
+ register USItype __r1 __asm__ ("1") = (n0); \
+ __asm__ ("dlr\t%0,%4" \
+ : "=r" (__r0), "=r" (__r1) \
+ : "r" (__r0), "r" (__r1), "r" (d)); \
+ (q) = __r1; (r) = __r0; \
+ } while (0)
+#endif /* if 0 */
+#else /* if __zarch__ */
+/* FIXME: this fails if gcc knows about the 64-bit registers. */
+#define smul_ppmm(xh, xl, m0, m1) \
+ do { \
+ union {DItype __ll; \
+ struct {USItype __h, __l;} __i; \
+ } __x; \
+ __asm__ ("mr\t%0,%2" \
+ : "=r" (__x.__ll) \
+ : "%0" (m0), "r" (m1)); \
+ (xh) = __x.__i.__h; (xl) = __x.__i.__l; \
+ } while (0)
+/* FIXME: this fails if gcc knows about the 64-bit registers. */
+#define sdiv_qrnnd(q, r, n1, n0, d) \
+ do { \
+ union {DItype __ll; \
+ struct {USItype __h, __l;} __i; \
+ } __x; \
+ __x.__i.__h = n1; __x.__i.__l = n0; \
+ __asm__ ("dr\t%0,%2" \
+ : "=r" (__x.__ll) \
+ : "0" (__x.__ll), "r" (d)); \
+ (q) = __x.__i.__l; (r) = __x.__i.__h; \
+ } while (0)
+#endif /* if __zarch__ */
+#endif
+
+#if defined (__s390x__) && W_TYPE_SIZE == 64
+/* We need to cast operands with register constraints, otherwise their types
+ will be assumed to be SImode by gcc. For these machines, such operations
+ will insert a value into the low 32 bits, and leave the high 32 bits with
+ garbage. */
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ do { \
+ __asm__ ("algr\t%1,%5\n\talcgr\t%0,%3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "0" ((UDItype)(ah)), "r" ((UDItype)(bh)), \
+ "%1" ((UDItype)(al)), "r" ((UDItype)(bl)) __CLOBBER_CC); \
+ } while (0)
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ do { \
+ __asm__ ("slgr\t%1,%5\n\tslbgr\t%0,%3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "0" ((UDItype)(ah)), "r" ((UDItype)(bh)), \
+ "1" ((UDItype)(al)), "r" ((UDItype)(bl)) __CLOBBER_CC); \
+ } while (0)
+#define umul_ppmm(xh, xl, m0, m1) \
+ do { \
+ union {unsigned int __attribute__ ((mode(TI))) __ll; \
+ struct {UDItype __h, __l;} __i; \
+ } __x; \
+ __asm__ ("mlgr\t%0,%2" \
+ : "=r" (__x.__ll) \
+ : "%0" ((UDItype)(m0)), "r" ((UDItype)(m1))); \
+ (xh) = __x.__i.__h; (xl) = __x.__i.__l; \
+ } while (0)
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ do { \
+ union {unsigned int __attribute__ ((mode(TI))) __ll; \
+ struct {UDItype __h, __l;} __i; \
+ } __x; \
+ __x.__i.__h = n1; __x.__i.__l = n0; \
+ __asm__ ("dlgr\t%0,%2" \
+ : "=r" (__x.__ll) \
+ : "0" (__x.__ll), "r" ((UDItype)(d))); \
+ (q) = __x.__i.__l; (r) = __x.__i.__h; \
+ } while (0)
+#if 0 /* FIXME: Enable for z10 (?) */
+#define count_leading_zeros(cnt, x) \
+ do { \
+ union {unsigned int __attribute__ ((mode(TI))) __ll; \
+ struct {UDItype __h, __l;} __i; \
+ } __clr_cnt; \
+ __asm__ ("flogr\t%0,%1" \
+ : "=r" (__clr_cnt.__ll) \
+ : "r" (x) __CLOBBER_CC); \
+ (cnt) = __clr_cnt.__i.__h; \
+ } while (0)
+#endif
+#endif
+
+#if (defined (__i386__) || defined (__i486__)) && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("addl %5,%k1\n\tadcl %3,%k0" \
+ : "=r" (sh), "=&r" (sl) \
+ : "0" ((USItype)(ah)), "g" ((USItype)(bh)), \
+ "%1" ((USItype)(al)), "g" ((USItype)(bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("subl %5,%k1\n\tsbbl %3,%k0" \
+ : "=r" (sh), "=&r" (sl) \
+ : "0" ((USItype)(ah)), "g" ((USItype)(bh)), \
+ "1" ((USItype)(al)), "g" ((USItype)(bl)))
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("mull %3" \
+ : "=a" (w0), "=d" (w1) \
+ : "%0" ((USItype)(u)), "rm" ((USItype)(v)))
+#define udiv_qrnnd(q, r, n1, n0, dx) /* d renamed to dx avoiding "=d" */\
+ __asm__ ("divl %4" /* stringification in K&R C */ \
+ : "=a" (q), "=d" (r) \
+ : "0" ((USItype)(n0)), "1" ((USItype)(n1)), "rm" ((USItype)(dx)))
+
+#if HAVE_HOST_CPU_i586 || HAVE_HOST_CPU_pentium || HAVE_HOST_CPU_pentiummmx
+/* Pentium bsrl takes between 10 and 72 cycles depending where the most
+ significant 1 bit is, hence the use of the following alternatives. bsfl
+ is slow too, between 18 and 42 depending where the least significant 1
+ bit is, so let the generic count_trailing_zeros below make use of the
+ count_leading_zeros here too. */
+
+#if HAVE_HOST_CPU_pentiummmx && ! defined (LONGLONG_STANDALONE)
+/* The following should be a fixed 14 or 15 cycles, but possibly plus an L1
+ cache miss reading from __clz_tab. For P55 it's favoured over the float
+ below so as to avoid mixing MMX and x87, since the penalty for switching
+ between the two is about 100 cycles.
+
+ The asm block sets __shift to -3 if the high 24 bits are clear, -2 for
+ 16, -1 for 8, or 0 otherwise. This could be written equivalently as
+ follows, but as of gcc 2.95.2 it results in conditional jumps.
+
+ __shift = -(__n < 0x1000000);
+ __shift -= (__n < 0x10000);
+ __shift -= (__n < 0x100);
+
+ The middle two sbbl and cmpl's pair, and with luck something gcc
+ generates might pair with the first cmpl and the last sbbl. The "32+1"
+ constant could be folded into __clz_tab[], but it doesn't seem worth
+ making a different table just for that. */
+
+#define count_leading_zeros(c,n) \
+ do { \
+ USItype __n = (n); \
+ USItype __shift; \
+ __asm__ ("cmpl $0x1000000, %1\n" \
+ "sbbl %0, %0\n" \
+ "cmpl $0x10000, %1\n" \
+ "sbbl $0, %0\n" \
+ "cmpl $0x100, %1\n" \
+ "sbbl $0, %0\n" \
+ : "=&r" (__shift) : "r" (__n)); \
+ __shift = __shift*8 + 24 + 1; \
+ (c) = 32 + 1 - __shift - __clz_tab[__n >> __shift]; \
+ } while (0)
+#define COUNT_LEADING_ZEROS_NEED_CLZ_TAB
+#define COUNT_LEADING_ZEROS_0 31 /* n==0 indistinguishable from n==1 */
+
+#else /* ! pentiummmx || LONGLONG_STANDALONE */
+/* The following should be a fixed 14 cycles or so. Some scheduling
+ opportunities should be available between the float load/store too. This
+ sort of code is used in gcc 3 for __builtin_ffs (with "n&-n") and is
+ apparently suggested by the Intel optimizing manual (don't know exactly
+ where). gcc 2.95 or up will be best for this, so the "double" is
+ correctly aligned on the stack. */
+#define count_leading_zeros(c,n) \
+ do { \
+ union { \
+ double d; \
+ unsigned a[2]; \
+ } __u; \
+ ASSERT ((n) != 0); \
+ __u.d = (UWtype) (n); \
+ (c) = 0x3FF + 31 - (__u.a[1] >> 20); \
+ } while (0)
+#define COUNT_LEADING_ZEROS_0 (0x3FF + 31)
+#endif /* pentiummx */
+
+#else /* ! pentium */
+
+#if __GMP_GNUC_PREREQ (3,4) /* using bsrl */
+#define count_leading_zeros(count,x) count_leading_zeros_gcc_clz(count,x)
+#endif /* gcc clz */
+
+/* On P6, gcc prior to 3.0 generates a partial register stall for
+ __cbtmp^31, due to using "xorb $31" instead of "xorl $31", the former
+ being 1 code byte smaller. "31-__cbtmp" is a workaround, probably at the
+ cost of one extra instruction. Do this for "i386" too, since that means
+ generic x86. */
+#if ! defined (count_leading_zeros) && __GNUC__ < 3 \
+ && (HAVE_HOST_CPU_i386 \
+ || HAVE_HOST_CPU_i686 \
+ || HAVE_HOST_CPU_pentiumpro \
+ || HAVE_HOST_CPU_pentium2 \
+ || HAVE_HOST_CPU_pentium3)
+#define count_leading_zeros(count, x) \
+ do { \
+ USItype __cbtmp; \
+ ASSERT ((x) != 0); \
+ __asm__ ("bsrl %1,%0" : "=r" (__cbtmp) : "rm" ((USItype)(x))); \
+ (count) = 31 - __cbtmp; \
+ } while (0)
+#endif /* gcc<3 asm bsrl */
+
+#ifndef count_leading_zeros
+#define count_leading_zeros(count, x) \
+ do { \
+ USItype __cbtmp; \
+ ASSERT ((x) != 0); \
+ __asm__ ("bsrl %1,%0" : "=r" (__cbtmp) : "rm" ((USItype)(x))); \
+ (count) = __cbtmp ^ 31; \
+ } while (0)
+#endif /* asm bsrl */
+
+#if __GMP_GNUC_PREREQ (3,4) /* using bsfl */
+#define count_trailing_zeros(count,x) count_trailing_zeros_gcc_ctz(count,x)
+#endif /* gcc ctz */
+
+#ifndef count_trailing_zeros
+#define count_trailing_zeros(count, x) \
+ do { \
+ ASSERT ((x) != 0); \
+ __asm__ ("bsfl %1,%k0" : "=r" (count) : "rm" ((USItype)(x))); \
+ } while (0)
+#endif /* asm bsfl */
+
+#endif /* ! pentium */
+
+#ifndef UMUL_TIME
+#define UMUL_TIME 10
+#endif
+#ifndef UDIV_TIME
+#define UDIV_TIME 40
+#endif
+#endif /* 80x86 */
+
+#if defined (__amd64__) && W_TYPE_SIZE == 64
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("addq %5,%q1\n\tadcq %3,%q0" \
+ : "=r" (sh), "=&r" (sl) \
+ : "0" ((UDItype)(ah)), "rme" ((UDItype)(bh)), \
+ "%1" ((UDItype)(al)), "rme" ((UDItype)(bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("subq %5,%q1\n\tsbbq %3,%q0" \
+ : "=r" (sh), "=&r" (sl) \
+ : "0" ((UDItype)(ah)), "rme" ((UDItype)(bh)), \
+ "1" ((UDItype)(al)), "rme" ((UDItype)(bl)))
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("mulq %3" \
+ : "=a" (w0), "=d" (w1) \
+ : "%0" ((UDItype)(u)), "rm" ((UDItype)(v)))
+#define udiv_qrnnd(q, r, n1, n0, dx) /* d renamed to dx avoiding "=d" */\
+ __asm__ ("divq %4" /* stringification in K&R C */ \
+ : "=a" (q), "=d" (r) \
+ : "0" ((UDItype)(n0)), "1" ((UDItype)(n1)), "rm" ((UDItype)(dx)))
+/* bsrq destination must be a 64-bit register, hence UDItype for __cbtmp. */
+#define count_leading_zeros(count, x) \
+ do { \
+ UDItype __cbtmp; \
+ ASSERT ((x) != 0); \
+ __asm__ ("bsrq %1,%0" : "=r" (__cbtmp) : "rm" ((UDItype)(x))); \
+ (count) = __cbtmp ^ 63; \
+ } while (0)
+/* bsfq destination must be a 64-bit register, "%q0" forces this in case
+ count is only an int. */
+#define count_trailing_zeros(count, x) \
+ do { \
+ ASSERT ((x) != 0); \
+ __asm__ ("bsfq %1,%q0" : "=r" (count) : "rm" ((UDItype)(x))); \
+ } while (0)
+#endif /* x86_64 */
+
+#if defined (__i860__) && W_TYPE_SIZE == 32
+#define rshift_rhlc(r,h,l,c) \
+ __asm__ ("shr %3,r0,r0\;shrd %1,%2,%0" \
+ "=r" (r) : "r" (h), "r" (l), "rn" (c))
+#endif /* i860 */
+
+#if defined (__i960__) && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("cmpo 1,0\;addc %5,%4,%1\;addc %3,%2,%0" \
+ : "=r" (sh), "=&r" (sl) \
+ : "dI" (ah), "dI" (bh), "%dI" (al), "dI" (bl))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("cmpo 0,0\;subc %5,%4,%1\;subc %3,%2,%0" \
+ : "=r" (sh), "=&r" (sl) \
+ : "dI" (ah), "dI" (bh), "dI" (al), "dI" (bl))
+#define umul_ppmm(w1, w0, u, v) \
+ ({union {UDItype __ll; \
+ struct {USItype __l, __h;} __i; \
+ } __x; \
+ __asm__ ("emul %2,%1,%0" \
+ : "=d" (__x.__ll) : "%dI" (u), "dI" (v)); \
+ (w1) = __x.__i.__h; (w0) = __x.__i.__l;})
+#define __umulsidi3(u, v) \
+ ({UDItype __w; \
+ __asm__ ("emul %2,%1,%0" : "=d" (__w) : "%dI" (u), "dI" (v)); \
+ __w; })
+#define udiv_qrnnd(q, r, nh, nl, d) \
+ do { \
+ union {UDItype __ll; \
+ struct {USItype __l, __h;} __i; \
+ } __nn; \
+ __nn.__i.__h = (nh); __nn.__i.__l = (nl); \
+ __asm__ ("ediv %d,%n,%0" \
+ : "=d" (__rq.__ll) : "dI" (__nn.__ll), "dI" (d)); \
+ (r) = __rq.__i.__l; (q) = __rq.__i.__h; \
+ } while (0)
+#define count_leading_zeros(count, x) \
+ do { \
+ USItype __cbtmp; \
+ __asm__ ("scanbit %1,%0" : "=r" (__cbtmp) : "r" (x)); \
+ (count) = __cbtmp ^ 31; \
+ } while (0)
+#define COUNT_LEADING_ZEROS_0 (-32) /* sic */
+#if defined (__i960mx) /* what is the proper symbol to test??? */
+#define rshift_rhlc(r,h,l,c) \
+ do { \
+ union {UDItype __ll; \
+ struct {USItype __l, __h;} __i; \
+ } __nn; \
+ __nn.__i.__h = (h); __nn.__i.__l = (l); \
+ __asm__ ("shre %2,%1,%0" : "=d" (r) : "dI" (__nn.__ll), "dI" (c)); \
+ }
+#endif /* i960mx */
+#endif /* i960 */
+
+#if (defined (__mc68000__) || defined (__mc68020__) || defined(mc68020) \
+ || defined (__m68k__) || defined (__mc5200__) || defined (__mc5206e__) \
+ || defined (__mc5307__)) && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("add%.l %5,%1\n\taddx%.l %3,%0" \
+ : "=d" (sh), "=&d" (sl) \
+ : "0" ((USItype)(ah)), "d" ((USItype)(bh)), \
+ "%1" ((USItype)(al)), "g" ((USItype)(bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("sub%.l %5,%1\n\tsubx%.l %3,%0" \
+ : "=d" (sh), "=&d" (sl) \
+ : "0" ((USItype)(ah)), "d" ((USItype)(bh)), \
+ "1" ((USItype)(al)), "g" ((USItype)(bl)))
+/* The '020, '030, '040 and CPU32 have 32x32->64 and 64/32->32q-32r. */
+#if defined (__mc68020__) || defined(mc68020) \
+ || defined (__mc68030__) || defined (mc68030) \
+ || defined (__mc68040__) || defined (mc68040) \
+ || defined (__mcpu32__) || defined (mcpu32) \
+ || defined (__NeXT__)
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("mulu%.l %3,%1:%0" \
+ : "=d" (w0), "=d" (w1) \
+ : "%0" ((USItype)(u)), "dmi" ((USItype)(v)))
+#define UMUL_TIME 45
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ __asm__ ("divu%.l %4,%1:%0" \
+ : "=d" (q), "=d" (r) \
+ : "0" ((USItype)(n0)), "1" ((USItype)(n1)), "dmi" ((USItype)(d)))
+#define UDIV_TIME 90
+#define sdiv_qrnnd(q, r, n1, n0, d) \
+ __asm__ ("divs%.l %4,%1:%0" \
+ : "=d" (q), "=d" (r) \
+ : "0" ((USItype)(n0)), "1" ((USItype)(n1)), "dmi" ((USItype)(d)))
+#else /* for other 68k family members use 16x16->32 multiplication */
+#define umul_ppmm(xh, xl, a, b) \
+ do { USItype __umul_tmp1, __umul_tmp2; \
+ __asm__ ("| Inlined umul_ppmm\n" \
+" move%.l %5,%3\n" \
+" move%.l %2,%0\n" \
+" move%.w %3,%1\n" \
+" swap %3\n" \
+" swap %0\n" \
+" mulu%.w %2,%1\n" \
+" mulu%.w %3,%0\n" \
+" mulu%.w %2,%3\n" \
+" swap %2\n" \
+" mulu%.w %5,%2\n" \
+" add%.l %3,%2\n" \
+" jcc 1f\n" \
+" add%.l %#0x10000,%0\n" \
+"1: move%.l %2,%3\n" \
+" clr%.w %2\n" \
+" swap %2\n" \
+" swap %3\n" \
+" clr%.w %3\n" \
+" add%.l %3,%1\n" \
+" addx%.l %2,%0\n" \
+" | End inlined umul_ppmm" \
+ : "=&d" (xh), "=&d" (xl), \
+ "=d" (__umul_tmp1), "=&d" (__umul_tmp2) \
+ : "%2" ((USItype)(a)), "d" ((USItype)(b))); \
+ } while (0)
+#define UMUL_TIME 100
+#define UDIV_TIME 400
+#endif /* not mc68020 */
+/* The '020, '030, '040 and '060 have bitfield insns.
+ GCC 3.4 defines __mc68020__ when in CPU32 mode, check for __mcpu32__ to
+ exclude bfffo on that chip (bitfield insns not available). */
+#if (defined (__mc68020__) || defined (mc68020) \
+ || defined (__mc68030__) || defined (mc68030) \
+ || defined (__mc68040__) || defined (mc68040) \
+ || defined (__mc68060__) || defined (mc68060) \
+ || defined (__NeXT__)) \
+ && ! defined (__mcpu32__)
+#define count_leading_zeros(count, x) \
+ __asm__ ("bfffo %1{%b2:%b2},%0" \
+ : "=d" (count) \
+ : "od" ((USItype) (x)), "n" (0))
+#define COUNT_LEADING_ZEROS_0 32
+#endif
+#endif /* mc68000 */
+
+#if defined (__m88000__) && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("addu.co %1,%r4,%r5\n\taddu.ci %0,%r2,%r3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "rJ" (ah), "rJ" (bh), "%rJ" (al), "rJ" (bl))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("subu.co %1,%r4,%r5\n\tsubu.ci %0,%r2,%r3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "rJ" (ah), "rJ" (bh), "rJ" (al), "rJ" (bl))
+#define count_leading_zeros(count, x) \
+ do { \
+ USItype __cbtmp; \
+ __asm__ ("ff1 %0,%1" : "=r" (__cbtmp) : "r" (x)); \
+ (count) = __cbtmp ^ 31; \
+ } while (0)
+#define COUNT_LEADING_ZEROS_0 63 /* sic */
+#if defined (__m88110__)
+#define umul_ppmm(wh, wl, u, v) \
+ do { \
+ union {UDItype __ll; \
+ struct {USItype __h, __l;} __i; \
+ } __x; \
+ __asm__ ("mulu.d %0,%1,%2" : "=r" (__x.__ll) : "r" (u), "r" (v)); \
+ (wh) = __x.__i.__h; \
+ (wl) = __x.__i.__l; \
+ } while (0)
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ ({union {UDItype __ll; \
+ struct {USItype __h, __l;} __i; \
+ } __x, __q; \
+ __x.__i.__h = (n1); __x.__i.__l = (n0); \
+ __asm__ ("divu.d %0,%1,%2" \
+ : "=r" (__q.__ll) : "r" (__x.__ll), "r" (d)); \
+ (r) = (n0) - __q.__l * (d); (q) = __q.__l; })
+#define UMUL_TIME 5
+#define UDIV_TIME 25
+#else
+#define UMUL_TIME 17
+#define UDIV_TIME 150
+#endif /* __m88110__ */
+#endif /* __m88000__ */
+
+#if defined (__mips) && W_TYPE_SIZE == 32
+#if __GMP_GNUC_PREREQ (4,4)
+#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ UDItype __ll = (UDItype)(u) * (v); \
+ w1 = __ll >> 32; \
+ w0 = __ll; \
+ } while (0)
+#endif
+#if !defined (umul_ppmm) && __GMP_GNUC_PREREQ (2,7)
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
+#endif
+#if !defined (umul_ppmm)
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("multu %2,%3\n\tmflo %0\n\tmfhi %1" \
+ : "=d" (w0), "=d" (w1) : "d" (u), "d" (v))
+#endif
+#define UMUL_TIME 10
+#define UDIV_TIME 100
+#endif /* __mips */
+
+#if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
+#if __GMP_GNUC_PREREQ (4,4)
+#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ typedef unsigned int __ll_UTItype __attribute__((mode(TI))); \
+ __ll_UTItype __ll = (__ll_UTItype)(u) * (v); \
+ w1 = __ll >> 64; \
+ w0 = __ll; \
+ } while (0)
+#endif
+#if !defined (umul_ppmm) && __GMP_GNUC_PREREQ (2,7)
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("dmultu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
+#endif
+#if !defined (umul_ppmm)
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("dmultu %2,%3\n\tmflo %0\n\tmfhi %1" \
+ : "=d" (w0), "=d" (w1) : "d" (u), "d" (v))
+#endif
+#define UMUL_TIME 20
+#define UDIV_TIME 140
+#endif /* __mips */
+
+#if defined (__mmix__) && W_TYPE_SIZE == 64
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("MULU %0,%2,%3" : "=r" (w0), "=z" (w1) : "r" (u), "r" (v))
+#endif
+
+#if defined (__ns32000__) && W_TYPE_SIZE == 32
+#define umul_ppmm(w1, w0, u, v) \
+ ({union {UDItype __ll; \
+ struct {USItype __l, __h;} __i; \
+ } __x; \
+ __asm__ ("meid %2,%0" \
+ : "=g" (__x.__ll) \
+ : "%0" ((USItype)(u)), "g" ((USItype)(v))); \
+ (w1) = __x.__i.__h; (w0) = __x.__i.__l;})
+#define __umulsidi3(u, v) \
+ ({UDItype __w; \
+ __asm__ ("meid %2,%0" \
+ : "=g" (__w) \
+ : "%0" ((USItype)(u)), "g" ((USItype)(v))); \
+ __w; })
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ ({union {UDItype __ll; \
+ struct {USItype __l, __h;} __i; \
+ } __x; \
+ __x.__i.__h = (n1); __x.__i.__l = (n0); \
+ __asm__ ("deid %2,%0" \
+ : "=g" (__x.__ll) \
+ : "0" (__x.__ll), "g" ((USItype)(d))); \
+ (r) = __x.__i.__l; (q) = __x.__i.__h; })
+#define count_trailing_zeros(count,x) \
+ do { \
+ __asm__ ("ffsd %2,%0" \
+ : "=r" (count) \
+ : "0" ((USItype) 0), "r" ((USItype) (x))); \
+ } while (0)
+#endif /* __ns32000__ */
+
+/* In the past we had a block of various #defines tested
+ _ARCH_PPC - AIX
+ _ARCH_PWR - AIX
+ __powerpc__ - gcc
+ __POWERPC__ - BEOS
+ __ppc__ - Darwin
+ PPC - old gcc, GNU/Linux, SysV
+ The plain PPC test was not good for vxWorks, since PPC is defined on all
+ CPUs there (eg. m68k too), as a constant one is expected to compare
+ CPU_FAMILY against.
+
+ At any rate, this was pretty unattractive and a bit fragile. The use of
+ HAVE_HOST_CPU_FAMILY is designed to cut through it all and be sure of
+ getting the desired effect.
+
+ ENHANCE-ME: We should test _IBMR2 here when we add assembly support for
+ the system vendor compilers. (Is that vendor compilers with inline asm,
+ or what?) */
+
+#if (HAVE_HOST_CPU_FAMILY_power || HAVE_HOST_CPU_FAMILY_powerpc) \
+ && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ do { \
+ if (__builtin_constant_p (bh) && (bh) == 0) \
+ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
+ else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0) \
+ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
+ else \
+ __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "r" (ah), "r" (bh), "%r" (al), "rI" (bl)); \
+ } while (0)
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ do { \
+ if (__builtin_constant_p (ah) && (ah) == 0) \
+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
+ else if (__builtin_constant_p (ah) && (ah) == ~(USItype) 0) \
+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
+ else if (__builtin_constant_p (bh) && (bh) == 0) \
+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
+ else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0) \
+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
+ else \
+ __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \
+ : "=r" (sh), "=&r" (sl) \
+ : "r" (ah), "r" (bh), "rI" (al), "r" (bl)); \
+ } while (0)
+#define count_leading_zeros(count, x) \
+ __asm__ ("{cntlz|cntlzw} %0,%1" : "=r" (count) : "r" (x))
+#define COUNT_LEADING_ZEROS_0 32
+#if HAVE_HOST_CPU_FAMILY_powerpc
+#if __GMP_GNUC_PREREQ (4,4)
+#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ UDItype __ll = (UDItype)(u) * (v); \
+ w1 = __ll >> 32; \
+ w0 = __ll; \
+ } while (0)
+#endif
+#if !defined (umul_ppmm)
+#define umul_ppmm(ph, pl, m0, m1) \
+ do { \
+ USItype __m0 = (m0), __m1 = (m1); \
+ __asm__ ("mulhwu %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \
+ (pl) = __m0 * __m1; \
+ } while (0)
+#endif
+#define UMUL_TIME 15
+#define smul_ppmm(ph, pl, m0, m1) \
+ do { \
+ SItype __m0 = (m0), __m1 = (m1); \
+ __asm__ ("mulhw %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \
+ (pl) = __m0 * __m1; \
+ } while (0)
+#define SMUL_TIME 14
+#define UDIV_TIME 120
+#else
+#define UMUL_TIME 8
+#define smul_ppmm(xh, xl, m0, m1) \
+ __asm__ ("mul %0,%2,%3" : "=r" (xh), "=q" (xl) : "r" (m0), "r" (m1))
+#define SMUL_TIME 4
+#define sdiv_qrnnd(q, r, nh, nl, d) \
+ __asm__ ("div %0,%2,%4" : "=r" (q), "=q" (r) : "r" (nh), "1" (nl), "r" (d))
+#define UDIV_TIME 100
+#endif
+#endif /* 32-bit POWER architecture variants. */
+
+/* We should test _IBMR2 here when we add assembly support for the system
+ vendor compilers. */
+#if HAVE_HOST_CPU_FAMILY_powerpc && W_TYPE_SIZE == 64
+#if !defined (_LONG_LONG_LIMB)
+/* _LONG_LONG_LIMB is ABI=mode32 where adde operates on 32-bit values. So
+ use adde etc only when not _LONG_LONG_LIMB. */
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ do { \
+ if (__builtin_constant_p (bh) && (bh) == 0) \
+ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
+ else if (__builtin_constant_p (bh) && (bh) == ~(UDItype) 0) \
+ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
+ else \
+ __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "r" (ah), "r" (bh), "%r" (al), "rI" (bl)); \
+ } while (0)
+/* We use "*rI" for the constant operand here, since with just "I", gcc barfs.
+ This might seem strange, but gcc folds away the dead code late. */
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ do { \
+ if (__builtin_constant_p (bl) && bl > -0x8000 && bl <= 0x8000) { \
+ if (__builtin_constant_p (ah) && (ah) == 0) \
+ __asm__ ("{ai|addic} %1,%3,%4\n\t{sfze|subfze} %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "*rI" (-bl)); \
+ else if (__builtin_constant_p (ah) && (ah) == ~(UDItype) 0) \
+ __asm__ ("{ai|addic} %1,%3,%4\n\t{sfme|subfme} %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "*rI" (-bl)); \
+ else if (__builtin_constant_p (bh) && (bh) == 0) \
+ __asm__ ("{ai|addic} %1,%3,%4\n\t{ame|addme} %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "*rI" (-bl)); \
+ else if (__builtin_constant_p (bh) && (bh) == ~(UDItype) 0) \
+ __asm__ ("{ai|addic} %1,%3,%4\n\t{aze|addze} %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "*rI" (-bl)); \
+ else \
+ __asm__ ("{ai|addic} %1,%4,%5\n\t{sfe|subfe} %0,%3,%2" \
+ : "=r" (sh), "=&r" (sl) \
+ : "r" (ah), "r" (bh), "rI" (al), "*rI" (-bl)); \
+ } else { \
+ if (__builtin_constant_p (ah) && (ah) == 0) \
+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl)); \
+ else if (__builtin_constant_p (ah) && (ah) == ~(UDItype) 0) \
+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl)); \
+ else if (__builtin_constant_p (bh) && (bh) == 0) \
+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl)); \
+ else if (__builtin_constant_p (bh) && (bh) == ~(UDItype) 0) \
+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl)); \
+ else \
+ __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \
+ : "=r" (sh), "=&r" (sl) \
+ : "r" (ah), "r" (bh), "rI" (al), "r" (bl)); \
+ } \
+ } while (0)
+#endif /* ! _LONG_LONG_LIMB */
+#define count_leading_zeros(count, x) \
+ __asm__ ("cntlzd %0,%1" : "=r" (count) : "r" (x))
+#define COUNT_LEADING_ZEROS_0 64
+#if 0 && __GMP_GNUC_PREREQ (4,4) /* Disable, this results in libcalls! */
+#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ typedef unsigned int __ll_UTItype __attribute__((mode(TI))); \
+ __ll_UTItype __ll = (__ll_UTItype)(u) * (v); \
+ w1 = __ll >> 64; \
+ w0 = __ll; \
+ } while (0)
+#endif
+#if !defined (umul_ppmm)
+#define umul_ppmm(ph, pl, m0, m1) \
+ do { \
+ UDItype __m0 = (m0), __m1 = (m1); \
+ __asm__ ("mulhdu %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \
+ (pl) = __m0 * __m1; \
+ } while (0)
+#endif
+#define UMUL_TIME 15
+#define smul_ppmm(ph, pl, m0, m1) \
+ do { \
+ DItype __m0 = (m0), __m1 = (m1); \
+ __asm__ ("mulhd %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \
+ (pl) = __m0 * __m1; \
+ } while (0)
+#define SMUL_TIME 14 /* ??? */
+#define UDIV_TIME 120 /* ??? */
+#endif /* 64-bit PowerPC. */
+
+#if defined (__pyr__) && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("addw %5,%1\n\taddwc %3,%0" \
+ : "=r" (sh), "=&r" (sl) \
+ : "0" ((USItype)(ah)), "g" ((USItype)(bh)), \
+ "%1" ((USItype)(al)), "g" ((USItype)(bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("subw %5,%1\n\tsubwb %3,%0" \
+ : "=r" (sh), "=&r" (sl) \
+ : "0" ((USItype)(ah)), "g" ((USItype)(bh)), \
+ "1" ((USItype)(al)), "g" ((USItype)(bl)))
+/* This insn works on Pyramids with AP, XP, or MI CPUs, but not with SP. */
+#define umul_ppmm(w1, w0, u, v) \
+ ({union {UDItype __ll; \
+ struct {USItype __h, __l;} __i; \
+ } __x; \
+ __asm__ ("movw %1,%R0\n\tuemul %2,%0" \
+ : "=&r" (__x.__ll) \
+ : "g" ((USItype) (u)), "g" ((USItype)(v))); \
+ (w1) = __x.__i.__h; (w0) = __x.__i.__l;})
+#endif /* __pyr__ */
+
+#if defined (__ibm032__) /* RT/ROMP */ && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("a %1,%5\n\tae %0,%3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "0" ((USItype)(ah)), "r" ((USItype)(bh)), \
+ "%1" ((USItype)(al)), "r" ((USItype)(bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("s %1,%5\n\tse %0,%3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "0" ((USItype)(ah)), "r" ((USItype)(bh)), \
+ "1" ((USItype)(al)), "r" ((USItype)(bl)))
+#define smul_ppmm(ph, pl, m0, m1) \
+ __asm__ ( \
+ "s r2,r2\n" \
+" mts r10,%2\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" cas %0,r2,r0\n" \
+" mfs r10,%1" \
+ : "=r" (ph), "=r" (pl) \
+ : "%r" ((USItype)(m0)), "r" ((USItype)(m1)) \
+ : "r2")
+#define UMUL_TIME 20
+#define UDIV_TIME 200
+#define count_leading_zeros(count, x) \
+ do { \
+ if ((x) >= 0x10000) \
+ __asm__ ("clz %0,%1" \
+ : "=r" (count) : "r" ((USItype)(x) >> 16)); \
+ else \
+ { \
+ __asm__ ("clz %0,%1" \
+ : "=r" (count) : "r" ((USItype)(x))); \
+ (count) += 16; \
+ } \
+ } while (0)
+#endif /* RT/ROMP */
+
+#if (defined (__SH2__) || defined (__SH3__) || defined (__SH4__)) && W_TYPE_SIZE == 32
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("dmulu.l %2,%3\n\tsts macl,%1\n\tsts mach,%0" \
+ : "=r" (w1), "=r" (w0) : "r" (u), "r" (v) : "macl", "mach")
+#define UMUL_TIME 5
+#endif
+
+#if defined (__sparc__) && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("addcc %r4,%5,%1\n\taddx %r2,%3,%0" \
+ : "=r" (sh), "=&r" (sl) \
+ : "rJ" (ah), "rI" (bh),"%rJ" (al), "rI" (bl) \
+ __CLOBBER_CC)
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("subcc %r4,%5,%1\n\tsubx %r2,%3,%0" \
+ : "=r" (sh), "=&r" (sl) \
+ : "rJ" (ah), "rI" (bh), "rJ" (al), "rI" (bl) \
+ __CLOBBER_CC)
+/* FIXME: When gcc -mcpu=v9 is used on solaris, gcc/config/sol2-sld-64.h
+ doesn't define anything to indicate that to us, it only sets __sparcv8. */
+#if defined (__sparc_v9__) || defined (__sparcv9)
+/* Perhaps we should use floating-point operations here? */
+#if 0
+/* Triggers a bug making mpz/tests/t-gcd.c fail.
+ Perhaps we simply need explicitly zero-extend the inputs? */
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("mulx %2,%3,%%g1; srl %%g1,0,%1; srlx %%g1,32,%0" : \
+ "=r" (w1), "=r" (w0) : "r" (u), "r" (v) : "g1")
+#else
+/* Use v8 umul until above bug is fixed. */
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("umul %2,%3,%1;rd %%y,%0" : "=r" (w1), "=r" (w0) : "r" (u), "r" (v))
+#endif
+/* Use a plain v8 divide for v9. */
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ do { \
+ USItype __q; \
+ __asm__ ("mov %1,%%y;nop;nop;nop;udiv %2,%3,%0" \
+ : "=r" (__q) : "r" (n1), "r" (n0), "r" (d)); \
+ (r) = (n0) - __q * (d); \
+ (q) = __q; \
+ } while (0)
+#else
+#if defined (__sparc_v8__) /* gcc normal */ \
+ || defined (__sparcv8) /* gcc solaris */ \
+ || HAVE_HOST_CPU_supersparc
+/* Don't match immediate range because, 1) it is not often useful,
+ 2) the 'I' flag thinks of the range as a 13 bit signed interval,
+ while we want to match a 13 bit interval, sign extended to 32 bits,
+ but INTERPRETED AS UNSIGNED. */
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("umul %2,%3,%1;rd %%y,%0" : "=r" (w1), "=r" (w0) : "r" (u), "r" (v))
+#define UMUL_TIME 5
+
+#if HAVE_HOST_CPU_supersparc
+#define UDIV_TIME 60 /* SuperSPARC timing */
+#else
+/* Don't use this on SuperSPARC because its udiv only handles 53 bit
+ dividends and will trap to the kernel for the rest. */
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ do { \
+ USItype __q; \
+ __asm__ ("mov %1,%%y;nop;nop;nop;udiv %2,%3,%0" \
+ : "=r" (__q) : "r" (n1), "r" (n0), "r" (d)); \
+ (r) = (n0) - __q * (d); \
+ (q) = __q; \
+ } while (0)
+#define UDIV_TIME 25
+#endif /* HAVE_HOST_CPU_supersparc */
+
+#else /* ! __sparc_v8__ */
+#if defined (__sparclite__)
+/* This has hardware multiply but not divide. It also has two additional
+ instructions scan (ffs from high bit) and divscc. */
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("umul %2,%3,%1;rd %%y,%0" : "=r" (w1), "=r" (w0) : "r" (u), "r" (v))
+#define UMUL_TIME 5
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ __asm__ ("! Inlined udiv_qrnnd\n" \
+" wr %%g0,%2,%%y ! Not a delayed write for sparclite\n" \
+" tst %%g0\n" \
+" divscc %3,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%0\n" \
+" rd %%y,%1\n" \
+" bl,a 1f\n" \
+" add %1,%4,%1\n" \
+"1: ! End of inline udiv_qrnnd" \
+ : "=r" (q), "=r" (r) : "r" (n1), "r" (n0), "rI" (d) \
+ : "%g1" __AND_CLOBBER_CC)
+#define UDIV_TIME 37
+#define count_leading_zeros(count, x) \
+ __asm__ ("scan %1,1,%0" : "=r" (count) : "r" (x))
+/* Early sparclites return 63 for an argument of 0, but they warn that future
+ implementations might change this. Therefore, leave COUNT_LEADING_ZEROS_0
+ undefined. */
+#endif /* __sparclite__ */
+#endif /* __sparc_v8__ */
+#endif /* __sparc_v9__ */
+/* Default to sparc v7 versions of umul_ppmm and udiv_qrnnd. */
+#ifndef umul_ppmm
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("! Inlined umul_ppmm\n" \
+" wr %%g0,%2,%%y ! SPARC has 0-3 delay insn after a wr\n" \
+" sra %3,31,%%g2 ! Don't move this insn\n" \
+" and %2,%%g2,%%g2 ! Don't move this insn\n" \
+" andcc %%g0,0,%%g1 ! Don't move this insn\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,0,%%g1\n" \
+" add %%g1,%%g2,%0\n" \
+" rd %%y,%1" \
+ : "=r" (w1), "=r" (w0) : "%rI" (u), "r" (v) \
+ : "%g1", "%g2" __AND_CLOBBER_CC)
+#define UMUL_TIME 39 /* 39 instructions */
+#endif
+#ifndef udiv_qrnnd
+#ifndef LONGLONG_STANDALONE
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ do { UWtype __r; \
+ (q) = __MPN(udiv_qrnnd) (&__r, (n1), (n0), (d)); \
+ (r) = __r; \
+ } while (0)
+extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, UWtype, UWtype);
+#ifndef UDIV_TIME
+#define UDIV_TIME 140
+#endif
+#endif /* LONGLONG_STANDALONE */
+#endif /* udiv_qrnnd */
+#endif /* __sparc__ */
+
+#if defined (__sparc__) && W_TYPE_SIZE == 64
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ( \
+ "addcc %r4,%5,%1\n" \
+ " addccc %r6,%7,%%g0\n" \
+ " addc %r2,%3,%0" \
+ : "=r" (sh), "=&r" (sl) \
+ : "rJ" (ah), "rI" (bh), "%rJ" (al), "rI" (bl), \
+ "%rJ" ((al) >> 32), "rI" ((bl) >> 32) \
+ __CLOBBER_CC)
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ( \
+ "subcc %r4,%5,%1\n" \
+ " subccc %r6,%7,%%g0\n" \
+ " subc %r2,%3,%0" \
+ : "=r" (sh), "=&r" (sl) \
+ : "rJ" (ah), "rI" (bh), "rJ" (al), "rI" (bl), \
+ "rJ" ((al) >> 32), "rI" ((bl) >> 32) \
+ __CLOBBER_CC)
+#endif
+
+#if defined (__vax__) && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("addl2 %5,%1\n\tadwc %3,%0" \
+ : "=g" (sh), "=&g" (sl) \
+ : "0" ((USItype)(ah)), "g" ((USItype)(bh)), \
+ "%1" ((USItype)(al)), "g" ((USItype)(bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("subl2 %5,%1\n\tsbwc %3,%0" \
+ : "=g" (sh), "=&g" (sl) \
+ : "0" ((USItype)(ah)), "g" ((USItype)(bh)), \
+ "1" ((USItype)(al)), "g" ((USItype)(bl)))
+#define smul_ppmm(xh, xl, m0, m1) \
+ do { \
+ union {UDItype __ll; \
+ struct {USItype __l, __h;} __i; \
+ } __x; \
+ USItype __m0 = (m0), __m1 = (m1); \
+ __asm__ ("emul %1,%2,$0,%0" \
+ : "=g" (__x.__ll) : "g" (__m0), "g" (__m1)); \
+ (xh) = __x.__i.__h; (xl) = __x.__i.__l; \
+ } while (0)
+#define sdiv_qrnnd(q, r, n1, n0, d) \
+ do { \
+ union {DItype __ll; \
+ struct {SItype __l, __h;} __i; \
+ } __x; \
+ __x.__i.__h = n1; __x.__i.__l = n0; \
+ __asm__ ("ediv %3,%2,%0,%1" \
+ : "=g" (q), "=g" (r) : "g" (__x.__ll), "g" (d)); \
+ } while (0)
+#if 0
+/* FIXME: This instruction appears to be unimplemented on some systems (vax
+ 8800 maybe). */
+#define count_trailing_zeros(count,x) \
+ do { \
+ __asm__ ("ffs 0, 31, %1, %0" \
+ : "=g" (count) \
+ : "g" ((USItype) (x))); \
+ } while (0)
+#endif
+#endif /* __vax__ */
+
+#if defined (__z8000__) && W_TYPE_SIZE == 16
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("add %H1,%H5\n\tadc %H0,%H3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "0" ((unsigned int)(ah)), "r" ((unsigned int)(bh)), \
+ "%1" ((unsigned int)(al)), "rQR" ((unsigned int)(bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("sub %H1,%H5\n\tsbc %H0,%H3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "0" ((unsigned int)(ah)), "r" ((unsigned int)(bh)), \
+ "1" ((unsigned int)(al)), "rQR" ((unsigned int)(bl)))
+#define umul_ppmm(xh, xl, m0, m1) \
+ do { \
+ union {long int __ll; \
+ struct {unsigned int __h, __l;} __i; \
+ } __x; \
+ unsigned int __m0 = (m0), __m1 = (m1); \
+ __asm__ ("mult %S0,%H3" \
+ : "=r" (__x.__i.__h), "=r" (__x.__i.__l) \
+ : "%1" (m0), "rQR" (m1)); \
+ (xh) = __x.__i.__h; (xl) = __x.__i.__l; \
+ (xh) += ((((signed int) __m0 >> 15) & __m1) \
+ + (((signed int) __m1 >> 15) & __m0)); \
+ } while (0)
+#endif /* __z8000__ */
+
+#endif /* __GNUC__ */
+
+#endif /* NO_ASM */
+
+
+/* FIXME: "sidi" here is highly doubtful, should sometimes be "diti". */
+#if !defined (umul_ppmm) && defined (__umulsidi3)
+#define umul_ppmm(ph, pl, m0, m1) \
+ { \
+ UDWtype __ll = __umulsidi3 (m0, m1); \
+ ph = (UWtype) (__ll >> W_TYPE_SIZE); \
+ pl = (UWtype) __ll; \
+ }
+#endif
+
+#if !defined (__umulsidi3)
+#define __umulsidi3(u, v) \
+ ({UWtype __hi, __lo; \
+ umul_ppmm (__hi, __lo, u, v); \
+ ((UDWtype) __hi << W_TYPE_SIZE) | __lo; })
+#endif
+
+
+/* Use mpn_umul_ppmm or mpn_udiv_qrnnd functions, if they exist. The "_r"
+ forms have "reversed" arguments, meaning the pointer is last, which
+ sometimes allows better parameter passing, in particular on 64-bit
+ hppa. */
+
+#define mpn_umul_ppmm __MPN(umul_ppmm)
+extern UWtype mpn_umul_ppmm (UWtype *, UWtype, UWtype);
+
+#if ! defined (umul_ppmm) && HAVE_NATIVE_mpn_umul_ppmm \
+ && ! defined (LONGLONG_STANDALONE)
+#define umul_ppmm(wh, wl, u, v) \
+ do { \
+ UWtype __umul_ppmm__p0; \
+ (wh) = mpn_umul_ppmm (&__umul_ppmm__p0, (UWtype) (u), (UWtype) (v)); \
+ (wl) = __umul_ppmm__p0; \
+ } while (0)
+#endif
+
+#define mpn_umul_ppmm_r __MPN(umul_ppmm_r)
+extern UWtype mpn_umul_ppmm_r (UWtype, UWtype, UWtype *);
+
+#if ! defined (umul_ppmm) && HAVE_NATIVE_mpn_umul_ppmm_r \
+ && ! defined (LONGLONG_STANDALONE)
+#define umul_ppmm(wh, wl, u, v) \
+ do { \
+ UWtype __umul_ppmm__p0; \
+ (wh) = mpn_umul_ppmm_r ((UWtype) (u), (UWtype) (v), &__umul_ppmm__p0); \
+ (wl) = __umul_ppmm__p0; \
+ } while (0)
+#endif
+
+#define mpn_udiv_qrnnd __MPN(udiv_qrnnd)
+extern UWtype mpn_udiv_qrnnd (UWtype *, UWtype, UWtype, UWtype);
+
+#if ! defined (udiv_qrnnd) && HAVE_NATIVE_mpn_udiv_qrnnd \
+ && ! defined (LONGLONG_STANDALONE)
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ do { \
+ UWtype __udiv_qrnnd__r; \
+ (q) = mpn_udiv_qrnnd (&__udiv_qrnnd__r, \
+ (UWtype) (n1), (UWtype) (n0), (UWtype) d); \
+ (r) = __udiv_qrnnd__r; \
+ } while (0)
+#endif
+
+#define mpn_udiv_qrnnd_r __MPN(udiv_qrnnd_r)
+extern UWtype mpn_udiv_qrnnd_r (UWtype, UWtype, UWtype, UWtype *);
+
+#if ! defined (udiv_qrnnd) && HAVE_NATIVE_mpn_udiv_qrnnd_r \
+ && ! defined (LONGLONG_STANDALONE)
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ do { \
+ UWtype __udiv_qrnnd__r; \
+ (q) = mpn_udiv_qrnnd_r ((UWtype) (n1), (UWtype) (n0), (UWtype) d, \
+ &__udiv_qrnnd__r); \
+ (r) = __udiv_qrnnd__r; \
+ } while (0)
+#endif
+
+
+/* If this machine has no inline assembler, use C macros. */
+
+#if !defined (add_ssaaaa)
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ do { \
+ UWtype __x; \
+ __x = (al) + (bl); \
+ (sh) = (ah) + (bh) + (__x < (al)); \
+ (sl) = __x; \
+ } while (0)
+#endif
+
+#if !defined (sub_ddmmss)
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ do { \
+ UWtype __x; \
+ __x = (al) - (bl); \
+ (sh) = (ah) - (bh) - ((al) < (bl)); \
+ (sl) = __x; \
+ } while (0)
+#endif
+
+/* If we lack umul_ppmm but have smul_ppmm, define umul_ppmm in terms of
+ smul_ppmm. */
+#if !defined (umul_ppmm) && defined (smul_ppmm)
+#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ UWtype __w1; \
+ UWtype __xm0 = (u), __xm1 = (v); \
+ smul_ppmm (__w1, w0, __xm0, __xm1); \
+ (w1) = __w1 + (-(__xm0 >> (W_TYPE_SIZE - 1)) & __xm1) \
+ + (-(__xm1 >> (W_TYPE_SIZE - 1)) & __xm0); \
+ } while (0)
+#endif
+
+/* If we still don't have umul_ppmm, define it using plain C.
+
+ For reference, when this code is used for squaring (ie. u and v identical
+ expressions), gcc recognises __x1 and __x2 are the same and generates 3
+ multiplies, not 4. The subsequent additions could be optimized a bit,
+ but the only place GMP currently uses such a square is mpn_sqr_basecase,
+ and chips obliged to use this generic C umul will have plenty of worse
+ performance problems than a couple of extra instructions on the diagonal
+ of sqr_basecase. */
+
+#if !defined (umul_ppmm)
+#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ UWtype __x0, __x1, __x2, __x3; \
+ UHWtype __ul, __vl, __uh, __vh; \
+ UWtype __u = (u), __v = (v); \
+ \
+ __ul = __ll_lowpart (__u); \
+ __uh = __ll_highpart (__u); \
+ __vl = __ll_lowpart (__v); \
+ __vh = __ll_highpart (__v); \
+ \
+ __x0 = (UWtype) __ul * __vl; \
+ __x1 = (UWtype) __ul * __vh; \
+ __x2 = (UWtype) __uh * __vl; \
+ __x3 = (UWtype) __uh * __vh; \
+ \
+ __x1 += __ll_highpart (__x0);/* this can't give carry */ \
+ __x1 += __x2; /* but this indeed can */ \
+ if (__x1 < __x2) /* did we get it? */ \
+ __x3 += __ll_B; /* yes, add it in the proper pos. */ \
+ \
+ (w1) = __x3 + __ll_highpart (__x1); \
+ (w0) = (__x1 << W_TYPE_SIZE/2) + __ll_lowpart (__x0); \
+ } while (0)
+#endif
+
+/* If we don't have smul_ppmm, define it using umul_ppmm (which surely will
+ exist in one form or another. */
+#if !defined (smul_ppmm)
+#define smul_ppmm(w1, w0, u, v) \
+ do { \
+ UWtype __w1; \
+ UWtype __xm0 = (u), __xm1 = (v); \
+ umul_ppmm (__w1, w0, __xm0, __xm1); \
+ (w1) = __w1 - (-(__xm0 >> (W_TYPE_SIZE - 1)) & __xm1) \
+ - (-(__xm1 >> (W_TYPE_SIZE - 1)) & __xm0); \
+ } while (0)
+#endif
+
+/* Define this unconditionally, so it can be used for debugging. */
+#define __udiv_qrnnd_c(q, r, n1, n0, d) \
+ do { \
+ UWtype __d1, __d0, __q1, __q0, __r1, __r0, __m; \
+ \
+ ASSERT ((d) != 0); \
+ ASSERT ((n1) < (d)); \
+ \
+ __d1 = __ll_highpart (d); \
+ __d0 = __ll_lowpart (d); \
+ \
+ __q1 = (n1) / __d1; \
+ __r1 = (n1) - __q1 * __d1; \
+ __m = __q1 * __d0; \
+ __r1 = __r1 * __ll_B | __ll_highpart (n0); \
+ if (__r1 < __m) \
+ { \
+ __q1--, __r1 += (d); \
+ if (__r1 >= (d)) /* i.e. we didn't get carry when adding to __r1 */\
+ if (__r1 < __m) \
+ __q1--, __r1 += (d); \
+ } \
+ __r1 -= __m; \
+ \
+ __q0 = __r1 / __d1; \
+ __r0 = __r1 - __q0 * __d1; \
+ __m = __q0 * __d0; \
+ __r0 = __r0 * __ll_B | __ll_lowpart (n0); \
+ if (__r0 < __m) \
+ { \
+ __q0--, __r0 += (d); \
+ if (__r0 >= (d)) \
+ if (__r0 < __m) \
+ __q0--, __r0 += (d); \
+ } \
+ __r0 -= __m; \
+ \
+ (q) = __q1 * __ll_B | __q0; \
+ (r) = __r0; \
+ } while (0)
+
+/* If the processor has no udiv_qrnnd but sdiv_qrnnd, go through
+ __udiv_w_sdiv (defined in libgcc or elsewhere). */
+#if !defined (udiv_qrnnd) && defined (sdiv_qrnnd)
+#define udiv_qrnnd(q, r, nh, nl, d) \
+ do { \
+ UWtype __r; \
+ (q) = __MPN(udiv_w_sdiv) (&__r, nh, nl, d); \
+ (r) = __r; \
+ } while (0)
+__GMP_DECLSPEC UWtype __MPN(udiv_w_sdiv) (UWtype *, UWtype, UWtype, UWtype);
+#endif
+
+/* If udiv_qrnnd was not defined for this processor, use __udiv_qrnnd_c. */
+#if !defined (udiv_qrnnd)
+#define UDIV_NEEDS_NORMALIZATION 1
+#define udiv_qrnnd __udiv_qrnnd_c
+#endif
+
+#if !defined (count_leading_zeros)
+#define count_leading_zeros(count, x) \
+ do { \
+ UWtype __xr = (x); \
+ UWtype __a; \
+ \
+ if (W_TYPE_SIZE == 32) \
+ { \
+ __a = __xr < ((UWtype) 1 << 2*__BITS4) \
+ ? (__xr < ((UWtype) 1 << __BITS4) ? 1 : __BITS4 + 1) \
+ : (__xr < ((UWtype) 1 << 3*__BITS4) ? 2*__BITS4 + 1 \
+ : 3*__BITS4 + 1); \
+ } \
+ else \
+ { \
+ for (__a = W_TYPE_SIZE - 8; __a > 0; __a -= 8) \
+ if (((__xr >> __a) & 0xff) != 0) \
+ break; \
+ ++__a; \
+ } \
+ \
+ (count) = W_TYPE_SIZE + 1 - __a - __clz_tab[__xr >> __a]; \
+ } while (0)
+/* This version gives a well-defined value for zero. */
+#define COUNT_LEADING_ZEROS_0 (W_TYPE_SIZE - 1)
+#define COUNT_LEADING_ZEROS_NEED_CLZ_TAB
+#define COUNT_LEADING_ZEROS_SLOW
+#endif
+
+/* clz_tab needed by mpn/x86/pentium/mod_1.asm in a fat binary */
+#if HAVE_HOST_CPU_FAMILY_x86 && WANT_FAT_BINARY
+#define COUNT_LEADING_ZEROS_NEED_CLZ_TAB
+#endif
+
+#ifdef COUNT_LEADING_ZEROS_NEED_CLZ_TAB
+extern const unsigned char __GMP_DECLSPEC __clz_tab[129];
+#endif
+
+#if !defined (count_trailing_zeros)
+#if !defined (COUNT_LEADING_ZEROS_SLOW)
+/* Define count_trailing_zeros using an asm count_leading_zeros. */
+#define count_trailing_zeros(count, x) \
+ do { \
+ UWtype __ctz_x = (x); \
+ UWtype __ctz_c; \
+ ASSERT (__ctz_x != 0); \
+ count_leading_zeros (__ctz_c, __ctz_x & -__ctz_x); \
+ (count) = W_TYPE_SIZE - 1 - __ctz_c; \
+ } while (0)
+#else
+/* Define count_trailing_zeros in plain C, assuming small counts are common.
+ We use clz_tab without ado, since the C count_leading_zeros above will have
+ pulled it in. */
+#define count_trailing_zeros(count, x) \
+ do { \
+ UWtype __ctz_x = (x); \
+ int __ctz_c; \
+ \
+ if (LIKELY ((__ctz_x & 0xff) != 0)) \
+ (count) = __clz_tab[__ctz_x & -__ctz_x] - 2; \
+ else \
+ { \
+ for (__ctz_c = 8 - 2; __ctz_c < W_TYPE_SIZE - 2; __ctz_c += 8) \
+ { \
+ __ctz_x >>= 8; \
+ if (LIKELY ((__ctz_x & 0xff) != 0)) \
+ break; \
+ } \
+ \
+ (count) = __ctz_c + __clz_tab[__ctz_x & -__ctz_x]; \
+ } \
+ } while (0)
+#endif
+#endif
+
+#ifndef UDIV_NEEDS_NORMALIZATION
+#define UDIV_NEEDS_NORMALIZATION 0
+#endif
+
+/* Whether udiv_qrnnd is actually implemented with udiv_qrnnd_preinv, and
+ that hence the latter should always be used. */
+#ifndef UDIV_PREINV_ALWAYS
+#define UDIV_PREINV_ALWAYS 0
+#endif
+
+/* Give defaults for UMUL_TIME and UDIV_TIME. */
+#ifndef UMUL_TIME
+#define UMUL_TIME 1
+#endif
+
+#ifndef UDIV_TIME
+#define UDIV_TIME UMUL_TIME
+#endif
diff --git a/src/ls.c b/src/ls.c
index 397e4ea9..f1ed43bd 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -1,5 +1,5 @@
/* 'dir', 'vdir' and 'ls' directory listing programs for GNU.
- Copyright (C) 1985-2012 Free Software Foundation, Inc.
+ Copyright (C) 1985-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -3064,12 +3064,6 @@ gobble_file (char const *name, enum filetype type, ino_t inode,
free (linkname);
}
- /* When not distinguishing types of symlinks, pretend we know that
- it is stat'able, so that it will be colored as a regular symlink,
- and not as an orphan. */
- if (S_ISLNK (f->stat.st_mode) && !check_symlink_color)
- f->linkok = true;
-
if (S_ISLNK (f->stat.st_mode))
f->filetype = symbolic_link;
else if (S_ISDIR (f->stat.st_mode))
@@ -3213,7 +3207,14 @@ make_link_name (char const *name, char const *linkname)
return xstrdup (linkname);
char *p = xmalloc (prefix_len + 1 + strlen (linkname) + 1);
- stpcpy (stpncpy (p, name, prefix_len + 1), linkname);
+
+ /* PREFIX_LEN usually specifies a string not ending in slash.
+ In that case, extend it by one, since the next byte *is* a slash.
+ Otherwise, the prefix is "/", so leave the length unchanged. */
+ if ( ! ISSLASH (name[prefix_len - 1]))
+ ++prefix_len;
+
+ stpcpy (stpncpy (p, name, prefix_len), linkname);
return p;
}
@@ -4286,7 +4287,7 @@ print_color_indicator (const struct fileinfo *f, bool symlink_target)
/* Is this a nonexistent file? If so, linkok == -1. */
- if (linkok == -1 && color_indicator[C_MISSING].string != NULL)
+ if (linkok == -1 && is_colored (C_MISSING))
type = C_MISSING;
else if (!f->stat_ok)
{
@@ -4361,8 +4362,7 @@ print_color_indicator (const struct fileinfo *f, bool symlink_target)
/* Adjust the color for orphaned symlinks. */
if (type == C_LINK && !linkok)
{
- if (color_symlink_as_referent
- || color_indicator[C_ORPHAN].string)
+ if (color_symlink_as_referent || is_colored (C_ORPHAN))
type = C_ORPHAN;
}
@@ -4721,11 +4721,10 @@ usage (int status)
fputs (_("\
List information about the FILEs (the current directory by default).\n\
Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-a, --all do not ignore entries starting with .\n\
-A, --almost-all do not list implied . and ..\n\
diff --git a/src/make-prime-list.c b/src/make-prime-list.c
new file mode 100644
index 00000000..4ec01cf3
--- /dev/null
+++ b/src/make-prime-list.c
@@ -0,0 +1,227 @@
+/* Factoring of uintmax_t numbers. Generation of needed tables.
+
+ Contributed to the GNU project by Torbjörn Granlund and Niels Möller
+ Contains code from GNU MP.
+
+Copyright 2012-2013 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 3 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see http://www.gnu.org/licenses/. */
+
+#include <config.h>
+
+#include <limits.h>
+#include <stdint.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+
+/* Deactivate config.h's "rpl_"-prefixed definitions of these symbols. */
+#undef fclose
+#undef malloc
+#undef strerror
+
+/* An unsigned type that is no narrower than 32 bits and no narrower
+ than unsigned int. It's best to make it as wide as possible.
+ For GCC 4.6 and later, use a heuristic to guess whether unsigned
+ __int128 works on your platform. If this heuristic does not work
+ for you, please report a bug; in the meantime compile with, e.g.,
+ -Dwide_uint='unsigned __int128' to override the heuristic. */
+#ifndef wide_uint
+# if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) && ULONG_MAX >> 31 >> 31 >> 1 != 0
+typedef unsigned __int128 wide_uint;
+# else
+typedef uintmax_t wide_uint;
+# endif
+#endif
+
+struct prime
+{
+ unsigned p;
+ wide_uint pinv; /* Inverse mod b = 2^{bitsize of wide_uint} */
+ wide_uint lim; /* floor ((wide_uint) -1 / p) */
+};
+
+static wide_uint _GL_ATTRIBUTE_CONST
+binvert (wide_uint a)
+{
+ wide_uint x = 0xf5397db1 >> (4*((a/2) & 0x7));
+ for (;;)
+ {
+ wide_uint y = 2*x - x*x*a;
+ if (y == x)
+ return x;
+ x = y;
+ }
+}
+
+static void
+process_prime (struct prime *info, unsigned p)
+{
+ wide_uint max = -1;
+ info->p = p;
+ info->pinv = binvert (p);
+ info->lim = max / p;
+}
+
+static void
+print_wide_uint (wide_uint n, int nesting, unsigned wide_uint_bits)
+{
+ /* Number of bits per integer literal. 8 is too many, because
+ uintmax_t is 32 bits on some machines so we cannot shift by 32 bits.
+ So use 7. */
+ int hex_digits_per_literal = 7;
+ int bits_per_literal = hex_digits_per_literal * 4;
+
+ unsigned remainder = n & ((1 << bits_per_literal) - 1);
+
+ if (n != remainder)
+ {
+ int needs_parentheses = n >> bits_per_literal >> bits_per_literal != 0;
+ if (needs_parentheses)
+ printf ("(");
+ print_wide_uint (n >> bits_per_literal, nesting + 1, wide_uint_bits);
+ if (needs_parentheses)
+ printf (")\n%*s", nesting + 3, "");
+ printf (" << %d | ", bits_per_literal);
+ }
+ else if (nesting)
+ {
+ printf ("(uintmax_t) ");
+ hex_digits_per_literal
+ = ((wide_uint_bits - 1) % bits_per_literal) % 4 + 1;
+ }
+
+ printf ("0x%0*xU", hex_digits_per_literal, remainder);
+}
+
+static void
+output_primes (const struct prime *primes, unsigned nprimes)
+{
+ unsigned i;
+ unsigned p;
+ int is_prime;
+
+ /* Compute wide_uint_bits by repeated shifting, rather than by
+ multiplying sizeof by CHAR_BIT, as this works even if the
+ wide_uint representation has holes. */
+ unsigned wide_uint_bits = 0;
+ wide_uint mask = -1;
+ for (wide_uint_bits = 0; mask; wide_uint_bits++)
+ mask >>= 1;
+
+ puts ("/* Generated file -- DO NOT EDIT */\n");
+ printf ("#define WIDE_UINT_BITS %u\n", wide_uint_bits);
+
+ for (i = 0, p = 2; i < nprimes; i++)
+ {
+ unsigned int d8 = i + 8 < nprimes ? primes[i + 8].p - primes[i].p : 0xff;
+ if (255 < d8) /* this happens at 668221 */
+ abort ();
+ printf ("P (%u, %u,\n (", primes[i].p - p, d8);
+ print_wide_uint (primes[i].pinv, 0, wide_uint_bits);
+ printf ("),\n UINTMAX_MAX / %d)\n", primes[i].p);
+ p = primes[i].p;
+ }
+
+ printf ("\n#undef FIRST_OMITTED_PRIME\n");
+
+ /* Find next prime */
+ do
+ {
+ p += 2;
+ for (i = 0, is_prime = 1; is_prime; i++)
+ {
+ if (primes[i].p * primes[i].p > p)
+ break;
+ if (p * primes[i].pinv <= primes[i].lim)
+ {
+ is_prime = 0;
+ break;
+ }
+ }
+ }
+ while (!is_prime);
+
+ printf ("#define FIRST_OMITTED_PRIME %u\n", p);
+}
+
+static void *
+xalloc (size_t s)
+{
+ void *p = malloc (s);
+ if (p)
+ return p;
+
+ fprintf (stderr, "Virtual memory exhausted.\n");
+ exit (EXIT_FAILURE);
+}
+
+int
+main (int argc, char **argv)
+{
+ int limit;
+
+ char *sieve;
+ size_t size, i;
+
+ struct prime *prime_list;
+ unsigned nprimes;
+
+ if (argc != 2)
+ {
+ fprintf (stderr, "Usage: %s LIMIT\n"
+ "Produces a list of odd primes <= LIMIT\n", argv[0]);
+ return EXIT_FAILURE;
+ }
+ limit = atoi (argv[1]);
+ if (limit < 3)
+ exit (EXIT_SUCCESS);
+
+ /* Make limit odd */
+ if ( !(limit & 1))
+ limit--;
+
+ size = (limit-1)/2;
+ /* sieve[i] represents 3+2*i */
+ sieve = xalloc (size);
+ memset (sieve, 1, size);
+
+ prime_list = xalloc (size * sizeof (*prime_list));
+ nprimes = 0;
+
+ for (i = 0; i < size;)
+ {
+ unsigned p = 3+2*i;
+ unsigned j;
+
+ process_prime (&prime_list[nprimes++], p);
+
+ for (j = (p*p - 3)/2; j < size; j+= p)
+ sieve[j] = 0;
+
+ while (i < size && sieve[++i] == 0)
+ ;
+ }
+
+ output_primes (prime_list, nprimes);
+
+ if (ferror (stdout) + fclose (stdout))
+ {
+ fprintf (stderr, "write error: %s\n", strerror (errno));
+ return EXIT_FAILURE;
+ }
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/md5sum.c b/src/md5sum.c
index f7e08491..b4378115 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -1,5 +1,5 @@
/* Compute checksums of files or strings.
- Copyright (C) 1995-2012 Free Software Foundation, Inc.
+ Copyright (C) 1995-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -135,7 +135,8 @@ enum
{
STATUS_OPTION = CHAR_MAX + 1,
QUIET_OPTION,
- STRICT_OPTION
+ STRICT_OPTION,
+ TAG_OPTION
};
static struct option const long_options[] =
@@ -147,6 +148,7 @@ static struct option const long_options[] =
{ "text", no_argument, NULL, 't' },
{ "warn", no_argument, NULL, 'w' },
{ "strict", no_argument, NULL, STRICT_OPTION },
+ { "tag", no_argument, NULL, TAG_OPTION },
{ GETOPT_HELP_OPTION_DECL },
{ GETOPT_VERSION_OPTION_DECL },
{ NULL, 0, NULL, 0 }
@@ -179,6 +181,9 @@ With no FILE, or when FILE is -, read standard input.\n\
printf (_("\
-c, --check read %s sums from the FILEs and check them\n"),
DIGEST_TYPE_STRING);
+ fputs (_("\
+ --tag create a BSD-style checksum\n\
+"), stdout);
if (O_BINARY)
fputs (_("\
-t, --text read in text mode (default if reading tty stdin)\n\
@@ -215,23 +220,73 @@ space for text), and name for each FILE.\n"),
#define ISWHITE(c) ((c) == ' ' || (c) == '\t')
+/* Given a file name, S of length S_LEN, that is not NUL-terminated,
+ modify it in place, performing the equivalent of this sed substitution:
+ 's/\\n/\n/g;s/\\\\/\\/g' i.e., replacing each "\\n" string with a newline
+ and each "\\\\" with a single backslash, NUL-terminate it and return S.
+ If S is not a valid escaped file name, i.e., if it ends with an odd number
+ of backslashes or if it contains a backslash followed by anything other
+ than "n" or another backslash, return NULL. */
+
+static char *
+filename_unescape (char *s, size_t s_len)
+{
+ char *dst = s;
+
+ for (size_t i = 0; i < s_len; i++)
+ {
+ switch (s[i])
+ {
+ case '\\':
+ if (i == s_len - 1)
+ {
+ /* File name ends with an unescaped backslash: invalid. */
+ return NULL;
+ }
+ ++i;
+ switch (s[i])
+ {
+ case 'n':
+ *dst++ = '\n';
+ break;
+ case '\\':
+ *dst++ = '\\';
+ break;
+ default:
+ /* Only '\' or 'n' may follow a backslash. */
+ return NULL;
+ }
+ break;
+
+ case '\0':
+ /* The file name may not contain a NUL. */
+ return NULL;
+
+ default:
+ *dst++ = s[i];
+ break;
+ }
+ }
+ if (dst < s + s_len)
+ *dst = '\0';
+
+ return s;
+}
+
/* Split the checksum string S (of length S_LEN) from a BSD 'md5' or
'sha1' command into two parts: a hexadecimal digest, and the file
name. S is modified. Return true if successful. */
static bool
bsd_split_3 (char *s, size_t s_len, unsigned char **hex_digest,
- char **file_name)
+ char **file_name, bool escaped_filename)
{
size_t i;
if (s_len == 0)
return false;
- *file_name = s;
-
- /* Find end of filename. The BSD 'md5' and 'sha1' commands do not escape
- filenames, so search backwards for the last ')'. */
+ /* Find end of filename. */
i = s_len - 1;
while (i && s[i] != ')')
i--;
@@ -239,6 +294,11 @@ bsd_split_3 (char *s, size_t s_len, unsigned char **hex_digest,
if (s[i] != ')')
return false;
+ *file_name = s;
+
+ if (escaped_filename && filename_unescape (s, i) == NULL)
+ return false;
+
s[i++] = '\0';
while (ISWHITE (s[i]))
@@ -271,7 +331,14 @@ split_3 (char *s, size_t s_len,
while (ISWHITE (s[i]))
++i;
+ if (s[i] == '\\')
+ {
+ ++i;
+ escaped_filename = true;
+ }
+
/* Check for BSD-style checksum line. */
+
algo_name_len = strlen (DIGEST_TYPE_STRING);
if (STREQ_LEN (s + i, DIGEST_TYPE_STRING, algo_name_len))
{
@@ -282,7 +349,7 @@ split_3 (char *s, size_t s_len,
*binary = 0;
return bsd_split_3 (s + i + algo_name_len + 1,
s_len - (i + algo_name_len + 1),
- hex_digest, file_name);
+ hex_digest, file_name, escaped_filename);
}
}
@@ -293,11 +360,6 @@ split_3 (char *s, size_t s_len,
if (s_len - i < min_digest_line_length + (s[i] == '\\'))
return false;
- if (s[i] == '\\')
- {
- ++i;
- escaped_filename = true;
- }
*hex_digest = (unsigned char *) &s[i];
/* The first field has to be the n-character hexadecimal
@@ -333,49 +395,8 @@ split_3 (char *s, size_t s_len,
*file_name = &s[i];
if (escaped_filename)
- {
- /* Translate each '\n' string in the file name to a NEWLINE,
- and each '\\' string to a backslash. */
-
- char *dst = &s[i];
-
- while (i < s_len)
- {
- switch (s[i])
- {
- case '\\':
- if (i == s_len - 1)
- {
- /* A valid line does not end with a backslash. */
- return false;
- }
- ++i;
- switch (s[i++])
- {
- case 'n':
- *dst++ = '\n';
- break;
- case '\\':
- *dst++ = '\\';
- break;
- default:
- /* Only '\' or 'n' may follow a backslash. */
- return false;
- }
- break;
-
- case '\0':
- /* The file name may not contain a NUL. */
- return false;
- break;
+ return filename_unescape (&s[i], s_len - i) != NULL;
- default:
- *dst++ = s[i++];
- break;
- }
- }
- *dst = '\0';
- }
return true;
}
@@ -636,6 +657,31 @@ digest_check (const char *checkfile_name)
&& (!strict || n_improperly_formatted_lines == 0));
}
+static void
+print_filename (char const *file)
+{
+ /* Translate each NEWLINE byte to the string, "\\n",
+ and each backslash to "\\\\". */
+ while (*file)
+ {
+ switch (*file)
+ {
+ case '\n':
+ fputs ("\\n", stdout);
+ break;
+
+ case '\\':
+ fputs ("\\\\", stdout);
+ break;
+
+ default:
+ putchar (*file);
+ break;
+ }
+ file++;
+ }
+}
+
int
main (int argc, char **argv)
{
@@ -646,6 +692,7 @@ main (int argc, char **argv)
int opt;
bool ok = true;
int binary = -1;
+ bool prefix_tag = false;
/* Setting values of global variables. */
initialize_main (&argc, &argv);
@@ -690,6 +737,10 @@ main (int argc, char **argv)
case STRICT_OPTION:
strict = true;
break;
+ case TAG_OPTION:
+ prefix_tag = true;
+ binary = 1;
+ break;
case_GETOPT_HELP_CHAR;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
@@ -699,6 +750,24 @@ main (int argc, char **argv)
min_digest_line_length = MIN_DIGEST_LINE_LENGTH;
digest_hex_bytes = DIGEST_HEX_BYTES;
+ if (prefix_tag && !binary)
+ {
+ /* This could be supported in a backwards compatible way
+ by prefixing the output line with a space in text mode.
+ However that's invasive enough that it was agreed to
+ not support this mode with --tag, as --text use cases
+ are adequately supported by the default output format. */
+ error (0, 0, _("--tag does not support --text mode"));
+ usage (EXIT_FAILURE);
+ }
+
+ if (prefix_tag && do_check)
+ {
+ error (0, 0, _("the --tag option is meaningless when "
+ "verifying checksums"));
+ usage (EXIT_FAILURE);
+ }
+
if (0 <= binary && do_check)
{
error (0, 0, _("the --binary and --text options are meaningless when "
@@ -754,41 +823,36 @@ main (int argc, char **argv)
ok = false;
else
{
+ if (prefix_tag)
+ {
+ if (strchr (file, '\n') || strchr (file, '\\'))
+ putchar ('\\');
+
+ fputs (DIGEST_TYPE_STRING, stdout);
+ fputs (" (", stdout);
+ print_filename (file);
+ fputs (") = ", stdout);
+ }
+
size_t i;
/* Output a leading backslash if the file name contains
a newline or backslash. */
- if (strchr (file, '\n') || strchr (file, '\\'))
+ if (!prefix_tag && (strchr (file, '\n') || strchr (file, '\\')))
putchar ('\\');
for (i = 0; i < (digest_hex_bytes / 2); ++i)
printf ("%02x", bin_buffer[i]);
- putchar (' ');
- if (file_is_binary)
- putchar ('*');
- else
- putchar (' ');
-
- /* Translate each NEWLINE byte to the string, "\\n",
- and each backslash to "\\\\". */
- for (i = 0; i < strlen (file); ++i)
+ if (!prefix_tag)
{
- switch (file[i])
- {
- case '\n':
- fputs ("\\n", stdout);
- break;
-
- case '\\':
- fputs ("\\\\", stdout);
- break;
-
- default:
- putchar (file[i]);
- break;
- }
+ putchar (' ');
+
+ putchar (file_is_binary ? '*' : ' ');
+
+ print_filename (file);
}
+
putchar ('\n');
}
}
diff --git a/src/mkdir.c b/src/mkdir.c
index 32f79d4e..a94f96e1 100644
--- a/src/mkdir.c
+++ b/src/mkdir.c
@@ -1,5 +1,5 @@
/* mkdir -- make directories
- Copyright (C) 1990-2012 Free Software Foundation, Inc.
+ Copyright (C) 1990-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -56,11 +56,10 @@ usage (int status)
printf (_("Usage: %s [OPTION]... DIRECTORY...\n"), program_name);
fputs (_("\
Create the DIRECTORY(ies), if they do not already exist.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-m, --mode=MODE set file mode (as in chmod), not a=rwx - umask\n\
-p, --parents no error if existing, make parent directories as needed\n\
diff --git a/src/mkfifo.c b/src/mkfifo.c
index e5c871d1..76291e5b 100644
--- a/src/mkfifo.c
+++ b/src/mkfifo.c
@@ -1,5 +1,5 @@
/* mkfifo -- make fifo's (named pipes)
- Copyright (C) 1990-2012 Free Software Foundation, Inc.
+ Copyright (C) 1990-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -51,11 +51,10 @@ usage (int status)
printf (_("Usage: %s [OPTION]... NAME...\n"), program_name);
fputs (_("\
Create named pipes (FIFOs) with the given NAMEs.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-m, --mode=MODE set file permission bits to MODE, not a=rw - umask\n\
"), stdout);
@@ -114,7 +113,7 @@ main (int argc, char **argv)
_("failed to set default file creation context to %s"),
quote (scontext));
- newmode = (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
+ newmode = MODE_RW_UGO;
if (specified_mode)
{
struct mode_change *change = mode_compile (specified_mode);
diff --git a/src/mknod.c b/src/mknod.c
index 3a6d695a..7cfc708d 100644
--- a/src/mknod.c
+++ b/src/mknod.c
@@ -1,5 +1,5 @@
/* mknod -- make special files
- Copyright (C) 1990-2012 Free Software Foundation, Inc.
+ Copyright (C) 1990-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -53,11 +53,10 @@ usage (int status)
program_name);
fputs (_("\
Create the special file NAME of the given TYPE.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-m, --mode=MODE set file permission bits to MODE, not a=rw - umask\n\
"), stdout);
@@ -120,7 +119,7 @@ main (int argc, char **argv)
}
}
- newmode = (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
+ newmode = MODE_RW_UGO;
if (specified_mode)
{
struct mode_change *change = mode_compile (specified_mode);
diff --git a/src/mktemp.c b/src/mktemp.c
index bab0c2bf..aef140af 100644
--- a/src/mktemp.c
+++ b/src/mktemp.c
@@ -1,5 +1,5 @@
/* Create a temporary file or directory, safely.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -206,7 +206,8 @@ main (int argc, char **argv)
case_GETOPT_HELP_CHAR;
- case 'V': /* Undocumented alias. FIXME: remove in 2011. */
+ case 'V': /* Undocumented alias, for compatibility with the original
+ mktemp program. */
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
usage (EXIT_FAILURE);
diff --git a/src/mv.c b/src/mv.c
index ee2f5a10..1cfcd82f 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -1,5 +1,5 @@
/* mv -- move or rename files
- Copyright (C) 1986-2012 Free Software Foundation, Inc.
+ Copyright (C) 1986-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -73,6 +73,7 @@ static void
rm_option_init (struct rm_options *x)
{
x->ignore_missing_files = false;
+ x->remove_empty_directories = true;
x->recursive = true;
x->one_file_system = false;
@@ -117,6 +118,7 @@ cp_option_init (struct cp_options *x)
x->preserve_links = true;
x->preserve_mode = true;
x->preserve_timestamps = true;
+ x->explicit_no_preserve_mode= false;
x->preserve_security_context = selinux_enabled;
x->reduce_diagnostics = false;
x->data_copy_required = true;
@@ -149,7 +151,7 @@ target_directory_operand (char const *file)
int err = (stat (file, &st) == 0 ? 0 : errno);
bool is_a_dir = !err && S_ISDIR (st.st_mode);
if (err && err != ENOENT)
- error (EXIT_FAILURE, err, _("accessing %s"), quote (file));
+ error (EXIT_FAILURE, err, _("failed to access %s"), quote (file));
return is_a_dir;
}
@@ -289,11 +291,10 @@ Usage: %s [OPTION]... [-T] SOURCE DEST\n\
program_name, program_name, program_name);
fputs (_("\
Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
--backup[=CONTROL] make a backup of each existing destination file\
\n\
@@ -396,7 +397,8 @@ main (int argc, char **argv)
{
struct stat st;
if (stat (optarg, &st) != 0)
- error (EXIT_FAILURE, errno, _("accessing %s"), quote (optarg));
+ error (EXIT_FAILURE, errno, _("failed to access %s"),
+ quote (optarg));
if (! S_ISDIR (st.st_mode))
error (EXIT_FAILURE, 0, _("target %s is not a directory"),
quote (optarg));
diff --git a/src/nice.c b/src/nice.c
index 1a90320e..04fd3bf6 100644
--- a/src/nice.c
+++ b/src/nice.c
@@ -1,5 +1,5 @@
/* nice -- run a program with modified niceness
- Copyright (C) 1990-2012 Free Software Foundation, Inc.
+ Copyright (C) 1990-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -72,12 +72,16 @@ usage (int status)
printf (_("Usage: %s [OPTION] [COMMAND [ARG]...]\n"), program_name);
printf (_("\
Run COMMAND with an adjusted niceness, which affects process scheduling.\n\
-With no COMMAND, print the current niceness. Nicenesses range from\n\
-%d (most favorable scheduling) to %d (least favorable).\n\
-\n\
- -n, --adjustment=N add integer N to the niceness (default 10)\n\
+With no COMMAND, print the current niceness. Niceness values range from\n\
+%d (most favorable to the process) to %d (least favorable to the process).\n\
"),
- NZERO, NZERO - 1);
+
+ emit_mandatory_arg_note ();
+
+ fputs (_("\
+ -n, --adjustment=N add integer N to the niceness (default 10)\n\
+"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
diff --git a/src/nl.c b/src/nl.c
index 21d4c4d9..96716aa1 100644
--- a/src/nl.c
+++ b/src/nl.c
@@ -1,5 +1,5 @@
/* nl -- number lines of files
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -145,11 +145,6 @@ static intmax_t line_no;
/* True if we have ever read standard input. */
static bool have_read_stdin;
-enum
-{
- PAGE_INCREMENT_OPTION_DEPRECATED = CHAR_MAX + 1
-};
-
static struct option const longopts[] =
{
{"header-numbering", required_argument, NULL, 'h'},
@@ -157,8 +152,6 @@ static struct option const longopts[] =
{"footer-numbering", required_argument, NULL, 'f'},
{"starting-line-number", required_argument, NULL, 'v'},
{"line-increment", required_argument, NULL, 'i'},
- /* FIXME: page-increment is deprecated, remove in dec-2011. */
- {"page-increment", required_argument, NULL, PAGE_INCREMENT_OPTION_DEPRECATED},
{"no-renumber", no_argument, NULL, 'p'},
{"join-blank-lines", required_argument, NULL, 'l'},
{"number-separator", required_argument, NULL, 's'},
@@ -186,11 +179,10 @@ Usage: %s [OPTION]... [FILE]...\n\
fputs (_("\
Write each FILE to standard output, with line numbers added.\n\
With no FILE, or when FILE is -, read standard input.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-b, --body-numbering=STYLE use STYLE for numbering body lines\n\
-d, --section-delimiter=CC use CC for separating logical pages\n\
@@ -513,10 +505,6 @@ main (int argc, char **argv)
ok = false;
}
break;
- case PAGE_INCREMENT_OPTION_DEPRECATED:
- error (0, 0, _("WARNING: --page-increment is deprecated; "
- "use --line-increment instead"));
- /* fall through */
case 'i':
if (! (xstrtoimax (optarg, NULL, 10, &page_incr, "") == LONGINT_OK
&& 0 < page_incr))
diff --git a/src/nohup.c b/src/nohup.c
index f46ab1eb..075c4cda 100644
--- a/src/nohup.c
+++ b/src/nohup.c
@@ -1,5 +1,5 @@
/* nohup -- run a command immune to hangups, with output to a non-tty
- Copyright (C) 2003-2012 Free Software Foundation, Inc.
+ Copyright (C) 2003-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/nproc.c b/src/nproc.c
index a93ee536..5bd6610d 100644
--- a/src/nproc.c
+++ b/src/nproc.c
@@ -1,5 +1,5 @@
/* nproc - print the number of processors.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,6 +24,7 @@
#include "system.h"
#include "error.h"
#include "nproc.h"
+#include "quote.h"
#include "xstrtol.h"
/* The official name of this program (e.g., no 'g' prefix). */
@@ -113,6 +114,12 @@ main (int argc, char **argv)
}
}
+ if (argc != optind)
+ {
+ error (0, 0, _("extra operand %s"), quote (argv[optind]));
+ usage (EXIT_FAILURE);
+ }
+
nproc = num_processors (mode);
if (ignore < nproc)
diff --git a/src/numfmt.c b/src/numfmt.c
new file mode 100644
index 00000000..8c21c2b3
--- /dev/null
+++ b/src/numfmt.c
@@ -0,0 +1,1527 @@
+/* Reformat numbers like 11505426432 to the more human-readable 11G
+ Copyright (C) 2012 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <float.h>
+#include <getopt.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <langinfo.h>
+
+#include "mbsalign.h"
+#include "argmatch.h"
+#include "error.h"
+#include "quote.h"
+#include "system.h"
+#include "xstrtol.h"
+#include "xstrndup.h"
+
+/* The official name of this program (e.g., no 'g' prefix). */
+#define PROGRAM_NAME "numfmt"
+
+#define AUTHORS proper_name ("Assaf Gordon")
+
+/* Exit code when some numbers fail to convert. */
+enum { EXIT_CONVERSION_WARNINGS = 2 };
+
+enum
+{
+ FROM_OPTION = CHAR_MAX + 1,
+ FROM_UNIT_OPTION,
+ TO_OPTION,
+ TO_UNIT_OPTION,
+ ROUND_OPTION,
+ SUFFIX_OPTION,
+ GROUPING_OPTION,
+ PADDING_OPTION,
+ FIELD_OPTION,
+ DEBUG_OPTION,
+ DEV_DEBUG_OPTION,
+ HEADER_OPTION,
+ FORMAT_OPTION,
+ INVALID_OPTION
+};
+
+enum scale_type
+{
+ scale_none, /* the default: no scaling. */
+ scale_auto, /* --from only. */
+ scale_SI,
+ scale_IEC,
+ scale_IEC_I /* 'i' suffix is required. */
+};
+
+static char const *const scale_from_args[] =
+{
+ "none", "auto", "si", "iec", "iec-i", NULL
+};
+
+static enum scale_type const scale_from_types[] =
+{
+ scale_none, scale_auto, scale_SI, scale_IEC, scale_IEC_I
+};
+
+static char const *const scale_to_args[] =
+{
+ "none", "si", "iec", "iec-i", NULL
+};
+
+static enum scale_type const scale_to_types[] =
+{
+ scale_none, scale_SI, scale_IEC, scale_IEC_I
+};
+
+
+enum round_type
+{
+ round_ceiling,
+ round_floor,
+ round_from_zero,
+ round_to_zero,
+ round_nearest,
+};
+
+static char const *const round_args[] =
+{
+ "up", "down", "from-zero", "towards-zero", "nearest", NULL
+};
+
+static enum round_type const round_types[] =
+{
+ round_ceiling, round_floor, round_from_zero, round_to_zero, round_nearest
+};
+
+
+enum inval_type
+{
+ inval_abort,
+ inval_fail,
+ inval_warn,
+ inval_ignore
+};
+
+static char const *const inval_args[] =
+{
+ "abort", "fail", "warn", "ignore", NULL
+};
+
+static enum inval_type const inval_types[] =
+{
+ inval_abort, inval_fail, inval_warn, inval_ignore
+};
+
+static struct option const longopts[] =
+{
+ {"from", required_argument, NULL, FROM_OPTION},
+ {"from-unit", required_argument, NULL, FROM_UNIT_OPTION},
+ {"to", required_argument, NULL, TO_OPTION},
+ {"to-unit", required_argument, NULL, TO_UNIT_OPTION},
+ {"round", required_argument, NULL, ROUND_OPTION},
+ {"padding", required_argument, NULL, PADDING_OPTION},
+ {"suffix", required_argument, NULL, SUFFIX_OPTION},
+ {"grouping", no_argument, NULL, GROUPING_OPTION},
+ {"delimiter", required_argument, NULL, 'd'},
+ {"field", required_argument, NULL, FIELD_OPTION},
+ {"debug", no_argument, NULL, DEBUG_OPTION},
+ {"-debug", no_argument, NULL, DEV_DEBUG_OPTION},
+ {"header", optional_argument, NULL, HEADER_OPTION},
+ {"format", required_argument, NULL, FORMAT_OPTION},
+ {"invalid", required_argument, NULL, INVALID_OPTION},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
+ {NULL, 0, NULL, 0}
+};
+
+/* If delimiter has this value, blanks separate fields. */
+enum { DELIMITER_DEFAULT = CHAR_MAX + 1 };
+
+/* Maximum number of digits we can safely handle
+ without precision loss, if scaling is 'none'. */
+enum { MAX_UNSCALED_DIGITS = 18 };
+
+/* Maximum number of digits we can work with.
+ This is equivalent to 999Y.
+ NOTE: 'long double' can handle more than that, but there's
+ no official suffix assigned beyond Yotta (1000^8). */
+enum { MAX_ACCEPTABLE_DIGITS = 27 };
+
+static enum scale_type scale_from = scale_none;
+static enum scale_type scale_to = scale_none;
+static enum round_type _round = round_from_zero;
+static enum inval_type _invalid = inval_abort;
+static const char *suffix = NULL;
+static uintmax_t from_unit_size = 1;
+static uintmax_t to_unit_size = 1;
+static int grouping = 0;
+static char *padding_buffer = NULL;
+static size_t padding_buffer_size = 0;
+static long int padding_width = 0;
+static const char *format_str = NULL;
+static char *format_str_prefix = NULL;
+static char *format_str_suffix = NULL;
+
+/* By default, any conversion error will terminate the program. */
+static int conv_exit_code = EXIT_CONVERSION_WARNINGS;
+
+
+/* auto-pad each line based on skipped whitespace. */
+static int auto_padding = 0;
+static mbs_align_t padding_alignment = MBS_ALIGN_RIGHT;
+static long int field = 1;
+static int delimiter = DELIMITER_DEFAULT;
+
+/* if non-zero, the first 'header' lines from STDIN are skipped. */
+static uintmax_t header = 0;
+
+/* Debug for users: print warnings to STDERR about possible
+ error (similar to sort's debug). */
+static bool debug;
+
+/* will be set according to the current locale. */
+static const char *decimal_point;
+static int decimal_point_length;
+
+/* debugging for developers. Enables devmsg(). */
+static bool dev_debug = false;
+
+/* Like error(0, 0, ...), but without an implicit newline.
+ Also a noop unless the global DEV_DEBUG is set.
+ TODO: Replace with variadic macro in system.h or
+ move to a separate module. */
+static inline void
+devmsg (char const *fmt, ...)
+{
+ if (dev_debug)
+ {
+ va_list ap;
+ va_start (ap, fmt);
+ vfprintf (stderr, fmt, ap);
+ va_end (ap);
+ }
+}
+
+static inline int
+default_scale_base (enum scale_type scale)
+{
+ switch (scale)
+ {
+ case scale_IEC:
+ case scale_IEC_I:
+ return 1024;
+
+ case scale_none:
+ case scale_auto:
+ case scale_SI:
+ default:
+ return 1000;
+ }
+}
+
+static inline int
+valid_suffix (const char suf)
+{
+ static const char *valid_suffixes = "KMGTPEZY";
+ return (strchr (valid_suffixes, suf) != NULL);
+}
+
+static inline int
+suffix_power (const char suf)
+{
+ switch (suf)
+ {
+ case 'K': /* kilo or kibi. */
+ return 1;
+
+ case 'M': /* mega or mebi. */
+ return 2;
+
+ case 'G': /* giga or gibi. */
+ return 3;
+
+ case 'T': /* tera or tebi. */
+ return 4;
+
+ case 'P': /* peta or pebi. */
+ return 5;
+
+ case 'E': /* exa or exbi. */
+ return 6;
+
+ case 'Z': /* zetta or 2**70. */
+ return 7;
+
+ case 'Y': /* yotta or 2**80. */
+ return 8;
+
+ default: /* should never happen. assert? */
+ return 0;
+ }
+}
+
+static inline const char *
+suffix_power_character (unsigned int power)
+{
+ switch (power)
+ {
+ case 0:
+ return "";
+
+ case 1:
+ return "K";
+
+ case 2:
+ return "M";
+
+ case 3:
+ return "G";
+
+ case 4:
+ return "T";
+
+ case 5:
+ return "P";
+
+ case 6:
+ return "E";
+
+ case 7:
+ return "Z";
+
+ case 8:
+ return "Y";
+
+ default:
+ return "(error)";
+ }
+}
+
+/* Similar to 'powl(3)' but without requiring 'libm'. */
+static long double
+powerld (long double base, unsigned int x)
+{
+ long double result = base;
+ if (x == 0)
+ return 1; /* note for test coverage: this is never
+ reached, as 'powerld' won't be called if
+ there's no suffix, hence, no "power". */
+
+ /* TODO: check for overflow, inf? */
+ while (--x)
+ result *= base;
+ return result;
+}
+
+/* Similar to 'fabs(3)' but without requiring 'libm'. */
+static inline long double
+absld (long double val)
+{
+ return val < 0 ? -val : val;
+}
+
+/* Scale down 'val', returns 'updated val' and 'x', such that
+ val*base^X = original val
+ Similar to "frexpl(3)" but without requiring 'libm',
+ allowing only integer scale, limited functionality and error checking. */
+static long double
+expld (long double val, unsigned int base, unsigned int /*output */ *x)
+{
+ unsigned int power = 0;
+
+ if (val >= -LDBL_MAX && val <= LDBL_MAX)
+ {
+ while (absld (val) >= base)
+ {
+ ++power;
+ val /= base;
+ }
+ }
+ if (x)
+ *x = power;
+ return val;
+}
+
+/* EXTREMELY limited 'ceil' - without 'libm'.
+ Assumes values that fit in intmax_t. */
+static inline intmax_t
+simple_round_ceiling (long double val)
+{
+ intmax_t intval = val;
+ if (intval < val)
+ intval++;
+ return intval;
+}
+
+/* EXTREMELY limited 'floor' - without 'libm'.
+ Assumes values that fit in intmax_t. */
+static inline intmax_t
+simple_round_floor (long double val)
+{
+ return -simple_round_ceiling (-val);
+}
+
+/* EXTREMELY limited 'round away from zero'.
+ Assumes values that fit in intmax_t. */
+static inline intmax_t
+simple_round_from_zero (long double val)
+{
+ return val < 0 ? simple_round_floor (val) : simple_round_ceiling (val);
+}
+
+/* EXTREMELY limited 'round away to zero'.
+ Assumes values that fit in intmax_t. */
+static inline intmax_t
+simple_round_to_zero (long double val)
+{
+ return val;
+}
+
+/* EXTREMELY limited 'round' - without 'libm'.
+ Assumes values that fit in intmax_t. */
+static inline intmax_t
+simple_round_nearest (long double val)
+{
+ return val < 0 ? val - 0.5 : val + 0.5;
+}
+
+static inline intmax_t
+simple_round (long double val, enum round_type t)
+{
+ switch (t)
+ {
+ case round_ceiling:
+ return simple_round_ceiling (val);
+
+ case round_floor:
+ return simple_round_floor (val);
+
+ case round_from_zero:
+ return simple_round_from_zero (val);
+
+ case round_to_zero:
+ return simple_round_to_zero (val);
+
+ case round_nearest:
+ return simple_round_nearest (val);
+
+ default:
+ /* to silence the compiler - this should never happen. */
+ return 0;
+ }
+}
+
+enum simple_strtod_error
+{
+ SSE_OK = 0,
+ SSE_OK_PRECISION_LOSS,
+ SSE_OVERFLOW,
+ SSE_INVALID_NUMBER,
+
+ /* the following are returned by 'simple_strtod_human'. */
+ SSE_VALID_BUT_FORBIDDEN_SUFFIX,
+ SSE_INVALID_SUFFIX,
+ SSE_MISSING_I_SUFFIX
+};
+
+/* Read an *integer* INPUT_STR,
+ but return the integer value in a 'long double' VALUE
+ hence, no UINTMAX_MAX limitation.
+ NEGATIVE is updated, and is stored separately from the VALUE
+ so that signbit() isn't required to determine the sign of -0..
+ ENDPTR is required (unlike strtod) and is used to store a pointer
+ to the character after the last character used in the conversion.
+
+ Note locale'd grouping is not supported,
+ nor is skipping of white-space supported.
+
+ Returns:
+ SSE_OK - valid number.
+ SSE_OK_PRECISION_LOSS - if more than 18 digits were used.
+ SSE_OVERFLOW - if more than 27 digits (999Y) were used.
+ SSE_INVALID_NUMBER - if no digits were found. */
+static enum simple_strtod_error
+simple_strtod_int (const char *input_str,
+ char **endptr, long double *value, bool *negative)
+{
+ enum simple_strtod_error e = SSE_OK;
+
+ long double val = 0;
+ unsigned int digits = 0;
+
+ if (*input_str == '-')
+ {
+ input_str++;
+ *negative = true;
+ }
+ else
+ *negative = false;
+
+ *endptr = (char *) input_str;
+ while (*endptr && isdigit (**endptr))
+ {
+ int digit = (**endptr) - '0';
+
+ /* can this happen in some strange locale? */
+ if (digit < 0 || digit > 9)
+ return SSE_INVALID_NUMBER;
+
+ if (digits > MAX_UNSCALED_DIGITS)
+ e = SSE_OK_PRECISION_LOSS;
+
+ ++digits;
+ if (digits > MAX_ACCEPTABLE_DIGITS)
+ return SSE_OVERFLOW;
+
+ val *= 10;
+ val += digit;
+
+ ++(*endptr);
+ }
+ if (digits == 0)
+ return SSE_INVALID_NUMBER;
+ if (*negative)
+ val = -val;
+
+ if (value)
+ *value = val;
+
+ return e;
+}
+
+/* Read a floating-point INPUT_STR represented as "NNNN[.NNNNN]",
+ and return the value in a 'long double' VALUE.
+ ENDPTR is required (unlike strtod) and is used to store a pointer
+ to the character after the last character used in the conversion.
+ PRECISION is optional and used to indicate fractions are present.
+
+ Note locale'd grouping is not supported,
+ nor is skipping of white-space supported.
+
+ Returns:
+ SSE_OK - valid number.
+ SSE_OK_PRECISION_LOSS - if more than 18 digits were used.
+ SSE_OVERFLOW - if more than 27 digits (999Y) were used.
+ SSE_INVALID_NUMBER - if no digits were found. */
+static enum simple_strtod_error
+simple_strtod_float (const char *input_str,
+ char **endptr,
+ long double *value,
+ size_t *precision)
+{
+ bool negative;
+ enum simple_strtod_error e = SSE_OK;
+
+ if (precision)
+ *precision = 0;
+
+ /* TODO: accept locale'd grouped values for the integral part. */
+ e = simple_strtod_int (input_str, endptr, value, &negative);
+ if (e != SSE_OK && e != SSE_OK_PRECISION_LOSS)
+ return e;
+
+
+ /* optional decimal point + fraction. */
+ if (STREQ_LEN (*endptr, decimal_point, decimal_point_length))
+ {
+ char *ptr2;
+ long double val_frac = 0;
+ bool neg_frac;
+
+ (*endptr) += decimal_point_length;
+ enum simple_strtod_error e2 =
+ simple_strtod_int (*endptr, &ptr2, &val_frac, &neg_frac);
+ if (e2 != SSE_OK && e2 != SSE_OK_PRECISION_LOSS)
+ return e2;
+ if (e2 == SSE_OK_PRECISION_LOSS)
+ e = e2; /* propagate warning. */
+ if (neg_frac)
+ return SSE_INVALID_NUMBER;
+
+ /* number of digits in the fractions. */
+ size_t exponent = ptr2 - *endptr;
+
+ val_frac = ((long double) val_frac) / powerld (10, exponent);
+
+ if (value)
+ {
+ if (negative)
+ *value -= val_frac;
+ else
+ *value += val_frac;
+ }
+
+ if (precision)
+ *precision = exponent;
+
+ *endptr = ptr2;
+ }
+ return e;
+}
+
+/* Read a 'human' INPUT_STR represented as "NNNN[.NNNNN] + suffix",
+ and return the value in a 'long double' VALUE,
+ with the precision of the input returned in PRECISION.
+ ENDPTR is required (unlike strtod) and is used to store a pointer
+ to the character after the last character used in the conversion.
+ ALLOWED_SCALING determines the scaling supported.
+
+ TODO:
+ support locale'd grouping
+ accept scentific and hex floats (probably use strtold directly)
+
+ Returns:
+ SSE_OK - valid number.
+ SSE_OK_PRECISION_LOSS - if more than 18 digits were used.
+ SSE_OVERFLOW - if more than 27 digits (999Y) were used.
+ SSE_INVALID_NUMBER - if no digits were found.
+ SSE_VALID_BUT_FORBIDDEN_SUFFIX
+ SSE_INVALID_SUFFIX
+ SSE_MISSING_I_SUFFIX */
+static enum simple_strtod_error
+simple_strtod_human (const char *input_str,
+ char **endptr, long double *value, size_t *precision,
+ enum scale_type allowed_scaling)
+{
+ int power = 0;
+ /* 'scale_auto' is checked below. */
+ int scale_base = default_scale_base (allowed_scaling);
+
+ devmsg ("simple_strtod_human:\n input string: '%s'\n "
+ "locale decimal-point: '%s'\n", input_str, decimal_point);
+
+ enum simple_strtod_error e =
+ simple_strtod_float (input_str, endptr, value, precision);
+ if (e != SSE_OK && e != SSE_OK_PRECISION_LOSS)
+ return e;
+
+ devmsg (" parsed numeric value: %Lf\n"
+ " input precision = %d\n", *value, (int)*precision);
+
+ if (**endptr != '\0')
+ {
+ /* process suffix. */
+
+ /* Skip any blanks between the number and suffix. */
+ while (isblank (**endptr))
+ (*endptr)++;
+
+ if (!valid_suffix (**endptr))
+ return SSE_INVALID_SUFFIX;
+
+ if (allowed_scaling == scale_none)
+ return SSE_VALID_BUT_FORBIDDEN_SUFFIX;
+
+ power = suffix_power (**endptr);
+ (*endptr)++; /* skip first suffix character. */
+
+ if (allowed_scaling == scale_auto && **endptr == 'i')
+ {
+ /* auto-scaling enabled, and the first suffix character
+ is followed by an 'i' (e.g. Ki, Mi, Gi). */
+ scale_base = 1024;
+ (*endptr)++; /* skip second ('i') suffix character. */
+ devmsg (" Auto-scaling, found 'i', switching to base %d\n",
+ scale_base);
+ }
+
+ *precision = 0; /* Reset, to select precision based on scale. */
+ }
+
+ if (allowed_scaling == scale_IEC_I)
+ {
+ if (**endptr == 'i')
+ (*endptr)++;
+ else
+ return SSE_MISSING_I_SUFFIX;
+ }
+
+ long double multiplier = powerld (scale_base, power);
+
+ devmsg (" suffix power=%d^%d = %Lf\n", scale_base, power, multiplier);
+
+ /* TODO: detect loss of precision and overflows. */
+ (*value) = (*value) * multiplier;
+
+ devmsg (" returning value: %Lf (%LG)\n", *value, *value);
+
+ return e;
+}
+
+
+static void
+simple_strtod_fatal (enum simple_strtod_error err, char const *input_str)
+{
+ char const *msgid = NULL;
+
+ switch (err)
+ {
+ case SSE_OK_PRECISION_LOSS:
+ case SSE_OK:
+ /* should never happen - this function isn't called when OK. */
+ abort ();
+
+ case SSE_OVERFLOW:
+ msgid = N_("value too large to be converted: '%s'");
+ break;
+
+ case SSE_INVALID_NUMBER:
+ msgid = N_("invalid number: '%s'");
+ break;
+
+ case SSE_VALID_BUT_FORBIDDEN_SUFFIX:
+ msgid = N_("rejecting suffix in input: '%s' (consider using --from)");
+ break;
+
+ case SSE_INVALID_SUFFIX:
+ msgid = N_("invalid suffix in input: '%s'");
+ break;
+
+ case SSE_MISSING_I_SUFFIX:
+ msgid = N_("missing 'i' suffix in input: '%s' (e.g Ki/Mi/Gi)");
+ break;
+
+ }
+
+ if (_invalid != inval_ignore)
+ error (conv_exit_code, 0, gettext (msgid), input_str);
+}
+
+/* Convert VAL to a human format string in BUF. */
+static void
+double_to_human (long double val, int precision,
+ char *buf, size_t buf_size,
+ enum scale_type scale, int group, enum round_type round)
+{
+ devmsg ("double_to_human:\n");
+
+ if (scale == scale_none)
+ {
+ val *= powerld (10, precision);
+ val = simple_round (val, round);
+ val /= powerld (10, precision);
+
+ devmsg ((group) ?
+ " no scaling, returning (grouped) value: %'.*Lf\n" :
+ " no scaling, returning value: %.*Lf\n", precision, val);
+
+ int i = snprintf (buf, buf_size, (group) ? "%'.*Lf" : "%.*Lf",
+ precision, val);
+ if (i < 0 || i >= (int) buf_size)
+ error (EXIT_FAILURE, 0,
+ _("failed to prepare value '%Lf' for printing"), val);
+ return;
+ }
+
+ /* Scaling requested by user. */
+ double scale_base = default_scale_base (scale);
+
+ /* Normalize val to scale. */
+ unsigned int power = 0;
+ val = expld (val, scale_base, &power);
+ devmsg (" scaled value to %Lf * %0.f ^ %d\n", val, scale_base, power);
+
+ /* Perform rounding. */
+ int ten_or_less = 0;
+ if (absld (val) < 10)
+ {
+ /* for values less than 10, we allow one decimal-point digit,
+ so adjust before rounding. */
+ ten_or_less = 1;
+ val *= 10;
+ }
+ val = simple_round (val, round);
+ /* two special cases after rounding:
+ 1. a "999.99" can turn into 1000 - so scale down
+ 2. a "9.99" can turn into 10 - so don't display decimal-point. */
+ if (absld (val) >= scale_base)
+ {
+ val /= scale_base;
+ power++;
+ }
+ if (ten_or_less)
+ val /= 10;
+
+ /* should "7.0" be printed as "7" ?
+ if removing the ".0" is preferred, enable the fourth condition. */
+ int show_decimal_point = (val != 0) && (absld (val) < 10) && (power > 0);
+ /* && (absld (val) > simple_round_floor (val))) */
+
+ devmsg (" after rounding, value=%Lf * %0.f ^ %d\n", val, scale_base, power);
+
+ snprintf (buf, buf_size, (show_decimal_point) ? "%.1Lf%s" : "%.0Lf%s",
+ val, suffix_power_character (power));
+
+ if (scale == scale_IEC_I && power > 0)
+ strncat (buf, "i", buf_size - strlen (buf) - 1);
+
+ devmsg (" returning value: '%s'\n", buf);
+
+ return;
+}
+
+/* Convert a string of decimal digits, N_STRING, with an optional suffix
+ to an integral value. Upon successful conversion, return that value.
+ If it cannot be converted, give a diagnostic and exit. */
+static uintmax_t
+unit_to_umax (const char *n_string)
+{
+ strtol_error s_err;
+ char *end = NULL;
+ uintmax_t n;
+
+ s_err = xstrtoumax (n_string, &end, 10, &n, "KMGTPEZY");
+
+ if (s_err != LONGINT_OK || *end || n == 0)
+ error (EXIT_FAILURE, 0, _("invalid unit size: '%s'"), n_string);
+
+ return n;
+}
+
+
+static void
+setup_padding_buffer (size_t min_size)
+{
+ if (padding_buffer_size > min_size)
+ return;
+
+ padding_buffer_size = min_size + 1;
+ padding_buffer = realloc (padding_buffer, padding_buffer_size);
+ if (!padding_buffer)
+ error (EXIT_FAILURE, 0, _("out of memory (requested %zu bytes)"),
+ padding_buffer_size);
+}
+
+void
+usage (int status)
+{
+ if (status != EXIT_SUCCESS)
+ emit_try_help ();
+ else
+ {
+ printf (_("\
+Usage: %s [OPTION]... [NUMBER]...\n\
+"), program_name);
+ fputs (_("\
+Reformat NUMBER(s), or the numbers from standard input if none are specified.\n\
+"), stdout);
+ emit_mandatory_arg_note ();
+ fputs (_("\
+ --debug print warnings about invalid input\n\
+"), stdout);
+ fputs (_("\
+ -d, --delimiter=X use X instead of whitespace for field delimiter\n\
+"), stdout);
+ fputs (_("\
+ --field=N replace the number in input field N (default is 1)\n\
+"), stdout);
+ fputs (_("\
+ --format=FORMAT use printf style floating-point FORMAT;\n\
+ see FORMAT below for details\n\
+"), stdout);
+ fputs (_("\
+ --from=UNIT auto-scale input numbers to UNITs; default is 'none';\n\
+ see UNIT below\n\
+"), stdout);
+ fputs (_("\
+ --from-unit=N specify the input unit size (instead of the default 1)\n\
+"), stdout);
+ fputs (_("\
+ --grouping use locale-defined grouping of digits, e.g. 1,000,000\n\
+ (which means it has no effect in the C/POSIX locale)\n\
+"), stdout);
+ fputs (_("\
+ --header[=N] print (without converting) the first N header lines;\n\
+ N defaults to 1 if not specified\n\
+"), stdout);
+ fputs (_("\
+ --invalid=MODE failure mode for invalid numbers: MODE can be:\n\
+ abort (default), fail, warn, ignore\n\
+"), stdout);
+ fputs (_("\
+ --padding=N pad the output to N characters; positive N will\n\
+ right-align; negative N will left-align;\n\
+ padding is ignored if the output is wider than N;\n\
+ the default is to automatically pad if a whitespace\n\
+ is found\n\
+"), stdout);
+ fputs (_("\
+ --round=METHOD use METHOD for rounding when scaling; METHOD can be:\n\
+ up, down, from-zero (default), towards-zero, nearest\n\
+"), stdout);
+ fputs (_("\
+ --suffix=SUFFIX add SUFFIX to output numbers, and accept optional\n\
+ SUFFIX in input numbers\n\
+"), stdout);
+ fputs (_("\
+ --to=UNIT auto-scale output numbers to UNITs; see UNIT below\n\
+"), stdout);
+ fputs (_("\
+ --to-unit=N the output unit size (instead of the default 1)\n\
+"), stdout);
+
+ fputs (HELP_OPTION_DESCRIPTION, stdout);
+ fputs (VERSION_OPTION_DESCRIPTION, stdout);
+
+ fputs (_("\
+\n\
+UNIT options:\n"), stdout);
+ fputs (_("\
+ none no auto-scaling is done; suffixes will trigger an error\n\
+"), stdout);
+ fputs (_("\
+ auto accept optional single/two letter suffix:\n\
+ 1K = 1000,\n\
+ 1Ki = 1024,\n\
+ 1M = 1000000,\n\
+ 1Mi = 1048576,\n"), stdout);
+ fputs (_("\
+ si accept optional single letter suffix:\n\
+ 1K = 1000,\n\
+ 1M = 1000000,\n\
+ ...\n"), stdout);
+ fputs (_("\
+ iec accept optional single letter suffix:\n\
+ 1K = 1024,\n\
+ 1M = 1048576,\n\
+ ...\n"), stdout);
+ fputs (_("\
+ iec-i accept optional two-letter suffix:\n\
+ 1Ki = 1024,\n\
+ 1Mi = 1048576,\n\
+ ...\n"), stdout);
+
+ fputs (_("\n\
+FORMAT must be suitable for printing one floating-point argument '%f'.\n\
+Optional quote (%'f) will enable --grouping (if supported by current locale).\n\
+Optional width value (%10f) will pad output. Optional negative width values\n\
+(%-10f) will left-pad output.\n\
+"), stdout);
+
+ printf (_("\n\
+Exit status is 0 if all input numbers were successfully converted.\n\
+By default, %s will stop at the first conversion error with exit status 2.\n\
+With --invalid='fail' a warning is printed for each conversion error\n\
+and the exit status is 2. With --invalid='warn' each conversion error is\n\
+diagnosed, but the exit status is 0. With --invalid='ignore' conversion\n\
+errors are not diagnosed and the exit status is 0.\n\
+"), program_name);
+
+ printf (_("\n\
+Examples:\n\
+ $ %s --to=si 1000\n\
+ -> \"1.0K\"\n\
+ $ %s --to=iec 2048\n\
+ -> \"2.0K\"\n\
+ $ %s --to=iec-i 4096\n\
+ -> \"4.0Ki\"\n\
+ $ echo 1K | %s --from=si\n\
+ -> \"1000\"\n\
+ $ echo 1K | %s --from=iec\n\
+ -> \"1024\"\n\
+ $ df | %s --header --field 2 --to=si\n\
+ $ ls -l | %s --header --field 5 --to=iec\n\
+ $ ls -lh | %s --header --field 5 --from=iec --padding=10\n\
+ $ ls -lh | %s --header --field 5 --from=iec --format %%10f\n"),
+ program_name, program_name, program_name,
+ program_name, program_name, program_name,
+ program_name, program_name, program_name);
+ emit_ancillary_info ();
+ }
+ exit (status);
+}
+
+/* Given 'fmt' (a printf(3) compatible format string), extracts the following:
+ 1. padding (e.g. %20f)
+ 2. alignment (e.g. %-20f)
+ 3. grouping (e.g. %'f)
+
+ Only a limited subset of printf(3) syntax is supported.
+
+ TODO:
+ support .precision
+ support %e %g etc. rather than just %f
+
+ NOTES:
+ 1. This function sets the global variables:
+ padding_width, padding_alignment, grouping,
+ format_str_prefix, format_str_suffix
+ 2. The function aborts on any errors. */
+static void
+parse_format_string (char const *fmt)
+{
+ size_t i;
+ size_t prefix_len = 0;
+ size_t suffix_pos;
+ long int pad = 0;
+ char *endptr = NULL;
+
+ for (i = 0; !(fmt[i] == '%' && fmt[i + 1] != '%'); i += (fmt[i] == '%') + 1)
+ {
+ if (!fmt[i])
+ error (EXIT_FAILURE, 0,
+ _("format %s has no %% directive"), quote (fmt));
+ prefix_len++;
+ }
+
+ i++;
+ i += strspn (fmt + i, " ");
+ if (fmt[i] == '\'')
+ {
+ grouping = 1;
+ i++;
+ }
+ i += strspn (fmt + i, " ");
+ errno = 0;
+ pad = strtol (fmt + i, &endptr, 10);
+ if (errno == ERANGE)
+ error (EXIT_FAILURE, 0,
+ _("invalid format %s (width overflow)"), quote (fmt));
+
+ if (endptr != (fmt + i) && pad != 0)
+ {
+ if (pad < 0)
+ {
+ padding_alignment = MBS_ALIGN_LEFT;
+ padding_width = -pad;
+ }
+ else
+ {
+ padding_width = pad;
+ }
+ }
+ i = endptr - fmt;
+
+ if (fmt[i] == '\0')
+ error (EXIT_FAILURE, 0, _("format %s ends in %%"), quote (fmt));
+
+ if (fmt[i] != 'f')
+ error (EXIT_FAILURE, 0, _("invalid format %s,"
+ " directive must be %%['][-][N]f"),
+ quote (fmt));
+ i++;
+ suffix_pos = i;
+
+ for (; fmt[i] != '\0'; i += (fmt[i] == '%') + 1)
+ if (fmt[i] == '%' && fmt[i + 1] != '%')
+ error (EXIT_FAILURE, 0, _("format %s has too many %% directives"),
+ quote (fmt));
+
+ if (prefix_len)
+ {
+ format_str_prefix = xstrndup (fmt, prefix_len);
+ if (!format_str_prefix)
+ error (EXIT_FAILURE, 0, _("out of memory (requested %zu bytes)"),
+ prefix_len + 1);
+ }
+ if (fmt[suffix_pos] != '\0')
+ {
+ format_str_suffix = strdup (fmt + suffix_pos);
+ if (!format_str_suffix)
+ error (EXIT_FAILURE, 0, _("out of memory (requested %zu bytes)"),
+ strlen (fmt + suffix_pos));
+ }
+
+ devmsg ("format String:\n input: %s\n grouping: %s\n"
+ " padding width: %ld\n alignment: %s\n"
+ " prefix: '%s'\n suffix: '%s'\n",
+ quote (fmt), (grouping) ? "yes" : "no",
+ padding_width,
+ (padding_alignment == MBS_ALIGN_LEFT) ? "Left" : "Right",
+ format_str_prefix, format_str_suffix);
+}
+
+/* Parse a numeric value (with optional suffix) from a string.
+ Returns a long double value, with input precision.
+
+ If there's an error converting the string to value - exits with
+ an error.
+
+ If there are any trailing characters after the number
+ (besides a valid suffix) - exits with an error. */
+static enum simple_strtod_error
+parse_human_number (const char *str, long double /*output */ *value,
+ size_t *precision)
+{
+ char *ptr = NULL;
+
+ enum simple_strtod_error e =
+ simple_strtod_human (str, &ptr, value, precision, scale_from);
+ if (e != SSE_OK && e != SSE_OK_PRECISION_LOSS)
+ {
+ simple_strtod_fatal (e, str);
+ return e;
+ }
+
+ if (ptr && *ptr != '\0')
+ {
+ if (_invalid != inval_ignore)
+ error (conv_exit_code, 0, _("invalid suffix in input '%s': '%s'"),
+ str, ptr);
+ e = SSE_INVALID_SUFFIX;
+ }
+ return e;
+}
+
+
+/* Print the given VAL, using the requested representation.
+ The number is printed to STDOUT, with padding and alignment. */
+static int
+prepare_padded_number (const long double val, size_t precision)
+{
+ /* Generate Output. */
+ char buf[128];
+
+ /* Can't reliably print too-large values without auto-scaling. */
+ unsigned int x;
+ expld (val, 10, &x);
+ if (scale_to == scale_none && x > MAX_UNSCALED_DIGITS)
+ {
+ if (_invalid != inval_ignore)
+ error (conv_exit_code, 0, _("value too large to be printed: '%Lg'"
+ " (consider using --to)"), val);
+ return 0;
+ }
+
+ if (x > MAX_ACCEPTABLE_DIGITS - 1)
+ {
+ if (_invalid != inval_ignore)
+ error (conv_exit_code, 0, _("value too large to be printed: '%Lg'"
+ " (cannot handle values > 999Y)"), val);
+ return 0;
+ }
+
+ double_to_human (val, precision, buf, sizeof (buf), scale_to, grouping,
+ _round);
+ if (suffix)
+ strncat (buf, suffix, sizeof (buf) - strlen (buf) -1);
+
+ devmsg ("formatting output:\n value: %Lf\n humanized: '%s'\n", val, buf);
+
+ if (padding_width && strlen (buf) < padding_width)
+ {
+ size_t w = padding_width;
+ mbsalign (buf, padding_buffer, padding_buffer_size, &w,
+ padding_alignment, MBA_UNIBYTE_ONLY);
+
+ devmsg (" After padding: '%s'\n", padding_buffer);
+ }
+ else
+ {
+ setup_padding_buffer (strlen (buf) + 1);
+ strcpy (padding_buffer, buf);
+ }
+
+ return 1;
+}
+
+static void
+print_padded_number (void)
+{
+ if (format_str_prefix)
+ fputs (format_str_prefix, stdout);
+
+ fputs (padding_buffer, stdout);
+
+ if (format_str_suffix)
+ fputs (format_str_suffix, stdout);
+}
+
+/* Converts the TEXT number string to the requested representation,
+ and handles automatic suffix addition. */
+static int
+process_suffixed_number (char *text, long double *result, size_t *precision)
+{
+ if (suffix && strlen (text) > strlen (suffix))
+ {
+ char *possible_suffix = text + strlen (text) - strlen (suffix);
+
+ if (STREQ (suffix, possible_suffix))
+ {
+ /* trim suffix, ONLY if it's at the end of the text. */
+ *possible_suffix = '\0';
+ devmsg ("trimming suffix '%s'\n", suffix);
+ }
+ else
+ devmsg ("no valid suffix found\n");
+ }
+
+ /* Skip white space - always. */
+ char *p = text;
+ while (*p && isblank (*p))
+ ++p;
+ const unsigned int skip_count = text - p;
+
+ /* setup auto-padding. */
+ if (auto_padding)
+ {
+ if (skip_count > 0 || field > 1)
+ {
+ padding_width = strlen (text);
+ setup_padding_buffer (padding_width);
+ }
+ else
+ {
+ padding_width = 0;
+ }
+ devmsg ("setting Auto-Padding to %ld characters\n", padding_width);
+ }
+
+ long double val = 0;
+ enum simple_strtod_error e = parse_human_number (p, &val, precision);
+ if (e == SSE_OK_PRECISION_LOSS && debug)
+ error (0, 0, _("large input value '%s': possible precision loss"), p);
+
+ if (from_unit_size != 1 || to_unit_size != 1)
+ val = (val * from_unit_size) / to_unit_size;
+
+ *result = val;
+
+ return (e == SSE_OK || e == SSE_OK_PRECISION_LOSS);
+}
+
+/* Skip the requested number of fields in the input string.
+ Returns a pointer to the *delimiter* of the requested field,
+ or a pointer to NUL (if reached the end of the string). */
+static inline char *
+__attribute ((pure))
+skip_fields (char *buf, int fields)
+{
+ char *ptr = buf;
+ if (delimiter != DELIMITER_DEFAULT)
+ {
+ if (*ptr == delimiter)
+ fields--;
+ while (*ptr && fields--)
+ {
+ while (*ptr && *ptr == delimiter)
+ ++ptr;
+ while (*ptr && *ptr != delimiter)
+ ++ptr;
+ }
+ }
+ else
+ while (*ptr && fields--)
+ {
+ while (*ptr && isblank (*ptr))
+ ++ptr;
+ while (*ptr && !isblank (*ptr))
+ ++ptr;
+ }
+ return ptr;
+}
+
+/* Parse a delimited string, and extracts the requested field.
+ NOTE: the input buffer is modified.
+
+ TODO:
+ Maybe support multiple fields, though can always pipe output
+ into another numfmt to process other fields.
+ Maybe default to processing all fields rather than just first?
+
+ Output:
+ _PREFIX, _DATA, _SUFFIX will point to the relevant positions
+ in the input string, or be NULL if such a part doesn't exist. */
+static void
+extract_fields (char *line, int _field,
+ char ** _prefix, char ** _data, char ** _suffix)
+{
+ char *ptr = line;
+ *_prefix = NULL;
+ *_data = NULL;
+ *_suffix = NULL;
+
+ devmsg ("extracting Fields:\n input: '%s'\n field: %d\n", line, _field);
+
+ if (field > 1)
+ {
+ /* skip the requested number of fields. */
+ *_prefix = line;
+ ptr = skip_fields (line, field - 1);
+ if (*ptr == '\0')
+ {
+ /* not enough fields in the input - print warning? */
+ devmsg (" TOO FEW FIELDS!\n prefix: '%s'\n", *_prefix);
+ return;
+ }
+
+ *ptr = '\0';
+ ++ptr;
+ }
+
+ *_data = ptr;
+ *_suffix = skip_fields (*_data, 1);
+ if (**_suffix)
+ {
+ /* there is a suffix (i.e. the field is not the last on the line),
+ so null-terminate the _data before it. */
+ **_suffix = '\0';
+ ++(*_suffix);
+ }
+ else
+ *_suffix = NULL;
+
+ devmsg (" prefix: '%s'\n number: '%s'\n suffix: '%s'\n",
+ *_prefix, *_data, *_suffix);
+}
+
+
+/* Convert a number in a given line of text.
+ NEWLINE specifies whether to output a '\n' for this "line". */
+static int
+process_line (char *line, bool newline)
+{
+ char *pre, *num, *suf;
+ long double val = 0;
+ size_t precision = 0;
+ int valid_number = 0;
+
+ extract_fields (line, field, &pre, &num, &suf);
+ if (!num)
+ if (_invalid != inval_ignore)
+ error (conv_exit_code, 0, _("input line is too short, "
+ "no numbers found to convert in field %ld"),
+ field);
+
+ if (num)
+ {
+ valid_number = process_suffixed_number (num, &val, &precision);
+ if (valid_number)
+ valid_number = prepare_padded_number (val, precision);
+ }
+
+ if (pre)
+ fputs (pre, stdout);
+
+ if (pre && num)
+ fputc ((delimiter == DELIMITER_DEFAULT) ? ' ' : delimiter, stdout);
+
+ if (valid_number)
+ {
+ print_padded_number ();
+ }
+ else
+ {
+ if (num)
+ fputs (num, stdout);
+ }
+
+ if (suf)
+ {
+ fputc ((delimiter == DELIMITER_DEFAULT) ? ' ' : delimiter, stdout);
+ fputs (suf, stdout);
+ }
+
+ if (newline)
+ putchar ('\n');
+
+ return valid_number;
+}
+
+int
+main (int argc, char **argv)
+{
+ int valid_numbers = 1;
+
+ initialize_main (&argc, &argv);
+ set_program_name (argv[0]);
+ setlocale (LC_ALL, "");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
+ decimal_point = nl_langinfo (RADIXCHAR);
+ if (decimal_point == NULL || strlen (decimal_point) == 0)
+ decimal_point = ".";
+ decimal_point_length = strlen (decimal_point);
+
+ atexit (close_stdout);
+
+ while (true)
+ {
+ int c = getopt_long (argc, argv, "d:", longopts, NULL);
+
+ if (c == -1)
+ break;
+
+ switch (c)
+ {
+ case FROM_OPTION:
+ scale_from = XARGMATCH ("--from", optarg,
+ scale_from_args, scale_from_types);
+ break;
+
+ case FROM_UNIT_OPTION:
+ from_unit_size = unit_to_umax (optarg);
+ break;
+
+ case TO_OPTION:
+ scale_to =
+ XARGMATCH ("--to", optarg, scale_to_args, scale_to_types);
+ break;
+
+ case TO_UNIT_OPTION:
+ to_unit_size = unit_to_umax (optarg);
+ break;
+
+ case ROUND_OPTION:
+ _round = XARGMATCH ("--round", optarg, round_args, round_types);
+ break;
+
+ case GROUPING_OPTION:
+ grouping = 1;
+ break;
+
+ case PADDING_OPTION:
+ if (xstrtol (optarg, NULL, 10, &padding_width, "") != LONGINT_OK
+ || padding_width == 0)
+ error (EXIT_FAILURE, 0, _("invalid padding value '%s'"), optarg);
+ if (padding_width < 0)
+ {
+ padding_alignment = MBS_ALIGN_LEFT;
+ padding_width = -padding_width;
+ }
+ /* TODO: We probably want to apply a specific --padding
+ to --header lines too. */
+ break;
+
+ case FIELD_OPTION:
+ if (xstrtol (optarg, NULL, 10, &field, "") != LONGINT_OK
+ || field <= 0)
+ error (EXIT_FAILURE, 0, _("invalid field value '%s'"), optarg);
+ break;
+
+ case 'd':
+ /* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */
+ if (optarg[0] != '\0' && optarg[1] != '\0')
+ error (EXIT_FAILURE, 0,
+ _("the delimiter must be a single character"));
+ delimiter = optarg[0];
+ break;
+
+ case SUFFIX_OPTION:
+ suffix = optarg;
+ break;
+
+ case DEBUG_OPTION:
+ debug = true;
+ break;
+
+ case DEV_DEBUG_OPTION:
+ dev_debug = true;
+ debug = true;
+ break;
+
+ case HEADER_OPTION:
+ if (optarg)
+ {
+ if (xstrtoumax (optarg, NULL, 10, &header, "") != LONGINT_OK
+ || header == 0)
+ error (EXIT_FAILURE, 0, _("invalid header value '%s'"),
+ optarg);
+ }
+ else
+ {
+ header = 1;
+ }
+ break;
+
+ case FORMAT_OPTION:
+ format_str = optarg;
+ break;
+
+ case INVALID_OPTION:
+ _invalid = XARGMATCH ("--invalid", optarg, inval_args, inval_types);
+ break;
+
+ case_GETOPT_HELP_CHAR;
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
+ default:
+ usage (EXIT_FAILURE);
+ }
+ }
+
+ if (format_str != NULL && grouping)
+ error (EXIT_FAILURE, 0, _("--grouping cannot be combined with --format"));
+ if (format_str != NULL && padding_width > 0)
+ error (EXIT_FAILURE, 0, _("--padding cannot be combined with --format"));
+
+ /* Warn about no-op. */
+ if (debug && scale_from == scale_none && scale_to == scale_none
+ && !grouping && (padding_width == 0) && (format_str == NULL))
+ error (0, 0, _("no conversion option specified"));
+
+ if (format_str)
+ parse_format_string (format_str);
+
+ if (grouping)
+ {
+ if (scale_to != scale_none)
+ error (EXIT_FAILURE, 0, _("grouping cannot be combined with --to"));
+ if (debug && (strlen (nl_langinfo (THOUSEP)) == 0))
+ error (0, 0, _("grouping has no effect in this locale"));
+ }
+
+
+ setup_padding_buffer (padding_width);
+ auto_padding = (padding_width == 0 && delimiter == DELIMITER_DEFAULT);
+
+ if (_invalid != inval_abort)
+ conv_exit_code = 0;
+
+ if (argc > optind)
+ {
+ if (debug && header)
+ error (0, 0, _("--header ignored with command-line input"));
+
+ for (; optind < argc; optind++)
+ valid_numbers &= process_line (argv[optind], true);
+ }
+ else
+ {
+ char *line = NULL;
+ size_t line_allocated = 0;
+ ssize_t len;
+
+ while (header-- && getline (&line, &line_allocated, stdin) > 0)
+ fputs (line, stdout);
+
+ while ((len = getline (&line, &line_allocated, stdin)) > 0)
+ {
+ bool newline = line[len - 1] == '\n';
+ if (newline)
+ line[len - 1] = '\0';
+ valid_numbers &= process_line (line, newline);
+ }
+
+ IF_LINT (free (line));
+
+ if (ferror (stdin))
+ error (0, errno, _("error reading input"));
+ }
+
+ free (padding_buffer);
+ free (format_str_prefix);
+ free (format_str_suffix);
+
+
+ if (debug && !valid_numbers)
+ error (0, 0, _("failed to convert some of the input numbers"));
+
+ int exit_status = EXIT_SUCCESS;
+ if (!valid_numbers && _invalid != inval_warn && _invalid != inval_ignore)
+ exit_status = EXIT_CONVERSION_WARNINGS;
+
+ exit (exit_status);
+}
diff --git a/src/od.c b/src/od.c
index a25f9650..ffccd741 100644
--- a/src/od.c
+++ b/src/od.c
@@ -1,5 +1,5 @@
/* od -- dump files in octal and other formats
- Copyright (C) 1992-2012 Free Software Foundation, Inc.
+ Copyright (C) 1992-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -305,24 +305,37 @@ With no FILE, or when FILE is -, read standard input.\n\
\n\
"), stdout);
fputs (_("\
-All arguments to long options are mandatory for short options.\n\
+If first and second call formats both apply, the second format is assumed\n\
+if the last operand begins with + or (if there are 2 operands) a digit.\n\
+An OFFSET operand means -j OFFSET. LABEL is the pseudo-address\n\
+at first byte printed, incremented when dump is progressing.\n\
+For OFFSET and LABEL, a 0x or 0X prefix indicates hexadecimal;\n\
+suffixes may be . for octal and b for multiply by 512.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
- -A, --address-radix=RADIX decide how file offsets are printed\n\
+ -A, --address-radix=RADIX output format for file offsets. RADIX is one\n\
+ of [doxn], for Decimal, Octal, Hex or None\n\
-j, --skip-bytes=BYTES skip BYTES input bytes first\n\
"), stdout);
fputs (_("\
-N, --read-bytes=BYTES limit dump to BYTES input bytes\n\
- -S BYTES, --strings[=BYTES] output strings of at least BYTES graphic chars\n\
+ -S BYTES, --strings[=BYTES] output strings of at least BYTES graphic chars.\
+\n\
+ 3 is implied when BYTES is not specified\n\
-t, --format=TYPE select output format or formats\n\
-v, --output-duplicates do not use * to mark line suppression\n\
- -w[BYTES], --width[=BYTES] output BYTES bytes per output line\n\
- --traditional accept arguments in traditional form\n\
+ -w[BYTES], --width[=BYTES] output BYTES bytes per output line.\n\
+ 32 is implied when BYTES is not specified\n\
+ --traditional accept arguments in third form above\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
fputs (_("\
\n\
+\n\
Traditional format specifications may be intermixed; they accumulate:\n\
-a same as -t a, select named characters, ignoring high-order bit\n\
-b same as -t o1, select octal bytes\n\
@@ -339,17 +352,8 @@ Traditional format specifications may be intermixed; they accumulate:\n\
"), stdout);
fputs (_("\
\n\
-If first and second call formats both apply, the second format is assumed\n\
-if the last operand begins with + or (if there are 2 operands) a digit.\n\
-An OFFSET operand means -j OFFSET. LABEL is the pseudo-address\n\
-at first byte printed, incremented when dump is progressing.\n\
-For OFFSET and LABEL, a 0x or 0X prefix indicates hexadecimal;\n\
-suffixes may be . for octal and b for multiply by 512.\n\
-"), stdout);
- fputs (_("\
\n\
TYPE is made up of one or more of these specifications:\n\
-\n\
a named character, ignoring high-order bit\n\
c ASCII character or backslash escape\n\
"), stdout);
@@ -362,24 +366,26 @@ TYPE is made up of one or more of these specifications:\n\
"), stdout);
fputs (_("\
\n\
-SIZE is a number. For TYPE in doux, SIZE may also be C for\n\
+SIZE is a number. For TYPE in [doux], SIZE may also be C for\n\
sizeof(char), S for sizeof(short), I for sizeof(int) or L for\n\
sizeof(long). If TYPE is f, SIZE may also be F for sizeof(float), D\n\
for sizeof(double) or L for sizeof(long double).\n\
"), stdout);
fputs (_("\
\n\
-RADIX is d for decimal, o for octal, x for hexadecimal or n for none.\n\
-BYTES is hexadecimal with 0x or 0X prefix, and may have a multiplier suffix:\n\
-b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,\n\
-GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.\n\
-Adding a z suffix to any type displays printable characters at the end of each\
-\n\
-output line.\n\
+Adding a z suffix to any type displays printable characters at the end of\n\
+each output line.\n\
"), stdout);
fputs (_("\
-Option --string without a number implies 3; option --width without a number\n\
-implies 32. By default, od uses -A o -t oS -w16.\n\
+\n\
+\n\
+BYTES is hex with 0x or 0X prefix, and may have a multiplier suffix:\n\
+ b 512\n\
+ KB 1000\n\
+ K 1024\n\
+ MB 1000*1000\n\
+ M 1024*1024\n\
+and so on for G, T, P, E, Z, Y.\n\
"), stdout);
emit_ancillary_info ();
}
diff --git a/src/operand2sig.c b/src/operand2sig.c
index 9a28d153..6936f1d2 100644
--- a/src/operand2sig.c
+++ b/src/operand2sig.c
@@ -1,5 +1,5 @@
/* operand2sig.c -- common function for parsing signal specifications
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/operand2sig.h b/src/operand2sig.h
index 046a79f6..4a799176 100644
--- a/src/operand2sig.h
+++ b/src/operand2sig.h
@@ -1,6 +1,6 @@
/* operand2sig.h -- prototype for signal specification function
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/paste.c b/src/paste.c
index 812a242d..bc9fa76c 100644
--- a/src/paste.c
+++ b/src/paste.c
@@ -1,5 +1,5 @@
/* paste - merge lines of files
- Copyright (C) 1997-2012 Free Software Foundation, Inc.
+ Copyright (C) 1997-2013 Free Software Foundation, Inc.
Copyright (C) 1984 David M. Ihnat
This program is free software: you can redistribute it and/or modify
@@ -440,11 +440,10 @@ Usage: %s [OPTION]... [FILE]...\n\
Write lines consisting of the sequentially corresponding lines from\n\
each FILE, separated by TABs, to standard output.\n\
With no FILE, or when FILE is -, read standard input.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-d, --delimiters=LIST reuse characters from LIST instead of TABs\n\
-s, --serial paste one file at a time instead of in parallel\n\
diff --git a/src/pathchk.c b/src/pathchk.c
index 194de22e..28567d08 100644
--- a/src/pathchk.c
+++ b/src/pathchk.c
@@ -1,5 +1,5 @@
/* pathchk -- check whether file names are valid or portable
- Copyright (C) 1991-2012 Free Software Foundation, Inc.
+ Copyright (C) 1991-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/pinky.c b/src/pinky.c
index 597bc56c..e6838ae6 100644
--- a/src/pinky.c
+++ b/src/pinky.c
@@ -1,5 +1,5 @@
/* GNU's pinky.
- Copyright (C) 1992-2012 Free Software Foundation, Inc.
+ Copyright (C) 1992-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -208,21 +208,14 @@ print_entry (const STRUCT_UTMP *utmp_ent)
#define DEV_DIR_LEN (sizeof (DEV_DIR_WITH_TRAILING_SLASH) - 1)
char line[sizeof (utmp_ent->ut_line) + DEV_DIR_LEN + 1];
+ char *p = line;
/* Copy ut_line into LINE, prepending '/dev/' if ut_line is not
already an absolute file name. Some system may put the full,
absolute file name in ut_line. */
- if (utmp_ent->ut_line[0] == '/')
- {
- strncpy (line, utmp_ent->ut_line, sizeof (utmp_ent->ut_line));
- line[sizeof (utmp_ent->ut_line)] = '\0';
- }
- else
- {
- strcpy (line, DEV_DIR_WITH_TRAILING_SLASH);
- strncpy (line + DEV_DIR_LEN, utmp_ent->ut_line, sizeof utmp_ent->ut_line);
- line[DEV_DIR_LEN + sizeof (utmp_ent->ut_line)] = '\0';
- }
+ if ( ! IS_ABSOLUTE_FILE_NAME (utmp_ent->ut_line))
+ p = stpcpy (p, DEV_DIR_WITH_TRAILING_SLASH);
+ stzncpy (p, utmp_ent->ut_line, sizeof (utmp_ent->ut_line));
if (stat (line, &stats) == 0)
{
@@ -242,8 +235,7 @@ print_entry (const STRUCT_UTMP *utmp_ent)
struct passwd *pw;
char name[UT_USER_SIZE + 1];
- strncpy (name, UT_USER (utmp_ent), UT_USER_SIZE);
- name[UT_USER_SIZE] = '\0';
+ stzncpy (name, UT_USER (utmp_ent), UT_USER_SIZE);
pw = getpwnam (name);
if (pw == NULL)
/* TRANSLATORS: Real name is unknown; at most 19 characters. */
@@ -284,8 +276,7 @@ print_entry (const STRUCT_UTMP *utmp_ent)
char *display = NULL;
/* Copy the host name into UT_HOST, and ensure it's nul terminated. */
- strncpy (ut_host, utmp_ent->ut_host, (int) sizeof (utmp_ent->ut_host));
- ut_host[sizeof (utmp_ent->ut_host)] = '\0';
+ stzncpy (ut_host, utmp_ent->ut_host, sizeof (utmp_ent->ut_host));
/* Look for an X display. */
display = strchr (ut_host, ':');
diff --git a/src/pr.c b/src/pr.c
index e97c4344..f4b0b694 100644
--- a/src/pr.c
+++ b/src/pr.c
@@ -1,5 +1,5 @@
/* pr -- convert text files for printing.
- Copyright (C) 1988-2012 Free Software Foundation, Inc.
+ Copyright (C) 1988-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -630,10 +630,6 @@ static uintmax_t page_number;
2 moo 4 hoo 6 zoo */
static int line_number;
-/* With line_number overflow, we use power_10 to cut off the higher-order
- digits of the line_number */
-static int power_10;
-
/* (-n) True means lines should be preceded by numbers. */
static bool numbered_lines = false;
@@ -1268,7 +1264,6 @@ init_parameters (int number_of_files)
if (numbered_lines)
{
- int tmp_i;
int chars_per_default_tab = 8;
line_count = start_line_num;
@@ -1289,12 +1284,6 @@ init_parameters (int number_of_files)
printing files in parallel. */
if (parallel_files)
chars_used_by_number = number_width;
-
- /* We use power_10 to cut off the higher-order digits of the
- line_number in function add_line_number */
- tmp_i = chars_per_number;
- for (power_10 = 1; tmp_i > 0; --tmp_i)
- power_10 = 10 * power_10;
}
chars_per_column = (chars_per_line - chars_used_by_number
@@ -1306,7 +1295,8 @@ init_parameters (int number_of_files)
if (numbered_lines)
{
free (number_buff);
- number_buff = xmalloc (2 * chars_per_number);
+ number_buff = xmalloc (MAX (chars_per_number,
+ INT_STRLEN_BOUND (line_number)) + 1);
}
/* Pick the maximum between the tab width and the width of an
@@ -2029,19 +2019,13 @@ add_line_number (COLUMN *p)
{
int i;
char *s;
- int left_cut;
+ int num_width;
/* Cutting off the higher-order digits is more informative than
- lower-order cut off*/
- if (line_number < power_10)
- sprintf (number_buff, "%*d", chars_per_number, line_number);
- else
- {
- left_cut = line_number % power_10;
- sprintf (number_buff, "%0*d", chars_per_number, left_cut);
- }
+ lower-order cut off. */
+ num_width = sprintf (number_buff, "%*d", chars_per_number, line_number);
line_number++;
- s = number_buff;
+ s = number_buff + (num_width - chars_per_number);
for (i = chars_per_number; i > 0; i--)
(p->char_func) (*s++);
@@ -2772,11 +2756,10 @@ Usage: %s [OPTION]... [FILE]...\n\
fputs (_("\
Paginate or columnate FILE(s) for printing.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
+FIRST_PAGE[:LAST_PAGE], --pages=FIRST_PAGE[:LAST_PAGE]\n\
begin [stop] printing with page FIRST_[LAST_]PAGE\n\
diff --git a/src/primes.h b/src/primes.h
new file mode 100644
index 00000000..f608966b
--- /dev/null
+++ b/src/primes.h
@@ -0,0 +1,4014 @@
+/* Generated file -- DO NOT EDIT */
+
+#define WIDE_UINT_BITS 128
+P (1, 26,
+ (((((uintmax_t) 0xaaaaU << 28 | 0xaaaaaaaU)
+ << 28 | 0xaaaaaaaU)
+ << 28 | 0xaaaaaaaU)
+ << 28 | 0xaaaaaabU),
+ UINTMAX_MAX / 3)
+P (2, 26,
+ (((((uintmax_t) 0xccccU << 28 | 0xcccccccU)
+ << 28 | 0xcccccccU)
+ << 28 | 0xcccccccU)
+ << 28 | 0xccccccdU),
+ UINTMAX_MAX / 5)
+P (2, 30,
+ (((((uintmax_t) 0xb6dbU << 28 | 0x6db6db6U)
+ << 28 | 0xdb6db6dU)
+ << 28 | 0xb6db6dbU)
+ << 28 | 0x6db6db7U),
+ UINTMAX_MAX / 7)
+P (4, 30,
+ (((((uintmax_t) 0xa2e8U << 28 | 0xba2e8baU)
+ << 28 | 0x2e8ba2eU)
+ << 28 | 0x8ba2e8bU)
+ << 28 | 0xa2e8ba3U),
+ UINTMAX_MAX / 11)
+P (2, 30,
+ (((((uintmax_t) 0xc4ecU << 28 | 0x4ec4ec4U)
+ << 28 | 0xec4ec4eU)
+ << 28 | 0xc4ec4ecU)
+ << 28 | 0x4ec4ec5U),
+ UINTMAX_MAX / 13)
+P (4, 30,
+ (((((uintmax_t) 0xf0f0U << 28 | 0xf0f0f0fU)
+ << 28 | 0x0f0f0f0U)
+ << 28 | 0xf0f0f0fU)
+ << 28 | 0x0f0f0f1U),
+ UINTMAX_MAX / 17)
+P (2, 34,
+ (((((uintmax_t) 0xbca1U << 28 | 0xaf286bcU)
+ << 28 | 0xa1af286U)
+ << 28 | 0xbca1af2U)
+ << 28 | 0x86bca1bU),
+ UINTMAX_MAX / 19)
+P (4, 36,
+ (((((uintmax_t) 0x4de9U << 28 | 0xbd37a6fU)
+ << 28 | 0x4de9bd3U)
+ << 28 | 0x7a6f4deU)
+ << 28 | 0x9bd37a7U),
+ UINTMAX_MAX / 23)
+P (6, 32,
+ (((((uintmax_t) 0xc234U << 28 | 0xf72c234U)
+ << 28 | 0xf72c234U)
+ << 28 | 0xf72c234U)
+ << 28 | 0xf72c235U),
+ UINTMAX_MAX / 29)
+P (2, 36,
+ (((((uintmax_t) 0xdef7U << 28 | 0xbdef7bdU)
+ << 28 | 0xef7bdefU)
+ << 28 | 0x7bdef7bU)
+ << 28 | 0xdef7bdfU),
+ UINTMAX_MAX / 31)
+P (6, 34,
+ (((((uintmax_t) 0xc1baU << 28 | 0xcf914c1U)
+ << 28 | 0xbacf914U)
+ << 28 | 0xc1bacf9U)
+ << 28 | 0x14c1badU),
+ UINTMAX_MAX / 37)
+P (4, 32,
+ (((((uintmax_t) 0x18f9U << 28 | 0xc18f9c1U)
+ << 28 | 0x8f9c18fU)
+ << 28 | 0x9c18f9cU)
+ << 28 | 0x18f9c19U),
+ UINTMAX_MAX / 41)
+P (2, 36,
+ (((((uintmax_t) 0xbe82U << 28 | 0xfa0be82U)
+ << 28 | 0xfa0be82U)
+ << 28 | 0xfa0be82U)
+ << 28 | 0xfa0be83U),
+ UINTMAX_MAX / 43)
+P (4, 36,
+ (((((uintmax_t) 0x3677U << 28 | 0xd46cefaU)
+ << 28 | 0x8d9df51U)
+ << 28 | 0xb3bea36U)
+ << 28 | 0x77d46cfU),
+ UINTMAX_MAX / 47)
+P (6, 36,
+ (((((uintmax_t) 0x1352U << 28 | 0x1cfb2b7U)
+ << 28 | 0x8c13521U)
+ << 28 | 0xcfb2b78U)
+ << 28 | 0xc13521dU),
+ UINTMAX_MAX / 53)
+P (6, 38,
+ (((((uintmax_t) 0x8f2fU << 28 | 0xba93868U)
+ << 28 | 0x22b63cbU)
+ << 28 | 0xeea4e1aU)
+ << 28 | 0x08ad8f3U),
+ UINTMAX_MAX / 59)
+P (2, 40,
+ (((((uintmax_t) 0x14fbU << 28 | 0xcda3ac1U)
+ << 28 | 0x0c9714fU)
+ << 28 | 0xbcda3acU)
+ << 28 | 0x10c9715U),
+ UINTMAX_MAX / 61)
+P (6, 36,
+ (((((uintmax_t) 0xc2ddU << 28 | 0x9ca81e9U)
+ << 28 | 0x131abf0U)
+ << 28 | 0xb7672a0U)
+ << 28 | 0x7a44c6bU),
+ UINTMAX_MAX / 67)
+P (4, 36,
+ (((((uintmax_t) 0x4f52U << 28 | 0xedf8c9eU)
+ << 28 | 0xa5dbf19U)
+ << 28 | 0x3d4bb7eU)
+ << 28 | 0x327a977U),
+ UINTMAX_MAX / 71)
+P (2, 36,
+ (((((uintmax_t) 0x3f1fU << 28 | 0x8fc7e3fU)
+ << 28 | 0x1f8fc7eU)
+ << 28 | 0x3f1f8fcU)
+ << 28 | 0x7e3f1f9U),
+ UINTMAX_MAX / 73)
+P (6, 34,
+ (((((uintmax_t) 0xd5dfU << 28 | 0x984dc5aU)
+ << 28 | 0xbbf309bU)
+ << 28 | 0x8b577e6U)
+ << 28 | 0x13716afU),
+ UINTMAX_MAX / 79)
+P (4, 44,
+ (((((uintmax_t) 0x2818U << 28 | 0xacb90f6U)
+ << 28 | 0xbf3a9a3U)
+ << 28 | 0x784a062U)
+ << 28 | 0xb2e43dbU),
+ UINTMAX_MAX / 83)
+P (6, 42,
+ (((((uintmax_t) 0xd1faU << 28 | 0x3f47e8fU)
+ << 28 | 0xd1fa3f4U)
+ << 28 | 0x7e8fd1fU)
+ << 28 | 0xa3f47e9U),
+ UINTMAX_MAX / 89)
+P (8, 40,
+ (((((uintmax_t) 0x5f02U << 28 | 0xa3a0fd5U)
+ << 28 | 0xc5f02a3U)
+ << 28 | 0xa0fd5c5U)
+ << 28 | 0xf02a3a1U),
+ UINTMAX_MAX / 97)
+P (4, 38,
+ (((((uintmax_t) 0xc32bU << 28 | 0x16cfd77U)
+ << 28 | 0x20f353aU)
+ << 28 | 0x4c0a237U)
+ << 28 | 0xc32b16dU),
+ UINTMAX_MAX / 101)
+P (2, 46,
+ (((((uintmax_t) 0xd0c6U << 28 | 0xd5bf60eU)
+ << 28 | 0xe9a18daU)
+ << 28 | 0xb7ec1ddU)
+ << 28 | 0x3431b57U),
+ UINTMAX_MAX / 103)
+P (4, 44,
+ (((((uintmax_t) 0xa2b1U << 28 | 0x0bf66e0U)
+ << 28 | 0xe5aea77U)
+ << 28 | 0xa04c8f8U)
+ << 28 | 0xd28ac43U),
+ UINTMAX_MAX / 107)
+P (2, 48,
+ (((((uintmax_t) 0xc096U << 28 | 0x4fda6c0U)
+ << 28 | 0x964fda6U)
+ << 28 | 0xc0964fdU)
+ << 28 | 0xa6c0965U),
+ UINTMAX_MAX / 109)
+P (4, 50,
+ (((((uintmax_t) 0xc090U << 28 | 0xfdbc090U)
+ << 28 | 0xfdbc090U)
+ << 28 | 0xfdbc090U)
+ << 28 | 0xfdbc091U),
+ UINTMAX_MAX / 113)
+P (14, 40,
+ (((((uintmax_t) 0xbf7eU << 28 | 0xfdfbf7eU)
+ << 28 | 0xfdfbf7eU)
+ << 28 | 0xfdfbf7eU)
+ << 28 | 0xfdfbf7fU),
+ UINTMAX_MAX / 127)
+P (4, 42,
+ (((((uintmax_t) 0xf82eU << 28 | 0xe6986d6U)
+ << 28 | 0xf63aa03U)
+ << 28 | 0xe88cb3cU)
+ << 28 | 0x9484e2bU),
+ UINTMAX_MAX / 131)
+P (6, 42,
+ (((((uintmax_t) 0x21a2U << 28 | 0x91c0779U)
+ << 28 | 0x75b8fe2U)
+ << 28 | 0x1a291c0U)
+ << 28 | 0x77975b9U),
+ UINTMAX_MAX / 137)
+P (2, 42,
+ (((((uintmax_t) 0xa212U << 28 | 0x6ad1f4fU)
+ << 28 | 0x31ba03aU)
+ << 28 | 0xef6ca97U)
+ << 28 | 0x0586723U),
+ UINTMAX_MAX / 139)
+P (10, 42,
+ (((((uintmax_t) 0x93c2U << 28 | 0x25cc74dU)
+ << 28 | 0x50c06dfU)
+ << 28 | 0x5b0f768U)
+ << 28 | 0xce2cabdU),
+ UINTMAX_MAX / 149)
+P (2, 42,
+ (((((uintmax_t) 0x26feU << 28 | 0x4dfc9bfU)
+ << 28 | 0x937f26fU)
+ << 28 | 0xe4dfc9bU)
+ << 28 | 0xf937f27U),
+ UINTMAX_MAX / 151)
+P (6, 40,
+ (((((uintmax_t) 0x0685U << 28 | 0xb4fe5e9U)
+ << 28 | 0x2c0685bU)
+ << 28 | 0x4fe5e92U)
+ << 28 | 0xc0685b5U),
+ UINTMAX_MAX / 157)
+P (6, 36,
+ (((((uintmax_t) 0x8bc7U << 28 | 0x75ca99eU)
+ << 28 | 0xa03241fU)
+ << 28 | 0x693a1c4U)
+ << 28 | 0x51ab30bU),
+ UINTMAX_MAX / 163)
+P (4, 44,
+ (((((uintmax_t) 0x513eU << 28 | 0xd9ad38bU)
+ << 28 | 0x7f3bc8dU)
+ << 28 | 0x07aa27dU)
+ << 28 | 0xb35a717U),
+ UINTMAX_MAX / 167)
+P (6, 50,
+ (((((uintmax_t) 0x133cU << 28 | 0xaba736cU)
+ << 28 | 0x05eb488U)
+ << 28 | 0x2383b30U)
+ << 28 | 0xd516325U),
+ UINTMAX_MAX / 173)
+P (6, 48,
+ (((((uintmax_t) 0x0e4dU << 28 | 0x3aa30a0U)
+ << 28 | 0x2dc3eedU)
+ << 28 | 0x6866f8dU)
+ << 28 | 0x962ae7bU),
+ UINTMAX_MAX / 179)
+P (2, 48,
+ (((((uintmax_t) 0x6fbcU << 28 | 0x1c498c0U)
+ << 28 | 0x5a84f34U)
+ << 28 | 0x54dca41U)
+ << 28 | 0x0f8ed9dU),
+ UINTMAX_MAX / 181)
+P (10, 42,
+ (((((uintmax_t) 0x7749U << 28 | 0xb79f7f5U)
+ << 28 | 0x470961dU)
+ << 28 | 0x7ca632eU)
+ << 28 | 0xe936f3fU),
+ UINTMAX_MAX / 191)
+P (2, 46,
+ (((((uintmax_t) 0x9094U << 28 | 0x8f40feaU)
+ << 28 | 0xc6f6b70U)
+ << 28 | 0xbf01539U)
+ << 28 | 0x0948f41U),
+ UINTMAX_MAX / 193)
+P (4, 44,
+ (((((uintmax_t) 0x0bb2U << 28 | 0x07cc053U)
+ << 28 | 0x2ae21c9U)
+ << 28 | 0x6bdb9d3U)
+ << 28 | 0xd137e0dU),
+ UINTMAX_MAX / 197)
+P (2, 52,
+ (((((uintmax_t) 0x7a36U << 28 | 0x07b7f5bU)
+ << 28 | 0x5630e26U)
+ << 28 | 0x97cc8aeU)
+ << 28 | 0xf46c0f7U),
+ UINTMAX_MAX / 199)
+P (12, 46,
+ (((((uintmax_t) 0x2f51U << 28 | 0x4a026d3U)
+ << 28 | 0x1be7bc0U)
+ << 28 | 0xe8f2a76U)
+ << 28 | 0xe68575bU),
+ UINTMAX_MAX / 211)
+P (12, 40,
+ (((((uintmax_t) 0xdd8fU << 28 | 0x7f6d0eeU)
+ << 28 | 0xc7bfb68U)
+ << 28 | 0x7763dfdU)
+ << 28 | 0xb43bb1fU),
+ UINTMAX_MAX / 223)
+P (4, 42,
+ (((((uintmax_t) 0x766aU << 28 | 0x024168eU)
+ << 28 | 0x18cf81bU)
+ << 28 | 0x10ea929U)
+ << 28 | 0xba144cbU),
+ UINTMAX_MAX / 227)
+P (2, 42,
+ (((((uintmax_t) 0x0c4cU << 28 | 0x0478bbcU)
+ << 28 | 0xecfee1dU)
+ << 28 | 0x10c4c04U)
+ << 28 | 0x78bbcedU),
+ UINTMAX_MAX / 229)
+P (4, 44,
+ (((((uintmax_t) 0x758fU << 28 | 0xee6bac7U)
+ << 28 | 0xf735d63U)
+ << 28 | 0xfb9aeb1U)
+ << 28 | 0xfdcd759U),
+ UINTMAX_MAX / 233)
+P (6, 42,
+ (((((uintmax_t) 0x077fU << 28 | 0x76e538cU)
+ << 28 | 0x5167e64U)
+ << 28 | 0xafaa4f4U)
+ << 28 | 0x37b2e0fU),
+ UINTMAX_MAX / 239)
+P (2, 42,
+ (((((uintmax_t) 0x10feU << 28 | 0xf010fefU)
+ << 28 | 0x010fef0U)
+ << 28 | 0x10fef01U)
+ << 28 | 0x0fef011U),
+ UINTMAX_MAX / 241)
+P (10, 42,
+ (((((uintmax_t) 0xa020U << 28 | 0xa32fefaU)
+ << 28 | 0xe680828U)
+ << 28 | 0xcbfbeb9U)
+ << 28 | 0xa020a33U),
+ UINTMAX_MAX / 251)
+P (6, 50,
+ (((((uintmax_t) 0xff00U << 28 | 0xff00ff0U)
+ << 28 | 0x0ff00ffU)
+ << 28 | 0x00ff00fU)
+ << 28 | 0xf00ff01U),
+ UINTMAX_MAX / 257)
+P (6, 48,
+ (((((uintmax_t) 0xf836U << 28 | 0x826ef73U)
+ << 28 | 0xd52bcd6U)
+ << 28 | 0x24fd147U)
+ << 28 | 0x0e99cb7U),
+ UINTMAX_MAX / 263)
+P (6, 44,
+ (((((uintmax_t) 0x3ce8U << 28 | 0x354b2eaU)
+ << 28 | 0x1c8cd8fU)
+ << 28 | 0xb3ddbd6U)
+ << 28 | 0x205b5c5U),
+ UINTMAX_MAX / 269)
+P (2, 46,
+ (((((uintmax_t) 0x8715U << 28 | 0xba188f9U)
+ << 28 | 0x63302d5U)
+ << 28 | 0x7da36caU)
+ << 28 | 0x27acdefU),
+ UINTMAX_MAX / 271)
+P (6, 54,
+ (((((uintmax_t) 0xb25eU << 28 | 0x4463cffU)
+ << 28 | 0x13686eeU)
+ << 28 | 0x70c03b2U)
+ << 28 | 0x5e4463dU),
+ UINTMAX_MAX / 277)
+P (4, 56,
+ (((((uintmax_t) 0x6c69U << 28 | 0xae01d27U)
+ << 28 | 0x2ca3fc5U)
+ << 28 | 0xb1a6b80U)
+ << 28 | 0x749cb29U),
+ UINTMAX_MAX / 281)
+P (2, 64,
+ (((((uintmax_t) 0xf26eU << 28 | 0x5c44bfcU)
+ << 28 | 0x61b2347U)
+ << 28 | 0x768073cU)
+ << 28 | 0x9b97113U),
+ UINTMAX_MAX / 283)
+P (10, 56,
+ (((((uintmax_t) 0xb07dU << 28 | 0xd0d1b15U)
+ << 28 | 0xd7cf125U)
+ << 28 | 0x91e9488U)
+ << 28 | 0x4ce32adU),
+ UINTMAX_MAX / 293)
+P (14, 46,
+ (((((uintmax_t) 0xd2f8U << 28 | 0x7ebfcaaU)
+ << 28 | 0x1c5a0f0U)
+ << 28 | 0x2806abcU)
+ << 28 | 0x74be1fbU),
+ UINTMAX_MAX / 307)
+P (4, 48,
+ (((((uintmax_t) 0xbe25U << 28 | 0xdd6d7aaU)
+ << 28 | 0x646ca7eU)
+ << 28 | 0xc3e8f3aU)
+ << 28 | 0x7198487U),
+ UINTMAX_MAX / 311)
+P (2, 54,
+ (((((uintmax_t) 0xbc1dU << 28 | 0x71afd8bU)
+ << 28 | 0xdc03458U)
+ << 28 | 0x550f8a3U)
+ << 28 | 0x9409d09U),
+ UINTMAX_MAX / 313)
+P (4, 56,
+ (((((uintmax_t) 0x2ed6U << 28 | 0xd05a72aU)
+ << 28 | 0xcd1f7ecU)
+ << 28 | 0x9e48ae6U)
+ << 28 | 0xf71de15U),
+ UINTMAX_MAX / 317)
+P (14, 48,
+ (((((uintmax_t) 0x62ffU << 28 | 0x3a018bfU)
+ << 28 | 0xce8062fU)
+ << 28 | 0xf3a018bU)
+ << 28 | 0xfce8063U),
+ UINTMAX_MAX / 331)
+P (6, 46,
+ (((((uintmax_t) 0x3fcfU << 28 | 0x61fe7b0U)
+ << 28 | 0xff3d87fU)
+ << 28 | 0x9ec3fcfU)
+ << 28 | 0x61fe7b1U),
+ UINTMAX_MAX / 337)
+P (10, 42,
+ (((((uintmax_t) 0x398bU << 28 | 0x6f668c2U)
+ << 28 | 0xc43df89U)
+ << 28 | 0xf5abe57U)
+ << 28 | 0x0e046d3U),
+ UINTMAX_MAX / 347)
+P (2, 48,
+ (((((uintmax_t) 0x8c1aU << 28 | 0x682913cU)
+ << 28 | 0xe1ecedaU)
+ << 28 | 0x971b23fU)
+ << 28 | 0x1545af5U),
+ UINTMAX_MAX / 349)
+P (4, 48,
+ (((((uintmax_t) 0x0b9aU << 28 | 0x7862a0fU)
+ << 28 | 0xf465879U)
+ << 28 | 0xd5f00b9U)
+ << 28 | 0xa7862a1U),
+ UINTMAX_MAX / 353)
+P (6, 50,
+ (((((uintmax_t) 0xe7c1U << 28 | 0x3f77161U)
+ << 28 | 0xb18f54dU)
+ << 28 | 0xba1df32U)
+ << 28 | 0xa128a57U),
+ UINTMAX_MAX / 359)
+P (8, 52,
+ (((((uintmax_t) 0x7318U << 28 | 0x6a06f9bU)
+ << 28 | 0x8d9a287U)
+ << 28 | 0x530217bU)
+ << 28 | 0x7747d8fU),
+ UINTMAX_MAX / 367)
+P (6, 48,
+ (((((uintmax_t) 0x7c39U << 28 | 0xa6c708eU)
+ << 28 | 0xc18b530U)
+ << 28 | 0xbaae53bU)
+ << 28 | 0xb5e06ddU),
+ UINTMAX_MAX / 373)
+P (6, 52,
+ (((((uintmax_t) 0x3763U << 28 | 0x4af9ebbU)
+ << 28 | 0xc742deeU)
+ << 28 | 0x70206c1U)
+ << 28 | 0x2e9b5b3U),
+ UINTMAX_MAX / 379)
+P (4, 50,
+ (((((uintmax_t) 0x5035U << 28 | 0x78fb523U)
+ << 28 | 0x6cf34cdU)
+ << 28 | 0xde9462eU)
+ << 28 | 0xc9dbe7fU),
+ UINTMAX_MAX / 383)
+P (6, 50,
+ (((((uintmax_t) 0xbcdfU << 28 | 0xc0d2975U)
+ << 28 | 0xccab1afU)
+ << 28 | 0xb64b05eU)
+ << 28 | 0xc41cf4dU),
+ UINTMAX_MAX / 389)
+P (8, 46,
+ (((((uintmax_t) 0xf5aeU << 28 | 0xc02944fU)
+ << 28 | 0xf5aec02U)
+ << 28 | 0x944ff5aU)
+ << 28 | 0xec02945U),
+ UINTMAX_MAX / 397)
+P (4, 48,
+ (((((uintmax_t) 0xc7d2U << 28 | 0x08f00a3U)
+ << 28 | 0x6e71a2cU)
+ << 28 | 0xb033128U)
+ << 28 | 0x382df71U),
+ UINTMAX_MAX / 401)
+P (8, 48,
+ (((((uintmax_t) 0xd38fU << 28 | 0x55c0280U)
+ << 28 | 0xf05a21cU)
+ << 28 | 0xcacc0c8U)
+ << 28 | 0x4b1c2a9U),
+ UINTMAX_MAX / 409)
+P (10, 42,
+ (((((uintmax_t) 0xca3bU << 28 | 0xe03aa76U)
+ << 28 | 0x87a3219U)
+ << 28 | 0xa93db57U)
+ << 28 | 0x5eb3a0bU),
+ UINTMAX_MAX / 419)
+P (2, 42,
+ (((((uintmax_t) 0x6a69U << 28 | 0xce2344bU)
+ << 28 | 0x66c3cceU)
+ << 28 | 0xbeef94fU)
+ << 28 | 0xa86fe2dU),
+ UINTMAX_MAX / 421)
+P (10, 36,
+ (((((uintmax_t) 0xfecfU << 28 | 0xe37d53bU)
+ << 28 | 0xfd9fc6fU)
+ << 28 | 0xaa77fb3U)
+ << 28 | 0xf8df54fU),
+ UINTMAX_MAX / 431)
+P (2, 46,
+ (((((uintmax_t) 0xa58aU << 28 | 0xf00975aU)
+ << 28 | 0x750ff68U)
+ << 28 | 0xa58af00U)
+ << 28 | 0x975a751U),
+ UINTMAX_MAX / 433)
+P (6, 48,
+ (((((uintmax_t) 0xdc6dU << 28 | 0xa187df5U)
+ << 28 | 0x80dfed5U)
+ << 28 | 0x6e36d0cU)
+ << 28 | 0x3efac07U),
+ UINTMAX_MAX / 439)
+P (4, 48,
+ (((((uintmax_t) 0x8fe4U << 28 | 0x4308ab0U)
+ << 28 | 0xd4a8bd8U)
+ << 28 | 0xb44c47aU)
+ << 28 | 0x8299b73U),
+ UINTMAX_MAX / 443)
+P (6, 50,
+ (((((uintmax_t) 0xf1bfU << 28 | 0x0091f5bU)
+ << 28 | 0xcb8bb02U)
+ << 28 | 0xd9ccaf9U)
+ << 28 | 0xba70e41U),
+ UINTMAX_MAX / 449)
+P (8, 46,
+ (((((uintmax_t) 0x5e1cU << 28 | 0x023d9e8U)
+ << 28 | 0x78ff709U)
+ << 28 | 0x85e1c02U)
+ << 28 | 0x3d9e879U),
+ UINTMAX_MAX / 457)
+P (4, 48,
+ (((((uintmax_t) 0x7880U << 28 | 0xd53da3dU)
+ << 28 | 0x15a842aU)
+ << 28 | 0x343316cU)
+ << 28 | 0x494d305U),
+ UINTMAX_MAX / 461)
+P (2, 58,
+ (((((uintmax_t) 0x1ddbU << 28 | 0x81ef699U)
+ << 28 | 0xb5e8c70U)
+ << 28 | 0xcb7916aU)
+ << 28 | 0xb67652fU),
+ UINTMAX_MAX / 463)
+P (4, 56,
+ (((((uintmax_t) 0xf364U << 28 | 0x5121706U)
+ << 28 | 0x07acad3U)
+ << 28 | 0x98f132fU)
+ << 28 | 0xb10fe5bU),
+ UINTMAX_MAX / 467)
+P (12, 62,
+ (((((uintmax_t) 0xadb1U << 28 | 0xf8848afU)
+ << 28 | 0x4c6d06fU)
+ << 28 | 0x2a38a6bU)
+ << 28 | 0xf54fa1fU),
+ UINTMAX_MAX / 479)
+P (8, 60,
+ (((((uintmax_t) 0xd9a0U << 28 | 0x541b55aU)
+ << 28 | 0xf0c1721U)
+ << 28 | 0x1df689bU)
+ << 28 | 0x98f81d7U),
+ UINTMAX_MAX / 487)
+P (4, 66,
+ (((((uintmax_t) 0x673bU << 28 | 0xf592825U)
+ << 28 | 0x8a2ac0eU)
+ << 28 | 0x994983eU)
+ << 28 | 0x90f1ec3U),
+ UINTMAX_MAX / 491)
+P (8, 64,
+ (((((uintmax_t) 0x0ddaU << 28 | 0x093c062U)
+ << 28 | 0x8041aadU)
+ << 28 | 0x671e44bU)
+ << 28 | 0xed87f3bU),
+ UINTMAX_MAX / 499)
+P (4, 66,
+ (((((uintmax_t) 0xa9fcU << 28 | 0xf24229bU)
+ << 28 | 0xbcd1af9U)
+ << 28 | 0x623a051U)
+ << 28 | 0x6e70fc7U),
+ UINTMAX_MAX / 503)
+P (6, 62,
+ (((((uintmax_t) 0xcbb1U << 28 | 0x8a4f773U)
+ << 28 | 0x2cc324bU)
+ << 28 | 0x7129be9U)
+ << 28 | 0xdece355U),
+ UINTMAX_MAX / 509)
+P (12, 56,
+ (((((uintmax_t) 0x01f7U << 28 | 0x27cce5fU)
+ << 28 | 0x530a519U)
+ << 28 | 0x0f3b747U)
+ << 28 | 0x3f62c39U),
+ UINTMAX_MAX / 521)
+P (2, 64,
+ (((((uintmax_t) 0x6da4U << 28 | 0xf4bdeb7U)
+ << 28 | 0x1121c63U)
+ << 28 | 0xdacc9aaU)
+ << 28 | 0xd46f9a3U),
+ UINTMAX_MAX / 523)
+P (18, 52,
+ (((((uintmax_t) 0x4d9aU << 28 | 0xbc552cfU)
+ << 28 | 0x42b88c1U)
+ << 28 | 0x108fda2U)
+ << 28 | 0x4e8d035U),
+ UINTMAX_MAX / 541)
+P (6, 52,
+ (((((uintmax_t) 0x141fU << 28 | 0xd312409U)
+ << 28 | 0x5c328b7U)
+ << 28 | 0x7578472U)
+ << 28 | 0x319bd8bU),
+ UINTMAX_MAX / 547)
+P (10, 44,
+ (((((uintmax_t) 0xddfdU << 28 | 0x3e0bf32U)
+ << 28 | 0x18d1947U)
+ << 28 | 0x3d20a1cU)
+ << 28 | 0x7ed9da5U),
+ UINTMAX_MAX / 557)
+P (6, 44,
+ (((((uintmax_t) 0xdb2bU << 28 | 0x3278f3bU)
+ << 28 | 0x910d2fbU)
+ << 28 | 0xe85af0fU)
+ << 28 | 0xea2c8fbU),
+ UINTMAX_MAX / 563)
+P (6, 44,
+ (((((uintmax_t) 0xcb5cU << 28 | 0x3b636e3U)
+ << 28 | 0xa7d1358U)
+ << 28 | 0xa1f7e6cU)
+ << 28 | 0xe0f4c09U),
+ UINTMAX_MAX / 569)
+P (2, 46,
+ (((((uintmax_t) 0x1bcbU << 28 | 0xfe34e75U)
+ << 28 | 0x76cf21aU)
+ << 28 | 0x00e58c5U)
+ << 28 | 0x44986f3U),
+ UINTMAX_MAX / 571)
+P (6, 42,
+ (((((uintmax_t) 0x6b5eU << 28 | 0x80aa5efU)
+ << 28 | 0x23f0071U)
+ << 28 | 0x94a17f5U)
+ << 28 | 0x5a10dc1U),
+ UINTMAX_MAX / 577)
+P (10, 44,
+ (((((uintmax_t) 0x9a62U << 28 | 0x8feb110U)
+ << 28 | 0x22e3a70U)
+ << 28 | 0x8494478U)
+ << 28 | 0x5e33763U),
+ UINTMAX_MAX / 587)
+P (6, 48,
+ (((((uintmax_t) 0xbe61U << 28 | 0x909eddeU)
+ << 28 | 0x53c01baU)
+ << 28 | 0x10679bdU)
+ << 28 | 0x84886b1U),
+ UINTMAX_MAX / 593)
+P (6, 44,
+ (((((uintmax_t) 0x4febU << 28 | 0x7c5e05fU)
+ << 28 | 0xbb9e8ebU)
+ << 28 | 0xe9c6bb3U)
+ << 28 | 0x1260967U),
+ UINTMAX_MAX / 599)
+P (2, 46,
+ (((((uintmax_t) 0x1ff2U << 28 | 0x5e8ff92U)
+ << 28 | 0xf47fc97U)
+ << 28 | 0xa3fe4bdU)
+ << 28 | 0x1ff25e9U),
+ UINTMAX_MAX / 601)
+P (6, 46,
+ (((((uintmax_t) 0x3014U << 28 | 0x3e6b1faU)
+ << 28 | 0x187616cU)
+ << 28 | 0x6388395U)
+ << 28 | 0xb84d99fU),
+ UINTMAX_MAX / 607)
+P (6, 46,
+ (((((uintmax_t) 0xd491U << 28 | 0x54c6c94U)
+ << 28 | 0xac0f08cU)
+ << 28 | 0x51da6a1U)
+ << 28 | 0x335df6dU),
+ UINTMAX_MAX / 613)
+P (4, 44,
+ (((((uintmax_t) 0x9b97U << 28 | 0x71454a4U)
+ << 28 | 0x4e00d46U)
+ << 28 | 0xf323447U)
+ << 28 | 0x5d5add9U),
+ UINTMAX_MAX / 617)
+P (2, 54,
+ (((((uintmax_t) 0x3abaU << 28 | 0x1b4baefU)
+ << 28 | 0x0b2a990U)
+ << 28 | 0x5605ca3U)
+ << 28 | 0xc619a43U),
+ UINTMAX_MAX / 619)
+P (12, 46,
+ (((((uintmax_t) 0xcc11U << 28 | 0xd9dd1bfU)
+ << 28 | 0xe608eceU)
+ << 28 | 0xe8dff30U)
+ << 28 | 0x4767747U),
+ UINTMAX_MAX / 631)
+P (10, 42,
+ (((((uintmax_t) 0xff99U << 28 | 0xc27f006U)
+ << 28 | 0x63d80ffU)
+ << 28 | 0x99c27f0U)
+ << 28 | 0x0663d81U),
+ UINTMAX_MAX / 641)
+P (2, 48,
+ (((((uintmax_t) 0x111eU << 28 | 0xa8032f6U)
+ << 28 | 0x0bf1aacU)
+ << 28 | 0xca407f6U)
+ << 28 | 0x71ddc2bU),
+ UINTMAX_MAX / 643)
+P (4, 54,
+ (((((uintmax_t) 0xdd93U << 28 | 0x95f5b66U)
+ << 28 | 0x7aa88e7U)
+ << 28 | 0x1298bacU)
+ << 28 | 0x1e12337U),
+ UINTMAX_MAX / 647)
+P (6, 56,
+ (((((uintmax_t) 0xa7caU << 28 | 0xaed9303U)
+ << 28 | 0x8740afaU)
+ << 28 | 0x1e94309U)
+ << 28 | 0xcd09045U),
+ UINTMAX_MAX / 653)
+P (6, 60,
+ (((((uintmax_t) 0x2be5U << 28 | 0x958f582U)
+ << 28 | 0xe9db7beU)
+ << 28 | 0xbccb8e9U)
+ << 28 | 0x1496b9bU),
+ UINTMAX_MAX / 659)
+P (2, 66,
+ (((((uintmax_t) 0x995eU << 28 | 0x1ca8dbfU)
+ << 28 | 0xb5a3d31U)
+ << 28 | 0x2fa30ccU)
+ << 28 | 0x7d7b8bdU),
+ UINTMAX_MAX / 661)
+P (12, 60,
+ (((((uintmax_t) 0x9f00U << 28 | 0x6160ff9U)
+ << 28 | 0xe9f0061U)
+ << 28 | 0x60ff9e9U)
+ << 28 | 0xf006161U),
+ UINTMAX_MAX / 673)
+P (4, 62,
+ (((((uintmax_t) 0xb33cU << 28 | 0xe15ee9bU)
+ << 28 | 0x097416bU)
+ << 28 | 0x03673b5U)
+ << 28 | 0xe28152dU),
+ UINTMAX_MAX / 677)
+P (6, 60,
+ (((((uintmax_t) 0xfa00U << 28 | 0xbfe802fU)
+ << 28 | 0xfa00bfeU)
+ << 28 | 0x802ffa0U)
+ << 28 | 0x0bfe803U),
+ UINTMAX_MAX / 683)
+P (8, 60,
+ (((((uintmax_t) 0x1c28U << 28 | 0x02f6bcfU)
+ << 28 | 0x18d26e6U)
+ << 28 | 0x6fe25c9U)
+ << 28 | 0xe907c7bU),
+ UINTMAX_MAX / 691)
+P (10, 56,
+ (((((uintmax_t) 0xcf6dU << 28 | 0xec4793eU)
+ << 28 | 0x72aba3fU)
+ << 28 | 0x8b236c7U)
+ << 28 | 0x6528895U),
+ UINTMAX_MAX / 701)
+P (8, 52,
+ (((((uintmax_t) 0x1e54U << 28 | 0x7da72d2U)
+ << 28 | 0x24d44f6U)
+ << 28 | 0xf923bf0U)
+ << 28 | 0x1ce2c0dU),
+ UINTMAX_MAX / 709)
+P (10, 50,
+ (((((uintmax_t) 0x7746U << 28 | 0xda9d5fcU)
+ << 28 | 0x708306cU)
+ << 28 | 0x3d3d98bU)
+ << 28 | 0xed7c42fU),
+ UINTMAX_MAX / 719)
+P (8, 46,
+ (((((uintmax_t) 0xcdffU << 28 | 0x4bb5591U)
+ << 28 | 0x6e37a30U)
+ << 28 | 0x981efcdU)
+ << 28 | 0x4b010e7U),
+ UINTMAX_MAX / 727)
+P (6, 54,
+ (((((uintmax_t) 0x2c01U << 28 | 0x65a1b3dU)
+ << 28 | 0xd13356fU)
+ << 28 | 0x691fc81U)
+ << 28 | 0xebbe575U),
+ UINTMAX_MAX / 733)
+P (6, 58,
+ (((((uintmax_t) 0xa802U << 28 | 0xc574bddU)
+ << 28 | 0x5bccbb1U)
+ << 28 | 0x0480ddbU)
+ << 28 | 0x47b52cbU),
+ UINTMAX_MAX / 739)
+P (4, 66,
+ (((((uintmax_t) 0x5411U << 28 | 0xeaa350fU)
+ << 28 | 0x8134b74U)
+ << 28 | 0xcd59ed6U)
+ << 28 | 0x4f3f0d7U),
+ UINTMAX_MAX / 743)
+P (8, 60,
+ (((((uintmax_t) 0xfceeU << 28 | 0x9d7c6bbU)
+ << 28 | 0x7bbd301U)
+ << 28 | 0x05cb813U)
+ << 28 | 0x16d6c0fU),
+ UINTMAX_MAX / 751)
+P (6, 64,
+ (((((uintmax_t) 0x4248U << 28 | 0x5eb0874U)
+ << 28 | 0x553879bU)
+ << 28 | 0xe64c6d9U)
+ << 28 | 0x1c1195dU),
+ UINTMAX_MAX / 757)
+P (4, 62,
+ (((((uintmax_t) 0xe060U << 28 | 0xe20f797U)
+ << 28 | 0x0b19e71U)
+ << 28 | 0xb3f945aU)
+ << 28 | 0x27b1f49U),
+ UINTMAX_MAX / 761)
+P (8, 58,
+ (((((uintmax_t) 0x782dU << 28 | 0x463deb5U)
+ << 28 | 0xc369877U)
+ << 28 | 0xd80d50eU)
+ << 28 | 0x508fd01U),
+ UINTMAX_MAX / 769)
+P (4, 56,
+ (((((uintmax_t) 0x4a2fU << 28 | 0x06f468aU)
+ << 28 | 0x6e9cfa5U)
+ << 28 | 0xeb778e1U)
+ << 28 | 0x33551cdU),
+ UINTMAX_MAX / 773)
+P (14, 52,
+ (((((uintmax_t) 0xda44U << 28 | 0x4f5ea87U)
+ << 28 | 0xf831718U)
+ << 28 | 0x657d3c2U)
+ << 28 | 0xd8a3f1bU),
+ UINTMAX_MAX / 787)
+P (10, 56,
+ (((((uintmax_t) 0xfb80U << 28 | 0xcd9225eU)
+ << 28 | 0x6f2302eU)
+ << 28 | 0x40e220cU)
+ << 28 | 0x34ad735U),
+ UINTMAX_MAX / 797)
+P (12, 48,
+ (((((uintmax_t) 0x1719U << 28 | 0xa1b36beU)
+ << 28 | 0x7f357a7U)
+ << 28 | 0x6593c70U)
+ << 28 | 0xa714919U),
+ UINTMAX_MAX / 809)
+P (2, 48,
+ (((((uintmax_t) 0x2867U << 28 | 0x894fdcaU)
+ << 28 | 0x567da1eU)
+ << 28 | 0xef45212U)
+ << 28 | 0x4eea383U),
+ UINTMAX_MAX / 811)
+P (10, 42,
+ (((((uintmax_t) 0x8932U << 28 | 0xd36914eU)
+ << 28 | 0x43f9c38U)
+ << 28 | 0x206dc24U)
+ << 28 | 0x2ba771dU),
+ UINTMAX_MAX / 821)
+P (2, 54,
+ (((((uintmax_t) 0xdeb7U << 28 | 0x8610cc0U)
+ << 28 | 0xdafbf4cU)
+ << 28 | 0xd4c3580U)
+ << 28 | 0x7772287U),
+ UINTMAX_MAX / 823)
+P (4, 54,
+ (((((uintmax_t) 0x8fa1U << 28 | 0xe560e3dU)
+ << 28 | 0x4a9a283U)
+ << 28 | 0xde917d5U)
+ << 28 | 0xe69ddf3U),
+ UINTMAX_MAX / 827)
+P (2, 54,
+ (((((uintmax_t) 0x6724U << 28 | 0x2159dccU)
+ << 28 | 0xbcfd388U)
+ << 28 | 0x2ef0403U)
+ << 28 | 0xb4a6c15U),
+ UINTMAX_MAX / 829)
+P (10, 48,
+ (((((uintmax_t) 0x5e96U << 28 | 0xbb58ca9U)
+ << 28 | 0xa64b0f8U)
+ << 28 | 0xfb6c51cU)
+ << 28 | 0x606b677U),
+ UINTMAX_MAX / 839)
+P (14, 54,
+ (((((uintmax_t) 0x2450U << 28 | 0x6e7171bU)
+ << 28 | 0xe930eb4U)
+ << 28 | 0xabaac44U)
+ << 28 | 0x6d3e1fdU),
+ UINTMAX_MAX / 853)
+P (4, 54,
+ (((((uintmax_t) 0x3743U << 28 | 0x3611535U)
+ << 28 | 0x7861fa9U)
+ << 28 | 0xf83bbe4U)
+ << 28 | 0x84a14e9U),
+ UINTMAX_MAX / 857)
+P (2, 60,
+ (((((uintmax_t) 0x232aU << 28 | 0x9df37baU)
+ << 28 | 0xdbf080bU)
+ << 28 | 0xebbc0d1U)
+ << 28 | 0xce874d3U),
+ UINTMAX_MAX / 859)
+P (4, 66,
+ (((((uintmax_t) 0x569eU << 28 | 0x67d2e92U)
+ << 28 | 0x8a3bebdU)
+ << 28 | 0x418eaf0U)
+ << 28 | 0x473189fU),
+ UINTMAX_MAX / 863)
+P (14, 60,
+ (((((uintmax_t) 0x7e1aU << 28 | 0x457923eU)
+ << 28 | 0x77ae444U)
+ << 28 | 0xe3af6f3U)
+ << 28 | 0x72b7e65U),
+ UINTMAX_MAX / 877)
+P (4, 60,
+ (((((uintmax_t) 0x9764U << 28 | 0x3fed672U)
+ << 28 | 0x7cf2ec8U)
+ << 28 | 0x7fdace4U)
+ << 28 | 0xf9e5d91U),
+ UINTMAX_MAX / 881)
+P (2, 64,
+ (((((uintmax_t) 0xea8bU << 28 | 0xbde5e83U)
+ << 28 | 0x9fbf0ecU)
+ << 28 | 0x93479c4U)
+ << 28 | 0x46bd9bbU),
+ UINTMAX_MAX / 883)
+P (4, 66,
+ (((((uintmax_t) 0x3d2fU << 28 | 0x9f06a35U)
+ << 28 | 0xae9c6daU)
+ << 28 | 0xc4d592eU)
+ << 28 | 0x777c647U),
+ UINTMAX_MAX / 887)
+P (20, 60,
+ (((((uintmax_t) 0x81d5U << 28 | 0xa9a1ba9U)
+ << 28 | 0x11379a6U)
+ << 28 | 0x3ea8c8fU)
+ << 28 | 0x61f0c23U),
+ UINTMAX_MAX / 907)
+P (4, 60,
+ (((((uintmax_t) 0x752eU << 28 | 0x5ddb77fU)
+ << 28 | 0xdc07de4U)
+ << 28 | 0x76062eaU)
+ << 28 | 0x5cbbb6fU),
+ UINTMAX_MAX / 911)
+P (8, 58,
+ (((((uintmax_t) 0x1abdU << 28 | 0xfafc60fU)
+ << 28 | 0x0add2dfU)
+ << 28 | 0x68761c6U)
+ << 28 | 0x9daac27U),
+ UINTMAX_MAX / 919)
+P (10, 54,
+ (((((uintmax_t) 0xac3aU << 28 | 0x6b786c0U)
+ << 28 | 0x582e4b8U)
+ << 28 | 0x13d7376U)
+ << 28 | 0x37aa061U),
+ UINTMAX_MAX / 929)
+P (8, 54,
+ (((((uintmax_t) 0x131fU << 28 | 0xf741d81U)
+ << 28 | 0xc6a01a3U)
+ << 28 | 0xa77aac1U)
+ << 28 | 0xfb15099U),
+ UINTMAX_MAX / 937)
+P (4, 56,
+ (((((uintmax_t) 0xc53cU << 28 | 0xaad918cU)
+ << 28 | 0x1b34817U)
+ << 28 | 0xf0c3e07U)
+ << 28 | 0x12c5825U),
+ UINTMAX_MAX / 941)
+P (6, 62,
+ (((((uintmax_t) 0xea1aU << 28 | 0x7df8f8bU)
+ << 28 | 0x37f52fdU)
+ << 28 | 0x912a70fU)
+ << 28 | 0xf30637bU),
+ UINTMAX_MAX / 947)
+P (6, 60,
+ (((((uintmax_t) 0xbb3bU << 28 | 0x5dc0113U)
+ << 28 | 0x1288ffbU)
+ << 28 | 0xb3b5dc0U)
+ << 28 | 0x1131289U),
+ UINTMAX_MAX / 953)
+P (14, 52,
+ (((((uintmax_t) 0x50beU << 28 | 0x9c31c53U)
+ << 28 | 0xa81b885U)
+ << 28 | 0x6d560a0U)
+ << 28 | 0xf5acdf7U),
+ UINTMAX_MAX / 967)
+P (4, 50,
+ (((((uintmax_t) 0x6580U << 28 | 0xec3a008U)
+ << 28 | 0x6fc9296U)
+ << 28 | 0x472f314U)
+ << 28 | 0xd3f89e3U),
+ UINTMAX_MAX / 971)
+P (6, 54,
+ (((((uintmax_t) 0x1108U << 28 | 0x1f71752U)
+ << 28 | 0x03ab1a7U)
+ << 28 | 0x6f5c7edU)
+ << 28 | 0x2253531U),
+ UINTMAX_MAX / 977)
+P (6, 50,
+ (((((uintmax_t) 0xb81fU << 28 | 0x4053563U)
+ << 28 | 0x3908981U)
+ << 28 | 0x6eae7c7U)
+ << 28 | 0xbf69fe7U),
+ UINTMAX_MAX / 983)
+P (8, 48,
+ (((((uintmax_t) 0x9c8bU << 28 | 0x7ed668eU)
+ << 28 | 0x14263b6U)
+ << 28 | 0xa2bea4cU)
+ << 28 | 0xfb1781fU),
+ UINTMAX_MAX / 991)
+P (6, 52,
+ (((((uintmax_t) 0x0291U << 28 | 0x54fdb06U)
+ << 28 | 0x6b547a3U)
+ << 28 | 0x900c533U)
+ << 28 | 0x18e81edU),
+ UINTMAX_MAX / 997)
+P (12, 42,
+ (((((uintmax_t) 0x2240U << 28 | 0x71aa3e6U)
+ << 28 | 0xa0db360U)
+ << 28 | 0xaa7f5d9U)
+ << 28 | 0xf148d11U),
+ UINTMAX_MAX / 1009)
+P (4, 48,
+ (((((uintmax_t) 0x02c7U << 28 | 0xa505cffU)
+ << 28 | 0xbf4e16bU)
+ << 28 | 0xe8c0102U)
+ << 28 | 0xc7a505dU),
+ UINTMAX_MAX / 1013)
+P (6, 44,
+ (((((uintmax_t) 0xcafdU << 28 | 0xbd2c779U)
+ << 28 | 0x57ad98fU)
+ << 28 | 0xf3f0ed2U)
+ << 28 | 0x8728f33U),
+ UINTMAX_MAX / 1019)
+P (2, 48,
+ (((((uintmax_t) 0x513cU << 28 | 0xedb245bU)
+ << 28 | 0x4473568U)
+ << 28 | 0x0e0a87eU)
+ << 28 | 0x5ec7155U),
+ UINTMAX_MAX / 1021)
+P (10, 56,
+ (((((uintmax_t) 0x2e6eU << 28 | 0xbe33267U)
+ << 28 | 0xca5ddbbU)
+ << 28 | 0xf70fa49U)
+ << 28 | 0xfe829b7U),
+ UINTMAX_MAX / 1031)
+P (2, 58,
+ (((((uintmax_t) 0x007eU << 28 | 0xe2825abU)
+ << 28 | 0x3eb2ed6U)
+ << 28 | 0x9d1e7b6U)
+ << 28 | 0xa50ca39U),
+ UINTMAX_MAX / 1033)
+P (6, 54,
+ (((((uintmax_t) 0x2f8dU << 28 | 0xacb84cdU)
+ << 28 | 0xfb90a1aU)
+ << 28 | 0x1e0f46bU)
+ << 28 | 0x6d26aefU),
+ UINTMAX_MAX / 1039)
+P (10, 48,
+ (((((uintmax_t) 0x01f3U << 28 | 0xcc435b0U)
+ << 28 | 0x713c474U)
+ << 28 | 0x29f9a7aU)
+ << 28 | 0x8251829U),
+ UINTMAX_MAX / 1049)
+P (2, 52,
+ (((((uintmax_t) 0x8c0eU << 28 | 0x9d59e14U)
+ << 28 | 0xf29a6d9U)
+ << 28 | 0xc2219d1U)
+ << 28 | 0xb863613U),
+ UINTMAX_MAX / 1051)
+P (10, 48,
+ (((((uintmax_t) 0x6e81U << 28 | 0xcf42d5cU)
+ << 28 | 0x6932e91U)
+ << 28 | 0x406c182U)
+ << 28 | 0x0d077adU),
+ UINTMAX_MAX / 1061)
+P (2, 54,
+ (((((uintmax_t) 0x9c4cU << 28 | 0x1a02688U)
+ << 28 | 0x4efdd52U)
+ << 28 | 0x1f4ec02U)
+ << 28 | 0xe3d2b97U),
+ UINTMAX_MAX / 1063)
+P (6, 54,
+ (((((uintmax_t) 0x7bcfU << 28 | 0x2599067U)
+ << 28 | 0x74255bbU)
+ << 28 | 0x8283b63U)
+ << 28 | 0xdc8eba5U),
+ UINTMAX_MAX / 1069)
+P (18, 42,
+ (((((uintmax_t) 0x46a7U << 28 | 0x3667275U)
+ << 28 | 0x48c5d43U)
+ << 28 | 0x1eda153U)
+ << 28 | 0x229ebbfU),
+ UINTMAX_MAX / 1087)
+P (4, 60,
+ (((((uintmax_t) 0xe720U << 28 | 0x9daecfeU)
+ << 28 | 0x5b832afU)
+ << 28 | 0x0bf78d7U)
+ << 28 | 0xe01686bU),
+ UINTMAX_MAX / 1091)
+P (2, 60,
+ (((((uintmax_t) 0x194bU << 28 | 0xa6ff4c1U)
+ << 28 | 0xeeaafa9U)
+ << 28 | 0xced0742U)
+ << 28 | 0xc086e8dU),
+ UINTMAX_MAX / 1093)
+P (4, 66,
+ (((((uintmax_t) 0x777bU << 28 | 0x730c5e4U)
+ << 28 | 0x768c7c2U)
+ << 28 | 0x6458ad9U)
+ << 28 | 0xf632df9U),
+ UINTMAX_MAX / 1097)
+P (6, 68,
+ (((((uintmax_t) 0x2aefU << 28 | 0xfc49577U)
+ << 28 | 0xfe24abbU)
+ << 28 | 0xff1255dU)
+ << 28 | 0xff892afU),
+ UINTMAX_MAX / 1103)
+P (6, 72,
+ (((((uintmax_t) 0xf1b0U << 28 | 0x213da24U)
+ << 28 | 0x78f59cbU)
+ << 28 | 0xd49a333U)
+ << 28 | 0xf04d8fdU),
+ UINTMAX_MAX / 1109)
+P (8, 70,
+ (((((uintmax_t) 0x8822U << 28 | 0xd60f205U)
+ << 28 | 0x0ac58ecU)
+ << 28 | 0x84ed6f9U)
+ << 28 | 0xcfdeff5U),
+ UINTMAX_MAX / 1117)
+P (6, 70,
+ (((((uintmax_t) 0x3606U << 28 | 0xd6bd351U)
+ << 28 | 0xd682d97U)
+ << 28 | 0x980cc40U)
+ << 28 | 0xbda9d4bU),
+ UINTMAX_MAX / 1123)
+P (6, 72,
+ (((((uintmax_t) 0x0122U << 28 | 0x3d38ea0U)
+ << 28 | 0x15c4977U)
+ << 28 | 0x7f34d52U)
+ << 28 | 0x4f5cbd9U),
+ UINTMAX_MAX / 1129)
+P (22, 62,
+ (((((uintmax_t) 0x78feU << 28 | 0x716e8a5U)
+ << 28 | 0x7a1b227U)
+ << 28 | 0x97051d9U)
+ << 28 | 0x4cbbb7fU),
+ UINTMAX_MAX / 1151)
+P (2, 64,
+ (((((uintmax_t) 0xd6ecU << 28 | 0xaef5908U)
+ << 28 | 0xa8be0eaU)
+ << 28 | 0x769051bU)
+ << 28 | 0x4f43b81U),
+ UINTMAX_MAX / 1153)
+P (10, 60,
+ (((((uintmax_t) 0x7867U << 28 | 0xe595e6eU)
+ << 28 | 0x801c2ceU)
+ << 28 | 0x7910f30U)
+ << 28 | 0x34d4323U),
+ UINTMAX_MAX / 1163)
+P (8, 58,
+ (((((uintmax_t) 0xa705U << 28 | 0xe713e4eU)
+ << 28 | 0x43c5692U)
+ << 28 | 0x791d137U)
+ << 28 | 0x4f5b99bU),
+ UINTMAX_MAX / 1171)
+P (10, 50,
+ (((((uintmax_t) 0x92c0U << 28 | 0x0ddf7c3U)
+ << 28 | 0x4e40989U)
+ << 28 | 0xa5645ccU)
+ << 28 | 0x68ea1b5U),
+ UINTMAX_MAX / 1181)
+P (6, 50,
+ (((((uintmax_t) 0xab06U << 28 | 0xaf8e205U)
+ << 28 | 0x9b7f75fU)
+ << 28 | 0x8aacf79U)
+ << 28 | 0x6c0cf0bU),
+ UINTMAX_MAX / 1187)
+P (6, 56,
+ (((((uintmax_t) 0xe187U << 28 | 0x673725fU)
+ << 28 | 0xb4774f2U)
+ << 28 | 0xe90a15eU)
+ << 28 | 0x33edf99U),
+ UINTMAX_MAX / 1193)
+P (8, 58,
+ (((((uintmax_t) 0x57d1U << 28 | 0xf5579b6U)
+ << 28 | 0x3f8538eU)
+ << 28 | 0x99e5febU)
+ << 28 | 0x897c451U),
+ UINTMAX_MAX / 1201)
+P (12, 64,
+ (((((uintmax_t) 0x5f64U << 28 | 0xab5ec29U)
+ << 28 | 0x5d7e6acU)
+ << 28 | 0xa2eda38U)
+ << 28 | 0xfb91695U),
+ UINTMAX_MAX / 1213)
+P (4, 62,
+ (((((uintmax_t) 0x48c8U << 28 | 0x41a1574U)
+ << 28 | 0xbf0035dU)
+ << 28 | 0x9b737beU)
+ << 28 | 0x5ea8b41U),
+ UINTMAX_MAX / 1217)
+P (6, 60,
+ (((((uintmax_t) 0x348aU << 28 | 0x26ef0b8U)
+ << 28 | 0x33e964aU)
+ << 28 | 0xefe1db9U)
+ << 28 | 0x3fd7cf7U),
+ UINTMAX_MAX / 1223)
+P (6, 60,
+ (((((uintmax_t) 0x5247U << 28 | 0x3d081faU)
+ << 28 | 0x958f1a0U)
+ << 28 | 0x994ef20U)
+ << 28 | 0xb3f8805U),
+ UINTMAX_MAX / 1229)
+P (2, 60,
+ (((((uintmax_t) 0x0ec3U << 28 | 0xe6367c5U)
+ << 28 | 0xc55ae10U)
+ << 28 | 0x3890bdaU)
+ << 28 | 0x912822fU),
+ UINTMAX_MAX / 1231)
+P (6, 60,
+ (((((uintmax_t) 0xb57fU << 28 | 0x46921bbU)
+ << 28 | 0xb4ab5b4U)
+ << 28 | 0x41659d1U)
+ << 28 | 0x3a9147dU),
+ UINTMAX_MAX / 1237)
+P (12, 52,
+ (((((uintmax_t) 0xb2eeU << 28 | 0xfcecf03U)
+ << 28 | 0x7c00d1eU)
+ << 28 | 0x2134440U)
+ << 28 | 0xc4c3f21U),
+ UINTMAX_MAX / 1249)
+P (10, 44,
+ (((((uintmax_t) 0xed4bU << 28 | 0x07ee1b3U)
+ << 28 | 0xf3ccc26U)
+ << 28 | 0x3a27727U)
+ << 28 | 0xa6883c3U),
+ UINTMAX_MAX / 1259)
+P (18, 30,
+ (((((uintmax_t) 0x435bU << 28 | 0x9d5e6bdU)
+ << 28 | 0xa4fc978U)
+ << 28 | 0xe221472U)
+ << 28 | 0xab33855U),
+ UINTMAX_MAX / 1277)
+P (2, 40,
+ (((((uintmax_t) 0x6013U << 28 | 0x370b023U)
+ << 28 | 0x3a3ed95U)
+ << 28 | 0xeac88e8U)
+ << 28 | 0x2e6faffU),
+ UINTMAX_MAX / 1279)
+P (4, 38,
+ (((((uintmax_t) 0x3447U << 28 | 0x089473bU)
+ << 28 | 0xa900ff6U)
+ << 28 | 0x6c25831U)
+ << 28 | 0x7be8dabU),
+ UINTMAX_MAX / 1283)
+P (6, 38,
+ (((((uintmax_t) 0x0f7dU << 28 | 0xb74fa3dU)
+ << 28 | 0x912de09U)
+ << 28 | 0xee202c7U)
+ << 28 | 0xcb91939U),
+ UINTMAX_MAX / 1289)
+P (2, 70,
+ (((((uintmax_t) 0x5316U << 28 | 0x02c6b14U)
+ << 28 | 0x6caa88dU)
+ << 28 | 0x2fca104U)
+ << 28 | 0x2a09ea3U),
+ UINTMAX_MAX / 1291)
+P (6, 70,
+ (((((uintmax_t) 0x2128U << 28 | 0xdb7c26aU)
+ << 28 | 0xfaabb82U)
+ << 28 | 0x779c856U)
+ << 28 | 0xd8b8bf1U),
+ UINTMAX_MAX / 1297)
+P (4, 72,
+ (((((uintmax_t) 0xb01cU << 28 | 0x55cadf2U)
+ << 28 | 0x39d9d38U)
+ << 28 | 0x79361cbU)
+ << 28 | 0xa8a223dU),
+ UINTMAX_MAX / 1301)
+P (2, 78,
+ (((((uintmax_t) 0x3d4cU << 28 | 0x6d3cb58U)
+ << 28 | 0x9b9a9f2U)
+ << 28 | 0x3f43639U)
+ << 28 | 0xc3182a7U),
+ UINTMAX_MAX / 1303)
+P (4, 92,
+ (((((uintmax_t) 0x0bc0U << 28 | 0x89e42fcU)
+ << 28 | 0xab94aa0U)
+ << 28 | 0x3868fc4U)
+ << 28 | 0x74bcd13U),
+ UINTMAX_MAX / 1307)
+P (12, 90,
+ (((((uintmax_t) 0x34fcU << 28 | 0x4ff6af1U)
+ << 28 | 0x0e2b165U)
+ << 28 | 0x1e78b8cU)
+ << 28 | 0x5311a97U),
+ UINTMAX_MAX / 1319)
+P (2, 102,
+ (((((uintmax_t) 0x18ffU << 28 | 0xce639c0U)
+ << 28 | 0x0c6718fU)
+ << 28 | 0xfce639cU)
+ << 28 | 0x00c6719U),
+ UINTMAX_MAX / 1321)
+P (6, 100,
+ (((((uintmax_t) 0x9b4cU << 28 | 0x33b39aeU)
+ << 28 | 0x96dc4f7U)
+ << 28 | 0xb460754U)
+ << 28 | 0xb0b61cfU),
+ UINTMAX_MAX / 1327)
+P (34, 68,
+ (((((uintmax_t) 0xbbe8U << 28 | 0xad0c9a3U)
+ << 28 | 0xd51d27bU)
+ << 28 | 0x03f3359U)
+ << 28 | 0xb8e63b1U),
+ UINTMAX_MAX / 1361)
+P (6, 66,
+ (((((uintmax_t) 0xa28dU << 28 | 0x33dfca1U)
+ << 28 | 0x0dabba5U)
+ << 28 | 0x5c53260U)
+ << 28 | 0x41eb667U),
+ UINTMAX_MAX / 1367)
+P (6, 66,
+ (((((uintmax_t) 0x677bU << 28 | 0x3ed5acdU)
+ << 28 | 0x78a2964U)
+ << 28 | 0x7f88ab8U)
+ << 28 | 0x96a76f5U),
+ UINTMAX_MAX / 1373)
+P (8, 66,
+ (((((uintmax_t) 0xf4e0U << 28 | 0xac06ac6U)
+ << 28 | 0x595988fU)
+ << 28 | 0xd971434U)
+ << 28 | 0xa55a46dU),
+ UINTMAX_MAX / 1381)
+P (18, 52,
+ (((((uintmax_t) 0x3ba7U << 28 | 0x6f12d90U)
+ << 28 | 0x609e19fU)
+ << 28 | 0xbf96995U)
+ << 28 | 0x8046447U),
+ UINTMAX_MAX / 1399)
+P (10, 44,
+ (((((uintmax_t) 0x3d69U << 28 | 0x32b0f71U)
+ << 28 | 0x8e43399U)
+ << 28 | 0x86feba6U)
+ << 28 | 0x9be3a81U),
+ UINTMAX_MAX / 1409)
+P (14, 36,
+ (((((uintmax_t) 0xb7adU << 28 | 0xf701426U)
+ << 28 | 0x239eda6U)
+ << 28 | 0x68b3e6dU)
+ << 28 | 0x053796fU),
+ UINTMAX_MAX / 1423)
+P (4, 44,
+ (((((uintmax_t) 0xd0d1U << 28 | 0x893d2caU)
+ << 28 | 0xb80fc97U)
+ << 28 | 0x694e658U)
+ << 28 | 0x9f4e09bU),
+ UINTMAX_MAX / 1427)
+P (2, 52,
+ (((((uintmax_t) 0xc00bU << 28 | 0x7721dbcU)
+ << 28 | 0xffd2237U)
+ << 28 | 0x890c00bU)
+ << 28 | 0x7721dbdU),
+ UINTMAX_MAX / 1429)
+P (4, 50,
+ (((((uintmax_t) 0xe9d9U << 28 | 0x0e1cf0dU)
+ << 28 | 0x0a8a45aU)
+ << 28 | 0xc094a23U)
+ << 28 | 0x5f37ea9U),
+ UINTMAX_MAX / 1433)
+P (6, 48,
+ (((((uintmax_t) 0x8489U << 28 | 0x56fe661U)
+ << 28 | 0xd881831U)
+ << 28 | 0xcff775fU)
+ << 28 | 0x2d5d65fU),
+ UINTMAX_MAX / 1439)
+P (8, 42,
+ (((((uintmax_t) 0xfd85U << 28 | 0xed3f28dU)
+ << 28 | 0xe356dddU)
+ << 28 | 0xad8e6b3U)
+ << 28 | 0x6505217U),
+ UINTMAX_MAX / 1447)
+P (4, 42,
+ (((((uintmax_t) 0x0a68U << 28 | 0xcca8aacU)
+ << 28 | 0x8c7035aU)
+ << 28 | 0x27df897U)
+ << 28 | 0x062cd03U),
+ UINTMAX_MAX / 1451)
+P (2, 46,
+ (((((uintmax_t) 0x57eaU << 28 | 0xdb877ceU)
+ << 28 | 0xaae6ce2U)
+ << 28 | 0x396fe0fU)
+ << 28 | 0xdb5a625U),
+ UINTMAX_MAX / 1453)
+P (6, 52,
+ (((((uintmax_t) 0x1c12U << 28 | 0xf330f43U)
+ << 28 | 0xe76f6b3U)
+ << 28 | 0x52a4957U)
+ << 28 | 0xe82317bU),
+ UINTMAX_MAX / 1459)
+P (12, 52,
+ (((((uintmax_t) 0x472dU << 28 | 0xc52d6c1U)
+ << 28 | 0x2cb9dd8U)
+ << 28 | 0xab3f2c6U)
+ << 28 | 0x0c2ea3fU),
+ UINTMAX_MAX / 1471)
+P (10, 50,
+ (((((uintmax_t) 0xda51U << 28 | 0x3e0e2c9U)
+ << 28 | 0x8ce0b68U)
+ << 28 | 0x93f702fU)
+ << 28 | 0x0452479U),
+ UINTMAX_MAX / 1481)
+P (2, 60,
+ (((((uintmax_t) 0x442fU << 28 | 0xa4dae2dU)
+ << 28 | 0x3a2c896U)
+ << 28 | 0x86fdc18U)
+ << 28 | 0x2acf7e3U),
+ UINTMAX_MAX / 1483)
+P (4, 62,
+ (((((uintmax_t) 0x091fU << 28 | 0xd96fbb2U)
+ << 28 | 0x2f2be68U)
+ << 28 | 0x5403717U)
+ << 28 | 0x3dce12fU),
+ UINTMAX_MAX / 1487)
+P (2, 64,
+ (((((uintmax_t) 0x3accU << 28 | 0x97fbdfaU)
+ << 28 | 0xd798d7fU)
+ << 28 | 0x0ded168U)
+ << 28 | 0x5c27331U),
+ UINTMAX_MAX / 1489)
+P (4, 66,
+ (((((uintmax_t) 0x4d54U << 28 | 0xe047548U)
+ << 28 | 0x87cd3eeU)
+ << 28 | 0xda72e1fU)
+ << 28 | 0xe490b7dU),
+ UINTMAX_MAX / 1493)
+P (6, 68,
+ (((((uintmax_t) 0x7e8cU << 28 | 0x61afbbbU)
+ << 28 | 0x013209eU)
+ << 28 | 0x7bfc959U)
+ << 28 | 0xa8e6e53U),
+ UINTMAX_MAX / 1499)
+P (12, 60,
+ (((((uintmax_t) 0xc4b3U << 28 | 0x96f4fccU)
+ << 28 | 0x7ebab49U)
+ << 28 | 0xb314d6dU)
+ << 28 | 0x4753dd7U),
+ UINTMAX_MAX / 1511)
+P (12, 56,
+ (((((uintmax_t) 0x9eadU << 28 | 0x21c933fU)
+ << 28 | 0x089292eU)
+ << 28 | 0x8f8c5acU)
+ << 28 | 0x4aa1b3bU),
+ UINTMAX_MAX / 1523)
+P (8, 52,
+ (((((uintmax_t) 0x0584U << 28 | 0x992a4deU)
+ << 28 | 0xb99aab8U)
+ << 28 | 0xef72348U)
+ << 28 | 0x1163d33U),
+ UINTMAX_MAX / 1531)
+P (12, 54,
+ (((((uintmax_t) 0x8b08U << 28 | 0x7620d9aU)
+ << 28 | 0xcb6806aU)
+ << 28 | 0x2ec96a5U)
+ << 28 | 0x94287b7U),
+ UINTMAX_MAX / 1543)
+P (6, 52,
+ (((((uintmax_t) 0xc108U << 28 | 0x6dbce6bU)
+ << 28 | 0x6c94bdbU)
+ << 28 | 0xa41c6d1U)
+ << 28 | 0x3aab8c5U),
+ UINTMAX_MAX / 1549)
+P (4, 54,
+ (((((uintmax_t) 0xe478U << 28 | 0xaa1e005U)
+ << 28 | 0x46633c2U)
+ << 28 | 0xadbe648U)
+ << 28 | 0xdc3aaf1U),
+ UINTMAX_MAX / 1553)
+P (6, 50,
+ (((((uintmax_t) 0x5cf1U << 28 | 0x0e9d4faU)
+ << 28 | 0x40b2a87U)
+ << 28 | 0xa2bade5U)
+ << 28 | 0x65f91a7U),
+ UINTMAX_MAX / 1559)
+P (8, 46,
+ (((((uintmax_t) 0x9ecbU << 28 | 0x8ef2c45U)
+ << 28 | 0xec11a4dU)
+ << 28 | 0x6fe8798U)
+ << 28 | 0xc01f5dfU),
+ UINTMAX_MAX / 1567)
+P (4, 48,
+ (((((uintmax_t) 0xfb99U << 28 | 0xaa49543U)
+ << 28 | 0xf39d937U)
+ << 28 | 0x91310c8U)
+ << 28 | 0xc23d98bU),
+ UINTMAX_MAX / 1571)
+P (8, 42,
+ (((((uintmax_t) 0x7abbU << 28 | 0x187b379U)
+ << 28 | 0xc2112f8U)
+ << 28 | 0x0e446b0U)
+ << 28 | 0x1228883U),
+ UINTMAX_MAX / 1579)
+P (4, 44,
+ (((((uintmax_t) 0x3cceU << 28 | 0x5a3d212U)
+ << 28 | 0x6f95e9aU)
+ << 28 | 0xed1436fU)
+ << 28 | 0xbf500cfU),
+ UINTMAX_MAX / 1583)
+P (14, 40,
+ (((((uintmax_t) 0xc6eeU << 28 | 0xd90c05cU)
+ << 28 | 0x5547a78U)
+ << 28 | 0x39b54ccU)
+ << 28 | 0x8b24115U),
+ UINTMAX_MAX / 1597)
+P (4, 56,
+ (((((uintmax_t) 0x8798U << 28 | 0x627f99aU)
+ << 28 | 0x9f948c1U)
+ << 28 | 0x28c646aU)
+ << 28 | 0xd0309c1U),
+ UINTMAX_MAX / 1601)
+P (6, 56,
+ (((((uintmax_t) 0x5233U << 28 | 0x4bab403U)
+ << 28 | 0x2fa1b14U)
+ << 28 | 0xde63162U)
+ << 28 | 0x4a3c377U),
+ UINTMAX_MAX / 1607)
+P (2, 58,
+ (((((uintmax_t) 0x0e51U << 28 | 0xc7ad43fU)
+ << 28 | 0x016e93fU)
+ << 28 | 0x7b9fe68U)
+ << 28 | 0xb0ecbf9U),
+ UINTMAX_MAX / 1609)
+P (4, 56,
+ (((((uintmax_t) 0x00a2U << 28 | 0x84ffd75U)
+ << 28 | 0xec00a28U)
+ << 28 | 0x4ffd75eU)
+ << 28 | 0xc00a285U),
+ UINTMAX_MAX / 1613)
+P (6, 74,
+ (((((uintmax_t) 0xe72cU << 28 | 0xbfa4ebeU)
+ << 28 | 0xb20bb37U)
+ << 28 | 0x803cb80U)
+ << 28 | 0xdea2ddbU),
+ UINTMAX_MAX / 1619)
+P (2, 76,
+ (((((uintmax_t) 0x22beU << 28 | 0x75d04e5U)
+ << 28 | 0x4f6ff86U)
+ << 28 | 0xb63f7c9U)
+ << 28 | 0xac4c6fdU),
+ UINTMAX_MAX / 1621)
+P (6, 72,
+ (((((uintmax_t) 0x84f4U << 28 | 0xd419cdfU)
+ << 28 | 0x6dfbe8bU)
+ << 28 | 0x6851d1bU)
+ << 28 | 0xd99b9d3U),
+ UINTMAX_MAX / 1627)
+P (10, 72,
+ (((((uintmax_t) 0xe83aU << 28 | 0xccdcd04U)
+ << 28 | 0xd90f7b6U)
+ << 28 | 0x2fda77cU)
+ << 28 | 0xa343b6dU),
+ UINTMAX_MAX / 1637)
+P (20, 64,
+ (((((uintmax_t) 0x9e34U << 28 | 0x383c8ffU)
+ << 28 | 0xd872f1fU)
+ << 28 | 0x0dc009eU)
+ << 28 | 0x34383c9U),
+ UINTMAX_MAX / 1657)
+P (6, 60,
+ (((((uintmax_t) 0x2e7dU << 28 | 0x4e5ad2eU)
+ << 28 | 0x55e5d49U)
+ << 28 | 0x6dc21ddU)
+ << 28 | 0xd35b97fU),
+ UINTMAX_MAX / 1663)
+P (4, 66,
+ (((((uintmax_t) 0xe596U << 28 | 0x098573aU)
+ << 28 | 0x33e80b0U)
+ << 28 | 0xe96ce17U)
+ << 28 | 0x090f82bU),
+ UINTMAX_MAX / 1667)
+P (2, 72,
+ (((((uintmax_t) 0x7181U << 28 | 0x4dc42e0U)
+ << 28 | 0x3fceeaaU)
+ << 28 | 0xdf05acdU)
+ << 28 | 0xd7d024dU),
+ UINTMAX_MAX / 1669)
+P (24, 54,
+ (((((uintmax_t) 0xa4abU << 28 | 0x2bb32f5U)
+ << 28 | 0x43975cbU)
+ << 28 | 0x1381967U)
+ << 28 | 0x46eafb5U),
+ UINTMAX_MAX / 1693)
+P (4, 56,
+ (((((uintmax_t) 0xa2ecU << 28 | 0x3cf1f87U)
+ << 28 | 0x5102434U)
+ << 28 | 0x7f52373U)
+ << 28 | 0x6755d61U),
+ UINTMAX_MAX / 1697)
+P (2, 60,
+ (((((uintmax_t) 0x6ff3U << 28 | 0xf223422U)
+ << 28 | 0x5ab51d1U)
+ << 28 | 0x4a48a05U)
+ << 28 | 0x1f7dd0bU),
+ UINTMAX_MAX / 1699)
+P (10, 68,
+ (((((uintmax_t) 0x6c00U << 28 | 0x9963e9dU)
+ << 28 | 0x48f3447U)
+ << 28 | 0x4d71b1cU)
+ << 28 | 0xe914d25U),
+ UINTMAX_MAX / 1709)
+P (12, 62,
+ (((((uintmax_t) 0x894cU << 28 | 0x02f99a8U)
+ << 28 | 0xd502d38U)
+ << 28 | 0x6063f5eU)
+ << 28 | 0x28c1f89U),
+ UINTMAX_MAX / 1721)
+P (2, 64,
+ (((((uintmax_t) 0xc8e0U << 28 | 0xa6684d4U)
+ << 28 | 0x2b6281dU)
+ << 28 | 0xb7325e3U)
+ << 28 | 0x2d04e73U),
+ UINTMAX_MAX / 1723)
+P (10, 56,
+ (((((uintmax_t) 0xf8c2U << 28 | 0xfdc8c0aU)
+ << 28 | 0x0b85afeU)
+ << 28 | 0xf748d38U)
+ << 28 | 0x93b880dU),
+ UINTMAX_MAX / 1733)
+P (8, 60,
+ (((((uintmax_t) 0xd0a7U << 28 | 0x0a25594U)
+ << 28 | 0x123bb2fU)
+ << 28 | 0x3351506U)
+ << 28 | 0xe935605U),
+ UINTMAX_MAX / 1741)
+P (6, 64,
+ (((((uintmax_t) 0xdb5dU << 28 | 0xa31878bU)
+ << 28 | 0xf158a7aU)
+ << 28 | 0x3637fa2U)
+ << 28 | 0x376415bU),
+ UINTMAX_MAX / 1747)
+P (6, 70,
+ (((((uintmax_t) 0x75b4U << 28 | 0x5a8abbcU)
+ << 28 | 0xd2e004aU)
+ << 28 | 0xc525d2bU)
+ << 28 | 0xaa21969U),
+ UINTMAX_MAX / 1753)
+P (6, 72,
+ (((((uintmax_t) 0x7e53U << 28 | 0x89d2e22U)
+ << 28 | 0xa34af3aU)
+ << 28 | 0x11c16b4U)
+ << 28 | 0x2cd351fU),
+ UINTMAX_MAX / 1759)
+P (18, 70,
+ (((((uintmax_t) 0xeaf7U << 28 | 0x801270aU)
+ << 28 | 0x843ff6cU)
+ << 28 | 0x7abde00U)
+ << 28 | 0x49c2a11U),
+ UINTMAX_MAX / 1777)
+P (6, 78,
+ (((((uintmax_t) 0x1ad9U << 28 | 0x60a0cecU)
+ << 28 | 0x0ae9754U)
+ << 28 | 0xdad0303U)
+ << 28 | 0xe069ac7U),
+ UINTMAX_MAX / 1783)
+P (4, 80,
+ (((((uintmax_t) 0x082aU << 28 | 0x676e737U)
+ << 28 | 0x70be3ebU)
+ << 28 | 0xf1ac9fdU)
+ << 28 | 0xfe91433U),
+ UINTMAX_MAX / 1787)
+P (2, 82,
+ (((((uintmax_t) 0x50b4U << 28 | 0xdfcda14U)
+ << 28 | 0x51d9efaU)
+ << 28 | 0xfdda823U)
+ << 28 | 0x7cec655U),
+ UINTMAX_MAX / 1789)
+P (12, 72,
+ (((((uintmax_t) 0x1ffbU << 28 | 0x738ffdbU)
+ << 28 | 0x9c7fedcU)
+ << 28 | 0xe3ff6e7U)
+ << 28 | 0x1ffb739U),
+ UINTMAX_MAX / 1801)
+P (10, 66,
+ (((((uintmax_t) 0xa660U << 28 | 0xf8ca6cdU)
+ << 28 | 0x88f9ebeU)
+ << 28 | 0xd5737d6U)
+ << 28 | 0x286db1bU),
+ UINTMAX_MAX / 1811)
+P (12, 56,
+ (((((uintmax_t) 0xed52U << 28 | 0xb6467eaU)
+ << 28 | 0xa7abbe4U)
+ << 28 | 0x79e431fU)
+ << 28 | 0xe08b4dfU),
+ UINTMAX_MAX / 1823)
+P (8, 58,
+ (((((uintmax_t) 0xdaf2U << 28 | 0xff4d09aU)
+ << 28 | 0x5ae119dU)
+ << 28 | 0xd9b0dd7U)
+ << 28 | 0x742f897U),
+ UINTMAX_MAX / 1831)
+P (16, 54,
+ (((((uintmax_t) 0x6054U << 28 | 0x454d33bU)
+ << 28 | 0x2efc88fU)
+ << 28 | 0x09d7402U)
+ << 28 | 0xc5a5e87U),
+ UINTMAX_MAX / 1847)
+P (14, 46,
+ (((((uintmax_t) 0xf545U << 28 | 0x31625b1U)
+ << 28 | 0x0a51292U)
+ << 28 | 0x16d5c4dU)
+ << 28 | 0x958738dU),
+ UINTMAX_MAX / 1861)
+P (6, 46,
+ (((((uintmax_t) 0x6df8U << 28 | 0x0c1100aU)
+ << 28 | 0xf82f2b3U)
+ << 28 | 0x139ba11U)
+ << 28 | 0xd34ca63U),
+ UINTMAX_MAX / 1867)
+P (4, 60,
+ (((((uintmax_t) 0xaf8bU << 28 | 0xf8e2952U)
+ << 28 | 0x3b61d47U)
+ << 28 | 0xd54f7edU)
+ << 28 | 0x644afafU),
+ UINTMAX_MAX / 1871)
+P (2, 60,
+ (((((uintmax_t) 0x4d5cU << 28 | 0x4227171U)
+ << 28 | 0x9491f92U)
+ << 28 | 0xa81d85cU)
+ << 28 | 0xf11a1b1U),
+ UINTMAX_MAX / 1873)
+P (4, 72,
+ (((((uintmax_t) 0xf78bU << 28 | 0x4082eeaU)
+ << 28 | 0xdc21475U)
+ << 28 | 0x4b26533U)
+ << 28 | 0x253bdfdU),
+ UINTMAX_MAX / 1877)
+P (2, 72,
+ (((((uintmax_t) 0xf354U << 28 | 0x558f76aU)
+ << 28 | 0xad92bbbU)
+ << 28 | 0xe0efc98U)
+ << 28 | 0x0bfd467U),
+ UINTMAX_MAX / 1879)
+P (10, 84,
+ (((((uintmax_t) 0x0ab4U << 28 | 0xc91d231U)
+ << 28 | 0x99d11c0U)
+ << 28 | 0xd8d594fU)
+ << 28 | 0x024dca1U),
+ UINTMAX_MAX / 1889)
+P (12, 78,
+ (((((uintmax_t) 0x1b56U << 28 | 0x52256feU)
+ << 28 | 0x84c7d82U)
+ << 28 | 0x38d43bcU)
+ << 28 | 0xaac1a65U),
+ UINTMAX_MAX / 1901)
+P (6, 80,
+ (((((uintmax_t) 0xaca2U << 28 | 0xb39dbc1U)
+ << 28 | 0x2cb3e27U)
+ << 28 | 0x779c1faU)
+ << 28 | 0xe6175bbU),
+ UINTMAX_MAX / 1907)
+P (6, 80,
+ (((((uintmax_t) 0x3856U << 28 | 0xb755c78U)
+ << 28 | 0x7068ea7U)
+ << 28 | 0x46ca9afU)
+ << 28 | 0x708b2c9U),
+ UINTMAX_MAX / 1913)
+P (18, 66,
+ (((((uintmax_t) 0x052bU << 28 | 0x9de5385U)
+ << 28 | 0x8076c93U)
+ << 28 | 0xf3cd9f3U)
+ << 28 | 0x89be823U),
+ UINTMAX_MAX / 1931)
+P (2, 66,
+ (((((uintmax_t) 0x820dU << 28 | 0x822f698U)
+ << 28 | 0xd4f545cU)
+ << 28 | 0xb4a4c04U)
+ << 28 | 0xc489345U),
+ UINTMAX_MAX / 1933)
+P (16, 54,
+ (((((uintmax_t) 0xcd09U << 28 | 0x536828fU)
+ << 28 | 0xb23dbbfU)
+ << 28 | 0x6047743U)
+ << 28 | 0xe85b6b5U),
+ UINTMAX_MAX / 1949)
+P (2, 60,
+ (((((uintmax_t) 0x8486U << 28 | 0xe386c1eU)
+ << 28 | 0xf778961U)
+ << 28 | 0xc147831U)
+ << 28 | 0x563545fU),
+ UINTMAX_MAX / 1951)
+P (22, 44,
+ (((((uintmax_t) 0xec68U << 28 | 0x5200c74U)
+ << 28 | 0xc6c78edU)
+ << 28 | 0xb47c0aeU)
+ << 28 | 0x62dee9dU),
+ UINTMAX_MAX / 1973)
+P (6, 48,
+ (((((uintmax_t) 0xd8acU << 28 | 0xd298624U)
+ << 28 | 0xff1830aU)
+ << 28 | 0x3824386U)
+ << 28 | 0x673a573U),
+ UINTMAX_MAX / 1979)
+P (8, 42,
+ (((((uintmax_t) 0x03ddU << 28 | 0x78b87ecU)
+ << 28 | 0x6aad6a4U)
+ << 28 | 0xa77d19eU)
+ << 28 | 0x575a0ebU),
+ UINTMAX_MAX / 1987)
+P (6, 46,
+ (((((uintmax_t) 0x8950U << 28 | 0x062a636U)
+ << 28 | 0xb8325a2U)
+ << 28 | 0xbee045eU)
+ << 28 | 0x066c279U),
+ UINTMAX_MAX / 1993)
+P (4, 56,
+ (((((uintmax_t) 0xa9daU << 28 | 0xd301275U)
+ << 28 | 0xae369c2U)
+ << 28 | 0x3618de8U)
+ << 28 | 0xab43d05U),
+ UINTMAX_MAX / 1997)
+P (2, 64,
+ (((((uintmax_t) 0xfa3cU << 28 | 0xb3cd496U)
+ << 28 | 0x174ec26U)
+ << 28 | 0x6b51521U)
+ << 28 | 0x6cb9f2fU),
+ UINTMAX_MAX / 1999)
+P (4, 66,
+ (((((uintmax_t) 0x5c05U << 28 | 0x9fa1eedU)
+ << 28 | 0xfaa1ce2U)
+ << 28 | 0x79edd9eU)
+ << 28 | 0x9c2e85bU),
+ UINTMAX_MAX / 2003)
+P (8, 70,
+ (((((uintmax_t) 0x8e52U << 28 | 0x3c5712bU)
+ << 28 | 0x68c48d0U)
+ << 28 | 0xc591c22U)
+ << 28 | 0x1dc9c53U),
+ UINTMAX_MAX / 2011)
+P (6, 66,
+ (((((uintmax_t) 0x8de5U << 28 | 0xdaaf67bU)
+ << 28 | 0x1d10a06U)
+ << 28 | 0xda8ee9cU)
+ << 28 | 0x9ee7c21U),
+ UINTMAX_MAX / 2017)
+P (10, 60,
+ (((((uintmax_t) 0xec2bU << 28 | 0xf35ed8fU)
+ << 28 | 0x98f179dU)
+ << 28 | 0xfebcaf4U)
+ << 28 | 0xc27e8c3U),
+ UINTMAX_MAX / 2027)
+P (2, 60,
+ (((((uintmax_t) 0xe8c8U << 28 | 0xdd0cfedU)
+ << 28 | 0xd4d9849U)
+ << 28 | 0xaeff9f1U)
+ << 28 | 0x9dd6de5U),
+ UINTMAX_MAX / 2029)
+P (10, 60,
+ (((((uintmax_t) 0x65f2U << 28 | 0xb107280U)
+ << 28 | 0xd0eb086U)
+ << 28 | 0x976a57aU)
+ << 28 | 0x296e9c7U),
+ UINTMAX_MAX / 2039)
+P (14, 58,
+ (((((uintmax_t) 0x44b5U << 28 | 0x0ed6b9cU)
+ << 28 | 0xbe093a3U)
+ << 28 | 0xb9abf48U)
+ << 28 | 0x72b84cdU),
+ UINTMAX_MAX / 2053)
+P (10, 50,
+ (((((uintmax_t) 0x9e96U << 28 | 0xa5899dfU)
+ << 28 | 0x7cf5b34U)
+ << 28 | 0xfca6483U)
+ << 28 | 0x895e6efU),
+ UINTMAX_MAX / 2063)
+P (6, 60,
+ (((((uintmax_t) 0x49beU << 28 | 0x6c24212U)
+ << 28 | 0x8f47e34U)
+ << 28 | 0xb5a3339U)
+ << 28 | 0x88f873dU),
+ UINTMAX_MAX / 2069)
+P (12, 50,
+ (((((uintmax_t) 0xd1fdU << 28 | 0xc922526U)
+ << 28 | 0xc0275d9U)
+ << 28 | 0xdd4f19bU)
+ << 28 | 0x5f17be1U),
+ UINTMAX_MAX / 2081)
+P (2, 54,
+ (((((uintmax_t) 0xb8d7U << 28 | 0x51f95d0U)
+ << 28 | 0x8f8bfb9U)
+ << 28 | 0x35b507fU)
+ << 28 | 0xd0ce78bU),
+ UINTMAX_MAX / 2083)
+P (4, 54,
+ (((((uintmax_t) 0x971fU << 28 | 0x47835f8U)
+ << 28 | 0xe2aeeb4U)
+ << 28 | 0x50f5540U)
+ << 28 | 0x660e797U),
+ UINTMAX_MAX / 2087)
+P (2, 54,
+ (((((uintmax_t) 0x418fU << 28 | 0xfe0a0c7U)
+ << 28 | 0xff05063U)
+ << 28 | 0xff82831U)
+ << 28 | 0xffc1419U),
+ UINTMAX_MAX / 2089)
+P (10, 54,
+ (((((uintmax_t) 0xd06fU << 28 | 0x3ae8760U)
+ << 28 | 0xf5e0889U)
+ << 28 | 0x92f718cU)
+ << 28 | 0x22a32fbU),
+ UINTMAX_MAX / 2099)
+P (12, 50,
+ (((((uintmax_t) 0x16adU << 28 | 0x6a5a779U)
+ << 28 | 0x25f515fU)
+ << 28 | 0x3253ad0U)
+ << 28 | 0xd37e7bfU),
+ UINTMAX_MAX / 2111)
+P (2, 66,
+ (((((uintmax_t) 0xfe0fU << 28 | 0xc007c0fU)
+ << 28 | 0xfe0fc00U)
+ << 28 | 0x7c0ffe0U)
+ << 28 | 0xfc007c1U),
+ UINTMAX_MAX / 2113)
+P (16, 74,
+ (((((uintmax_t) 0x9763U << 28 | 0x3395b43U)
+ << 28 | 0xf020b4dU)
+ << 28 | 0x8ebadc0U)
+ << 28 | 0xc0640b1U),
+ UINTMAX_MAX / 2129)
+P (2, 76,
+ (((((uintmax_t) 0x9a20U << 28 | 0xea7f195U)
+ << 28 | 0x90471e2U)
+ << 28 | 0x729af83U)
+ << 28 | 0x1037bdbU),
+ UINTMAX_MAX / 2131)
+P (6, 76,
+ (((((uintmax_t) 0x7285U << 28 | 0xee07e80U)
+ << 28 | 0xa8ab8b8U)
+ << 28 | 0xf64bf30U)
+ << 28 | 0xfeebfe9U),
+ UINTMAX_MAX / 2137)
+P (4, 80,
+ (((((uintmax_t) 0x3dd1U << 28 | 0x5e1a10fU)
+ << 28 | 0xa9e8cdaU)
+ << 28 | 0x93124b5U)
+ << 28 | 0x44c0bf5U),
+ UINTMAX_MAX / 2141)
+P (2, 94,
+ (((((uintmax_t) 0x4f14U << 28 | 0xe7bff85U)
+ << 28 | 0xac9e29cU)
+ << 28 | 0xf7ff0b5U)
+ << 28 | 0x93c539fU),
+ UINTMAX_MAX / 2143)
+P (10, 86,
+ (((((uintmax_t) 0x12e7U << 28 | 0xdccdf10U)
+ << 28 | 0x4a322d6U)
+ << 28 | 0xbd8861fU)
+ << 28 | 0xa0e07d9U),
+ UINTMAX_MAX / 2153)
+P (8, 82,
+ (((((uintmax_t) 0xd7b8U << 28 | 0xebfac9aU)
+ << 28 | 0x00b5f5cU)
+ << 28 | 0xfe75c0bU)
+ << 28 | 0xd8ab891U),
+ UINTMAX_MAX / 2161)
+P (18, 72,
+ (((((uintmax_t) 0xae1cU << 28 | 0xe6bd9efU)
+ << 28 | 0x512ea43U)
+ << 28 | 0xe808757U)
+ << 28 | 0xc2e862bU),
+ UINTMAX_MAX / 2179)
+P (24, 64,
+ (((((uintmax_t) 0x459bU << 28 | 0x5dc70f3U)
+ << 28 | 0x90e8690U)
+ << 28 | 0xcaa96d5U)
+ << 28 | 0x95c9d93U),
+ UINTMAX_MAX / 2203)
+P (4, 62,
+ (((((uintmax_t) 0x4ec2U << 28 | 0xa38d65bU)
+ << 28 | 0xa2bd88fU)
+ << 28 | 0xd550625U)
+ << 28 | 0xd07135fU),
+ UINTMAX_MAX / 2207)
+P (6, 60,
+ (((((uintmax_t) 0x525dU << 28 | 0x3cf6a14U)
+ << 28 | 0x20da676U)
+ << 28 | 0xb010a86U)
+ << 28 | 0xe209f2dU),
+ UINTMAX_MAX / 2213)
+P (8, 60,
+ (((((uintmax_t) 0x716bU << 28 | 0x4f6a9e5U)
+ << 28 | 0xf3522ecU)
+ << 28 | 0xc042644U)
+ << 28 | 0x7769b25U),
+ UINTMAX_MAX / 2221)
+P (16, 50,
+ (((((uintmax_t) 0x48abU << 28 | 0x336212fU)
+ << 28 | 0xf32ece3U)
+ << 28 | 0x81339caU)
+ << 28 | 0xabe3295U),
+ UINTMAX_MAX / 2237)
+P (2, 54,
+ (((((uintmax_t) 0xbde9U << 28 | 0xd1944b7U)
+ << 28 | 0x656aad1U)
+ << 28 | 0xb190a2dU)
+ << 28 | 0x0c7673fU),
+ UINTMAX_MAX / 2239)
+P (4, 54,
+ (((((uintmax_t) 0xb595U << 28 | 0xdb3fccdU)
+ << 28 | 0xe54afc3U)
+ << 28 | 0xbce3cf2U)
+ << 28 | 0x6b0e7ebU),
+ UINTMAX_MAX / 2243)
+P (8, 58,
+ (((((uintmax_t) 0x8a10U << 28 | 0x9aab45fU)
+ << 28 | 0x137285fU)
+ << 28 | 0x87e76f5U)
+ << 28 | 0x6c61ce3U),
+ UINTMAX_MAX / 2251)
+P (16, 44,
+ (((((uintmax_t) 0x2e69U << 28 | 0x78b763bU)
+ << 28 | 0x65f88c0U)
+ << 28 | 0x6c6857aU)
+ << 28 | 0x124b353U),
+ UINTMAX_MAX / 2267)
+P (2, 64,
+ (((((uintmax_t) 0x7e40U << 28 | 0x4f6dc75U)
+ << 28 | 0xca11d38U)
+ << 28 | 0xc040fcbU)
+ << 28 | 0xa630f75U),
+ UINTMAX_MAX / 2269)
+P (4, 66,
+ (((((uintmax_t) 0xa706U << 28 | 0x6b72173U)
+ << 28 | 0x37865d0U)
+ << 28 | 0x78bc4fbU)
+ << 28 | 0xd533b21U),
+ UINTMAX_MAX / 2273)
+P (8, 60,
+ (((((uintmax_t) 0x1165U << 28 | 0x5853800U)
+ << 28 | 0xe5d99deU)
+ << 28 | 0x8e15c5dU)
+ << 28 | 0xd354f59U),
+ UINTMAX_MAX / 2281)
+P (6, 60,
+ (((((uintmax_t) 0xad0dU << 28 | 0xfdfc31bU)
+ << 28 | 0x33610caU)
+ << 28 | 0x61d53d7U)
+ << 28 | 0x414260fU),
+ UINTMAX_MAX / 2287)
+P (6, 58,
+ (((((uintmax_t) 0x65b5U << 28 | 0x32cc4f0U)
+ << 28 | 0xb46abb5U)
+ << 28 | 0x6bf5ba8U)
+ << 28 | 0xeae635dU),
+ UINTMAX_MAX / 2293)
+P (4, 60,
+ (((((uintmax_t) 0xcdbcU << 28 | 0x7622fecU)
+ << 28 | 0x6285844U)
+ << 28 | 0xa72cb0fU)
+ << 28 | 0xb6e3949U),
+ UINTMAX_MAX / 2297)
+P (12, 62,
+ (((((uintmax_t) 0x37c4U << 28 | 0x92cae49U)
+ << 28 | 0xd6fa587U)
+ << 28 | 0x9839a71U)
+ << 28 | 0x4f45bcdU),
+ UINTMAX_MAX / 2309)
+P (2, 66,
+ (((((uintmax_t) 0xc031U << 28 | 0xa083283U)
+ << 28 | 0x60ed802U)
+ << 28 | 0xa8994fdU)
+ << 28 | 0xe5314b7U),
+ UINTMAX_MAX / 2311)
+P (22, 48,
+ (((((uintmax_t) 0xc841U << 28 | 0xd685a6aU)
+ << 28 | 0xe081eb9U)
+ << 28 | 0x71920cfU)
+ << 28 | 0x2b90135U),
+ UINTMAX_MAX / 2333)
+P (6, 44,
+ (((((uintmax_t) 0xc4c9U << 28 | 0xd2b0364U)
+ << 28 | 0x9549a8aU)
+ << 28 | 0x8fd0b7dU)
+ << 28 | 0xf9a6e8bU),
+ UINTMAX_MAX / 2339)
+P (2, 48,
+ (((((uintmax_t) 0xe3c9U << 28 | 0x5290213U)
+ << 28 | 0xe7112b3U)
+ << 28 | 0x1f9a84cU)
+ << 28 | 0x1c6eaadU),
+ UINTMAX_MAX / 2341)
+P (6, 46,
+ (((((uintmax_t) 0xf02fU << 28 | 0x1ede4bbU)
+ << 28 | 0x2c64c92U)
+ << 28 | 0x293b028U)
+ << 28 | 0x23c6d83U),
+ UINTMAX_MAX / 2347)
+P (4, 48,
+ (((((uintmax_t) 0x83f9U << 28 | 0x7773bffU)
+ << 28 | 0x907f2eeU)
+ << 28 | 0xe77ff20U)
+ << 28 | 0xfe5ddcfU),
+ UINTMAX_MAX / 2351)
+P (6, 54,
+ (((((uintmax_t) 0xd472U << 28 | 0x42b02b7U)
+ << 28 | 0x1ef460eU)
+ << 28 | 0x1ea0f6cU)
+ << 28 | 0x496c11dU),
+ UINTMAX_MAX / 2357)
+P (14, 46,
+ (((((uintmax_t) 0xd905U << 28 | 0xb8f4727U)
+ << 28 | 0x318f0fdU)
+ << 28 | 0xf2d3d6fU)
+ << 28 | 0x88ccb6bU),
+ UINTMAX_MAX / 2371)
+P (6, 46,
+ (((((uintmax_t) 0xf2c0U << 28 | 0xc7e3914U)
+ << 28 | 0x920a1faU)
+ << 28 | 0x9d74a34U)
+ << 28 | 0x57738f9U),
+ UINTMAX_MAX / 2377)
+P (4, 56,
+ (((((uintmax_t) 0x6c7cU << 28 | 0x4a67008U)
+ << 28 | 0x99f72efU)
+ << 28 | 0xc3ca3dbU)
+ << 28 | 0x71a5785U),
+ UINTMAX_MAX / 2381)
+P (2, 58,
+ (((((uintmax_t) 0x7e55U << 28 | 0xba2c0b9U)
+ << 28 | 0xa289b8eU)
+ << 28 | 0x2071718U)
+ << 28 | 0xd0d6dafU),
+ UINTMAX_MAX / 2383)
+P (6, 58,
+ (((((uintmax_t) 0xbf46U << 28 | 0xd4d0be4U)
+ << 28 | 0xff091bcU)
+ << 28 | 0x0fdbfebU)
+ << 28 | 0x6cfabfdU),
+ UINTMAX_MAX / 2389)
+P (4, 66,
+ (((((uintmax_t) 0x1908U << 28 | 0x738977bU)
+ << 28 | 0x58af71eU)
+ << 28 | 0xeab613eU)
+ << 28 | 0x5e5aee9U),
+ UINTMAX_MAX / 2393)
+P (6, 68,
+ (((((uintmax_t) 0x6a48U << 28 | 0xc6e8d7fU)
+ << 28 | 0xbbb472dU)
+ << 28 | 0x2388e90U)
+ << 28 | 0xe9e929fU),
+ UINTMAX_MAX / 2399)
+P (12, 62,
+ (((((uintmax_t) 0x9f7bU << 28 | 0x7cc2f24U)
+ << 28 | 0xd82eb81U)
+ << 28 | 0xdbafba5U)
+ << 28 | 0x88ddb43U),
+ UINTMAX_MAX / 2411)
+P (6, 60,
+ (((((uintmax_t) 0x57ceU << 28 | 0x01e8101U)
+ << 28 | 0x96b8152U)
+ << 28 | 0xeebc51cU)
+ << 28 | 0x4799791U),
+ UINTMAX_MAX / 2417)
+P (6, 80,
+ (((((uintmax_t) 0x22c2U << 28 | 0x9d6cb7dU)
+ << 28 | 0x695651cU)
+ << 28 | 0x6bc4693U)
+ << 28 | 0xb45a047U),
+ UINTMAX_MAX / 2423)
+P (14, 84,
+ (((((uintmax_t) 0x366aU << 28 | 0x190050aU)
+ << 28 | 0xd1e2606U)
+ << 28 | 0xeee0974U)
+ << 28 | 0x498874dU),
+ UINTMAX_MAX / 2437)
+P (4, 90,
+ (((((uintmax_t) 0x7708U << 28 | 0x7eb0665U)
+ << 28 | 0xba929d8U)
+ << 28 | 0x5b7377aU)
+ << 28 | 0x9953cb9U),
+ UINTMAX_MAX / 2441)
+P (6, 92,
+ (((((uintmax_t) 0x8f53U << 28 | 0x96f6b06U)
+ << 28 | 0x2c2614bU)
+ << 28 | 0x6df412dU)
+ << 28 | 0x4caf56fU),
+ UINTMAX_MAX / 2447)
+P (12, 84,
+ (((((uintmax_t) 0x0c2eU << 28 | 0x394250fU)
+ << 28 | 0xedad56bU)
+ << 28 | 0x8afbbb4U)
+ << 28 | 0xa053493U),
+ UINTMAX_MAX / 2459)
+P (8, 82,
+ (((((uintmax_t) 0x78afU << 28 | 0x29d1b7fU)
+ << 28 | 0xbd965ccU)
+ << 28 | 0x5299c96U)
+ << 28 | 0xac7720bU),
+ UINTMAX_MAX / 2467)
+P (6, 78,
+ (((((uintmax_t) 0x1287U << 28 | 0x9bcb69bU)
+ << 28 | 0x11e89adU)
+ << 28 | 0xce84b5cU)
+ << 28 | 0x710aa99U),
+ UINTMAX_MAX / 2473)
+P (4, 80,
+ (((((uintmax_t) 0x92c2U << 28 | 0x17c54bfU)
+ << 28 | 0x67de19dU)
+ << 28 | 0x673f5aaU)
+ << 28 | 0x3804225U),
+ UINTMAX_MAX / 2477)
+P (26, 76,
+ (((((uintmax_t) 0xd46eU << 28 | 0x0ce30e3U)
+ << 28 | 0x76f2ce6U)
+ << 28 | 0x541268eU)
+ << 28 | 0xfbce7f7U),
+ UINTMAX_MAX / 2503)
+P (18, 70,
+ (((((uintmax_t) 0xa49bU << 28 | 0x91ec4ccU)
+ << 28 | 0x5004dfcU)
+ << 28 | 0xf41e76cU)
+ << 28 | 0xf5be669U),
+ UINTMAX_MAX / 2521)
+P (10, 62,
+ (((((uintmax_t) 0x6098U << 28 | 0x1f8eb77U)
+ << 28 | 0xa7cd05cU)
+ << 28 | 0x3eb5dc3U)
+ << 28 | 0x1c383cbU),
+ UINTMAX_MAX / 2531)
+P (8, 70,
+ (((((uintmax_t) 0x62e9U << 28 | 0x505bf44U)
+ << 28 | 0xdd6a930U)
+ << 28 | 0x1832d11U)
+ << 28 | 0xd8ad6c3U),
+ UINTMAX_MAX / 2539)
+P (4, 74,
+ (((((uintmax_t) 0xb3cbU << 28 | 0x3fecabfU)
+ << 28 | 0x119df2eU)
+ << 28 | 0x9c0942fU)
+ << 28 | 0x1ce450fU),
+ UINTMAX_MAX / 2543)
+P (6, 72,
+ (((((uintmax_t) 0xef3aU << 28 | 0x59c92a1U)
+ << 28 | 0x4b05b97U)
+ << 28 | 0xf3f2be3U)
+ << 28 | 0x7a39a5dU),
+ UINTMAX_MAX / 2549)
+P (2, 82,
+ (((((uintmax_t) 0xe69cU << 28 | 0x5983c36U)
+ << 28 | 0x30c57e8U)
+ << 28 | 0xb7d8a96U)
+ << 28 | 0x54187c7U),
+ UINTMAX_MAX / 2551)
+P (6, 90,
+ (((((uintmax_t) 0x437aU << 28 | 0xa4cb09bU)
+ << 28 | 0x61d08b5U)
+ << 28 | 0xd024d7dU)
+ << 28 | 0xa5b1b55U),
+ UINTMAX_MAX / 2557)
+P (22, 78,
+ (((((uintmax_t) 0x1b65U << 28 | 0x8bdca98U)
+ << 28 | 0xaabb9b8U)
+ << 28 | 0xba9d6e7U)
+ << 28 | 0xae3501bU),
+ UINTMAX_MAX / 2579)
+P (12, 68,
+ (((((uintmax_t) 0x3ea4U << 28 | 0x3624f3dU)
+ << 28 | 0x8dfb0f5U)
+ << 28 | 0x0865f71U)
+ << 28 | 0xb90f1dfU),
+ UINTMAX_MAX / 2591)
+P (2, 70,
+ (((((uintmax_t) 0x2d05U << 28 | 0x08fbf3cU)
+ << 28 | 0x1ffcd73U)
+ << 28 | 0x9c16828U)
+ << 28 | 0x47df9e1U),
+ UINTMAX_MAX / 2593)
+P (16, 62,
+ (((((uintmax_t) 0xc716U << 28 | 0xdcc634cU)
+ << 28 | 0xa218ec4U)
+ << 28 | 0x70a4d84U)
+ << 28 | 0x2b90ed1U),
+ UINTMAX_MAX / 2609)
+P (8, 60,
+ (((((uintmax_t) 0xe30bU << 28 | 0x71f669dU)
+ << 28 | 0x7e49c1fU)
+ << 28 | 0xb1be116U)
+ << 28 | 0x98cc409U),
+ UINTMAX_MAX / 2617)
+P (4, 62,
+ (((((uintmax_t) 0xa624U << 28 | 0x238d871U)
+ << 28 | 0x4cde4d8U)
+ << 28 | 0xd5512a7U)
+ << 28 | 0xcd35d15U),
+ UINTMAX_MAX / 2621)
+P (12, 54,
+ (((((uintmax_t) 0x6488U << 28 | 0x81e55c1U)
+ << 28 | 0x30e7ca5U)
+ << 28 | 0x4968217U)
+ << 28 | 0x23e07f9U),
+ UINTMAX_MAX / 2633)
+P (14, 42,
+ (((((uintmax_t) 0x8513U << 28 | 0xd3830beU)
+ << 28 | 0x54ea0bcU)
+ << 28 | 0xc8c6d7aU)
+ << 28 | 0xbaa8167U),
+ UINTMAX_MAX / 2647)
+P (10, 36,
+ (((((uintmax_t) 0x49b5U << 28 | 0x0a4f32fU)
+ << 28 | 0x800c552U)
+ << 28 | 0xc396c95U)
+ << 28 | 0xeb619a1U),
+ UINTMAX_MAX / 2657)
+P (2, 40,
+ (((((uintmax_t) 0xa1f0U << 28 | 0x049f0c9U)
+ << 28 | 0xcbd166eU)
+ << 28 | 0xb7e3808U)
+ << 28 | 0x78ec74bU),
+ UINTMAX_MAX / 2659)
+P (4, 44,
+ (((((uintmax_t) 0x25f8U << 28 | 0xe2df380U)
+ << 28 | 0xb892e3dU)
+ << 28 | 0x5513b50U)
+ << 28 | 0x4537157U),
+ UINTMAX_MAX / 2663)
+P (8, 40,
+ (((((uintmax_t) 0x1654U << 28 | 0xeb02967U)
+ << 28 | 0x9b8e231U)
+ << 28 | 0x4391f88U)
+ << 28 | 0x62e948fU),
+ UINTMAX_MAX / 2671)
+P (6, 36,
+ (((((uintmax_t) 0x304aU << 28 | 0xf935d6eU)
+ << 28 | 0x11c97dcU)
+ << 28 | 0x0b17cfcU)
+ << 28 | 0xd81f5ddU),
+ UINTMAX_MAX / 2677)
+P (6, 36,
+ (((((uintmax_t) 0xef7eU << 28 | 0x3c1c9feU)
+ << 28 | 0xaa07d2fU)
+ << 28 | 0x6bea3ecU)
+ << 28 | 0x89044b3U),
+ UINTMAX_MAX / 2683)
+P (4, 42,
+ (((((uintmax_t) 0xd02cU << 28 | 0x34f8dabU)
+ << 28 | 0xf7ff3ceU)
+ << 28 | 0x13a0586U)
+ << 28 | 0x9f1b57fU),
+ UINTMAX_MAX / 2687)
+P (2, 42,
+ (((((uintmax_t) 0xca7fU << 28 | 0x00185f3U)
+ << 28 | 0x3e2ad75U)
+ << 28 | 0x93474e8U)
+ << 28 | 0xace3581U),
+ UINTMAX_MAX / 2689)
+P (4, 48,
+ (((((uintmax_t) 0x613fU << 28 | 0x67e6e76U)
+ << 28 | 0x10ebc07U)
+ << 28 | 0xfc32929U)
+ << 28 | 0x5a05e4dU),
+ UINTMAX_MAX / 2693)
+P (6, 50,
+ (((((uintmax_t) 0x91e1U << 28 | 0x1433fa4U)
+ << 28 | 0xf1ad7b0U)
+ << 28 | 0x5377cbaU)
+ << 28 | 0x4908d23U),
+ UINTMAX_MAX / 2699)
+P (8, 46,
+ (((((uintmax_t) 0x99c5U << 28 | 0x2d7ced2U)
+ << 28 | 0xe3e9ae7U)
+ << 28 | 0xb2131a6U)
+ << 28 | 0x28aa39bU),
+ UINTMAX_MAX / 2707)
+P (4, 56,
+ (((((uintmax_t) 0xe699U << 28 | 0x2a662c6U)
+ << 28 | 0x1d45f90U)
+ << 28 | 0x31dbed7U)
+ << 28 | 0xde01527U),
+ UINTMAX_MAX / 2711)
+P (2, 64,
+ (((((uintmax_t) 0x86efU << 28 | 0x7ca673aU)
+ << 28 | 0xf9ad876U)
+ << 28 | 0x844b1c6U)
+ << 28 | 0x70aa9a9U),
+ UINTMAX_MAX / 2713)
+P (6, 70,
+ (((((uintmax_t) 0xb29bU << 28 | 0x59ea585U)
+ << 28 | 0x098266aU)
+ << 28 | 0x03f4533U)
+ << 28 | 0xb08915fU),
+ UINTMAX_MAX / 2719)
+P (10, 62,
+ (((((uintmax_t) 0x2d67U << 28 | 0x181bc45U)
+ << 28 | 0x6ad8b1dU)
+ << 28 | 0xbca579dU)
+ << 28 | 0xb0a3999U),
+ UINTMAX_MAX / 2729)
+P (2, 66,
+ (((((uintmax_t) 0xffa0U << 28 | 0x02ffe80U)
+ << 28 | 0x0bffa00U)
+ << 28 | 0x2ffe800U)
+ << 28 | 0xbffa003U),
+ UINTMAX_MAX / 2731)
+P (10, 60,
+ (((((uintmax_t) 0xef00U << 28 | 0x778c303U)
+ << 28 | 0x1503a47U)
+ << 28 | 0x8ab1a3eU)
+ << 28 | 0x936139dU),
+ UINTMAX_MAX / 2741)
+P (8, 54,
+ (((((uintmax_t) 0xd453U << 28 | 0x113a63aU)
+ << 28 | 0x4bcdb66U)
+ << 28 | 0xe722bc4U)
+ << 28 | 0xc5cc095U),
+ UINTMAX_MAX / 2749)
+P (4, 66,
+ (((((uintmax_t) 0x01c4U << 28 | 0x4cfeca8U)
+ << 28 | 0x7f35a7aU)
+ << 28 | 0x8f63c71U)
+ << 28 | 0x7278541U),
+ UINTMAX_MAX / 2753)
+P (14, 66,
+ (((((uintmax_t) 0x3887U << 28 | 0x72a189cU)
+ << 28 | 0x2c09fdfU)
+ << 28 | 0x6eee24dU)
+ << 28 | 0x292bc2fU),
+ UINTMAX_MAX / 2767)
+P (10, 60,
+ (((((uintmax_t) 0x835dU << 28 | 0x625cbd2U)
+ << 28 | 0xa50339fU)
+ << 28 | 0xc20d172U)
+ << 28 | 0x37dd569U),
+ UINTMAX_MAX / 2777)
+P (12, 54,
+ (((((uintmax_t) 0x8052U << 28 | 0x3e3ba9bU)
+ << 28 | 0x7da8ccdU)
+ << 28 | 0xf993235U)
+ << 28 | 0x6bda2edU),
+ UINTMAX_MAX / 2789)
+P (2, 60,
+ (((((uintmax_t) 0xced6U << 28 | 0x1518ac7U)
+ << 28 | 0x0a2e697U)
+ << 28 | 0xb5e332eU)
+ << 28 | 0x80f68d7U),
+ UINTMAX_MAX / 2791)
+P (6, 60,
+ (((((uintmax_t) 0x42d0U << 28 | 0x7f67b31U)
+ << 28 | 0xe1cbd46U)
+ << 28 | 0xeee26fdU)
+ << 28 | 0x875e2e5U),
+ UINTMAX_MAX / 2797)
+P (4, 60,
+ (((((uintmax_t) 0xa787U << 28 | 0x5b7cc16U)
+ << 28 | 0x4cf4935U)
+ << 28 | 0x48a8e65U)
+ << 28 | 0x157a611U),
+ UINTMAX_MAX / 2801)
+P (2, 76,
+ (((((uintmax_t) 0x69abU << 28 | 0x6d816a6U)
+ << 28 | 0x6791ac2U)
+ << 28 | 0x88d03beU)
+ << 28 | 0x9b71e3bU),
+ UINTMAX_MAX / 2803)
+P (16, 68,
+ (((((uintmax_t) 0xace8U << 28 | 0x1dc954bU)
+ << 28 | 0xa58d081U)
+ << 28 | 0x51186dbU)
+ << 28 | 0x38937abU),
+ UINTMAX_MAX / 2819)
+P (14, 64,
+ (((((uintmax_t) 0x7c3fU << 28 | 0xfa377bbU)
+ << 28 | 0x52dd078U)
+ << 28 | 0x00b9108U)
+ << 28 | 0x95a45f1U),
+ UINTMAX_MAX / 2833)
+P (4, 66,
+ (((((uintmax_t) 0x1f0aU << 28 | 0x8ec0eccU)
+ << 28 | 0x79a36aeU)
+ << 28 | 0xe0b0241U)
+ << 28 | 0x82eec3dU),
+ UINTMAX_MAX / 2837)
+P (6, 66,
+ (((((uintmax_t) 0x609eU << 28 | 0x7b00a15U)
+ << 28 | 0xca83496U)
+ << 28 | 0x323eda1U)
+ << 28 | 0x73b5713U),
+ UINTMAX_MAX / 2843)
+P (8, 66,
+ (((((uintmax_t) 0x7362U << 28 | 0x52ca08cU)
+ << 28 | 0xcba690eU)
+ << 28 | 0xd0dbd03U)
+ << 28 | 0xae77c8bU),
+ UINTMAX_MAX / 2851)
+P (6, 70,
+ (((((uintmax_t) 0xa370U << 28 | 0x463ffa4U)
+ << 28 | 0x3eb91f7U)
+ << 28 | 0x3800b78U)
+ << 28 | 0x28dc119U),
+ UINTMAX_MAX / 2857)
+P (4, 78,
+ (((((uintmax_t) 0x4586U << 28 | 0x7cbbe80U)
+ << 28 | 0x502c61bU)
+ << 28 | 0x61715ecU)
+ << 28 | 0x22b7ca5U),
+ UINTMAX_MAX / 2861)
+P (18, 74,
+ (((((uintmax_t) 0x508fU << 28 | 0xb1c027dU)
+ << 28 | 0x607a5a8U)
+ << 28 | 0x533a991U)
+ << 28 | 0xead64bfU),
+ UINTMAX_MAX / 2879)
+P (8, 70,
+ (((((uintmax_t) 0xbc40U << 28 | 0xe8adccbU)
+ << 28 | 0xf2e057fU)
+ << 28 | 0x6c7290eU)
+ << 28 | 0x46c2e77U),
+ UINTMAX_MAX / 2887)
+P (10, 66,
+ (((((uintmax_t) 0x73d9U << 28 | 0x78cc4e1U)
+ << 28 | 0xdde3e63U)
+ << 28 | 0x25e8d90U)
+ << 28 | 0x7b01db1U),
+ UINTMAX_MAX / 2897)
+P (6, 66,
+ (((((uintmax_t) 0x1c21U << 28 | 0x8299f86U)
+ << 28 | 0xa86ec28U)
+ << 28 | 0x909f701U)
+ << 28 | 0x52a1067U),
+ UINTMAX_MAX / 2903)
+P (6, 62,
+ (((((uintmax_t) 0x5da2U << 28 | 0x8a842e1U)
+ << 28 | 0xd0a78eaU)
+ << 28 | 0x7077af0U)
+ << 28 | 0x997a0f5U),
+ UINTMAX_MAX / 2909)
+P (8, 82,
+ (((((uintmax_t) 0x21f6U << 28 | 0xb281b61U)
+ << 28 | 0xadae07eU)
+ << 28 | 0x605cad1U)
+ << 28 | 0x0c32e6dU),
+ UINTMAX_MAX / 2917)
+P (10, 74,
+ (((((uintmax_t) 0x2e9dU << 28 | 0xf4a1477U)
+ << 28 | 0x4c2dd47U)
+ << 28 | 0x1b33570U)
+ << 28 | 0x635b38fU),
+ UINTMAX_MAX / 2927)
+P (12, 72,
+ (((((uintmax_t) 0x891aU << 28 | 0x37ebcabU)
+ << 28 | 0x12ba3abU)
+ << 28 | 0x559fa99U)
+ << 28 | 0x7a61bb3U),
+ UINTMAX_MAX / 2939)
+P (14, 66,
+ (((((uintmax_t) 0xccadU << 28 | 0xbad1f78U)
+ << 28 | 0x11569adU)
+ << 28 | 0x4bdae56U)
+ << 28 | 0x2bddab9U),
+ UINTMAX_MAX / 2953)
+P (4, 66,
+ (((((uintmax_t) 0xb335U << 28 | 0x6a92a82U)
+ << 28 | 0x08d4a05U)
+ << 28 | 0x5e1b2f2U)
+ << 28 | 0xed62f45U),
+ UINTMAX_MAX / 2957)
+P (6, 74,
+ (((((uintmax_t) 0x58bbU << 28 | 0x5017802U)
+ << 28 | 0x12d5c03U)
+ << 28 | 0xcd328b1U)
+ << 28 | 0xa2dca9bU),
+ UINTMAX_MAX / 2963)
+P (6, 72,
+ (((((uintmax_t) 0x7501U << 28 | 0xa365242U)
+ << 28 | 0x0c3e6d2U)
+ << 28 | 0x8f4e087U)
+ << 28 | 0x33218a9U),
+ UINTMAX_MAX / 2969)
+P (2, 78,
+ (((((uintmax_t) 0x18a4U << 28 | 0xbffa7c4U)
+ << 28 | 0x073ceb6U)
+ << 28 | 0x800b077U)
+ << 28 | 0xf186293U),
+ UINTMAX_MAX / 2971)
+P (28, 62,
+ (((((uintmax_t) 0xa633U << 28 | 0x0bdd838U)
+ << 28 | 0xae2356fU)
+ << 28 | 0xbd138c3U)
+ << 28 | 0xfd9c207U),
+ UINTMAX_MAX / 2999)
+P (2, 66,
+ (((((uintmax_t) 0xe2ffU << 28 | 0x0fc80a3U)
+ << 28 | 0xc9104b1U)
+ << 28 | 0x17ccd12U)
+ << 28 | 0xae88a89U),
+ UINTMAX_MAX / 3001)
+P (10, 68,
+ (((((uintmax_t) 0x1183U << 28 | 0xb2cce6eU)
+ << 28 | 0xb2b722fU)
+ << 28 | 0x1a1a044U)
+ << 28 | 0x046bcebU),
+ UINTMAX_MAX / 3011)
+P (8, 64,
+ (((((uintmax_t) 0xbfb9U << 28 | 0x73118d8U)
+ << 28 | 0x666f154U)
+ << 28 | 0x8aba0b0U)
+ << 28 | 0x60541e3U),
+ UINTMAX_MAX / 3019)
+P (4, 66,
+ (((((uintmax_t) 0xa152U << 28 | 0xbc81bc6U)
+ << 28 | 0xc0e90cfU)
+ << 28 | 0x4e808ceU)
+ << 28 | 0xa111b2fU),
+ UINTMAX_MAX / 3023)
+P (14, 72,
+ (((((uintmax_t) 0xaebdU << 28 | 0xa92d6f2U)
+ << 28 | 0xef39bdbU)
+ << 28 | 0xec1b4faU)
+ << 28 | 0x855a475U),
+ UINTMAX_MAX / 3037)
+P (4, 78,
+ (((((uintmax_t) 0x890cU << 28 | 0xb62bf18U)
+ << 28 | 0x542ece3U)
+ << 28 | 0xf794eb6U)
+ << 28 | 0x00d7821U),
+ UINTMAX_MAX / 3041)
+P (8, 72,
+ (((((uintmax_t) 0x699fU << 28 | 0xc793db6U)
+ << 28 | 0x480a134U)
+ << 28 | 0xfae0d9aU)
+ << 28 | 0x11f7c59U),
+ UINTMAX_MAX / 3049)
+P (12, 76,
+ (((((uintmax_t) 0x14fdU << 28 | 0xe8c0055U)
+ << 28 | 0xa3d62f0U)
+ << 28 | 0x06b0ccbU)
+ << 28 | 0xbac085dU),
+ UINTMAX_MAX / 3061)
+P (6, 96,
+ (((((uintmax_t) 0xa99cU << 28 | 0x01006adU)
+ << 28 | 0x72efe3fU)
+ << 28 | 0x45076dcU)
+ << 28 | 0x3114733U),
+ UINTMAX_MAX / 3067)
+P (12, 88,
+ (((((uintmax_t) 0x59e0U << 28 | 0xe778f96U)
+ << 28 | 0xe7f8aeeU)
+ << 28 | 0xf49bfa5U)
+ << 28 | 0x8a1a1b7U),
+ UINTMAX_MAX / 3079)
+P (4, 86,
+ (((((uintmax_t) 0x6edaU << 28 | 0x627b0f3U)
+ << 28 | 0x2121a12U)
+ << 28 | 0xc4218beU)
+ << 28 | 0xa691fa3U),
+ UINTMAX_MAX / 3083)
+P (6, 92,
+ (((((uintmax_t) 0xf88aU << 28 | 0x9107df8U)
+ << 28 | 0x35b3ebcU)
+ << 28 | 0x7504e3bU)
+ << 28 | 0xd5e64f1U),
+ UINTMAX_MAX / 3089)
+P (20, 78,
+ (((((uintmax_t) 0xcddaU << 28 | 0x9dee60fU)
+ << 28 | 0xf969a4eU)
+ << 28 | 0xe21c292U)
+ << 28 | 0xbb92fadU),
+ UINTMAX_MAX / 3109)
+P (10, 72,
+ (((((uintmax_t) 0x4ff1U << 28 | 0x8de982bU)
+ << 28 | 0xfe5bc34U)
+ << 28 | 0x338b732U)
+ << 28 | 0x7a4bacfU),
+ UINTMAX_MAX / 3119)
+P (2, 82,
+ (((((uintmax_t) 0x8fdfU << 28 | 0x30a40ccU)
+ << 28 | 0xbc0053fU)
+ << 28 | 0xe5c0833U)
+ << 28 | 0xd6fccd1U),
+ UINTMAX_MAX / 3121)
+P (16, 72,
+ (((((uintmax_t) 0x0ca6U << 28 | 0x26ae799U)
+ << 28 | 0x8087cb1U)
+ << 28 | 0xe707435U)
+ << 28 | 0x35203c1U),
+ UINTMAX_MAX / 3137)
+P (26, 54,
+ (((((uintmax_t) 0x3a1cU << 28 | 0xa6ba507U)
+ << 28 | 0x340aaefU)
+ << 28 | 0xbb5dcdfU)
+ << 28 | 0xb4e43d3U),
+ UINTMAX_MAX / 3163)
+P (4, 54,
+ (((((uintmax_t) 0x340eU << 28 | 0x8ccfe76U)
+ << 28 | 0xd34c8caU)
+ << 28 | 0x68467caU)
+ << 28 | 0x5394f9fU),
+ UINTMAX_MAX / 3167)
+P (2, 60,
+ (((((uintmax_t) 0xe94cU << 28 | 0xd3010cdU)
+ << 28 | 0x82c978cU)
+ << 28 | 0x51c0814U)
+ << 28 | 0x08b97a1U),
+ UINTMAX_MAX / 3169)
+P (12, 70,
+ (((((uintmax_t) 0x69d4U << 28 | 0x0f213ccU)
+ << 28 | 0x2c1a132U)
+ << 28 | 0x75a899dU)
+ << 28 | 0xfa5dd65U),
+ UINTMAX_MAX / 3181)
+P (6, 66,
+ (((((uintmax_t) 0xcc45U << 28 | 0x14a4d46U)
+ << 28 | 0x1ff849eU)
+ << 28 | 0x674cb62U)
+ << 28 | 0xe1b78bbU),
+ UINTMAX_MAX / 3187)
+P (4, 66,
+ (((((uintmax_t) 0x6351U << 28 | 0xbffadd9U)
+ << 28 | 0x54cc6a3U)
+ << 28 | 0x7ff5bb2U)
+ << 28 | 0xa998d47U),
+ UINTMAX_MAX / 3191)
+P (12, 56,
+ (((((uintmax_t) 0x77baU << 28 | 0x4e2aae1U)
+ << 28 | 0x3a95c79U)
+ << 28 | 0x2a999dbU)
+ << 28 | 0x131a22bU),
+ UINTMAX_MAX / 3203)
+P (6, 62,
+ (((((uintmax_t) 0x8d1fU << 28 | 0x82e96c6U)
+ << 28 | 0xa42da1bU)
+ << 28 | 0x48841bcU)
+ << 28 | 0x30d29b9U),
+ UINTMAX_MAX / 3209)
+P (8, 82,
+ (((((uintmax_t) 0x0ef5U << 28 | 0xe4c8da5U)
+ << 28 | 0xc2683f0U)
+ << 28 | 0x6721d20U)
+ << 28 | 0x11d3471U),
+ UINTMAX_MAX / 3217)
+P (4, 80,
+ (((((uintmax_t) 0x9ccfU << 28 | 0x98fef77U)
+ << 28 | 0xeed5293U)
+ << 28 | 0xfd2386dU)
+ << 28 | 0xff85ebdU),
+ UINTMAX_MAX / 3221)
+P (8, 78,
+ (((((uintmax_t) 0x9c06U << 28 | 0xa8de9f5U)
+ << 28 | 0xb182e4cU)
+ << 28 | 0xe72f54cU)
+ << 28 | 0x07ed9b5U),
+ UINTMAX_MAX / 3229)
+P (22, 62,
+ (((((uintmax_t) 0xdcf5U << 28 | 0x5e929f8U)
+ << 28 | 0x99148d6U)
+ << 28 | 0xd0fd3e7U)
+ << 28 | 0x1dd827bU),
+ UINTMAX_MAX / 3251)
+P (2, 66,
+ (((((uintmax_t) 0xcebcU << 28 | 0x664e397U)
+ << 28 | 0x2d17d85U)
+ << 28 | 0x6405fb1U)
+ << 28 | 0xeed819dU),
+ UINTMAX_MAX / 3253)
+P (4, 66,
+ (((((uintmax_t) 0x921eU << 28 | 0x0671f84U)
+ << 28 | 0xc15b18eU)
+ << 28 | 0xa8aceb7U)
+ << 28 | 0xc443989U),
+ UINTMAX_MAX / 3257)
+P (2, 70,
+ (((((uintmax_t) 0x4223U << 28 | 0xfa07b2bU)
+ << 28 | 0x4830634U)
+ << 28 | 0xa13026fU)
+ << 28 | 0x62e5873U),
+ UINTMAX_MAX / 3259)
+P (12, 60,
+ (((((uintmax_t) 0x4ceeU << 28 | 0xdc3bcb1U)
+ << 28 | 0x806e31eU)
+ << 28 | 0xea0208eU)
+ << 28 | 0xc0af4f7U),
+ UINTMAX_MAX / 3271)
+P (28, 44,
+ (((((uintmax_t) 0x969eU << 28 | 0xc4a2f55U)
+ << 28 | 0xe703563U)
+ << 28 | 0x679853cU)
+ << 28 | 0xea598cbU),
+ UINTMAX_MAX / 3299)
+P (2, 46,
+ (((((uintmax_t) 0xd886U << 28 | 0xa176bb8U)
+ << 28 | 0x577a9c3U)
+ << 28 | 0x0b3ebd6U)
+ << 28 | 0x1f2d0edU),
+ UINTMAX_MAX / 3301)
+P (6, 52,
+ (((((uintmax_t) 0xaaecU << 28 | 0xb97a633U)
+ << 28 | 0xdda117eU)
+ << 28 | 0xb9037bcU)
+ << 28 | 0x7f43bc3U),
+ UINTMAX_MAX / 3307)
+P (6, 48,
+ (((((uintmax_t) 0x1a59U << 28 | 0x7af0505U)
+ << 28 | 0xcb9c2a5U)
+ << 28 | 0x83e6f6cU)
+ << 28 | 0xe016411U),
+ UINTMAX_MAX / 3313)
+P (6, 52,
+ (((((uintmax_t) 0x76c8U << 28 | 0x6358785U)
+ << 28 | 0x34d5cf1U)
+ << 28 | 0x938d895U)
+ << 28 | 0xf1a74c7U),
+ UINTMAX_MAX / 3319)
+P (4, 50,
+ (((((uintmax_t) 0xb781U << 28 | 0xa8058bfU)
+ << 28 | 0xac2e880U)
+ << 28 | 0xcf1491cU)
+ << 28 | 0x1e81e33U),
+ UINTMAX_MAX / 3323)
+P (6, 60,
+ (((((uintmax_t) 0xc604U << 28 | 0x75cf8d9U)
+ << 28 | 0x2a5f33cU)
+ << 28 | 0x0f12886U)
+ << 28 | 0xba8f301U),
+ UINTMAX_MAX / 3329)
+P (2, 60,
+ (((((uintmax_t) 0x9d2aU << 28 | 0x8009d65U)
+ << 28 | 0x861c20eU)
+ << 28 | 0x4b786e0U)
+ << 28 | 0xdfcc5abU),
+ UINTMAX_MAX / 3331)
+P (12, 64,
+ (((((uintmax_t) 0x4053U << 28 | 0x511894dU)
+ << 28 | 0xe137367U)
+ << 28 | 0x2684c93U)
+ << 28 | 0xf2d41efU),
+ UINTMAX_MAX / 3343)
+P (4, 66,
+ (((((uintmax_t) 0xcbfdU << 28 | 0x3f19edcU)
+ << 28 | 0xbd615e0U)
+ << 28 | 0x0757badU)
+ << 28 | 0xb35c51bU),
+ UINTMAX_MAX / 3347)
+P (12, 74,
+ (((((uintmax_t) 0x303eU << 28 | 0x309fbe2U)
+ << 28 | 0x6de63d6U)
+ << 28 | 0xd84afe6U)
+ << 28 | 0x6472edfU),
+ UINTMAX_MAX / 3359)
+P (2, 88,
+ (((((uintmax_t) 0x1123U << 28 | 0x440491fU)
+ << 28 | 0x00137fbU)
+ << 28 | 0xbc0eedcU)
+ << 28 | 0xbbfb6e1U),
+ UINTMAX_MAX / 3361)
+P (10, 86,
+ (((((uintmax_t) 0x5ae7U << 28 | 0x03df7f3U)
+ << 28 | 0x3de4825U)
+ << 28 | 0x0f43aa0U)
+ << 28 | 0x8a84983U),
+ UINTMAX_MAX / 3371)
+P (2, 88,
+ (((((uintmax_t) 0x11fcU << 28 | 0xcff5122U)
+ << 28 | 0x3abe804U)
+ << 28 | 0x400e927U)
+ << 28 | 0xb1acaa5U),
+ UINTMAX_MAX / 3373)
+P (16, 74,
+ (((((uintmax_t) 0x80cbU << 28 | 0x0c29652U)
+ << 28 | 0x5643d56U)
+ << 28 | 0x572be34U)
+ << 28 | 0xb9d3215U),
+ UINTMAX_MAX / 3389)
+P (2, 76,
+ (((((uintmax_t) 0xc57dU << 28 | 0xffd958dU)
+ << 28 | 0xb3c0487U)
+ << 28 | 0x964ef77U)
+ << 28 | 0x81c62bfU),
+ UINTMAX_MAX / 3391)
+P (16, 62,
+ (((((uintmax_t) 0x9c4aU << 28 | 0x3cdce8eU)
+ << 28 | 0xea48e29U)
+ << 28 | 0xed84051U)
+ << 28 | 0xc06e9afU),
+ UINTMAX_MAX / 3407)
+P (6, 78,
+ (((((uintmax_t) 0x0cf9U << 28 | 0xeca5ea8U)
+ << 28 | 0xc4381b0U)
+ << 28 | 0x0acd11eU)
+ << 28 | 0xd3f87fdU),
+ UINTMAX_MAX / 3413)
+P (20, 66,
+ (((((uintmax_t) 0xfe48U << 28 | 0xee074edU)
+ << 28 | 0x223a506U)
+ << 28 | 0x3078817U)
+ << 28 | 0x44152d9U),
+ UINTMAX_MAX / 3433)
+P (16, 62,
+ (((((uintmax_t) 0xa409U << 28 | 0x342e04eU)
+ << 28 | 0x6187e7aU)
+ << 28 | 0x786459fU)
+ << 28 | 0x5c1ccc9U),
+ UINTMAX_MAX / 3449)
+P (8, 60,
+ (((((uintmax_t) 0xe4e5U << 28 | 0x902e357U)
+ << 28 | 0x74c7f13U)
+ << 28 | 0x08125d7U)
+ << 28 | 0x4563281U),
+ UINTMAX_MAX / 3457)
+P (4, 66,
+ (((((uintmax_t) 0x7588U << 28 | 0x9dfe5f6U)
+ << 28 | 0xae1e539U)
+ << 28 | 0x5310a48U)
+ << 28 | 0x0b3e34dU),
+ UINTMAX_MAX / 3461)
+P (2, 66,
+ (((((uintmax_t) 0x3784U << 28 | 0x6603fdeU)
+ << 28 | 0xe1c3d35U)
+ << 28 | 0x985baa8U)
+ << 28 | 0xb202837U),
+ UINTMAX_MAX / 3463)
+P (4, 66,
+ (((((uintmax_t) 0xb450U << 28 | 0xa1daeecU)
+ << 28 | 0xba5ea96U)
+ << 28 | 0x304a6e0U)
+ << 28 | 0x52b3223U),
+ UINTMAX_MAX / 3467)
+P (2, 70,
+ (((((uintmax_t) 0xfbf0U << 28 | 0xf20d6e5U)
+ << 28 | 0x363d8bdU)
+ << 28 | 0x8265fc9U)
+ << 28 | 0xaf8fd45U),
+ UINTMAX_MAX / 3469)
+P (22, 50,
+ (((((uintmax_t) 0xeeb1U << 28 | 0x9bd44b6U)
+ << 28 | 0x27bee1bU)
+ << 28 | 0x6d0b383U)
+ << 28 | 0xec58e0bU),
+ UINTMAX_MAX / 3491)
+P (8, 48,
+ (((((uintmax_t) 0x7386U << 28 | 0x8c53fdfU)
+ << 28 | 0x38fe9c2U)
+ << 28 | 0x1a7c3b6U)
+ << 28 | 0x8b28503U),
+ UINTMAX_MAX / 3499)
+P (12, 46,
+ (((((uintmax_t) 0xba13U << 28 | 0x65219cfU)
+ << 28 | 0xbb2b623U)
+ << 28 | 0x6fa180fU)
+ << 28 | 0xbfd6007U),
+ UINTMAX_MAX / 3511)
+P (6, 42,
+ (((((uintmax_t) 0xe16dU << 28 | 0xb1887adU)
+ << 28 | 0xe4c6dc4U)
+ << 28 | 0x2accd44U)
+ << 28 | 0x0ed9595U),
+ UINTMAX_MAX / 3517)
+P (10, 44,
+ (((((uintmax_t) 0x4cf0U << 28 | 0x1ab5e49U)
+ << 28 | 0x04b7c7aU)
+ << 28 | 0xcf71282U)
+ << 28 | 0x36ba3f7U),
+ UINTMAX_MAX / 3527)
+P (2, 52,
+ (((((uintmax_t) 0x6374U << 28 | 0x6df92e5U)
+ << 28 | 0xaad5ff9U)
+ << 28 | 0x09367a9U)
+ << 28 | 0x87b9c79U),
+ UINTMAX_MAX / 3529)
+P (4, 50,
+ (((((uintmax_t) 0x3fc3U << 28 | 0xb6abbabU)
+ << 28 | 0xa82dcb6U)
+ << 28 | 0x4efb252U)
+ << 28 | 0xbfba705U),
+ UINTMAX_MAX / 3533)
+P (6, 54,
+ (((((uintmax_t) 0x82b6U << 28 | 0x6ef6f53U)
+ << 28 | 0x8c8ce98U)
+ << 28 | 0x0d4f5a7U)
+ << 28 | 0xe4cd25bU),
+ UINTMAX_MAX / 3539)
+P (2, 66,
+ (((((uintmax_t) 0x20c0U << 28 | 0x04a07f3U)
+ << 28 | 0xdab1fe1U)
+ << 28 | 0xecc4ef2U)
+ << 28 | 0x7b0c37dU),
+ UINTMAX_MAX / 3541)
+P (6, 66,
+ (((((uintmax_t) 0xfb2aU << 28 | 0x13c68cbU)
+ << 28 | 0xd185291U)
+ << 28 | 0x11aebb8U)
+ << 28 | 0x1d72653U),
+ UINTMAX_MAX / 3547)
+P (10, 60,
+ (((((uintmax_t) 0x8908U << 28 | 0x46d1b90U)
+ << 28 | 0x96d9c89U)
+ << 28 | 0x51f985cU)
+ << 28 | 0xb2c67edU),
+ UINTMAX_MAX / 3557)
+P (2, 64,
+ (((((uintmax_t) 0xf7baU << 28 | 0x5f17856U)
+ << 28 | 0xe44e8c4U)
+ << 28 | 0x39d4fc5U)
+ << 28 | 0x4e0b5d7U),
+ UINTMAX_MAX / 3559)
+P (12, 60,
+ (((((uintmax_t) 0x811cU << 28 | 0x75db26eU)
+ << 28 | 0xd4a0de8U)
+ << 28 | 0x57bf318U)
+ << 28 | 0x96d533bU),
+ UINTMAX_MAX / 3571)
+P (10, 56,
+ (((((uintmax_t) 0x6fbcU << 28 | 0x83d31afU)
+ << 28 | 0x37d51b6U)
+ << 28 | 0x14bb4cbU)
+ << 28 | 0x5023755U),
+ UINTMAX_MAX / 3581)
+P (2, 60,
+ (((((uintmax_t) 0xdf7dU << 28 | 0xad8c657U)
+ << 28 | 0x4f61193U)
+ << 28 | 0x8a89e54U)
+ << 28 | 0x73bf1ffU),
+ UINTMAX_MAX / 3583)
+P (10, 66,
+ (((((uintmax_t) 0x48beU << 28 | 0xf2f618aU)
+ << 28 | 0x70259eaU)
+ << 28 | 0xc481acaU)
+ << 28 | 0x34de039U),
+ UINTMAX_MAX / 3593)
+P (14, 64,
+ (((((uintmax_t) 0x5c8cU << 28 | 0x86d951dU)
+ << 28 | 0x4fd8414U)
+ << 28 | 0xb961badU)
+ << 28 | 0xf4809a7U),
+ UINTMAX_MAX / 3607)
+P (6, 60,
+ (((((uintmax_t) 0x3e35U << 28 | 0xfddfd4eU)
+ << 28 | 0xb85d876U)
+ << 28 | 0x784fecbU)
+ << 28 | 0xa352435U),
+ UINTMAX_MAX / 3613)
+P (4, 60,
+ (((((uintmax_t) 0x3f46U << 28 | 0x480d05dU)
+ << 28 | 0xfde06efU)
+ << 28 | 0xa689bb5U)
+ << 28 | 0x8aef5e1U),
+ UINTMAX_MAX / 3617)
+P (6, 68,
+ (((((uintmax_t) 0xa7f5U << 28 | 0x427da20U)
+ << 28 | 0x5cb49b2U)
+ << 28 | 0xb2c4db9U)
+ << 28 | 0xc3a8197U),
+ UINTMAX_MAX / 3623)
+P (8, 66,
+ (((((uintmax_t) 0x1756U << 28 | 0x39f44bdU)
+ << 28 | 0xcbf7d25U)
+ << 28 | 0x03bc992U)
+ << 28 | 0x279f8cfU),
+ UINTMAX_MAX / 3631)
+P (6, 64,
+ (((((uintmax_t) 0xf7b1U << 28 | 0xba9905dU)
+ << 28 | 0x798f3d2U)
+ << 28 | 0xab9aec5U)
+ << 28 | 0xca1541dU),
+ UINTMAX_MAX / 3637)
+P (6, 66,
+ (((((uintmax_t) 0x0ec1U << 28 | 0xcf3b3d3U)
+ << 28 | 0x4ea253eU)
+ << 28 | 0x78ba146U)
+ << 28 | 0x0f99af3U),
+ UINTMAX_MAX / 3643)
+P (16, 60,
+ (((((uintmax_t) 0x694bU << 28 | 0xe954ddeU)
+ << 28 | 0xd63b30aU)
+ << 28 | 0x0142657U)
+ << 28 | 0x2cfcb63U),
+ UINTMAX_MAX / 3659)
+P (12, 56,
+ (((((uintmax_t) 0xd628U << 28 | 0x9612455U)
+ << 28 | 0x13dfebeU)
+ << 28 | 0xa857968U)
+ << 28 | 0xf3cbd67U),
+ UINTMAX_MAX / 3671)
+P (2, 60,
+ (((((uintmax_t) 0x63bcU << 28 | 0xcfb30dbU)
+ << 28 | 0xaffca78U)
+ << 28 | 0xdb213eeU)
+ << 28 | 0xfe659e9U),
+ UINTMAX_MAX / 3673)
+P (4, 62,
+ (((((uintmax_t) 0x7cf8U << 28 | 0xb08fb32U)
+ << 28 | 0x328ba96U)
+ << 28 | 0x3e8541aU)
+ << 28 | 0x74d35f5U),
+ UINTMAX_MAX / 3677)
+P (14, 70,
+ (((((uintmax_t) 0x99e7U << 28 | 0xb98849cU)
+ << 28 | 0xbfb489eU)
+ << 28 | 0x22d1527U)
+ << 28 | 0x76f2e43U),
+ UINTMAX_MAX / 3691)
+P (6, 70,
+ (((((uintmax_t) 0x1767U << 28 | 0xa90721dU)
+ << 28 | 0xc686c05U)
+ << 28 | 0xd10d39dU)
+ << 28 | 0x1e1f291U),
+ UINTMAX_MAX / 3697)
+P (4, 68,
+ (((((uintmax_t) 0x817cU << 28 | 0xb6e3047U)
+ << 28 | 0xeff3d37U)
+ << 28 | 0x4468dccU)
+ << 28 | 0xaced1ddU),
+ UINTMAX_MAX / 3701)
+P (8, 70,
+ (((((uintmax_t) 0x916dU << 28 | 0x896be15U)
+ << 28 | 0xac3548dU)
+ << 28 | 0x145c7d1U)
+ << 28 | 0x10c5ad5U),
+ UINTMAX_MAX / 3709)
+P (10, 74,
+ (((((uintmax_t) 0x50e1U << 28 | 0xc7f7bd5U)
+ << 28 | 0xdf5f332U)
+ << 28 | 0x51a39f5U)
+ << 28 | 0xacb5737U),
+ UINTMAX_MAX / 3719)
+P (8, 70,
+ (((((uintmax_t) 0xc1e7U << 28 | 0xf58f36eU)
+ << 28 | 0x1b567a6U)
+ << 28 | 0x6e50171U)
+ << 28 | 0x443506fU),
+ UINTMAX_MAX / 3727)
+P (6, 70,
+ (((((uintmax_t) 0xe72cU << 28 | 0xc7f8de3U)
+ << 28 | 0x0f6e112U)
+ << 28 | 0x4f69ad9U)
+ << 28 | 0x1dd4cbdU),
+ UINTMAX_MAX / 3733)
+P (6, 82,
+ (((((uintmax_t) 0x81e2U << 28 | 0x02e029aU)
+ << 28 | 0x0d485ecU)
+ << 28 | 0x24f8f2aU)
+ << 28 | 0x61a2793U),
+ UINTMAX_MAX / 3739)
+P (22, 62,
+ (((((uintmax_t) 0x66a5U << 28 | 0x216bc00U)
+ << 28 | 0x45b35b4U)
+ << 28 | 0x72148e6U)
+ << 28 | 0x56b7a51U),
+ UINTMAX_MAX / 3761)
+P (6, 66,
+ (((((uintmax_t) 0x3442U << 28 | 0x9973536U)
+ << 28 | 0x29ba00aU)
+ << 28 | 0xdf9570eU)
+ << 28 | 0x1142f07U),
+ UINTMAX_MAX / 3767)
+P (2, 78,
+ (((((uintmax_t) 0xc952U << 28 | 0x869f58aU)
+ << 28 | 0x38eb489U)
+ << 28 | 0xbf33b06U)
+ << 28 | 0x5119789U),
+ UINTMAX_MAX / 3769)
+P (10, 72,
+ (((((uintmax_t) 0xc462U << 28 | 0xe78b7b7U)
+ << 28 | 0xebf2b8fU)
+ << 28 | 0x0149803U)
+ << 28 | 0xcb291ebU),
+ UINTMAX_MAX / 3779)
+P (14, 60,
+ (((((uintmax_t) 0xa7b8U << 28 | 0x300e09dU)
+ << 28 | 0xa9be883U)
+ << 28 | 0x34b63afU)
+ << 28 | 0xd190a31U),
+ UINTMAX_MAX / 3793)
+P (4, 66,
+ (((((uintmax_t) 0x678fU << 28 | 0x45607afU)
+ << 28 | 0xa226292U)
+ << 28 | 0x0908d50U)
+ << 28 | 0xd6aba7dU),
+ UINTMAX_MAX / 3797)
+P (6, 74,
+ (((((uintmax_t) 0x3066U << 28 | 0x51b882dU)
+ << 28 | 0xc63e557U)
+ << 28 | 0xd8b018cU)
+ << 28 | 0x5a33d53U),
+ UINTMAX_MAX / 3803)
+P (18, 60,
+ (((((uintmax_t) 0x03f3U << 28 | 0xf0b9737U)
+ << 28 | 0x01682eaU)
+ << 28 | 0x1773092U)
+ << 28 | 0xdc27ee5U),
+ UINTMAX_MAX / 3821)
+P (2, 66,
+ (((((uintmax_t) 0x824fU << 28 | 0x6b12f35U)
+ << 28 | 0x80e76caU)
+ << 28 | 0xe5f38b7U)
+ << 28 | 0xbf2e00fU),
+ UINTMAX_MAX / 3823)
+P (10, 74,
+ (((((uintmax_t) 0xba8aU << 28 | 0x4084821U)
+ << 28 | 0xa94f02bU)
+ << 28 | 0xd02df34U)
+ << 28 | 0xf695349U),
+ UINTMAX_MAX / 3833)
+P (14, 64,
+ (((((uintmax_t) 0x1f9bU << 28 | 0xea70762U)
+ << 28 | 0xf3f48ddU)
+ << 28 | 0xfecd5beU)
+ << 28 | 0x62e2eb7U),
+ UINTMAX_MAX / 3847)
+P (4, 66,
+ (((((uintmax_t) 0xb7acU << 28 | 0x817ee73U)
+ << 28 | 0x45119dbU)
+ << 28 | 0xf849ebeU)
+ << 28 | 0xc96c4a3U),
+ UINTMAX_MAX / 3851)
+P (2, 66,
+ (((((uintmax_t) 0xf8c2U << 28 | 0x0286585U)
+ << 28 | 0xe14dcdaU)
+ << 28 | 0x31d4d01U)
+ << 28 | 0x87357c5U),
+ UINTMAX_MAX / 3853)
+P (10, 60,
+ (((((uintmax_t) 0x7727U << 28 | 0x2a58ab3U)
+ << 28 | 0xdb276e3U)
+ << 28 | 0x4e21cc2U)
+ << 28 | 0xd5418a7U),
+ UINTMAX_MAX / 3863)
+P (14, 52,
+ (((((uintmax_t) 0x61caU << 28 | 0x83edc68U)
+ << 28 | 0xdb38968U)
+ << 28 | 0xca5137aU)
+ << 28 | 0x9e574adU),
+ UINTMAX_MAX / 3877)
+P (4, 50,
+ (((((uintmax_t) 0x74f3U << 28 | 0x8879e60U)
+ << 28 | 0x2c53a3eU)
+ << 28 | 0xaa0d0f8U)
+ << 28 | 0x04bfd19U),
+ UINTMAX_MAX / 3881)
+P (8, 54,
+ (((((uintmax_t) 0x1c6fU << 28 | 0xe7c6996U)
+ << 28 | 0x04df055U)
+ << 28 | 0x4fb753cU)
+ << 28 | 0xc20e9d1U),
+ UINTMAX_MAX / 3889)
+P (18, 40,
+ (((((uintmax_t) 0x374dU << 28 | 0x408a62aU)
+ << 28 | 0xda31679U)
+ << 28 | 0x7afcca1U)
+ << 28 | 0x300756bU),
+ UINTMAX_MAX / 3907)
+P (4, 56,
+ (((((uintmax_t) 0xc8e2U << 28 | 0xbdb1524U)
+ << 28 | 0x758f48bU)
+ << 28 | 0x8d950b5U)
+ << 28 | 0x2eeea77U),
+ UINTMAX_MAX / 3911)
+P (6, 72,
+ (((((uintmax_t) 0xbfc1U << 28 | 0x421336fU)
+ << 28 | 0x6ea5dfbU)
+ << 28 | 0x6cd166aU)
+ << 28 | 0xcabc185U),
+ UINTMAX_MAX / 3917)
+P (2, 82,
+ (((((uintmax_t) 0x7daeU << 28 | 0x58b5560U)
+ << 28 | 0x7b5454eU)
+ << 28 | 0xb6c5ed9U)
+ << 28 | 0x437a7afU),
+ UINTMAX_MAX / 3919)
+P (4, 80,
+ (((((uintmax_t) 0xf1f8U << 28 | 0x4cbdc3dU)
+ << 28 | 0x573f5d1U)
+ << 28 | 0xeddbd91U)
+ << 28 | 0xb790cdbU),
+ UINTMAX_MAX / 3923)
+P (6, 78,
+ (((((uintmax_t) 0xa6abU << 28 | 0x9f4ec63U)
+ << 28 | 0x4c6db93U)
+ << 28 | 0xd714ea4U)
+ << 28 | 0xd8948e9U),
+ UINTMAX_MAX / 3929)
+P (2, 82,
+ (((((uintmax_t) 0x8198U << 28 | 0x742e1b7U)
+ << 28 | 0xb68a73cU)
+ << 28 | 0xa13ed81U)
+ << 28 | 0x45188d3U),
+ UINTMAX_MAX / 3931)
+P (12, 76,
+ (((((uintmax_t) 0x5ab3U << 28 | 0x52c7947U)
+ << 28 | 0xbe09382U)
+ << 28 | 0x9086016U)
+ << 28 | 0xda89c57U),
+ UINTMAX_MAX / 3943)
+P (4, 74,
+ (((((uintmax_t) 0xec69U << 28 | 0x9751239U)
+ << 28 | 0xb9900d7U)
+ << 28 | 0xda1f432U)
+ << 28 | 0x124a543U),
+ UINTMAX_MAX / 3947)
+P (20, 60,
+ (((((uintmax_t) 0xa4e1U << 28 | 0x58dc715U)
+ << 28 | 0x1a22b7eU)
+ << 28 | 0xad55816U)
+ << 28 | 0x32fb07fU),
+ UINTMAX_MAX / 3967)
+P (22, 60,
+ (((((uintmax_t) 0x4cd1U << 28 | 0xba8fa08U)
+ << 28 | 0x1613a35U)
+ << 28 | 0x443837fU)
+ << 28 | 0x63ec3bdU),
+ UINTMAX_MAX / 3989)
+P (12, 50,
+ (((((uintmax_t) 0x48afU << 28 | 0x92759a4U)
+ << 28 | 0x3f37589U)
+ << 28 | 0xe2b200eU)
+ << 28 | 0x5519461U),
+ UINTMAX_MAX / 4001)
+P (2, 54,
+ (((((uintmax_t) 0x9293U << 28 | 0xfc29b25U)
+ << 28 | 0xcbafee9U)
+ << 28 | 0xae44f0bU)
+ << 28 | 0x7289c0bU),
+ UINTMAX_MAX / 4003)
+P (4, 66,
+ (((((uintmax_t) 0xc02cU << 28 | 0xfa2fa91U)
+ << 28 | 0xcaf9094U)
+ << 28 | 0x387a277U)
+ << 28 | 0xb9fa817U),
+ UINTMAX_MAX / 4007)
+P (6, 66,
+ (((((uintmax_t) 0x15c0U << 28 | 0xd8627efU)
+ << 28 | 0x28a2cc8U)
+ << 28 | 0x4f1a58aU)
+ << 28 | 0xbfc2c25U),
+ UINTMAX_MAX / 4013)
+P (6, 72,
+ (((((uintmax_t) 0x1143U << 28 | 0x12ca6e3U)
+ << 28 | 0x2522b71U)
+ << 28 | 0x101d8e3U)
+ << 28 | 0xc83377bU),
+ UINTMAX_MAX / 4019)
+P (2, 72,
+ (((((uintmax_t) 0xcfadU << 28 | 0x7d3b04aU)
+ << 28 | 0x5c91ec0U)
+ << 28 | 0x24abe5cU)
+ << 28 | 0x50ba69dU),
+ UINTMAX_MAX / 4021)
+P (6, 72,
+ (((((uintmax_t) 0x9d46U << 28 | 0x3eef687U)
+ << 28 | 0x26d7815U)
+ << 28 | 0xde4eb36U)
+ << 28 | 0x5a65d73U),
+ UINTMAX_MAX / 4027)
+P (22, 62,
+ (((((uintmax_t) 0xe98eU << 28 | 0x1152e37U)
+ << 28 | 0xc3cf309U)
+ << 28 | 0xed28a76U)
+ << 28 | 0xbcca931U),
+ UINTMAX_MAX / 4049)
+P (2, 76,
+ (((((uintmax_t) 0xa002U << 28 | 0x05affefU)
+ << 28 | 0xd280081U)
+ << 28 | 0x6bffbf4U)
+ << 28 | 0xa00205bU),
+ UINTMAX_MAX / 4051)
+P (6, 72,
+ (((((uintmax_t) 0x1d87U << 28 | 0xfb74ed0U)
+ << 28 | 0x1b4271fU)
+ << 28 | 0x5c71543U)
+ << 28 | 0xd558069U),
+ UINTMAX_MAX / 4057)
+P (16, 60,
+ (((((uintmax_t) 0x7051U << 28 | 0x751852fU)
+ << 28 | 0x74370f2U)
+ << 28 | 0x5c64d0eU)
+ << 28 | 0xc53b859U),
+ UINTMAX_MAX / 4073)
+P (6, 60,
+ (((((uintmax_t) 0x88e1U << 28 | 0x6f867eeU)
+ << 28 | 0x6d54296U)
+ << 28 | 0xc02c2efU)
+ << 28 | 0x1e0ff0fU),
+ UINTMAX_MAX / 4079)
+P (12, 62,
+ (((((uintmax_t) 0xe8e8U << 28 | 0xc8bebb9U)
+ << 28 | 0xaa05219U)
+ << 28 | 0xa804816U)
+ << 28 | 0x870a333U),
+ UINTMAX_MAX / 4091)
+P (2, 64,
+ (((((uintmax_t) 0xc605U << 28 | 0x20f62e2U)
+ << 28 | 0x8a79f6dU)
+ << 28 | 0xe49add0U)
+ << 28 | 0x971c555U),
+ UINTMAX_MAX / 4093)
+P (6, 60,
+ (((((uintmax_t) 0x46c2U << 28 | 0xbb7cd89U)
+ << 28 | 0x7639d52U)
+ << 28 | 0x8087e68U)
+ << 28 | 0x4c71aabU),
+ UINTMAX_MAX / 4099)
+P (12, 66,
+ (((((uintmax_t) 0xfc73U << 28 | 0x53e15cbU)
+ << 28 | 0x9127ea9U)
+ << 28 | 0x4152c26U)
+ << 28 | 0x9bcdeefU),
+ UINTMAX_MAX / 4111)
+P (16, 74,
+ (((((uintmax_t) 0x3d78U << 28 | 0xe5c2d68U)
+ << 28 | 0x0673803U)
+ << 28 | 0x79450a3U)
+ << 28 | 0xc2b6bdfU),
+ UINTMAX_MAX / 4127)
+P (2, 82,
+ (((((uintmax_t) 0x4a66U << 28 | 0x8c7e3baU)
+ << 28 | 0x4fbb8d2U)
+ << 28 | 0xcd38bafU)
+ << 28 | 0xe5373e1U),
+ UINTMAX_MAX / 4129)
+P (4, 84,
+ (((((uintmax_t) 0x616eU << 28 | 0xb008eb5U)
+ << 28 | 0xfb2b2c2U)
+ << 28 | 0x9df2beaU)
+ << 28 | 0x71d8badU),
+ UINTMAX_MAX / 4133)
+P (6, 80,
+ (((((uintmax_t) 0x12bdU << 28 | 0xa25ba9aU)
+ << 28 | 0x80c5ec1U)
+ << 28 | 0x5862775U)
+ << 28 | 0xf302e83U),
+ UINTMAX_MAX / 4139)
+P (14, 76,
+ (((((uintmax_t) 0x98dfU << 28 | 0x642b264U)
+ << 28 | 0x7a0d310U)
+ << 28 | 0x16af2feU)
+ << 28 | 0x55ede09U),
+ UINTMAX_MAX / 4153)
+P (4, 74,
+ (((((uintmax_t) 0xcc45U << 28 | 0x381a1c7U)
+ << 28 | 0x3878b3dU)
+ << 28 | 0x26dbd9dU)
+ << 28 | 0x1910715U),
+ UINTMAX_MAX / 4157)
+P (2, 82,
+ (((((uintmax_t) 0x1344U << 28 | 0x23b36d8U)
+ << 28 | 0x0d4ba62U)
+ << 28 | 0x1dab2dfU)
+ << 28 | 0xaf3dfbfU),
+ UINTMAX_MAX / 4159)
+P (18, 66,
+ (((((uintmax_t) 0xd614U << 28 | 0x399c587U)
+ << 28 | 0xff827b6U)
+ << 28 | 0xf1d7ac2U)
+ << 28 | 0x87338b1U),
+ UINTMAX_MAX / 4177)
+P (24, 52,
+ (((((uintmax_t) 0x5c04U << 28 | 0x24ce751U)
+ << 28 | 0xf620c8dU)
+ << 28 | 0x9e9f0c3U)
+ << 28 | 0xf9e7fd9U),
+ UINTMAX_MAX / 4201)
+P (10, 48,
+ (((((uintmax_t) 0xa4cfU << 28 | 0x6d1fac5U)
+ << 28 | 0x93e8e60U)
+ << 28 | 0xa93f876U)
+ << 28 | 0x2e914bbU),
+ UINTMAX_MAX / 4211)
+P (6, 44,
+ (((((uintmax_t) 0x16b4U << 28 | 0x4c7d8a9U)
+ << 28 | 0x7e358b1U)
+ << 28 | 0x4371f24U)
+ << 28 | 0x7c159c9U),
+ UINTMAX_MAX / 4217)
+P (2, 52,
+ (((((uintmax_t) 0x7d2dU << 28 | 0xb0c132cU)
+ << 28 | 0x9926a6dU)
+ << 28 | 0xd3b4844U)
+ << 28 | 0x71d4eb3U),
+ UINTMAX_MAX / 4219)
+P (10, 44,
+ (((((uintmax_t) 0xc12aU << 28 | 0x5044c45U)
+ << 28 | 0xfa4f4cdU)
+ << 28 | 0x172f470U)
+ << 28 | 0x1c1684dU),
+ UINTMAX_MAX / 4229)
+P (2, 52,
+ (((((uintmax_t) 0x3b6aU << 28 | 0xabf51beU)
+ << 28 | 0x4a6c103U)
+ << 28 | 0x72e686eU)
+ << 28 | 0xd8bb537U),
+ UINTMAX_MAX / 4231)
+P (10, 48,
+ (((((uintmax_t) 0x0b0bU << 28 | 0xe43ba38U)
+ << 28 | 0x61105bcU)
+ << 28 | 0x07f7ca6U)
+ << 28 | 0x5c5b071U),
+ UINTMAX_MAX / 4241)
+P (2, 54,
+ (((((uintmax_t) 0x1841U << 28 | 0x2954499U)
+ << 28 | 0xbb949abU)
+ << 28 | 0x2b6170cU)
+ << 28 | 0x3f78d9bU),
+ UINTMAX_MAX / 4243)
+P (10, 74,
+ (((((uintmax_t) 0x67e4U << 28 | 0x8d552c3U)
+ << 28 | 0xde0d1f3U)
+ << 28 | 0xd74f461U)
+ << 28 | 0xfe6f5b5U),
+ UINTMAX_MAX / 4253)
+P (6, 78,
+ (((((uintmax_t) 0xa030U << 28 | 0x161ea7bU)
+ << 28 | 0x38ae8dbU)
+ << 28 | 0xc13f4b3U)
+ << 28 | 0x1f3230bU),
+ UINTMAX_MAX / 4259)
+P (2, 78,
+ (((((uintmax_t) 0xf2a9U << 28 | 0x8b90bb7U)
+ << 28 | 0x2eec1d1U)
+ << 28 | 0x420716eU)
+ << 28 | 0x3f1572dU),
+ UINTMAX_MAX / 4261)
+P (10, 78,
+ (((((uintmax_t) 0xa0c1U << 28 | 0xb926e68U)
+ << 28 | 0x69f8ed5U)
+ << 28 | 0xbe2fd4dU)
+ << 28 | 0x805464fU),
+ UINTMAX_MAX / 4271)
+P (2, 84,
+ (((((uintmax_t) 0xc4edU << 28 | 0x7ccb753U)
+ << 28 | 0xef76ec6U)
+ << 28 | 0x8b97c13U)
+ << 28 | 0x6943851U),
+ UINTMAX_MAX / 4273)
+P (10, 80,
+ (((((uintmax_t) 0x5305U << 28 | 0xada2a32U)
+ << 28 | 0xce35e9eU)
+ << 28 | 0x27918afU)
+ << 28 | 0x7cfb473U),
+ UINTMAX_MAX / 4283)
+P (6, 84,
+ (((((uintmax_t) 0x0b38U << 28 | 0xa4bcd9fU)
+ << 28 | 0xaa0cc5eU)
+ << 28 | 0xc8ab6c3U)
+ << 28 | 0x6ac7f41U),
+ UINTMAX_MAX / 4289)
+P (8, 94,
+ (((((uintmax_t) 0xc8f3U << 28 | 0x8c6bf3dU)
+ << 28 | 0x8adf696U)
+ << 28 | 0x4076331U)
+ << 28 | 0xdd90979U),
+ UINTMAX_MAX / 4297)
+P (30, 70,
+ (((((uintmax_t) 0x3ed4U << 28 | 0xdeb0e60U)
+ << 28 | 0x6fb3530U)
+ << 28 | 0x198eff7U)
+ << 28 | 0x7b002d7U),
+ UINTMAX_MAX / 4327)
+P (10, 72,
+ (((((uintmax_t) 0xe304U << 28 | 0x8b8a2eaU)
+ << 28 | 0x19da93aU)
+ << 28 | 0xf7cb958U)
+ << 28 | 0x3ece011U),
+ UINTMAX_MAX / 4337)
+P (2, 82,
+ (((((uintmax_t) 0x63b5U << 28 | 0xa908ca7U)
+ << 28 | 0xcb9bb34U)
+ << 28 | 0xce06f64U)
+ << 28 | 0x3d9883bU),
+ UINTMAX_MAX / 4339)
+P (10, 74,
+ (((((uintmax_t) 0xd58fU << 28 | 0x1940b11U)
+ << 28 | 0x0300879U)
+ << 28 | 0xf767e52U)
+ << 28 | 0x8708c55U),
+ UINTMAX_MAX / 4349)
+P (8, 84,
+ (((((uintmax_t) 0xa973U << 28 | 0xcee1454U)
+ << 28 | 0x5fa7a18U)
+ << 28 | 0x5332d2eU)
+ << 28 | 0xf2313cdU),
+ UINTMAX_MAX / 4357)
+P (6, 84,
+ (((((uintmax_t) 0xc544U << 28 | 0x1f37189U)
+ << 28 | 0x5bd3a43U)
+ << 28 | 0xb611b84U)
+ << 28 | 0xc8332a3U),
+ UINTMAX_MAX / 4363)
+P (10, 78,
+ (((((uintmax_t) 0xc201U << 28 | 0x49b4038U)
+ << 28 | 0x330c3c2U)
+ << 28 | 0xe215e4fU)
+ << 28 | 0x43bb63dU),
+ UINTMAX_MAX / 4373)
+P (18, 66,
+ (((((uintmax_t) 0xfcf7U << 28 | 0xe56a2a8U)
+ << 28 | 0xf4dd4f9U)
+ << 28 | 0x4b9dd22U)
+ << 28 | 0xce44e97U),
+ UINTMAX_MAX / 4391)
+P (6, 66,
+ (((((uintmax_t) 0xc364U << 28 | 0x3300862U)
+ << 28 | 0x47258d8U)
+ << 28 | 0x95834a1U)
+ << 28 | 0xdb166a5U),
+ UINTMAX_MAX / 4397)
+P (12, 72,
+ (((((uintmax_t) 0xa5f1U << 28 | 0xb76bd2bU)
+ << 28 | 0x5f83834U)
+ << 28 | 0x7d2f16dU)
+ << 28 | 0x19b8d09U),
+ UINTMAX_MAX / 4409)
+P (12, 62,
+ (((((uintmax_t) 0x9b97U << 28 | 0x89df750U)
+ << 28 | 0x6e4081bU)
+ << 28 | 0x54d4dc4U)
+ << 28 | 0x5b7d98dU),
+ UINTMAX_MAX / 4421)
+P (2, 70,
+ (((((uintmax_t) 0x612dU << 28 | 0xe5f44efU)
+ << 28 | 0x2839e11U)
+ << 28 | 0x7ac30d9U)
+ << 28 | 0xa044877U),
+ UINTMAX_MAX / 4423)
+P (18, 66,
+ (((((uintmax_t) 0x9811U << 28 | 0x1015369U)
+ << 28 | 0x6e9ec0eU)
+ << 28 | 0x10b78a6U)
+ << 28 | 0x7a526e9U),
+ UINTMAX_MAX / 4441)
+P (6, 66,
+ (((((uintmax_t) 0xa197U << 28 | 0x1cf4c64U)
+ << 28 | 0x2a99792U)
+ << 28 | 0xda68a81U)
+ << 28 | 0x8688a9fU),
+ UINTMAX_MAX / 4447)
+P (4, 66,
+ (((((uintmax_t) 0x0f02U << 28 | 0xeeeb01cU)
+ << 28 | 0x870bacfU)
+ << 28 | 0x2b6c87fU)
+ << 28 | 0x741f84bU),
+ UINTMAX_MAX / 4451)
+P (6, 62,
+ (((((uintmax_t) 0x8d2eU << 28 | 0x94fe559U)
+ << 28 | 0x50d09d2U)
+ << 28 | 0x64f9bd4U)
+ << 28 | 0x1e18ed9U),
+ UINTMAX_MAX / 4457)
+P (6, 60,
+ (((((uintmax_t) 0xa84bU << 28 | 0xb74450fU)
+ << 28 | 0xe38c973U)
+ << 28 | 0x3cbeaa9U)
+ << 28 | 0x7166d8fU),
+ UINTMAX_MAX / 4463)
+P (18, 66,
+ (((((uintmax_t) 0x495aU << 28 | 0xe4dcfaaU)
+ << 28 | 0xfd8b1c9U)
+ << 28 | 0xf475b02U)
+ << 28 | 0x1d22e81U),
+ UINTMAX_MAX / 4481)
+P (2, 66,
+ (((((uintmax_t) 0x6837U << 28 | 0x46fb256U)
+ << 28 | 0x74d6073U)
+ << 28 | 0x1f76f2eU)
+ << 28 | 0xc4c852bU),
+ UINTMAX_MAX / 4483)
+P (10, 68,
+ (((((uintmax_t) 0xf6ffU << 28 | 0x5f8d222U)
+ << 28 | 0x12931daU)
+ << 28 | 0xf6f0c97U)
+ << 28 | 0x8f69945U),
+ UINTMAX_MAX / 4493)
+P (14, 60,
+ (((((uintmax_t) 0xd49aU << 28 | 0xb982b2bU)
+ << 28 | 0x1c92174U)
+ << 28 | 0x9c8ad20U)
+ << 28 | 0xc61ec93U),
+ UINTMAX_MAX / 4507)
+P (6, 70,
+ (((((uintmax_t) 0x2f4fU << 28 | 0x04983ffU)
+ << 28 | 0xc5e9e09U)
+ << 28 | 0x307ff8bU)
+ << 28 | 0xd3c1261U),
+ UINTMAX_MAX / 4513)
+P (4, 74,
+ (((((uintmax_t) 0xadefU << 28 | 0x566dd5fU)
+ << 28 | 0x282eb33U)
+ << 28 | 0x4a69fb5U)
+ << 28 | 0xa486e2dU),
+ UINTMAX_MAX / 4517)
+P (2, 78,
+ (((((uintmax_t) 0xd118U << 28 | 0x137ccc9U)
+ << 28 | 0xe647f1fU)
+ << 28 | 0x36c7bf3U)
+ << 28 | 0x1578617U),
+ UINTMAX_MAX / 4519)
+P (4, 80,
+ (((((uintmax_t) 0x01cfU << 28 | 0xa9f7f67U)
+ << 28 | 0xdc3aa31U)
+ << 28 | 0xebbcc27U)
+ << 28 | 0x9ea6103U),
+ UINTMAX_MAX / 4523)
+P (24, 74,
+ (((((uintmax_t) 0x9c1fU << 28 | 0x4da38ddU)
+ << 28 | 0x2657442U)
+ << 28 | 0xe2aad11U)
+ << 28 | 0x9f466ebU),
+ UINTMAX_MAX / 4547)
+P (2, 88,
+ (((((uintmax_t) 0x41acU << 28 | 0x994bcdcU)
+ << 28 | 0xd3d2c10U)
+ << 28 | 0x6ec05a0U)
+ << 28 | 0xab1450dU),
+ UINTMAX_MAX / 4549)
+P (12, 78,
+ (((((uintmax_t) 0x556dU << 28 | 0x480324aU)
+ << 28 | 0x6d002b1U)
+ << 28 | 0xb38db92U)
+ << 28 | 0xa99e731U),
+ UINTMAX_MAX / 4561)
+P (6, 76,
+ (((((uintmax_t) 0x9c39U << 28 | 0x2ce6456U)
+ << 28 | 0x52d9278U)
+ << 28 | 0x4ae377eU)
+ << 28 | 0x67071e7U),
+ UINTMAX_MAX / 4567)
+P (16, 66,
+ (((((uintmax_t) 0xcdc8U << 28 | 0x79fec56U)
+ << 28 | 0x781893eU)
+ << 28 | 0x9e1471bU)
+ << 28 | 0xa6671d7U),
+ UINTMAX_MAX / 4583)
+P (8, 60,
+ (((((uintmax_t) 0x375eU << 28 | 0xf621586U)
+ << 28 | 0x1b19982U)
+ << 28 | 0xc29b59dU)
+ << 28 | 0x4d73d0fU),
+ UINTMAX_MAX / 4591)
+P (6, 60,
+ (((((uintmax_t) 0x75c7U << 28 | 0xfa35597U)
+ << 28 | 0xdcce0c2U)
+ << 28 | 0x3dd0712U)
+ << 28 | 0x8b5525dU),
+ UINTMAX_MAX / 4597)
+P (6, 60,
+ (((((uintmax_t) 0x4083U << 28 | 0xb2ce1ccU)
+ << 28 | 0xf1d164dU)
+ << 28 | 0x4e5ce0eU)
+ << 28 | 0x9245133U),
+ UINTMAX_MAX / 4603)
+P (18, 52,
+ (((((uintmax_t) 0x9d9cU << 28 | 0x64622aeU)
+ << 28 | 0x10824c8U)
+ << 28 | 0xfd1057cU)
+ << 28 | 0x09f8cc5U),
+ UINTMAX_MAX / 4621)
+P (16, 42,
+ (((((uintmax_t) 0x02b4U << 28 | 0x87cfdbcU)
+ << 28 | 0x89230eaU)
+ << 28 | 0x1516e94U)
+ << 28 | 0xf394035U),
+ UINTMAX_MAX / 4637)
+P (2, 52,
+ (((((uintmax_t) 0x32e1U << 28 | 0x4328c7fU)
+ << 28 | 0xce8e0b5U)
+ << 28 | 0xe3319c5U)
+ << 28 | 0x64ee9dfU),
+ UINTMAX_MAX / 4639)
+P (4, 60,
+ (((((uintmax_t) 0xf929U << 28 | 0xbd10602U)
+ << 28 | 0x894a612U)
+ << 28 | 0x6a69f90U)
+ << 28 | 0xd822d8bU),
+ UINTMAX_MAX / 4643)
+P (6, 72,
+ (((((uintmax_t) 0xa0bcU << 28 | 0x8b6d15cU)
+ << 28 | 0x03be950U)
+ << 28 | 0x1ed6348U)
+ << 28 | 0x857aa19U),
+ UINTMAX_MAX / 4649)
+P (2, 72,
+ (((((uintmax_t) 0xf169U << 28 | 0xf4a94f1U)
+ << 28 | 0x86231deU)
+ << 28 | 0x344a324U)
+ << 28 | 0xeee1c83U),
+ UINTMAX_MAX / 4651)
+P (6, 72,
+ (((((uintmax_t) 0xafdaU << 28 | 0x2e10d23U)
+ << 28 | 0x58ab11dU)
+ << 28 | 0xd9690cbU)
+ << 28 | 0x2c406d1U),
+ UINTMAX_MAX / 4657)
+P (6, 70,
+ (((((uintmax_t) 0x70eeU << 28 | 0x0c3017bU)
+ << 28 | 0x7881908U)
+ << 28 | 0xd6c5178U)
+ << 28 | 0xd5e4387U),
+ UINTMAX_MAX / 4663)
+P (10, 78,
+ (((((uintmax_t) 0x2b47U << 28 | 0x45bd0e3U)
+ << 28 | 0x051844cU)
+ << 28 | 0xea4050aU)
+ << 28 | 0x3e8fdc1U),
+ UINTMAX_MAX / 4673)
+P (6, 80,
+ (((((uintmax_t) 0x5aa8U << 28 | 0x9fc2b8dU)
+ << 28 | 0x1a891c1U)
+ << 28 | 0x14a06acU)
+ << 28 | 0xc83f777U),
+ UINTMAX_MAX / 4679)
+P (12, 92,
+ (((((uintmax_t) 0x834dU << 28 | 0x385f9c7U)
+ << 28 | 0x5a89320U)
+ << 28 | 0xb060ebcU)
+ << 28 | 0x0ea01dbU),
+ UINTMAX_MAX / 4691)
+P (12, 84,
+ (((((uintmax_t) 0xcbb0U << 28 | 0x86fea3aU)
+ << 28 | 0x06a40feU)
+ << 28 | 0x50045acU)
+ << 28 | 0xb78c99fU),
+ UINTMAX_MAX / 4703)
+P (18, 68,
+ (((((uintmax_t) 0x4bceU << 28 | 0xc35242bU)
+ << 28 | 0x29eaa29U)
+ << 28 | 0x1a68705U)
+ << 28 | 0xb196e91U),
+ UINTMAX_MAX / 4721)
+P (2, 70,
+ (((((uintmax_t) 0x1cf1U << 28 | 0xbea1a20U)
+ << 28 | 0x324cdc1U)
+ << 28 | 0x042c724U)
+ << 28 | 0x273e2bbU),
+ UINTMAX_MAX / 4723)
+P (6, 70,
+ (((((uintmax_t) 0x530aU << 28 | 0xaa16d83U)
+ << 28 | 0x622522cU)
+ << 28 | 0xee680bbU)
+ << 28 | 0x165b7c9U),
+ UINTMAX_MAX / 4729)
+P (4, 68,
+ (((((uintmax_t) 0x6dbeU << 28 | 0xc4fd598U)
+ << 28 | 0x42343fdU)
+ << 28 | 0x2ff9f12U)
+ << 28 | 0xe0776d5U),
+ UINTMAX_MAX / 4733)
+P (18, 62,
+ (((((uintmax_t) 0x9327U << 28 | 0xd1e0357U)
+ << 28 | 0x3cba016U)
+ << 28 | 0x6a5da63U)
+ << 28 | 0xaf2cc6fU),
+ UINTMAX_MAX / 4751)
+P (8, 58,
+ (((((uintmax_t) 0xfe7eU << 28 | 0x69c1b53U)
+ << 28 | 0xa5d7dedU)
+ << 28 | 0xd16a593U)
+ << 28 | 0x0408d27U),
+ UINTMAX_MAX / 4759)
+P (24, 48,
+ (((((uintmax_t) 0xdba8U << 28 | 0x6fc17c3U)
+ << 28 | 0xa04d12aU)
+ << 28 | 0xdf30c26U)
+ << 28 | 0x528844fU),
+ UINTMAX_MAX / 4783)
+P (4, 74,
+ (((((uintmax_t) 0x4928U << 28 | 0x7ba43b4U)
+ << 28 | 0x0f9d99aU)
+ << 28 | 0x48d6572U)
+ << 28 | 0xb5eec7bU),
+ UINTMAX_MAX / 4787)
+P (2, 82,
+ (((((uintmax_t) 0xfd7cU << 28 | 0xd1c2bd5U)
+ << 28 | 0x72fbc6eU)
+ << 28 | 0x8bf2877U)
+ << 28 | 0x503cb9dU),
+ UINTMAX_MAX / 4789)
+P (4, 84,
+ (((((uintmax_t) 0x1951U << 28 | 0x21b3d5eU)
+ << 28 | 0x975e0eaU)
+ << 28 | 0x27a191aU)
+ << 28 | 0x7045389U),
+ UINTMAX_MAX / 4793)
+P (6, 90,
+ (((((uintmax_t) 0xced1U << 28 | 0x00e827bU)
+ << 28 | 0x0325b6eU)
+ << 28 | 0xb091f34U)
+ << 28 | 0xdd45d3fU),
+ UINTMAX_MAX / 4799)
+P (2, 102,
+ (((((uintmax_t) 0xe394U << 28 | 0x4a02e12U)
+ << 28 | 0x05dd8dcU)
+ << 28 | 0x8a6cabbU)
+ << 28 | 0x2937d41U),
+ UINTMAX_MAX / 4801)
+P (12, 96,
+ (((((uintmax_t) 0x3e2dU << 28 | 0xa2eb33fU)
+ << 28 | 0x746e6bcU)
+ << 28 | 0x2f04f25U)
+ << 28 | 0x4922a05U),
+ UINTMAX_MAX / 4813)
+P (4, 102,
+ (((((uintmax_t) 0xf205U << 28 | 0xd890fadU)
+ << 28 | 0x84cf441U)
+ << 28 | 0x431f4d6U)
+ << 28 | 0xeb38631U),
+ UINTMAX_MAX / 4817)
+P (14, 100,
+ (((((uintmax_t) 0x7974U << 28 | 0xa2271b8U)
+ << 28 | 0x09c017bU)
+ << 28 | 0xd717435U)
+ << 28 | 0xa08291fU),
+ UINTMAX_MAX / 4831)
+P (30, 72,
+ (((((uintmax_t) 0xf434U << 28 | 0x0837312U)
+ << 28 | 0x2b4a342U)
+ << 28 | 0x32df9c9U)
+ << 28 | 0x1fc1a55U),
+ UINTMAX_MAX / 4861)
+P (10, 66,
+ (((((uintmax_t) 0x4c78U << 28 | 0x09ab985U)
+ << 28 | 0xc13f8a4U)
+ << 28 | 0x651e1d5U)
+ << 28 | 0x382eab7U),
+ UINTMAX_MAX / 4871)
+P (6, 66,
+ (((((uintmax_t) 0x9273U << 28 | 0x60376e4U)
+ << 28 | 0x8c0bf7cU)
+ << 28 | 0xfb5409dU)
+ << 28 | 0xe4cf3c5U),
+ UINTMAX_MAX / 4877)
+P (12, 62,
+ (((((uintmax_t) 0x47a1U << 28 | 0xbf627e6U)
+ << 28 | 0x7276dcdU)
+ << 28 | 0xd636fb0U)
+ << 28 | 0x68b9929U),
+ UINTMAX_MAX / 4889)
+P (14, 54,
+ (((((uintmax_t) 0x3f55U << 28 | 0x93b5db8U)
+ << 28 | 0xe2d01eeU)
+ << 28 | 0x8f95e74U)
+ << 28 | 0x0462c97U),
+ UINTMAX_MAX / 4903)
+P (6, 58,
+ (((((uintmax_t) 0x29aaU << 28 | 0xc9d12b8U)
+ << 28 | 0xb650349U)
+ << 28 | 0x0f97b3aU)
+ << 28 | 0x758b4a5U),
+ UINTMAX_MAX / 4909)
+P (10, 50,
+ (((((uintmax_t) 0x3c51U << 28 | 0x65394caU)
+ << 28 | 0x8d3eb64U)
+ << 28 | 0x1431563U)
+ << 28 | 0xc441287U),
+ UINTMAX_MAX / 4919)
+P (12, 42,
+ (((((uintmax_t) 0xf258U << 28 | 0x91c808bU)
+ << 28 | 0x8d292b7U)
+ << 28 | 0x43dad3eU)
+ << 28 | 0xc45916bU),
+ UINTMAX_MAX / 4931)
+P (2, 54,
+ (((((uintmax_t) 0x708fU << 28 | 0xa57e92aU)
+ << 28 | 0x8098c7bU)
+ << 28 | 0x188be8fU)
+ << 28 | 0x55c878dU),
+ UINTMAX_MAX / 4933)
+P (4, 56,
+ (((((uintmax_t) 0x983dU << 28 | 0xcf2775dU)
+ << 28 | 0xcd7ead8U)
+ << 28 | 0x05648b2U)
+ << 28 | 0xca54ef9U),
+ UINTMAX_MAX / 4937)
+P (6, 56,
+ (((((uintmax_t) 0x729cU << 28 | 0xb7c09bcU)
+ << 28 | 0x91a2776U)
+ << 28 | 0xdbe6eefU)
+ << 28 | 0x60123afU),
+ UINTMAX_MAX / 4943)
+P (8, 255,
+ (((((uintmax_t) 0xe8f0U << 28 | 0x5536727U)
+ << 28 | 0xa8b8137U)
+ << 28 | 0x11525e6U)
+ << 28 | 0xa9e8867U),
+ UINTMAX_MAX / 4951)
+P (6, 255,
+ (((((uintmax_t) 0xbdf2U << 28 | 0x781fd01U)
+ << 28 | 0x3014a85U)
+ << 28 | 0xc2215cbU)
+ << 28 | 0x383d8f5U),
+ UINTMAX_MAX / 4957)
+P (10, 255,
+ (((((uintmax_t) 0x0439U << 28 | 0xee5f8e3U)
+ << 28 | 0x30656e5U)
+ << 28 | 0x8f554c8U)
+ << 28 | 0x9825857U),
+ UINTMAX_MAX / 4967)
+P (2, 255,
+ (((((uintmax_t) 0x77adU << 28 | 0xfb283c9U)
+ << 28 | 0x63b0a8fU)
+ << 28 | 0xbd3b17cU)
+ << 28 | 0x01dacd9U),
+ UINTMAX_MAX / 4969)
+P (4, 255,
+ (((((uintmax_t) 0x5d7bU << 28 | 0xe851f3fU)
+ << 28 | 0x443554cU)
+ << 28 | 0x8c39dc7U)
+ << 28 | 0xaedee65U),
+ UINTMAX_MAX / 4973)
+P (14, 255,
+ (((((uintmax_t) 0x373cU << 28 | 0x1c8a99bU)
+ << 28 | 0x1412465U)
+ << 28 | 0x3ac6ddaU)
+ << 28 | 0x86cd3b3U),
+ UINTMAX_MAX / 4987)
+P (6, 255,
+ (((((uintmax_t) 0x5b50U << 28 | 0xa687decU)
+ << 28 | 0x6a07b0dU)
+ << 28 | 0x61c6791U)
+ << 28 | 0xa9c2c81U),
+ UINTMAX_MAX / 4993)
+P (6, 255,
+ (((((uintmax_t) 0x0b44U << 28 | 0x292c4bfU)
+ << 28 | 0xef9cdb6U)
+ << 28 | 0x27a3009U)
+ << 28 | 0x0354237U),
+ UINTMAX_MAX / 4999)
+
+#undef FIRST_OMITTED_PRIME
+#define FIRST_OMITTED_PRIME 5003
diff --git a/src/printenv.c b/src/printenv.c
index 5c01f8d8..066649d3 100644
--- a/src/printenv.c
+++ b/src/printenv.c
@@ -1,5 +1,5 @@
/* printenv -- print all or part of environment
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/printf.c b/src/printf.c
index a5317864..fd795a3d 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -1,5 +1,5 @@
/* printf - format and print data
- Copyright (C) 1990-2012 Free Software Foundation, Inc.
+ Copyright (C) 1990-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/prog-fprintf.c b/src/prog-fprintf.c
index b4ae0089..e800f867 100644
--- a/src/prog-fprintf.c
+++ b/src/prog-fprintf.c
@@ -1,5 +1,5 @@
/* prog-fprintf.c - common formating output functions and definitions
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/prog-fprintf.h b/src/prog-fprintf.h
index 1d72dbe3..10282f07 100644
--- a/src/prog-fprintf.h
+++ b/src/prog-fprintf.h
@@ -1,5 +1,5 @@
/* prog-fprintf.h - common formating output functions and definitions
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/ptx.c b/src/ptx.c
index a5b22d4b..f9936732 100644
--- a/src/ptx.c
+++ b/src/ptx.c
@@ -1,5 +1,5 @@
/* Permuted index for GNU, with keywords in their context.
- Copyright (C) 1990-2012 Free Software Foundation, Inc.
+ Copyright (C) 1990-2013 Free Software Foundation, Inc.
François Pinard <pinard@iro.umontreal.ca>, 1988.
This program is free software: you can redistribute it and/or modify
@@ -1820,11 +1820,10 @@ Usage: %s [OPTION]... [INPUT]... (without -G)\n\
program_name, program_name);
fputs (_("\
Output a permuted index, including context, of the words in the input files.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-A, --auto-reference output automatically generated references\n\
-G, --traditional behave more like System V 'ptx'\n\
diff --git a/src/pwd.c b/src/pwd.c
index 23b7c53a..ea8a767e 100644
--- a/src/pwd.c
+++ b/src/pwd.c
@@ -1,5 +1,5 @@
/* pwd - print current directory
- Copyright (C) 1994-2012 Free Software Foundation, Inc.
+ Copyright (C) 1994-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/readlink.c b/src/readlink.c
index e025bf91..665a25cf 100644
--- a/src/readlink.c
+++ b/src/readlink.c
@@ -1,5 +1,5 @@
/* readlink -- display value of a symbolic link.
- Copyright (C) 2002-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -25,7 +25,6 @@
#include "canonicalize.h"
#include "error.h"
#include "areadlink.h"
-#include "quote.h"
/* The official name of this program (e.g., no 'g' prefix). */
#define PROGRAM_NAME "readlink"
@@ -47,6 +46,7 @@ static struct option const longopts[] =
{"quiet", no_argument, NULL, 'q'},
{"silent", no_argument, NULL, 's'},
{"verbose", no_argument, NULL, 'v'},
+ {"zero", no_argument, NULL, 'z'},
{GETOPT_HELP_OPTION_DECL},
{GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
@@ -59,7 +59,7 @@ usage (int status)
emit_try_help ();
else
{
- printf (_("Usage: %s [OPTION]... FILE\n"), program_name);
+ printf (_("Usage: %s [OPTION]... FILE...\n"), program_name);
fputs (_("Print value of a symbolic link or canonical file name\n\n"),
stdout);
fputs (_("\
@@ -77,10 +77,11 @@ usage (int status)
every component of the given name recursively,\
\n\
without requirements on components existence\n\
- -n, --no-newline do not output the trailing newline\n\
+ -n, --no-newline do not output the trailing delimiter\n\
-q, --quiet,\n\
-s, --silent suppress most error messages\n\
-v, --verbose report error messages\n\
+ -z, --zero separate output with NUL rather than newline\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
@@ -94,14 +95,9 @@ main (int argc, char **argv)
{
/* If not -1, use this method to canonicalize. */
int can_mode = -1;
-
- /* File name to canonicalize. */
- const char *fname;
-
- /* Result of canonicalize. */
- char *value;
-
+ int status = EXIT_SUCCESS;
int optc;
+ bool use_nuls = false;
initialize_main (&argc, &argv);
set_program_name (argv[0]);
@@ -111,7 +107,7 @@ main (int argc, char **argv)
atexit (close_stdout);
- while ((optc = getopt_long (argc, argv, "efmnqsv", longopts, NULL)) != -1)
+ while ((optc = getopt_long (argc, argv, "efmnqsvz", longopts, NULL)) != -1)
{
switch (optc)
{
@@ -134,6 +130,9 @@ main (int argc, char **argv)
case 'v':
verbose = true;
break;
+ case 'z':
+ use_nuls = true;
+ break;
case_GETOPT_HELP_CHAR;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
@@ -147,26 +146,33 @@ main (int argc, char **argv)
usage (EXIT_FAILURE);
}
- fname = argv[optind++];
-
- if (optind < argc)
+ if (argc - optind > 1)
{
- error (0, 0, _("extra operand %s"), quote (argv[optind]));
- usage (EXIT_FAILURE);
+ if (no_newline)
+ error (0, 0, _("ignoring --no-newline with multiple arguments"));
+ no_newline = false;
}
- value = (can_mode != -1
- ? canonicalize_filename_mode (fname, can_mode)
- : areadlink_with_size (fname, 63));
- if (value)
+ for (; optind < argc; ++optind)
{
- printf ("%s%s", value, (no_newline ? "" : "\n"));
- free (value);
- return EXIT_SUCCESS;
+ const char *fname = argv[optind];
+ char *value = (can_mode != -1
+ ? canonicalize_filename_mode (fname, can_mode)
+ : areadlink_with_size (fname, 63));
+ if (value)
+ {
+ fputs (value, stdout);
+ if (! no_newline)
+ putchar (use_nuls ? '\0' : '\n');
+ free (value);
+ }
+ else
+ {
+ status = EXIT_FAILURE;
+ if (verbose)
+ error (0, errno, "%s", fname);
+ }
}
- if (verbose)
- error (EXIT_FAILURE, errno, "%s", fname);
-
- return EXIT_FAILURE;
+ return status;
}
diff --git a/src/realpath.c b/src/realpath.c
index cd595b8c..292c8f3b 100644
--- a/src/realpath.c
+++ b/src/realpath.c
@@ -1,5 +1,5 @@
/* realpath - print the resolved path
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/relpath.c b/src/relpath.c
index 4405361c..5a93afe4 100644
--- a/src/relpath.c
+++ b/src/relpath.c
@@ -1,5 +1,5 @@
/* relpath - print the relative path
- Copyright (C) 2012 Free Software Foundation, Inc.
+ Copyright (C) 2012-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/relpath.h b/src/relpath.h
index e25f82b2..0439d330 100644
--- a/src/relpath.h
+++ b/src/relpath.h
@@ -1,5 +1,5 @@
/* relpath - print the relative path
- Copyright (C) 2012 Free Software Foundation, Inc.
+ Copyright (C) 2012-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/remove.c b/src/remove.c
index f44a9821..cdbbec5b 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -1,5 +1,5 @@
/* remove.c -- core functions for removing files and directories
- Copyright (C) 1988-2012 Free Software Foundation, Inc.
+ Copyright (C) 1988-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -88,20 +88,6 @@ cache_stat_init (struct stat *st)
return st;
}
-/* Return true if *ST has been statted. */
-static inline bool
-cache_statted (struct stat *st)
-{
- return (st->st_size != -1);
-}
-
-/* Return true if *ST has been statted successfully. */
-static inline bool
-cache_stat_ok (struct stat *st)
-{
- return (0 <= st->st_size);
-}
-
/* Return 1 if FILE is an unwritable non-symlink,
0 if it is writable or some other type of file,
-1 and set errno if there is some problem in determining the answer.
@@ -204,6 +190,13 @@ prompt (FTS const *fts, FTSENT const *ent, bool is_dir,
int dirent_type = is_dir ? DT_DIR : DT_UNKNOWN;
int write_protected = 0;
+ bool is_empty = false;
+ if (is_empty_p)
+ {
+ is_empty = is_empty_dir (fd_cwd, filename);
+ *is_empty_p = is_empty ? T_YES : T_NO;
+ }
+
/* When nonzero, this indicates that we failed to remove a child entry,
either because the user declined an interactive prompt, or due to
some other failure, like permissions. */
@@ -252,7 +245,10 @@ prompt (FTS const *fts, FTSENT const *ent, bool is_dir,
break;
case DT_DIR:
- if (!x->recursive)
+ /* Unless we're either deleting directories or deleting
+ recursively, we want to raise an EISDIR error rather than
+ prompting the user */
+ if ( ! (x->recursive || (x->remove_empty_directories && is_empty)))
{
write_protected = -1;
wp_errno = EISDIR;
@@ -268,15 +264,6 @@ prompt (FTS const *fts, FTSENT const *ent, bool is_dir,
return RM_ERROR;
}
- bool is_empty;
- if (is_empty_p)
- {
- is_empty = is_empty_dir (fd_cwd, filename);
- *is_empty_p = is_empty ? T_YES : T_NO;
- }
- else
- is_empty = false;
-
/* Issue the prompt. */
if (dirent_type == DT_DIR
&& mode == PA_DESCEND_INTO_DIR
@@ -311,36 +298,6 @@ prompt (FTS const *fts, FTSENT const *ent, bool is_dir,
return RM_OK;
}
-/* Return true if FILENAME is a directory (and not a symlink to a directory).
- Otherwise, including the case in which lstat fails, return false.
- *ST is FILENAME's tstatus.
- Do not modify errno. */
-static inline bool
-is_dir_lstat (int fd_cwd, char const *filename, struct stat *st)
-{
- int saved_errno = errno;
- bool is_dir =
- (cache_fstatat (fd_cwd, filename, st, AT_SYMLINK_NOFOLLOW) == 0
- && S_ISDIR (st->st_mode));
- errno = saved_errno;
- return is_dir;
-}
-
-/* Return true if FILENAME is a non-directory.
- Otherwise, including the case in which lstat fails, return false.
- *ST is FILENAME's tstatus.
- Do not modify errno. */
-static inline bool
-is_nondir_lstat (int fd_cwd, char const *filename, struct stat *st)
-{
- int saved_errno = errno;
- bool is_non_dir =
- (cache_fstatat (fd_cwd, filename, st, AT_SYMLINK_NOFOLLOW) == 0
- && !S_ISDIR (st->st_mode));
- errno = saved_errno;
- return is_non_dir;
-}
-
/* When a function like unlink, rmdir, or fstatat fails with an errno
value of ERRNUM, return true if the specified file system object
is guaranteed not to exist; otherwise, return false. */
@@ -435,11 +392,15 @@ excise (FTS *fts, FTSENT *ent, struct rm_options const *x, bool is_dir)
if (ignorable_missing (x, errno))
return RM_OK;
- /* When failing to rmdir an unreadable directory, the typical
- errno value is EISDIR, but that is not as useful to the user
- as the errno value from the failed open (probably EPERM).
- Use the earlier, more descriptive errno value. */
- if (ent->fts_info == FTS_DNR)
+ /* When failing to rmdir an unreadable directory, we see errno values
+ like EISDIR or ENOTDIR (or, on Solaris 10, EEXIST), but they would be
+ meaningless in a diagnostic. When that happens and the errno value
+ from the failed open is EPERM or EACCES, use the earlier, more
+ descriptive errno value. */
+ if (ent->fts_info == FTS_DNR
+ && (errno == ENOTEMPTY || errno == EISDIR || errno == ENOTDIR
+ || errno == EEXIST)
+ && (ent->fts_errno == EPERM || ent->fts_errno == EACCES))
errno = ent->fts_errno;
error (0, errno, _("cannot remove %s"), quote (ent->fts_path));
mark_ancestor_dirs (ent);
@@ -458,11 +419,16 @@ rm_fts (FTS *fts, FTSENT *ent, struct rm_options const *x)
switch (ent->fts_info)
{
case FTS_D: /* preorder directory */
- if (! x->recursive)
+ if (! x->recursive
+ && !(x->remove_empty_directories
+ && is_empty_dir (fts->fts_cwd_fd, ent->fts_accpath)))
{
- /* This is the first (pre-order) encounter with a directory.
- Not recursive, so arrange to skip contents. */
- error (0, EISDIR, _("cannot remove %s"), quote (ent->fts_path));
+ /* This is the first (pre-order) encounter with a directory
+ that we cannot delete.
+ Not recursive, and it's not an empty directory (if we're removing
+ them) so arrange to skip contents. */
+ int err = x->remove_empty_directories ? ENOTEMPTY : EISDIR;
+ error (0, err, _("cannot remove %s"), quote (ent->fts_path));
mark_ancestor_dirs (ent);
fts_skip_tree (fts, ent);
return RM_ERROR;
@@ -471,9 +437,6 @@ rm_fts (FTS *fts, FTSENT *ent, struct rm_options const *x)
/* Perform checks that can apply only for command-line arguments. */
if (ent->fts_level == FTS_ROOTLEVEL)
{
- if (strip_trailing_slashes (ent->fts_path))
- ent->fts_pathlen = strlen (ent->fts_path);
-
/* If the basename of a command line argument is "." or "..",
diagnose it and do nothing more with that argument. */
if (dot_or_dotdot (last_component (ent->fts_accpath)))
diff --git a/src/remove.h b/src/remove.h
index 4eab2821..9ac54d43 100644
--- a/src/remove.h
+++ b/src/remove.h
@@ -1,6 +1,6 @@
/* Remove directory entries.
- Copyright (C) 1998-2012 Free Software Foundation, Inc.
+ Copyright (C) 1998-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -49,6 +49,9 @@ struct rm_options
/* If true, recursively remove directories. */
bool recursive;
+ /* If true, remove empty directories. */
+ bool remove_empty_directories;
+
/* Pointer to the device and inode numbers of '/', when --recursive
and preserving '/'. Otherwise NULL. */
struct dev_ino *root_dev_ino;
diff --git a/src/rm.c b/src/rm.c
index 02809f21..3e187cf8 100644
--- a/src/rm.c
+++ b/src/rm.c
@@ -1,5 +1,5 @@
/* 'rm' file deletion utility for GNU.
- Copyright (C) 1988-2012 Free Software Foundation, Inc.
+ Copyright (C) 1988-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -77,6 +77,7 @@ static struct option const long_opts[] =
{"-presume-input-tty", no_argument, NULL, PRESUME_INPUT_TTY_OPTION},
{"recursive", no_argument, NULL, 'r'},
+ {"dir", no_argument, NULL, 'd'},
{"verbose", no_argument, NULL, 'v'},
{GETOPT_HELP_OPTION_DECL},
{GETOPT_VERSION_OPTION_DECL},
@@ -154,6 +155,7 @@ Remove (unlink) the FILE(s).\n\
--no-preserve-root do not treat '/' specially\n\
--preserve-root do not remove '/' (default)\n\
-r, -R, --recursive remove directories and their contents recursively\n\
+ -d, --dir remove empty directories\n\
-v, --verbose explain what is being done\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
@@ -189,6 +191,7 @@ rm_option_init (struct rm_options *x)
x->ignore_missing_files = false;
x->interactive = RMI_SOMETIMES;
x->one_file_system = false;
+ x->remove_empty_directories = false;
x->recursive = false;
x->root_dev_ino = NULL;
x->stdin_tty = isatty (STDIN_FILENO);
@@ -220,10 +223,14 @@ main (int argc, char **argv)
/* Try to disable the ability to unlink a directory. */
priv_set_remove_linkdir ();
- while ((c = getopt_long (argc, argv, "firvIR", long_opts, NULL)) != -1)
+ while ((c = getopt_long (argc, argv, "dfirvIR", long_opts, NULL)) != -1)
{
switch (c)
{
+ case 'd':
+ x.remove_empty_directories = true;
+ break;
+
case 'f':
x.interactive = RMI_NEVER;
x.ignore_missing_files = true;
diff --git a/src/rmdir.c b/src/rmdir.c
index 38850c81..81ef2a99 100644
--- a/src/rmdir.c
+++ b/src/rmdir.c
@@ -1,6 +1,6 @@
/* rmdir -- remove directories
- Copyright (C) 1990-2012 Free Software Foundation, Inc.
+ Copyright (C) 1990-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/runcon.c b/src/runcon.c
index 875441f3..8a0b34e9 100644
--- a/src/runcon.c
+++ b/src/runcon.c
@@ -1,5 +1,5 @@
/* runcon -- run command with specified security context
- Copyright (C) 2005-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -87,7 +87,11 @@ Usage: %s CONTEXT COMMAND [args]\n\
fputs (_("\
Run a program in a different security context.\n\
With neither CONTEXT nor COMMAND, print the current security context.\n\
-\n\
+"), stdout);
+
+ emit_mandatory_arg_note ();
+
+ fputs (_("\
CONTEXT Complete security context\n\
-c, --compute compute process transition context before modifying\n\
-t, --type=TYPE type (for same role as parent)\n\
diff --git a/src/seq.c b/src/seq.c
index 90e9fc15..acbe2350 100644
--- a/src/seq.c
+++ b/src/seq.c
@@ -1,5 +1,5 @@
/* seq - print sequence of numbers to standard output.
- Copyright (C) 1994-2012 Free Software Foundation, Inc.
+ Copyright (C) 1994-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -72,7 +72,11 @@ Usage: %s [OPTION]... LAST\n\
"), program_name, program_name, program_name);
fputs (_("\
Print numbers from FIRST to LAST, in steps of INCREMENT.\n\
-\n\
+"), stdout);
+
+ emit_mandatory_arg_note ();
+
+ fputs (_("\
-f, --format=FORMAT use printf style floating-point FORMAT\n\
-s, --separator=STRING use STRING to separate numbers (default: \\n)\n\
-w, --equal-width equalize width by padding with leading zeroes\n\
@@ -166,6 +170,21 @@ scan_arg (const char *arg)
{
long exponent = strtol (e + 1, NULL, 10);
ret.precision += exponent < 0 ? -exponent : 0;
+ /* Don't account for e.... in the width since this is not output. */
+ ret.width -= strlen (arg) - (e - arg);
+ /* Adjust the width as per the exponent. */
+ if (exponent < 0)
+ {
+ if (decimal_point)
+ {
+ if (e == decimal_point + 1) /* undo #. -> # above */
+ ret.width++;
+ }
+ else
+ ret.width++;
+ exponent = -exponent;
+ }
+ ret.width += exponent;
}
}
@@ -317,6 +336,8 @@ get_default_format (operand first, operand step, operand last)
last_width--; /* don't include space for '.' */
if (last.precision == 0 && prec)
last_width++; /* include space for '.' */
+ if (first.precision == 0 && prec)
+ first_width++; /* include space for '.' */
size_t width = MAX (first_width, last_width);
if (width <= INT_MAX)
{
@@ -335,6 +356,122 @@ get_default_format (operand first, operand step, operand last)
return "%Lg";
}
+/* The NUL-terminated string S0 of length S_LEN represents a valid
+ non-negative decimal integer. Adjust the string and length so
+ that the pair describe the next-larger value. */
+static void
+incr (char **s0, size_t *s_len)
+{
+ char *s = *s0;
+ char *endp = s + *s_len - 1;
+
+ do
+ {
+ if ((*endp)++ < '9')
+ return;
+ *endp-- = '0';
+ }
+ while (endp >= s);
+ *--(*s0) = '1';
+ ++*s_len;
+}
+
+/* Compare A and B (each a NUL-terminated digit string), with lengths
+ given by A_LEN and B_LEN. Return +1 if A < B, -1 if B < A, else 0. */
+static int
+cmp (char const *a, size_t a_len, char const *b, size_t b_len)
+{
+ if (a_len < b_len)
+ return -1;
+ if (b_len < a_len)
+ return 1;
+ return (strcmp (a, b));
+}
+
+/* Trim leading 0's from S, but if S is all 0's, leave one.
+ Return a pointer to the trimmed string. */
+static char const * _GL_ATTRIBUTE_PURE
+trim_leading_zeros (char const *s)
+{
+ char const *p = s;
+ while (*s == '0')
+ ++s;
+
+ /* If there were only 0's, back up, to leave one. */
+ if (!*s && s != p)
+ --s;
+ return s;
+}
+
+/* Print all whole numbers from A to B, inclusive -- to stdout, each
+ followed by a newline. If B < A, return false and print nothing.
+ Otherwise, return true. */
+static bool
+seq_fast (char const *a, char const *b)
+{
+ /* Skip past any leading 0's. Without this, our naive cmp
+ function would declare 000 to be larger than 99. */
+ a = trim_leading_zeros (a);
+ b = trim_leading_zeros (b);
+
+ size_t p_len = strlen (a);
+ size_t q_len = strlen (b);
+ size_t n = MAX (p_len, q_len);
+ char *p0 = xmalloc (n + 1);
+ char *p = memcpy (p0 + n - p_len, a, p_len + 1);
+ char *q0 = xmalloc (n + 1);
+ char *q = memcpy (q0 + n - q_len, b, q_len + 1);
+
+ bool ok = cmp (p, p_len, q, q_len) <= 0;
+ if (ok)
+ {
+ /* Buffer at least this many numbers per fwrite call.
+ This gives a speed-up of more than 2x over the unbuffered code
+ when printing the first 10^9 integers. */
+ enum {N = 40};
+ char *buf = xmalloc (N * (n + 1));
+ char const *buf_end = buf + N * (n + 1);
+
+ char *z = buf;
+
+ /* Write first number to buffer. */
+ z = mempcpy (z, p, p_len);
+
+ /* Append separator then number. */
+ while (cmp (p, p_len, q, q_len) < 0)
+ {
+ *z++ = *separator;
+ incr (&p, &p_len);
+ z = mempcpy (z, p, p_len);
+ /* If no place for another separator + number then
+ output buffer so far, and reset to start of buffer. */
+ if (buf_end - (n + 1) < z)
+ {
+ fwrite (buf, z - buf, 1, stdout);
+ z = buf;
+ }
+ }
+
+ /* Write any remaining buffered output, and the terminator. */
+ *z++ = *terminator;
+ fwrite (buf, z - buf, 1, stdout);
+
+ IF_LINT (free (buf));
+ }
+
+ free (p0);
+ free (q0);
+ return ok;
+}
+
+/* Return true if S consists of at least one digit and no non-digits. */
+static bool _GL_ATTRIBUTE_PURE
+all_digits_p (char const *s)
+{
+ size_t n = strlen (s);
+ return ISDIGIT (s[0]) && n == strspn (s, "0123456789");
+}
+
int
main (int argc, char **argv)
{
@@ -397,13 +534,14 @@ main (int argc, char **argv)
}
}
- if (argc - optind < 1)
+ unsigned int n_args = argc - optind;
+ if (n_args < 1)
{
error (0, 0, _("missing operand"));
usage (EXIT_FAILURE);
}
- if (3 < argc - optind)
+ if (3 < n_args)
{
error (0, 0, _("extra operand %s"), quote (argv[optind + 3]));
usage (EXIT_FAILURE);
@@ -412,6 +550,33 @@ main (int argc, char **argv)
if (format_str)
format_str = long_double_format (format_str, &layout);
+ if (format_str != NULL && equal_width)
+ {
+ error (0, 0, _("format string may not be specified"
+ " when printing equal width strings"));
+ usage (EXIT_FAILURE);
+ }
+
+ /* If the following hold:
+ - no format string, [FIXME: relax this, eventually]
+ - integer start (or no start)
+ - integer end
+ - increment == 1 or not specified [FIXME: relax this, eventually]
+ then use the much more efficient integer-only code. */
+ if (all_digits_p (argv[optind])
+ && (n_args == 1 || all_digits_p (argv[optind + 1]))
+ && (n_args < 3 || (STREQ ("1", argv[optind + 1])
+ && all_digits_p (argv[optind + 2])))
+ && !equal_width && !format_str && strlen (separator) == 1)
+ {
+ char const *s1 = n_args == 1 ? "1" : argv[optind];
+ char const *s2 = argv[optind + (n_args - 1)];
+ if (seq_fast (s1, s2))
+ exit (EXIT_SUCCESS);
+
+ /* Upon any failure, let the more general code deal with it. */
+ }
+
last = scan_arg (argv[optind++]);
if (optind < argc)
@@ -426,11 +591,27 @@ main (int argc, char **argv)
}
}
- if (format_str != NULL && equal_width)
+ if (first.precision == 0 && step.precision == 0 && last.precision == 0
+ && 0 <= first.value && step.value == 1 && 0 <= last.value
+ && !equal_width && !format_str && strlen (separator) == 1)
{
- error (0, 0, _("format string may not be specified"
- " when printing equal width strings"));
- usage (EXIT_FAILURE);
+ char *s1;
+ char *s2;
+ if (asprintf (&s1, "%0.Lf", first.value) < 0)
+ xalloc_die ();
+ if (asprintf (&s2, "%0.Lf", last.value) < 0)
+ xalloc_die ();
+
+ if (seq_fast (s1, s2))
+ {
+ IF_LINT (free (s1));
+ IF_LINT (free (s2));
+ exit (EXIT_SUCCESS);
+ }
+
+ free (s1);
+ free (s2);
+ /* Upon any failure, let the more general code deal with it. */
}
if (format_str == NULL)
diff --git a/src/setuidgid.c b/src/setuidgid.c
index 39044ce9..ed6b65d2 100644
--- a/src/setuidgid.c
+++ b/src/setuidgid.c
@@ -1,5 +1,5 @@
/* setuidgid - run a command with the UID and GID of a specified user
- Copyright (C) 2003-2012 Free Software Foundation, Inc.
+ Copyright (C) 2003-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -107,7 +107,7 @@ main (int argc, char **argv)
{
if (! (xstrtoul (gr, &ptr, 10, &tmp_ul, NULL) == LONGINT_OK
&& tmp_ul <= GID_T_MAX))
- error (EXIT_FAILURE, 0, _("invalid group %s"),
+ error (SETUIDGID_FAILURE, 0, _("invalid group %s"),
quote (gr));
if (n_gids == n_gids_allocated)
gids = X2NREALLOC (gids, &n_gids_allocated);
@@ -159,8 +159,7 @@ main (int argc, char **argv)
pwd = getpwnam (user);
if (pwd == NULL)
{
- error (SETUIDGID_FAILURE, errno,
- _("unknown user-ID: %s"), quote (user));
+ error (0, errno, _("unknown user-ID: %s"), quote (user));
usage (SETUIDGID_FAILURE);
}
uid = pwd->pw_uid;
@@ -170,7 +169,7 @@ main (int argc, char **argv)
pwd = getpwuid (uid);
if (pwd == NULL)
{
- error (SETUIDGID_FAILURE, errno,
+ error (0, errno,
_("to use user-ID %s you need to use -g too"), quote (user));
usage (SETUIDGID_FAILURE);
}
@@ -181,8 +180,8 @@ main (int argc, char **argv)
{
int n = xgetgroups (pwd->pw_name, pwd->pw_gid, &gids);
if (n <= 0)
- error (EXIT_FAILURE, errno, _("failed to get groups for user %s"),
- quote (pwd->pw_name));
+ error (SETUIDGID_FAILURE, errno,
+ _("failed to get groups for user %s"), quote (pwd->pw_name));
n_gids = n;
}
diff --git a/src/shred.c b/src/shred.c
index 7a282601..9b869cdc 100644
--- a/src/shred.c
+++ b/src/shred.c
@@ -1,6 +1,6 @@
/* shred.c - overwrite files and devices to make it harder to recover data
- Copyright (C) 1999-2012 Free Software Foundation, Inc.
+ Copyright (C) 1999-2013 Free Software Foundation, Inc.
Copyright (C) 1997, 1998, 1999 Colin Plumb.
This program is free software: you can redistribute it and/or modify
@@ -148,11 +148,10 @@ usage (int status)
fputs (_("\
Overwrite the specified FILE(s) repeatedly, in order to make it harder\n\
for even very expensive hardware probing to recover the data.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
printf (_("\
-f, --force change permissions to allow writing if necessary\n\
-n, --iterations=N overwrite N times instead of the default (%d)\n\
@@ -485,10 +484,11 @@ dopass (int fd, char const *qname, off_t *sizep, int type,
offset += soff;
+ bool done = offset == size;
+
/* Time to print progress? */
- if (n
- && ((offset == size && *previous_human_offset)
- || thresh <= (now = time (NULL))))
+ if (n && ((done && *previous_human_offset)
+ || thresh <= (now = time (NULL))))
{
char offset_buf[LONGEST_HUMAN_READABLE + 1];
char size_buf[LONGEST_HUMAN_READABLE + 1];
@@ -498,8 +498,7 @@ dopass (int fd, char const *qname, off_t *sizep, int type,
= human_readable (offset, offset_buf,
human_floor | human_progress_opts, 1, 1);
- if (offset == size
- || !STREQ (previous_human_offset, human_offset))
+ if (done || !STREQ (previous_human_offset, human_offset))
{
if (size < 0)
error (0, 0, _("%s: pass %lu/%lu (%s)...%s"),
@@ -516,7 +515,7 @@ dopass (int fd, char const *qname, off_t *sizep, int type,
= human_readable (size, size_buf,
human_ceiling | human_progress_opts,
1, 1);
- if (offset == size)
+ if (done)
human_offset = human_size;
error (0, 0, _("%s: pass %lu/%lu (%s)...%s/%s %d%%"),
qname, k, n, pass_string, human_offset, human_size,
diff --git a/src/shuf.c b/src/shuf.c
index bb4736ca..71ac3e60 100644
--- a/src/shuf.c
+++ b/src/shuf.c
@@ -1,6 +1,6 @@
/* Shuffle lines of text.
- Copyright (C) 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -53,11 +53,10 @@ Usage: %s [OPTION]... [FILE]\n\
program_name, program_name, program_name);
fputs (_("\
Write a random permutation of the input lines to standard output.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-e, --echo treat each ARG as an input line\n\
-i, --input-range=LO-HI treat each number LO through HI as an input line\n\
diff --git a/src/sleep.c b/src/sleep.c
index 3aec9379..b9163bc4 100644
--- a/src/sleep.c
+++ b/src/sleep.c
@@ -1,5 +1,5 @@
/* sleep - delay for a specified amount of time.
- Copyright (C) 1984-2012 Free Software Foundation, Inc.
+ Copyright (C) 1984-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/sort.c b/src/sort.c
index 493e7f17..7410abca 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -1,5 +1,5 @@
/* sort - sort lines of text (with all kinds of options).
- Copyright (C) 1988-2012 Free Software Foundation, Inc.
+ Copyright (C) 1988-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -28,6 +28,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
+#include <assert.h>
#include "system.h"
#include "argmatch.h"
#include "error.h"
@@ -261,6 +262,9 @@ struct merge_node_queue
when popping. */
};
+/* Used to implement --unique (-u). */
+static struct line saved_line;
+
/* FIXME: None of these tables work with multibyte character sets.
Also, there are many other bugs when handling multibyte characters.
One way to fix this is to rewrite 'sort' to use wide characters
@@ -394,11 +398,10 @@ Usage: %s [OPTION]... [FILE]...\n\
program_name, program_name);
fputs (_("\
Write sorted concatenation of all FILE(s) to standard output.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
Ordering options:\n\
\n\
@@ -910,11 +913,10 @@ create_temp_file (int *pfd, bool survive_fd_exhaustion)
static FILE *
stream_open (char const *file, char const *how)
{
- if (!file)
- return stdout;
+ FILE *fp;
+
if (*how == 'r')
{
- FILE *fp;
if (STREQ (file, "-"))
{
have_read_stdin = true;
@@ -923,9 +925,18 @@ stream_open (char const *file, char const *how)
else
fp = fopen (file, how);
fadvise (fp, FADVISE_SEQUENTIAL);
- return fp;
}
- return fopen (file, how);
+ else if (*how == 'w')
+ {
+ if (file && ftruncate (STDOUT_FILENO, 0) != 0)
+ error (SORT_FAILURE, errno, _("%s: error truncating"),
+ quote (file));
+ fp = stdout;
+ }
+ else
+ assert (!"unexpected mode passed to stream_open");
+
+ return fp;
}
/* Same as stream_open, except always return a non-null value; die on
@@ -967,10 +978,14 @@ xfclose (FILE *fp, char const *file)
}
static void
-dup2_or_die (int oldfd, int newfd)
+move_fd_or_die (int oldfd, int newfd)
{
- if (dup2 (oldfd, newfd) < 0)
- error (SORT_FAILURE, errno, _("dup2 failed"));
+ if (oldfd != newfd)
+ {
+ if (dup2 (oldfd, newfd) < 0)
+ error (SORT_FAILURE, errno, _("dup2 failed"));
+ close (oldfd);
+ }
}
/* Fork a child process for piping to and do common cleanup. The
@@ -1081,10 +1096,8 @@ maybe_create_temp (FILE **pfp, bool survive_fd_exhaustion)
else if (node->pid == 0)
{
close (pipefds[1]);
- dup2_or_die (tempfd, STDOUT_FILENO);
- close (tempfd);
- dup2_or_die (pipefds[0], STDIN_FILENO);
- close (pipefds[0]);
+ move_fd_or_die (tempfd, STDOUT_FILENO);
+ move_fd_or_die (pipefds[0], STDIN_FILENO);
if (execlp (compress_program, compress_program, (char *) NULL) < 0)
error (SORT_FAILURE, errno, _("couldn't execute %s"),
@@ -1141,10 +1154,8 @@ open_temp (struct tempnode *temp)
case 0:
close (pipefds[0]);
- dup2_or_die (tempfd, STDIN_FILENO);
- close (tempfd);
- dup2_or_die (pipefds[1], STDOUT_FILENO);
- close (pipefds[1]);
+ move_fd_or_die (tempfd, STDIN_FILENO);
+ move_fd_or_die (pipefds[1], STDOUT_FILENO);
execlp (compress_program, compress_program, "-d", (char *) NULL);
error (SORT_FAILURE, errno, _("couldn't execute %s -d"),
@@ -1399,22 +1410,16 @@ specify_nthreads (int oi, char c, char const *s)
return nthreads;
}
-
/* Return the default sort size. */
static size_t
default_sort_size (void)
{
- /* Let MEM be available memory or 1/8 of total memory, whichever
- is greater. */
- double avail = physmem_available ();
- double total = physmem_total ();
- double mem = MAX (avail, total / 8);
- struct rlimit rlimit;
-
- /* Let SIZE be MEM, but no more than the maximum object size or
- system resource limits. Don't bother to check for values like
- RLIM_INFINITY since in practice they are not much less than SIZE_MAX. */
+ /* Let SIZE be MEM, but no more than the maximum object size,
+ total memory, or system resource limits. Don't bother to check
+ for values like RLIM_INFINITY since in practice they are not much
+ less than SIZE_MAX. */
size_t size = SIZE_MAX;
+ struct rlimit rlimit;
if (getrlimit (RLIMIT_DATA, &rlimit) == 0 && rlimit.rlim_cur < size)
size = rlimit.rlim_cur;
#ifdef RLIMIT_AS
@@ -1433,6 +1438,16 @@ default_sort_size (void)
size = rlimit.rlim_cur / 16 * 15;
#endif
+ /* Let MEM be available memory or 1/8 of total memory, whichever
+ is greater. */
+ double avail = physmem_available ();
+ double total = physmem_total ();
+ double mem = MAX (avail, total / 8);
+
+ /* Leave a 1/4 margin for physical memory. */
+ if (total * 0.75 < size)
+ size = total * 0.75;
+
/* Return the minimum of MEM and SIZE, but no less than
MIN_SORT_SIZE. Avoid the MIN macro here, as it is not quite
right when only one argument is floating point. */
@@ -1800,7 +1815,7 @@ fillbuf (struct buffer *buf, FILE *fp, char const *file)
{
/* The current input line is too long to fit in the buffer.
- Double the buffer size and try again, keeping it properly
+ Increase the buffer size and try again, keeping it properly
aligned. */
size_t line_alloc = buf->alloc / sizeof (struct line);
buf->buf = x2nrealloc (buf->buf, &line_alloc, sizeof (struct line));
@@ -3335,13 +3350,11 @@ queue_pop (struct merge_node_queue *queue)
static void
write_unique (struct line const *line, FILE *tfp, char const *temp_output)
{
- static struct line saved;
-
if (unique)
{
- if (saved.text && ! compare (line, &saved))
+ if (saved_line.text && ! compare (line, &saved_line))
return;
- saved = *line;
+ saved_line = *line;
}
write_line (line, tfp, temp_output);
@@ -3636,10 +3649,7 @@ avoid_trashing_input (struct sortfile *files, size_t ntemps,
{
if (! got_outstat)
{
- if ((outfile
- ? stat (outfile, &outstat)
- : fstat (STDOUT_FILENO, &outstat))
- != 0)
+ if (fstat (STDOUT_FILENO, &outstat) != 0)
break;
got_outstat = true;
}
@@ -3666,6 +3676,45 @@ avoid_trashing_input (struct sortfile *files, size_t ntemps,
}
}
+/* Scan the input files to ensure all are accessible.
+ Otherwise exit with a diagnostic.
+
+ Note this will catch common issues with permissions etc.
+ but will fail to notice issues where you can open() but not read(),
+ like when a directory is specified on some systems.
+ Catching these obscure cases could slow down performance in
+ common cases. */
+
+static void
+check_inputs (char *const *files, size_t nfiles)
+{
+ size_t i;
+ for (i = 0; i < nfiles; i++)
+ {
+ if (STREQ (files[i], "-"))
+ continue;
+
+ if (euidaccess (files[i], R_OK) != 0)
+ die (_("cannot read"), files[i]);
+ }
+}
+
+/* Ensure a specified output file can be created or written to,
+ and point stdout to it. Do not truncate the file.
+ Exit with a diagnostic on failure. */
+
+static void
+check_output (char const *outfile)
+{
+ if (outfile)
+ {
+ int outfd = open (outfile, O_WRONLY | O_CREAT | O_BINARY, MODE_RW_UGO);
+ if (outfd < 0)
+ die (_("open failed"), outfile);
+ move_fd_or_die (outfd, STDOUT_FILENO);
+ }
+}
+
/* Merge the input FILES. NTEMPS is the number of files at the
start of FILES that are temporary; it is zero at the top level.
NFILES is the total number of files. Put the output in
@@ -3843,6 +3892,7 @@ sort (char *const *files, size_t nfiles, char const *output_file,
break;
}
+ saved_line.text = NULL;
line = buffer_linelim (&buf);
if (buf.eof && !nfiles && !ntemps && !buf.left)
{
@@ -4243,6 +4293,10 @@ main (int argc, char **argv)
char const *optarg1 = argv[optind++];
s = parse_field_count (optarg1 + 1, &key->eword,
N_("invalid number after '-'"));
+ /* When called with a non-NULL message ID,
+ parse_field_count cannot return NULL. Tell static
+ analysis tools that dereferencing S is safe. */
+ assert (s);
if (*s == '.')
s = parse_field_count (s + 1, &key->echar,
N_("invalid number after '.'"));
@@ -4616,6 +4670,12 @@ main (int argc, char **argv)
exit (check (files[0], checkonly) ? EXIT_SUCCESS : SORT_OUT_OF_ORDER);
}
+ /* Check all inputs are accessible, or exit immediately. */
+ check_inputs (files, nfiles);
+
+ /* Check output is writable, or exit immediately. */
+ check_output (outfile);
+
if (mergeonly)
{
struct sortfile *sortfiles = xcalloc (nfiles, sizeof *sortfiles);
diff --git a/src/split.c b/src/split.c
index 53ee2719..e5e75f0f 100644
--- a/src/split.c
+++ b/src/split.c
@@ -1,5 +1,5 @@
/* split.c -- split a file into pieces.
- Copyright (C) 1988-2012 Free Software Foundation, Inc.
+ Copyright (C) 1988-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -92,6 +92,9 @@ static char const *additional_suffix;
/* Name of input file. May be "-". */
static char *infile;
+/* stat buf for input file. */
+static struct stat in_stat_buf;
+
/* Descriptor on which output file is open. */
static int output_desc = -1;
@@ -206,11 +209,10 @@ Usage: %s [OPTION]... [INPUT [PREFIX]]\n\
Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default\n\
size is 1000 lines, and default PREFIX is 'x'. With no INPUT, or when INPUT\n\
is -, read standard input.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fprintf (stdout, _("\
-a, --suffix-length=N generate suffixes of length N (default %d)\n\
--additional-suffix=SUFFIX append an additional SUFFIX to file names.\n\
@@ -362,8 +364,20 @@ create (const char *name)
{
if (verbose)
fprintf (stdout, _("creating file %s\n"), quote (name));
- return open (name, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,
- (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH));
+
+ int fd = open (name, O_WRONLY | O_CREAT | O_BINARY, MODE_RW_UGO);
+ if (fd < 0)
+ return fd;
+ struct stat out_stat_buf;
+ if (fstat (fd, &out_stat_buf) != 0)
+ error (EXIT_FAILURE, errno, _("failed to stat %s"), quote (name));
+ if (SAME_INODE (in_stat_buf, out_stat_buf))
+ error (EXIT_FAILURE, 0, _("%s would overwrite input; aborting"),
+ quote (name));
+ if (ftruncate (fd, 0) != 0)
+ error (EXIT_FAILURE, errno, _("%s: error truncating"), quote (name));
+
+ return fd;
}
else
{
@@ -1029,6 +1043,7 @@ no_filters:
files[i_file].ofd = OFD_APPEND;
}
}
+ IF_LINT (free (files));
}
#define FAIL_ONLY_ONE_WAY() \
@@ -1058,10 +1073,8 @@ parse_chunk (uintmax_t *k_units, uintmax_t *n_units, char *slash)
int
main (int argc, char **argv)
{
- struct stat stat_buf;
enum Split_type split_type = type_undef;
size_t in_blk_size = 0; /* optimal block size of input file device */
- char *buf; /* file i/o buffer */
size_t page_size = getpagesize ();
uintmax_t k_units = 0;
uintmax_t n_units;
@@ -1335,16 +1348,16 @@ main (int argc, char **argv)
/* Get the optimal block size of input device and make a buffer. */
- if (fstat (STDIN_FILENO, &stat_buf) != 0)
+ if (fstat (STDIN_FILENO, &in_stat_buf) != 0)
error (EXIT_FAILURE, errno, "%s", infile);
if (in_blk_size == 0)
- in_blk_size = io_blksize (stat_buf);
+ in_blk_size = io_blksize (in_stat_buf);
if (split_type == type_chunk_bytes || split_type == type_chunk_lines)
{
off_t input_offset = lseek (STDIN_FILENO, 0, SEEK_CUR);
- if (usable_st_size (&stat_buf))
- file_size = stat_buf.st_size;
+ if (usable_st_size (&in_stat_buf))
+ file_size = in_stat_buf.st_size;
else if (0 <= input_offset)
{
file_size = lseek (STDIN_FILENO, 0, SEEK_END);
@@ -1368,7 +1381,8 @@ main (int argc, char **argv)
file_size = MAX (file_size, n_units);
}
- buf = ptr_align (xmalloc (in_blk_size + 1 + page_size - 1), page_size);
+ void *b = xmalloc (in_blk_size + 1 + page_size - 1);
+ char *buf = ptr_align (b, page_size);
/* When filtering, closure of one pipe must not terminate the process,
as there may still be other streams expecting input from us. */
@@ -1418,6 +1432,8 @@ main (int argc, char **argv)
abort ();
}
+ IF_LINT (free (b));
+
if (close (STDIN_FILENO) != 0)
error (EXIT_FAILURE, errno, "%s", infile);
closeout (NULL, output_desc, filter_pid, outfile);
diff --git a/src/stat.c b/src/stat.c
index c6747a6b..dd210d18 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -1,5 +1,5 @@
/* stat.c -- display file or file system status
- Copyright (C) 2001-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -126,7 +126,11 @@ statfs (char const *filename, struct fs_info *buf)
# else
# define STRUCT_STATVFS struct statfs
# define STRUCT_STATXFS_F_FSID_IS_INTEGER STRUCT_STATFS_F_FSID_IS_INTEGER
-# define STATFS_FRSIZE(S) 0
+# if HAVE_STRUCT_STATFS_F_FRSIZE
+# define STATFS_FRSIZE(S) ((S)->f_frsize)
+# else
+# define STATFS_FRSIZE(S) 0
+# endif
# endif
#endif
@@ -245,6 +249,11 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
return "afs";
case S_MAGIC_ANON_INODE_FS: /* 0x09041934 local */
return "anon-inode FS";
+ case S_MAGIC_AUFS: /* 0x61756673 remote */
+ /* FIXME: change syntax or add an optional attribute like "inotify:no".
+ The above is labeled as "remote" so that tail always uses polling,
+ but this isn't really a remote file system type. */
+ return "aufs";
case S_MAGIC_AUTOFS: /* 0x0187 local */
return "autofs";
case S_MAGIC_BEFS: /* 0x42465331 local */
@@ -257,6 +266,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
return "binfmt_misc";
case S_MAGIC_BTRFS: /* 0x9123683E local */
return "btrfs";
+ case S_MAGIC_CEPH: /* 0x00C36400 remote */
+ return "ceph";
case S_MAGIC_CGROUP: /* 0x0027E0EB local */
return "cgroupfs";
case S_MAGIC_CIFS: /* 0xFF534D42 remote */
@@ -353,6 +364,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
return "openprom";
case S_MAGIC_OCFS2: /* 0x7461636f remote */
return "ocfs2";
+ case S_MAGIC_PANFS: /* 0xAAD7AAEA remote */
+ return "panfs";
case S_MAGIC_PIPEFS: /* 0x50495045 remote */
/* FIXME: change syntax or add an optional attribute like "inotify:no".
The above is labeled as "remote" so that tail always uses polling,
@@ -402,8 +415,12 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
return "usbdevfs";
case S_MAGIC_V9FS: /* 0x01021997 local */
return "v9fs";
+ case S_MAGIC_VMHGFS: /* 0xBACBACBC remote */
+ return "vmhgfs";
case S_MAGIC_VXFS: /* 0xA501FCF5 local */
return "vxfs";
+ case S_MAGIC_VZFS: /* 0x565A4653 local */
+ return "vzfs";
case S_MAGIC_XENFS: /* 0xABBA1974 local */
return "xenfs";
case S_MAGIC_XENIX: /* 0x012FF7B4 local */
@@ -412,6 +429,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
return "xfs";
case S_MAGIC_XIAFS: /* 0x012FD16D local */
return "xia";
+ case S_MAGIC_ZFS: /* 0x2FC12FC1 local */
+ return "zfs";
# elif __GNU__
case FSTYPE_UFS:
@@ -1330,7 +1349,11 @@ usage (int status)
printf (_("Usage: %s [OPTION]... FILE...\n"), program_name);
fputs (_("\
Display file or file system status.\n\
-\n\
+"), stdout);
+
+ emit_mandatory_arg_note ();
+
+ fputs (_("\
-L, --dereference follow links\n\
-f, --file-system display file system status instead of file status\n\
"), stdout);
diff --git a/src/stdbuf.c b/src/stdbuf.c
index 178f9e24..38e9bee7 100644
--- a/src/stdbuf.c
+++ b/src/stdbuf.c
@@ -1,5 +1,5 @@
/* stdbuf -- setup the standard streams for a command
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -90,11 +90,10 @@ usage (int status)
printf (_("Usage: %s OPTION... COMMAND\n"), program_name);
fputs (_("\
Run COMMAND, with modified buffering operations for its standard streams.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-i, --input=MODE adjust standard input stream buffering\n\
-o, --output=MODE adjust standard output stream buffering\n\
diff --git a/src/stty.c b/src/stty.c
index eb07f853..ee891a59 100644
--- a/src/stty.c
+++ b/src/stty.c
@@ -1,5 +1,5 @@
/* stty -- change and print terminal line settings
- Copyright (C) 1990-2012 Free Software Foundation, Inc.
+ Copyright (C) 1990-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -52,6 +52,7 @@
#endif
#include <getopt.h>
#include <stdarg.h>
+#include <assert.h>
#include "system.h"
#include "error.h"
@@ -216,6 +217,9 @@ static struct mode_info const mode_info[] =
#ifdef CRTSCTS
{"crtscts", control, REV, CRTSCTS, 0},
#endif
+#ifdef CDTRDSR
+ {"cdtrdsr", control, REV, CDTRDSR, 0},
+#endif
{"ignbrk", input, SANE_UNSET | REV, IGNBRK, 0},
{"brkint", input, SANE_SET | REV, BRKINT, 0},
@@ -514,7 +518,11 @@ Usage: %s [-F DEVICE | --file=DEVICE] [SETTING]...\n\
program_name, program_name, program_name);
fputs (_("\
Print or change terminal characteristics.\n\
-\n\
+"), stdout);
+
+ emit_mandatory_arg_note ();
+
+ fputs (_("\
-a, --all print all current settings in human-readable form\n\
-g, --save print all current settings in a stty-readable form\n\
-F, --file=DEVICE open and use the specified DEVICE instead of stdin\n\
@@ -576,6 +584,7 @@ Control settings:\n\
[-]clocal disable modem control signals\n\
[-]cread allow input to be received\n\
* [-]crtscts enable RTS/CTS handshaking\n\
+ * [-]cdtrdsr enable DTR/DSR handshaking\n\
csN set character size to N bits, N in [5..8]\n\
"), stdout);
fputs (_("\
@@ -583,7 +592,7 @@ Control settings:\n\
[-]hup send a hangup signal when the last process closes the tty\n\
[-]hupcl same as [-]hup\n\
[-]parenb generate parity bit in output and expect parity bit in input\n\
- [-]parodd set odd parity (even with '-')\n\
+ [-]parodd set odd parity (or even parity with '-')\n\
"), stdout);
fputs (_("\
\n\
@@ -729,14 +738,14 @@ main (int argc, char **argv)
{
/* Initialize to all zeroes so there is no risk memcmp will report a
spurious difference in an uninitialized portion of the structure. */
- struct termios mode = { 0, };
+ static struct termios mode;
enum output_type output_type;
int optc;
int argi = 0;
int opti = 1;
bool require_set_attr;
- bool speed_was_set;
+ bool speed_was_set ATTRIBUTE_UNUSED;
bool verbose_output;
bool recoverable_output;
int k;
@@ -1002,7 +1011,7 @@ main (int argc, char **argv)
{
/* Initialize to all zeroes so there is no risk memcmp will report a
spurious difference in an uninitialized portion of the structure. */
- struct termios new_mode = { 0, };
+ static struct termios new_mode;
if (tcsetattr (STDIN_FILENO, TCSADRAIN, &mode))
error (EXIT_FAILURE, errno, "%s", device_name);
@@ -1538,6 +1547,12 @@ display_changed (struct termios *mode)
bitsp = mode_type_flag (mode_info[i].type, mode);
mask = mode_info[i].mask ? mode_info[i].mask : mode_info[i].bits;
+
+ /* bitsp would be NULL only for "combination" modes, yet those
+ are filtered out above via the OMIT flag. Tell static analysis
+ tools that it's ok to dereference bitsp here. */
+ assert (bitsp);
+
if ((*bitsp & mask) == mode_info[i].bits)
{
if (mode_info[i].flags & SANE_UNSET)
@@ -1615,6 +1630,7 @@ display_all (struct termios *mode, char const *device_name)
bitsp = mode_type_flag (mode_info[i].type, mode);
mask = mode_info[i].mask ? mode_info[i].mask : mode_info[i].bits;
+ assert (bitsp); /* See the identical assertion and comment above. */
if ((*bitsp & mask) == mode_info[i].bits)
wrapf ("%s", mode_info[i].name);
else if (mode_info[i].flags & REV)
diff --git a/src/su.c b/src/su.c
deleted file mode 100644
index bb54cc33..00000000
--- a/src/su.c
+++ /dev/null
@@ -1,520 +0,0 @@
-/* su for GNU. Run a shell with substitute user and group IDs.
- Copyright (C) 1992-2012 Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-/* Run a shell with the real and effective UID and GID and groups
- of USER, default 'root'.
-
- The shell run is taken from USER's password entry, /bin/sh if
- none is specified there. If the account has a password, su
- prompts for a password unless run by a user with real UID 0.
-
- Does not change the current directory.
- Sets 'HOME' and 'SHELL' from the password entry for USER, and if
- USER is not root, sets 'USER' and 'LOGNAME' to USER.
- The subshell is not a login shell.
-
- If one or more ARGs are given, they are passed as additional
- arguments to the subshell.
-
- Does not handle /bin/sh or other shells specially
- (setting argv[0] to "-su", passing -c only to certain shells, etc.).
- I don't see the point in doing that, and it's ugly.
-
- This program intentionally does not support a "wheel group" that
- restricts who can su to UID 0 accounts. RMS considers that to
- be fascist.
-
- Compile-time options:
- -DSYSLOG_SUCCESS Log successful su's (by default, to root) with syslog.
- -DSYSLOG_FAILURE Log failed su's (by default, to root) with syslog.
-
- -DSYSLOG_NON_ROOT Log all su's, not just those to root (UID 0).
- Never logs attempted su's to nonexistent accounts.
-
- Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
-
-#include <config.h>
-#include <stdio.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <pwd.h>
-#include <grp.h>
-
-#include "system.h"
-#include "getpass.h"
-
-#if HAVE_SYSLOG_H && HAVE_SYSLOG
-# include <syslog.h>
-#else
-# undef SYSLOG_SUCCESS
-# undef SYSLOG_FAILURE
-# undef SYSLOG_NON_ROOT
-#endif
-
-#if HAVE_SYS_PARAM_H
-# include <sys/param.h>
-#endif
-
-#ifndef HAVE_ENDGRENT
-# define endgrent() ((void) 0)
-#endif
-
-#ifndef HAVE_ENDPWENT
-# define endpwent() ((void) 0)
-#endif
-
-#if HAVE_SHADOW_H
-# include <shadow.h>
-#endif
-
-#include "error.h"
-
-/* The official name of this program (e.g., no 'g' prefix). */
-#define PROGRAM_NAME "su"
-
-#define AUTHORS proper_name ("David MacKenzie")
-
-#if HAVE_PATHS_H
-# include <paths.h>
-#endif
-
-/* The default PATH for simulated logins to non-superuser accounts. */
-#ifdef _PATH_DEFPATH
-# define DEFAULT_LOGIN_PATH _PATH_DEFPATH
-#else
-# define DEFAULT_LOGIN_PATH ":/usr/ucb:/bin:/usr/bin"
-#endif
-
-/* The default PATH for simulated logins to superuser accounts. */
-#ifdef _PATH_DEFPATH_ROOT
-# define DEFAULT_ROOT_LOGIN_PATH _PATH_DEFPATH_ROOT
-#else
-# define DEFAULT_ROOT_LOGIN_PATH "/usr/ucb:/bin:/usr/bin:/etc"
-#endif
-
-/* The shell to run if none is given in the user's passwd entry. */
-#define DEFAULT_SHELL "/bin/sh"
-
-/* The user to become if none is specified. */
-#define DEFAULT_USER "root"
-
-char *crypt (char const *key, char const *salt);
-
-static void run_shell (char const *, char const *, char **, size_t)
- ATTRIBUTE_NORETURN;
-
-/* If true, pass the '-f' option to the subshell. */
-static bool fast_startup;
-
-/* If true, simulate a login instead of just starting a shell. */
-static bool simulate_login;
-
-/* If true, change some environment vars to indicate the user su'd to. */
-static bool change_environment;
-
-static struct option const longopts[] =
-{
- {"command", required_argument, NULL, 'c'},
- {"fast", no_argument, NULL, 'f'},
- {"login", no_argument, NULL, 'l'},
- {"preserve-environment", no_argument, NULL, 'p'},
- {"shell", required_argument, NULL, 's'},
- {GETOPT_HELP_OPTION_DECL},
- {GETOPT_VERSION_OPTION_DECL},
- {NULL, 0, NULL, 0}
-};
-
-/* Add NAME=VAL to the environment, checking for out of memory errors. */
-
-static void
-xsetenv (char const *name, char const *val)
-{
- size_t namelen = strlen (name);
- size_t vallen = strlen (val);
- char *string = xmalloc (namelen + 1 + vallen + 1);
- strcpy (string, name);
- string[namelen] = '=';
- strcpy (string + namelen + 1, val);
- if (putenv (string) != 0)
- xalloc_die ();
-}
-
-#if defined SYSLOG_SUCCESS || defined SYSLOG_FAILURE
-/* Log the fact that someone has run su to the user given by PW;
- if SUCCESSFUL is true, they gave the correct password, etc. */
-
-static void
-log_su (struct passwd const *pw, bool successful)
-{
- const char *new_user, *old_user, *tty;
-
-# ifndef SYSLOG_NON_ROOT
- if (pw->pw_uid)
- return;
-# endif
- new_user = pw->pw_name;
- /* The utmp entry (via getlogin) is probably the best way to identify
- the user, especially if someone su's from a su-shell. */
- old_user = getlogin ();
- if (!old_user)
- {
- /* getlogin can fail -- usually due to lack of utmp entry.
- Resort to getpwuid. */
- errno = 0;
- uid_t ruid = getuid ();
- uid_t NO_UID = -1;
- struct passwd *pwd = (ruid == NO_UID && errno ? NULL : getpwuid (ruid));
- old_user = (pwd ? pwd->pw_name : "");
- }
- tty = ttyname (STDERR_FILENO);
- if (!tty)
- tty = "none";
- /* 4.2BSD openlog doesn't have the third parameter. */
- openlog (last_component (program_name), 0
-# ifdef LOG_AUTH
- , LOG_AUTH
-# endif
- );
- syslog (LOG_NOTICE,
-# ifdef SYSLOG_NON_ROOT
- "%s(to %s) %s on %s",
-# else
- "%s%s on %s",
-# endif
- successful ? "" : "FAILED SU ",
-# ifdef SYSLOG_NON_ROOT
- new_user,
-# endif
- old_user, tty);
- closelog ();
-}
-#endif
-
-/* Ask the user for a password.
- Return true if the user gives the correct password for entry PW,
- false if not. Return true without asking for a password if run by UID 0
- or if PW has an empty password. */
-
-static bool
-correct_password (const struct passwd *pw)
-{
- char *unencrypted, *encrypted, *correct;
-#if HAVE_GETSPNAM && HAVE_STRUCT_SPWD_SP_PWDP
- /* Shadow passwd stuff for SVR3 and maybe other systems. */
- struct spwd *sp = getspnam (pw->pw_name);
-
- endspent ();
- if (sp)
- correct = sp->sp_pwdp;
- else
-#endif
- correct = pw->pw_passwd;
-
- if (getuid () == 0 || !correct || correct[0] == '\0')
- return true;
-
- unencrypted = getpass (_("Password:"));
- if (!unencrypted)
- {
- error (0, 0, _("getpass: cannot open /dev/tty"));
- return false;
- }
- encrypted = crypt (unencrypted, correct);
- memset (unencrypted, 0, strlen (unencrypted));
- return STREQ (encrypted, correct);
-}
-
-/* Update 'environ' for the new shell based on PW, with SHELL being
- the value for the SHELL environment variable. */
-
-static void
-modify_environment (const struct passwd *pw, const char *shell)
-{
- if (simulate_login)
- {
- /* Leave TERM unchanged. Set HOME, SHELL, USER, LOGNAME, PATH.
- Unset all other environment variables. */
- char const *term = getenv ("TERM");
- if (term)
- term = xstrdup (term);
- environ = xmalloc ((6 + !!term) * sizeof (char *));
- environ[0] = NULL;
- if (term)
- xsetenv ("TERM", term);
- xsetenv ("HOME", pw->pw_dir);
- xsetenv ("SHELL", shell);
- xsetenv ("USER", pw->pw_name);
- xsetenv ("LOGNAME", pw->pw_name);
- xsetenv ("PATH", (pw->pw_uid
- ? DEFAULT_LOGIN_PATH
- : DEFAULT_ROOT_LOGIN_PATH));
- }
- else
- {
- /* Set HOME, SHELL, and if not becoming a super-user,
- USER and LOGNAME. */
- if (change_environment)
- {
- xsetenv ("HOME", pw->pw_dir);
- xsetenv ("SHELL", shell);
- if (pw->pw_uid)
- {
- xsetenv ("USER", pw->pw_name);
- xsetenv ("LOGNAME", pw->pw_name);
- }
- }
- }
-}
-
-/* Become the user and group(s) specified by PW. */
-
-static void
-change_identity (const struct passwd *pw)
-{
-#ifdef HAVE_INITGROUPS
- errno = 0;
- if (initgroups (pw->pw_name, pw->pw_gid) == -1)
- error (EXIT_CANCELED, errno, _("cannot set groups"));
- endgrent ();
-#endif
- if (setgid (pw->pw_gid))
- error (EXIT_CANCELED, errno, _("cannot set group id"));
- if (setuid (pw->pw_uid))
- error (EXIT_CANCELED, errno, _("cannot set user id"));
-}
-
-/* Run SHELL, or DEFAULT_SHELL if SHELL is empty.
- If COMMAND is nonzero, pass it to the shell with the -c option.
- Pass ADDITIONAL_ARGS to the shell as more arguments; there
- are N_ADDITIONAL_ARGS extra arguments. */
-
-static void
-run_shell (char const *shell, char const *command, char **additional_args,
- size_t n_additional_args)
-{
- size_t n_args = 1 + fast_startup + 2 * !!command + n_additional_args + 1;
- char const **args = xnmalloc (n_args, sizeof *args);
- size_t argno = 1;
-
- if (simulate_login)
- {
- char *arg0;
- char *shell_basename;
-
- shell_basename = last_component (shell);
- arg0 = xmalloc (strlen (shell_basename) + 2);
- arg0[0] = '-';
- strcpy (arg0 + 1, shell_basename);
- args[0] = arg0;
- }
- else
- args[0] = last_component (shell);
- if (fast_startup)
- args[argno++] = "-f";
- if (command)
- {
- args[argno++] = "-c";
- args[argno++] = command;
- }
- memcpy (args + argno, additional_args, n_additional_args * sizeof *args);
- args[argno + n_additional_args] = NULL;
- execv (shell, (char **) args);
-
- {
- int exit_status = (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE);
- error (0, errno, "%s", shell);
- exit (exit_status);
- }
-}
-
-/* Return true if SHELL is a restricted shell (one not returned by
- getusershell), else false, meaning it is a standard shell. */
-
-static bool
-restricted_shell (const char *shell)
-{
- char *line;
-
- setusershell ();
- while ((line = getusershell ()) != NULL)
- {
- if (*line != '#' && STREQ (line, shell))
- {
- endusershell ();
- return false;
- }
- }
- endusershell ();
- return true;
-}
-
-void
-usage (int status)
-{
- if (status != EXIT_SUCCESS)
- emit_try_help ();
- else
- {
- printf (_("Usage: %s [OPTION]... [-] [USER [ARG]...]\n"), program_name);
- fputs (_("\
-Change the effective user id and group id to that of USER.\n\
-\n\
- -, -l, --login make the shell a login shell\n\
- -c, --command=COMMAND pass a single COMMAND to the shell with -c\n\
- -f, --fast pass -f to the shell (for csh or tcsh)\n\
- -m, --preserve-environment do not reset environment variables\n\
- -p same as -m\n\
- -s, --shell=SHELL run SHELL if /etc/shells allows it\n\
-"), stdout);
- fputs (HELP_OPTION_DESCRIPTION, stdout);
- fputs (VERSION_OPTION_DESCRIPTION, stdout);
- fputs (_("\
-\n\
-A mere - implies -l. If USER not given, assume root.\n\
-"), stdout);
- emit_ancillary_info ();
- }
- exit (status);
-}
-
-int
-main (int argc, char **argv)
-{
- int optc;
- const char *new_user = DEFAULT_USER;
- char *command = NULL;
- char *shell = NULL;
- struct passwd *pw;
- struct passwd pw_copy;
-
- initialize_main (&argc, &argv);
- set_program_name (argv[0]);
- setlocale (LC_ALL, "");
- bindtextdomain (PACKAGE, LOCALEDIR);
- textdomain (PACKAGE);
-
- initialize_exit_failure (EXIT_CANCELED);
- atexit (close_stdout);
-
- fast_startup = false;
- simulate_login = false;
- change_environment = true;
-
- while ((optc = getopt_long (argc, argv, "c:flmps:", longopts, NULL)) != -1)
- {
- switch (optc)
- {
- case 'c':
- command = optarg;
- break;
-
- case 'f':
- fast_startup = true;
- break;
-
- case 'l':
- simulate_login = true;
- break;
-
- case 'm':
- case 'p':
- change_environment = false;
- break;
-
- case 's':
- shell = optarg;
- break;
-
- case_GETOPT_HELP_CHAR;
-
- case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
-
- default:
- usage (EXIT_CANCELED);
- }
- }
-
- if (optind < argc && STREQ (argv[optind], "-"))
- {
- simulate_login = true;
- ++optind;
- }
- if (optind < argc)
- new_user = argv[optind++];
-
- pw = getpwnam (new_user);
- if (! (pw && pw->pw_name && pw->pw_name[0] && pw->pw_dir && pw->pw_dir[0]
- && pw->pw_passwd))
- error (EXIT_CANCELED, 0, _("user %s does not exist"), new_user);
-
- /* Make a copy of the password information and point pw at the local
- copy instead. Otherwise, some systems (e.g. GNU/Linux) would clobber
- the static data through the getlogin call from log_su.
- Also, make sure pw->pw_shell is a nonempty string.
- It may be NULL when NEW_USER is a username that is retrieved via NIS (YP),
- but that doesn't have a default shell listed. */
- pw_copy = *pw;
- pw = &pw_copy;
- pw->pw_name = xstrdup (pw->pw_name);
- pw->pw_passwd = xstrdup (pw->pw_passwd);
- pw->pw_dir = xstrdup (pw->pw_dir);
- pw->pw_shell = xstrdup (pw->pw_shell && pw->pw_shell[0]
- ? pw->pw_shell
- : DEFAULT_SHELL);
- endpwent ();
-
- if (!correct_password (pw))
- {
-#ifdef SYSLOG_FAILURE
- log_su (pw, false);
-#endif
- error (EXIT_CANCELED, 0, _("incorrect password"));
- }
-#ifdef SYSLOG_SUCCESS
- else
- {
- log_su (pw, true);
- }
-#endif
-
- if (!shell && !change_environment)
- shell = getenv ("SHELL");
- if (shell && getuid () != 0 && restricted_shell (pw->pw_shell))
- {
- /* The user being su'd to has a nonstandard shell, and so is
- probably a uucp account or has restricted access. Don't
- compromise the account by allowing access with a standard
- shell. */
- error (0, 0, _("using restricted shell %s"), pw->pw_shell);
- shell = NULL;
- }
- shell = xstrdup (shell ? shell : pw->pw_shell);
- modify_environment (pw, shell);
-
- change_identity (pw);
- if (simulate_login && chdir (pw->pw_dir) != 0)
- error (0, errno, _("warning: cannot change directory to %s"), pw->pw_dir);
-
- /* error() flushes stderr, but does not check for write failure.
- Normally, we would catch this via our atexit() hook of
- close_stdout, but execv() gets in the way. If stderr
- encountered a write failure, there is no need to try calling
- error() again. */
- if (ferror (stderr))
- exit (EXIT_CANCELED);
-
- run_shell (shell, command, argv + optind, MAX (0, argc - optind));
-}
diff --git a/src/sum.c b/src/sum.c
index df012072..9ebcc424 100644
--- a/src/sum.c
+++ b/src/sum.c
@@ -1,5 +1,5 @@
/* sum -- checksum and count the blocks in a file
- Copyright (C) 1986-2012 Free Software Foundation, Inc.
+ Copyright (C) 1986-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/sync.c b/src/sync.c
index 95db2f38..03b8e530 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -1,5 +1,5 @@
/* sync - update the super block
- Copyright (C) 1994-2012 Free Software Foundation, Inc.
+ Copyright (C) 1994-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/system.h b/src/system.h
index 06f09cba..1677999e 100644
--- a/src/system.h
+++ b/src/system.h
@@ -1,5 +1,5 @@
/* system-dependent definitions for coreutils
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -30,6 +30,9 @@ you must include <sys/types.h> before including this file
#include <sys/stat.h>
+/* Commonly used file permission combination. */
+#define MODE_RW_UGO (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
+
#if !defined HAVE_MKFIFO
# define mkfifo(name, mode) mknod (name, (mode) | S_IFIFO, 0)
#endif
@@ -536,6 +539,14 @@ is_nul (const char *buf, size_t bufsize)
)
static inline void
+emit_mandatory_arg_note (void)
+{
+ fputs (_("\n\
+Mandatory arguments to long options are mandatory for short options too.\n\
+"), stdout);
+}
+
+static inline void
emit_size_note (void)
{
fputs (_("\n\
@@ -623,6 +634,21 @@ The following directory is part of the cycle:\n %s\n"), \
} \
while (0)
+/* Like stpncpy, but do ensure that the result is NUL-terminated,
+ and do not NUL-pad out to LEN. I.e., when strnlen (src, len) == len,
+ this function writes a NUL byte into dest[len]. Thus, the length
+ of the destination buffer must be at least LEN + 1.
+ The DEST and SRC buffers must not overlap. */
+static inline char *
+stzncpy (char *restrict dest, char const *restrict src, size_t len)
+{
+ char const *src_end = src + len;
+ while (src < src_end && *src)
+ *dest++ = *src++;
+ *dest = 0;
+ return dest;
+}
+
#ifndef ARRAY_CARDINALITY
# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
#endif
diff --git a/src/tac-pipe.c b/src/tac-pipe.c
index fc2201f0..f29db43c 100644
--- a/src/tac-pipe.c
+++ b/src/tac-pipe.c
@@ -1,6 +1,6 @@
/* tac from a pipe.
- Copyright (C) 1997-2012 Free Software Foundation, Inc.
+ Copyright (C) 1997-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/tac.c b/src/tac.c
index 8bef4439..c6a8cf69 100644
--- a/src/tac.c
+++ b/src/tac.c
@@ -1,5 +1,5 @@
/* tac - concatenate and print files in reverse
- Copyright (C) 1988-2012 Free Software Foundation, Inc.
+ Copyright (C) 1988-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -137,11 +137,10 @@ Usage: %s [OPTION]... [FILE]...\n\
fputs (_("\
Write each FILE to standard output, last line first.\n\
With no FILE, or when FILE is -, read standard input.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-b, --before attach the separator before instead of after\n\
-r, --regex interpret the separator as a regular expression\n\
diff --git a/src/tail.c b/src/tail.c
index 29ddabd6..ca851ee6 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -1,5 +1,5 @@
/* tail -- output the last part of file(s)
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -263,11 +263,10 @@ Usage: %s [OPTION]... [FILE]...\n\
Print the last %d lines of each FILE to standard output.\n\
With more than one FILE, precede each with a header giving the file name.\n\
With no FILE, or when FILE is -, read standard input.\n\
-\n\
"), DEFAULT_N_LINES);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
-"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-c, --bytes=K output the last K bytes; alternatively, use -c +K\n\
to output bytes starting with the Kth of each file\n\
@@ -1141,6 +1140,7 @@ tail_forever (struct File_spec *f, size_t n_files, double sleep_interval)
f[i].fd = -1;
f[i].errnum = errno;
error (0, errno, "%s", name);
+ close (fd); /* ignore failure */
continue;
}
@@ -1276,9 +1276,9 @@ check_fspec (struct File_spec *fspec, int wd, int *prev_wd)
if (fstat (fspec->fd, &stats) != 0)
{
+ fspec->errnum = errno;
close_fd (fspec->fd, name);
fspec->fd = -1;
- fspec->errnum = errno;
return;
}
diff --git a/src/tee.c b/src/tee.c
index 2d82577e..e5165de1 100644
--- a/src/tee.c
+++ b/src/tee.c
@@ -1,5 +1,5 @@
/* tee - read from standard input and write to standard output and files.
- Copyright (C) 1985-2012 Free Software Foundation, Inc.
+ Copyright (C) 1985-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/test.c b/src/test.c
index 45f2206b..20382097 100644
--- a/src/test.c
+++ b/src/test.c
@@ -2,7 +2,7 @@
/* Modified to run with the GNU shell by bfox. */
-/* Copyright (C) 1987-2012 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/timeout.c b/src/timeout.c
index c0a25274..2ffd2b11 100644
--- a/src/timeout.c
+++ b/src/timeout.c
@@ -1,5 +1,5 @@
/* timeout -- run a command with bounded time
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -49,6 +49,9 @@
#include <stdio.h>
#include <sys/types.h>
#include <signal.h>
+#if HAVE_PRCTL
+# include <sys/prctl.h>
+#endif
#include <sys/wait.h>
#include "system.h"
@@ -78,12 +81,14 @@ static int timed_out;
static int term_signal = SIGTERM; /* same default as kill command. */
static int monitored_pid;
static double kill_after;
-static bool foreground; /* whether to use another program group. */
+static bool foreground; /* whether to use another program group. */
+static bool preserve_status; /* whether to use a timeout status or not. */
/* for long options with no corresponding short option, use enum */
enum
{
- FOREGROUND_OPTION = CHAR_MAX + 1
+ FOREGROUND_OPTION = CHAR_MAX + 1,
+ PRESERVE_STATUS_OPTION
};
static struct option const long_options[] =
@@ -91,11 +96,22 @@ static struct option const long_options[] =
{"kill-after", required_argument, NULL, 'k'},
{"signal", required_argument, NULL, 's'},
{"foreground", no_argument, NULL, FOREGROUND_OPTION},
+ {"preserve-status", no_argument, NULL, PRESERVE_STATUS_OPTION},
{GETOPT_HELP_OPTION_DECL},
{GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
+static void
+unblock_signal (int sig)
+{
+ sigset_t unblock_set;
+ sigemptyset (&unblock_set);
+ sigaddset (&unblock_set, sig);
+ if (sigprocmask (SIG_UNBLOCK, &unblock_set, NULL) != 0)
+ error (0, errno, _("warning: sigprocmask"));
+}
+
/* Start the timeout after which we'll receive a SIGALRM.
Round DURATION up to the next representable value.
Treat out-of-range values as if they were maximal,
@@ -104,6 +120,11 @@ static struct option const long_options[] =
static void
settimeout (double duration)
{
+
+ /* We configure timers below so that SIGALRM is sent on expiry.
+ Therefore ensure we don't inherit a mask blocking SIGALRM. */
+ unblock_signal (SIGALRM);
+
/* timer_settime() provides potentially nanosecond resolution.
setitimer() is more portable (to Darwin for example),
but only provides microsecond resolution and thus is
@@ -207,10 +228,14 @@ Usage: %s [OPTION] DURATION COMMAND [ARG]...\n\
fputs (_("\
Start COMMAND, and kill it if still running after DURATION.\n\
-\n\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
+ --preserve-status\n\
+ exit with the same status as COMMAND, even when the\n\
+ command times out\n\
--foreground\n\
When not running timeout directly from a shell prompt,\n\
allow COMMAND to read from the TTY and receive TTY signals.\n\
@@ -232,12 +257,12 @@ DURATION is a floating point number with an optional suffix:\n\
or 'd' for days.\n"), stdout);
fputs (_("\n\
-If the command times out, then exit with status 124. Otherwise, exit\n\
-with the status of COMMAND. If no signal is specified, send the TERM\n\
-signal upon timeout. The TERM signal kills any process that does not\n\
-block or catch that signal. For other processes, it may be necessary to\n\
-use the KILL (9) signal, since this signal cannot be caught. If the\n\
-KILL (9) signal is sent, the exit status is 128+9 rather than 124.\n"), stdout);
+If the command times out, and --preserve-status is not set, then exit with\n\
+status 124. Otherwise, exit with the status of COMMAND. If no signal\n\
+is specified, send the TERM signal upon timeout. The TERM signal kills\n\
+any process that does not block or catch that signal. It may be necessary\n\
+to use the KILL (9) signal, since this signal cannot be caught, in which\n\
+case the exit status is 128+9 rather than 124.\n"), stdout);
emit_ancillary_info ();
}
exit (status);
@@ -316,6 +341,29 @@ install_signal_handlers (int sigterm)
sigaction (sigterm, &sa, NULL); /* user specified termination signal. */
}
+/* Try to disable core dumps for this process.
+ Return TRUE if successful, FALSE otherwise. */
+static bool
+disable_core_dumps (void)
+{
+#if HAVE_PRCTL && defined PR_SET_DUMPABLE
+ if (prctl (PR_SET_DUMPABLE, 0) == 0)
+ return true;
+
+#elif HAVE_SETRLIMIT && defined RLIMIT_CORE
+ /* Note this doesn't disable processing by a filter in
+ /proc/sys/kernel/core_pattern on Linux. */
+ if (setrlimit (RLIMIT_CORE, &(struct rlimit) {0,0}) == 0)
+ return true;
+
+#else
+ return false;
+#endif
+
+ error (0, errno, _("warning: disabling core dumps failed"));
+ return false;
+}
+
int
main (int argc, char **argv)
{
@@ -350,6 +398,10 @@ main (int argc, char **argv)
foreground = true;
break;
+ case PRESERVE_STATUS_OPTION:
+ preserve_status = true;
+ break;
+
case_GETOPT_HELP_CHAR;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
@@ -426,21 +478,14 @@ main (int argc, char **argv)
else if (WIFSIGNALED (status))
{
int sig = WTERMSIG (status);
-/* The following is not used as one cannot disable processing
- by a filter in /proc/sys/kernel/core_pattern on Linux. */
-#if 0 && HAVE_SETRLIMIT && defined RLIMIT_CORE
- if (!timed_out)
+ if (WCOREDUMP (status))
+ error (0, 0, _("the monitored command dumped core"));
+ if (!timed_out && disable_core_dumps ())
{
- /* exit with the signal flag set, but avoid core files. */
- if (setrlimit (RLIMIT_CORE, &(struct rlimit) {0,0}) == 0)
- {
- signal (sig, SIG_DFL);
- raise (sig);
- }
- else
- error (0, errno, _("warning: disabling core dumps failed"));
+ /* exit with the signal flag set. */
+ signal (sig, SIG_DFL);
+ raise (sig);
}
-#endif
status = sig + 128; /* what sh returns for signaled processes. */
}
else
@@ -451,7 +496,7 @@ main (int argc, char **argv)
}
}
- if (timed_out)
+ if (timed_out && !preserve_status)
return EXIT_TIMEDOUT;
else
return status;
diff --git a/src/touch.c b/src/touch.c
index 368516e7..3a3ffbe0 100644
--- a/src/touch.c
+++ b/src/touch.c
@@ -1,5 +1,5 @@
/* touch -- change modification and access times of files
- Copyright (C) 1987-2012 Free Software Foundation, Inc.
+ Copyright (C) 1987-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -131,11 +131,8 @@ touch (const char *file)
else if (! (no_create || no_dereference))
{
/* Try to open FILE, creating it if necessary. */
- int default_permissions =
- S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
fd = fd_reopen (STDIN_FILENO, file,
- O_WRONLY | O_CREAT | O_NONBLOCK | O_NOCTTY,
- default_permissions);
+ O_WRONLY | O_CREAT | O_NONBLOCK | O_NOCTTY, MODE_RW_UGO);
/* Don't save a copy of errno if it's EISDIR, since that would lead
touch to give a bogus diagnostic for e.g., 'touch /' (assuming
@@ -172,7 +169,7 @@ touch (const char *file)
{
if (close (STDIN_FILENO) != 0)
{
- error (0, errno, _("closing %s"), quote (file));
+ error (0, errno, _("failed to close %s"), quote (file));
return false;
}
}
@@ -221,11 +218,10 @@ is supplied.\n\
\n\
A FILE argument string of - is handled specially and causes touch to\n\
change the times of the file associated with standard output.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-a change only the access time\n\
-c, --no-create do not create any files\n\
@@ -241,7 +237,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
fputs (_("\
-r, --reference=FILE use this file's times instead of current time\n\
-t STAMP use [[CC]YY]MMDDhhmm[.ss] instead of current time\n\
- --time=WORD change the specified time:\n\
+ --time=WORD change the specified time:\n\
WORD is access, atime, or use: equivalent to -a\n\
WORD is modify or mtime: equivalent to -m\n\
"), stdout);
diff --git a/src/tr.c b/src/tr.c
index 2a86b5a9..d45e3dff 100644
--- a/src/tr.c
+++ b/src/tr.c
@@ -1,5 +1,5 @@
/* tr -- a filter to translate characters
- Copyright (C) 1991-2012 Free Software Foundation, Inc.
+ Copyright (C) 1991-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/true.c b/src/true.c
index b37ac543..804141c0 100644
--- a/src/true.c
+++ b/src/true.c
@@ -1,5 +1,5 @@
/* Exit with a status code indicating success.
- Copyright (C) 1999-2012 Free Software Foundation, Inc.
+ Copyright (C) 1999-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/truncate.c b/src/truncate.c
index e37ab380..8349cb61 100644
--- a/src/truncate.c
+++ b/src/truncate.c
@@ -1,5 +1,5 @@
/* truncate -- truncate or extend the length of files.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -102,11 +102,10 @@ A FILE argument that does not exist is created.\n\
If a FILE is larger than the specified size, the extra data is lost.\n\
If a FILE is shorter, it is extended and the extended part (hole)\n\
reads as zero bytes.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-c, --no-create do not create any files\n\
"), stdout);
@@ -244,7 +243,6 @@ main (int argc, char **argv)
off_t size IF_LINT ( = 0);
off_t rsize = -1;
rel_mode_t rel_mode = rm_abs;
- mode_t omode;
int c, fd = -1, oflags;
char const *fname;
@@ -371,8 +369,15 @@ main (int argc, char **argv)
if (0 <= ref_fd)
{
off_t file_end = lseek (ref_fd, 0, SEEK_END);
- if (0 <= file_end && close (ref_fd) == 0)
+ int saved_errno = errno;
+ close (ref_fd); /* ignore failure */
+ if (0 <= file_end)
file_size = file_end;
+ else
+ {
+ /* restore, in case close clobbered it. */
+ errno = saved_errno;
+ }
}
}
if (file_size < 0)
@@ -385,11 +390,10 @@ main (int argc, char **argv)
}
oflags = O_WRONLY | (no_create ? 0 : O_CREAT) | O_NONBLOCK;
- omode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
while ((fname = *argv++) != NULL)
{
- if ((fd = open (fname, oflags, omode)) == -1)
+ if ((fd = open (fname, oflags, MODE_RW_UGO)) == -1)
{
/* 'truncate -s0 -c no-such-file' shouldn't gen error
'truncate -s0 no-such-dir/file' should gen ENOENT error
@@ -410,7 +414,7 @@ main (int argc, char **argv)
errors |= !do_ftruncate (fd, fname, size, rsize, rel_mode);
if (close (fd) != 0)
{
- error (0, errno, _("closing %s"), quote (fname));
+ error (0, errno, _("failed to close %s"), quote (fname));
errors = true;
}
}
diff --git a/src/tsort.c b/src/tsort.c
index 04ddbcd3..d22f1f05 100644
--- a/src/tsort.c
+++ b/src/tsort.c
@@ -1,5 +1,5 @@
/* tsort - topological sort.
- Copyright (C) 1998-2012 Free Software Foundation, Inc.
+ Copyright (C) 1998-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/tty.c b/src/tty.c
index 63598a0f..312bf422 100644
--- a/src/tty.c
+++ b/src/tty.c
@@ -1,5 +1,5 @@
/* tty -- print the name of the terminal connected to standard input
- Copyright (C) 1990-2012 Free Software Foundation, Inc.
+ Copyright (C) 1990-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/uname.c b/src/uname.c
index 0eb123b6..cfcd0a33 100644
--- a/src/uname.c
+++ b/src/uname.c
@@ -1,6 +1,6 @@
/* uname -- print system information
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/unexpand.c b/src/unexpand.c
index ea0fc710..1803cd57 100644
--- a/src/unexpand.c
+++ b/src/unexpand.c
@@ -1,5 +1,5 @@
/* unexpand - convert blanks to tabs
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -117,11 +117,10 @@ Usage: %s [OPTION]... [FILE]...\n\
fputs (_("\
Convert blanks in each FILE to tabs, writing to standard output.\n\
With no FILE, or when FILE is -, read standard input.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-a, --all convert all blanks, instead of just initial blanks\n\
--first-only convert only leading sequences of blanks (overrides -a)\n\
diff --git a/src/uniq.c b/src/uniq.c
index 9ed59d78..5efdad7d 100644
--- a/src/uniq.c
+++ b/src/uniq.c
@@ -1,5 +1,5 @@
/* uniq -- remove duplicate lines from a sorted file
- Copyright (C) 1986-2012 Free Software Foundation, Inc.
+ Copyright (C) 1986-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -140,11 +140,10 @@ Filter adjacent matching lines from INPUT (or standard input),\n\
writing to OUTPUT (or standard output).\n\
\n\
With no options, matching lines are merged to the first occurrence.\n\
-\n\
-"), stdout);
- fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
+
+ emit_mandatory_arg_note ();
+
fputs (_("\
-c, --count prefix lines by the number of occurrences\n\
-d, --repeated only print duplicate lines\n\
diff --git a/src/unlink.c b/src/unlink.c
index e2bab5a2..e822fd69 100644
--- a/src/unlink.c
+++ b/src/unlink.c
@@ -1,5 +1,5 @@
/* unlink utility for GNU.
- Copyright (C) 2001-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/uptime.c b/src/uptime.c
index f8c7cfab..8e8f2ca6 100644
--- a/src/uptime.c
+++ b/src/uptime.c
@@ -1,5 +1,5 @@
/* GNU's uptime.
- Copyright (C) 1992-2012 Free Software Foundation, Inc.
+ Copyright (C) 1992-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -146,9 +146,9 @@ print_uptime (size_t n, const STRUCT_UTMP *this)
select_plural (updays)),
updays, uphours, upmins);
else
- printf ("up %2d:%02d, ", uphours, upmins);
+ printf (_("up %2d:%02d, "), uphours, upmins);
}
- printf (ngettext ("%lu user", "%lu users", entries),
+ printf (ngettext ("%lu user", "%lu users", select_plural (entries)),
(unsigned long int) entries);
loads = getloadavg (avg, 3);
diff --git a/src/users.c b/src/users.c
index 48940aaa..d1c8137f 100644
--- a/src/users.c
+++ b/src/users.c
@@ -1,5 +1,5 @@
/* GNU's users.
- Copyright (C) 1992-2012 Free Software Foundation, Inc.
+ Copyright (C) 1992-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/wc.c b/src/wc.c
index 50173773..93decd7e 100644
--- a/src/wc.c
+++ b/src/wc.c
@@ -1,5 +1,5 @@
/* wc - print the number of lines, words, and bytes in files
- Copyright (C) 1985-2012 Free Software Foundation, Inc.
+ Copyright (C) 1985-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/wheel-gen.pl b/src/wheel-gen.pl
deleted file mode 100755
index 65b60d12..00000000
--- a/src/wheel-gen.pl
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/usr/bin/perl -w
-# Generate the spokes of a wheel, for wheel factorization.
-
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
- if 0;
-
-use strict;
-(my $ME = $0) =~ s|.*/||;
-
-# A global destructor to close standard output with error checking.
-sub END
-{
- defined fileno STDOUT
- or return;
- close STDOUT
- and return;
- warn "$ME: closing standard output: $!\n";
- $? ||= 1;
-}
-
-sub is_prime ($)
-{
- my ($n) = @_;
- use integer;
-
- $n == 2
- and return 1;
-
- my $d = 2;
- my $w = 1;
- while (1)
- {
- my $q = $n / $d;
- $n == $q * $d
- and return 0;
- $d += $w;
- $q < $d
- and last;
- $w = 2;
- }
- return 1;
-}
-
-{
- @ARGV == 1
- or die "$ME: missing argument\n";
-
- my $wheel_size = $ARGV[0];
-
- my @primes = (2);
- my $product = $primes[0];
- my $n_primes = 1;
- for (my $i = 3; ; $i += 2)
- {
- if (is_prime $i)
- {
- push @primes, $i;
- $product *= $i;
- ++$n_primes == $wheel_size
- and last;
- }
- }
-
- my $ws_m1 = $wheel_size - 1;
- print <<EOF;
-/* The first $ws_m1 elements correspond to the incremental offsets of the
- first $wheel_size primes (@primes). The $wheel_size(th) element is the
- difference between that last prime and the next largest integer
- that is not a multiple of those primes. The remaining numbers
- define the wheel. For more information, see
- http://www.utm.edu/research/primes/glossary/WheelFactorization.html. */
-EOF
-
- my @increments;
- my $prev = 2;
- for (my $i = 3; ; $i += 2)
- {
- my $rel_prime = 1;
- foreach my $divisor (@primes)
- {
- $i != $divisor && $i % $divisor == 0
- and $rel_prime = 0;
- }
-
- if ($rel_prime)
- {
- #warn $i, ' ', $i - $prev, "\n";
- push @increments, $i - $prev;
- $prev = $i;
-
- $product + 1 < $i
- and last;
- }
- }
-
- print join (",\n", @increments), "\n";
-
- exit 0;
-}
diff --git a/src/wheel-size.h b/src/wheel-size.h
deleted file mode 100644
index 1f2d609d..00000000
--- a/src/wheel-size.h
+++ /dev/null
@@ -1 +0,0 @@
-#define WHEEL_SIZE 5
diff --git a/src/wheel.h b/src/wheel.h
deleted file mode 100644
index 1c04d598..00000000
--- a/src/wheel.h
+++ /dev/null
@@ -1,491 +0,0 @@
-/* The first 4 elements correspond to the incremental offsets of the
- first 5 primes (2 3 5 7 11). The 5(th) element is the
- difference between that last prime and the next largest integer
- that is not a multiple of those primes. The remaining numbers
- define the wheel. For more information, see
- http://www.utm.edu/research/primes/glossary/WheelFactorization.html. */
-1,
-2,
-2,
-4,
-2,
-4,
-2,
-4,
-6,
-2,
-6,
-4,
-2,
-4,
-6,
-6,
-2,
-6,
-4,
-2,
-6,
-4,
-6,
-8,
-4,
-2,
-4,
-2,
-4,
-14,
-4,
-6,
-2,
-10,
-2,
-6,
-6,
-4,
-2,
-4,
-6,
-2,
-10,
-2,
-4,
-2,
-12,
-10,
-2,
-4,
-2,
-4,
-6,
-2,
-6,
-4,
-6,
-6,
-6,
-2,
-6,
-4,
-2,
-6,
-4,
-6,
-8,
-4,
-2,
-4,
-6,
-8,
-6,
-10,
-2,
-4,
-6,
-2,
-6,
-6,
-4,
-2,
-4,
-6,
-2,
-6,
-4,
-2,
-6,
-10,
-2,
-10,
-2,
-4,
-2,
-4,
-6,
-8,
-4,
-2,
-4,
-12,
-2,
-6,
-4,
-2,
-6,
-4,
-6,
-12,
-2,
-4,
-2,
-4,
-8,
-6,
-4,
-6,
-2,
-4,
-6,
-2,
-6,
-10,
-2,
-4,
-6,
-2,
-6,
-4,
-2,
-4,
-2,
-10,
-2,
-10,
-2,
-4,
-6,
-6,
-2,
-6,
-6,
-4,
-6,
-6,
-2,
-6,
-4,
-2,
-6,
-4,
-6,
-8,
-4,
-2,
-6,
-4,
-8,
-6,
-4,
-6,
-2,
-4,
-6,
-8,
-6,
-4,
-2,
-10,
-2,
-6,
-4,
-2,
-4,
-2,
-10,
-2,
-10,
-2,
-4,
-2,
-4,
-8,
-6,
-4,
-2,
-4,
-6,
-6,
-2,
-6,
-4,
-8,
-4,
-6,
-8,
-4,
-2,
-4,
-2,
-4,
-8,
-6,
-4,
-6,
-6,
-6,
-2,
-6,
-6,
-4,
-2,
-4,
-6,
-2,
-6,
-4,
-2,
-4,
-2,
-10,
-2,
-10,
-2,
-6,
-4,
-6,
-2,
-6,
-4,
-2,
-4,
-6,
-6,
-8,
-4,
-2,
-6,
-10,
-8,
-4,
-2,
-4,
-2,
-4,
-8,
-10,
-6,
-2,
-4,
-8,
-6,
-6,
-4,
-2,
-4,
-6,
-2,
-6,
-4,
-6,
-2,
-10,
-2,
-10,
-2,
-4,
-2,
-4,
-6,
-2,
-6,
-4,
-2,
-4,
-6,
-6,
-2,
-6,
-6,
-6,
-4,
-6,
-8,
-4,
-2,
-4,
-2,
-4,
-8,
-6,
-4,
-8,
-4,
-6,
-2,
-6,
-6,
-4,
-2,
-4,
-6,
-8,
-4,
-2,
-4,
-2,
-10,
-2,
-10,
-2,
-4,
-2,
-4,
-6,
-2,
-10,
-2,
-4,
-6,
-8,
-6,
-4,
-2,
-6,
-4,
-6,
-8,
-4,
-6,
-2,
-4,
-8,
-6,
-4,
-6,
-2,
-4,
-6,
-2,
-6,
-6,
-4,
-6,
-6,
-2,
-6,
-6,
-4,
-2,
-10,
-2,
-10,
-2,
-4,
-2,
-4,
-6,
-2,
-6,
-4,
-2,
-10,
-6,
-2,
-6,
-4,
-2,
-6,
-4,
-6,
-8,
-4,
-2,
-4,
-2,
-12,
-6,
-4,
-6,
-2,
-4,
-6,
-2,
-12,
-4,
-2,
-4,
-8,
-6,
-4,
-2,
-4,
-2,
-10,
-2,
-10,
-6,
-2,
-4,
-6,
-2,
-6,
-4,
-2,
-4,
-6,
-6,
-2,
-6,
-4,
-2,
-10,
-6,
-8,
-6,
-4,
-2,
-4,
-8,
-6,
-4,
-6,
-2,
-4,
-6,
-2,
-6,
-6,
-6,
-4,
-6,
-2,
-6,
-4,
-2,
-4,
-2,
-10,
-12,
-2,
-4,
-2,
-10,
-2,
-6,
-4,
-2,
-4,
-6,
-6,
-2,
-10,
-2,
-6,
-4,
-14,
-4,
-2,
-4,
-2,
-4,
-8,
-6,
-4,
-6,
-2,
-4,
-6,
-2,
-6,
-6,
-4,
-2,
-4,
-6,
-2,
-6,
-4,
-2,
-4,
-12,
-2,
-12
diff --git a/src/who.c b/src/who.c
index c875b1de..6b44c4bb 100644
--- a/src/who.c
+++ b/src/who.c
@@ -1,5 +1,5 @@
/* GNU's who.
- Copyright (C) 1992-2012 Free Software Foundation, Inc.
+ Copyright (C) 1992-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -342,23 +342,15 @@ print_user (const STRUCT_UTMP *utmp_ent, time_t boottime)
#define DEV_DIR_LEN (sizeof (DEV_DIR_WITH_TRAILING_SLASH) - 1)
char line[sizeof (utmp_ent->ut_line) + DEV_DIR_LEN + 1];
+ char *p = line;
PIDSTR_DECL_AND_INIT (pidstr, utmp_ent);
/* Copy ut_line into LINE, prepending '/dev/' if ut_line is not
already an absolute file name. Some systems may put the full,
absolute file name in ut_line. */
- if (utmp_ent->ut_line[0] == '/')
- {
- strncpy (line, utmp_ent->ut_line, sizeof (utmp_ent->ut_line));
- line[sizeof (utmp_ent->ut_line)] = '\0';
- }
- else
- {
- strcpy (line, DEV_DIR_WITH_TRAILING_SLASH);
- strncpy (line + DEV_DIR_LEN, utmp_ent->ut_line,
- sizeof (utmp_ent->ut_line));
- line[DEV_DIR_LEN + sizeof (utmp_ent->ut_line)] = '\0';
- }
+ if ( ! IS_ABSOLUTE_FILE_NAME (utmp_ent->ut_line))
+ p = stpcpy (p, DEV_DIR_WITH_TRAILING_SLASH);
+ stzncpy (p, utmp_ent->ut_line, sizeof (utmp_ent->ut_line));
if (stat (line, &stats) == 0)
{
@@ -384,8 +376,7 @@ print_user (const STRUCT_UTMP *utmp_ent, time_t boottime)
char *display = NULL;
/* Copy the host name into UT_HOST, and ensure it's nul terminated. */
- strncpy (ut_host, utmp_ent->ut_host, sizeof (utmp_ent->ut_host));
- ut_host[sizeof (utmp_ent->ut_host)] = '\0';
+ stzncpy (ut_host, utmp_ent->ut_host, sizeof (utmp_ent->ut_host));
/* Look for an X display. */
display = strchr (ut_host, ':');
diff --git a/src/whoami.c b/src/whoami.c
index 4e090f6f..dfa28da3 100644
--- a/src/whoami.c
+++ b/src/whoami.c
@@ -1,6 +1,6 @@
/* whoami -- print effective userid
- Copyright (C) 1989-2012 Free Software Foundation, Inc.
+ Copyright (C) 1989-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/yes.c b/src/yes.c
index cc445466..b87b5430 100644
--- a/src/yes.c
+++ b/src/yes.c
@@ -1,5 +1,5 @@
/* yes - output a string repeatedly until killed
- Copyright (C) 1991-2012 Free Software Foundation, Inc.
+ Copyright (C) 1991-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by