<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/cksum.c, branch v9.0</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v9.0</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v9.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2021-09-23T23:39:05Z</updated>
<entry>
<title>cksum: fix -a crc on 64 bit big endian systems</title>
<updated>2021-09-23T23:39:05Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2021-09-23T21:45:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=56bff500c5e48ab9c6fc62b9d457b1f283288417'/>
<id>urn:sha1:56bff500c5e48ab9c6fc62b9d457b1f283288417</id>
<content type='text'>
* src/cksum.c (crc_sum_stream): On sparc64 for example,
a crc of 0 was printed due to mismatch in size of
variable copied between generator and output functions.
uint_fast32_t is generally 64 bits on 64 bit systems,
so we copy through an int to ensure we don't use the wrong
end of a 64 bit variable.
Reported by Nelson H. F. Beebe
</content>
</entry>
<entry>
<title>cksum: support --zero in default mode</title>
<updated>2021-09-15T19:44:18Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2021-09-12T15:57:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d9b78a232948124c1a1421005e5d3bf5de758591'/>
<id>urn:sha1:d9b78a232948124c1a1421005e5d3bf5de758591</id>
<content type='text'>
* src/cksum.h: Thread DELIM through the output functions.
* src/digest.c: Likewise.
* src/sum.c: Likewise.
* src/sum.h: Likewise.
* src/cksum.c: Likewise. Also adjust check to allow -z
with traditional output modes.  Also ajust the global variable
name to avoid shadowing warnings.
* tests/misc/cksum-a.sh: Adjust accordingly.
</content>
</entry>
<entry>
<title>digest: refactor cksum(1) into digest.c</title>
<updated>2021-09-15T14:35:53Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2021-09-05T22:32:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=6a5c561b4fb3018d284d03747c612527e0c89571'/>
<id>urn:sha1:6a5c561b4fb3018d284d03747c612527e0c89571</id>
<content type='text'>
* cfg.mk: Adjust cksum.c to not require config.h
and support a main (for crctab) without calling bindtextdomain().
* po/POTFILES.in: Remove cksum_pclmul.c since it no longer
concerns itself with diagnostics.
* src/cksum.c: Refactor to just providing stream digest,
and digest printing functionality.
* src/cksum.h: Adjust to the new interface.
* src/cksum_pclmul.c: Remove diagnostics, and determine errors
internally.
* src/crctab.c: Separate from cksum.h since that's now included
multiple times.
* src/digest.c: Provide cksum(1) functionality if -DHASH_ALGO_CKSUM
* src/local.mk: Adjust to new crctab.c and HASH_ALGO_CKSUM define.
</content>
</entry>
<entry>
<title>cksum: document the --debug option</title>
<updated>2021-09-15T14:35:53Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2021-09-05T21:07:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=2aab794c84bac9bfc061c24084e83a75d83156de'/>
<id>urn:sha1:2aab794c84bac9bfc061c24084e83a75d83156de</id>
<content type='text'>
This should have been part of commit v8.32-113-gb73b9fcb1

* doc/coreutils.texi (cksum invocation): Add the --debug description.
* src/cksum.c (usage): Likewise.
(main): Also give explicit indication when using generic hardware.
</content>
</entry>
<entry>
<title>maint: use clearerr on stdin when appropriate</title>
<updated>2021-08-22T20:10:26Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2021-08-22T18:54:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=88846befff58d181c5f77d50ec4b11980af16563'/>
<id>urn:sha1:88846befff58d181c5f77d50ec4b11980af16563</id>
<content type='text'>
This is so that commands like ‘fmt - -’ read from stdin
both times, even when it is a tty.  Fix some other minor
issues that are related.
* src/blake2/b2sum.c (main):
* src/cksum.c (cksum):
* src/cut.c (cut_file):
* src/expand-common.c (next_file):
* src/fmt.c (fmt):
* src/fold.c (fold_file):
* src/md5sum.c (digest_file, digest_check):
* src/nl.c (nl_file):
* src/od.c (check_and_close):
* src/paste.c (paste_parallel, paste_serial):
* src/pr.c (close_file):
* src/sum.c (bsd_sum_file):
Use clearerr on stdin so that stdin can be read multiple times
even if it is a tty.  Do not assume that ferror preserves errno as
POSIX does not guarantee this.  Coalesce duplicate diagnostic
calls.
* src/blake2/b2sum.c (main):
* src/fmt.c (main, fmt):
Report read error, even if it's merely fclose failure.
* src/fmt.c: Include die.h.
(fmt): New arg FILE.  Close input (reporting error) if not stdin.
All callers changed.
* src/ptx.c (swallow_file_in_memory): Clear stdin's EOF flag.
* src/sort.c (xfclose): Remove unnecessary feof call.
</content>
</entry>
<entry>
<title>maint: use "char const *" rather than "const char *"</title>
<updated>2021-04-11T17:33:45Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2021-04-11T17:23:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ef772bf97f7ec577754cbb5b278504d83cf41a43'/>
<id>urn:sha1:ef772bf97f7ec577754cbb5b278504d83cf41a43</id>
<content type='text'>
* cfg.mk (sc_prohibit-const-char): Add a new syntax-check to
enforce this style.
* *.[ch]: sed -i 's/const char \*/char const */g'
</content>
</entry>
<entry>
<title>cksum: port recent changes to macOS</title>
<updated>2021-03-24T23:47:50Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2021-03-24T23:43:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=16772940766d8649aa9437ca456ca3738b7a8eaf'/>
<id>urn:sha1:16772940766d8649aa9437ca456ca3738b7a8eaf</id>
<content type='text'>
* src/cksum.c (cksum_slice8): Fix bug on little-endian
platforms lacking __bswap_32: the SWAP macro evaluates
its argument multiple times, but the macro has a side effect.
</content>
</entry>
<entry>
<title>cksum: don't exit immediately if a single file overflows</title>
<updated>2021-03-15T13:12:29Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2021-03-15T13:08:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=86c8dc2e85c0941ec7908cd5a3db7803e7293606'/>
<id>urn:sha1:86c8dc2e85c0941ec7908cd5a3db7803e7293606</id>
<content type='text'>
This behavior was introduced in commit FILEUTILS-4_0_44-4-g519b707b4.

* src/cksum.c (cksum_slice8): Only report the overflow, and continue.
* src/cksum_pclmul.c (cksum_pclmul): Likewise.
</content>
</entry>
<entry>
<title>cksum: add --debug to diagnose which implementation used</title>
<updated>2021-03-15T12:44:27Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2021-03-13T18:10:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b73b9fcb1dad0e4edd13b6d1423c27acf4c4f312'/>
<id>urn:sha1:b73b9fcb1dad0e4edd13b6d1423c27acf4c4f312</id>
<content type='text'>
* src/cksum.c: (main): Use getopt_long to parse options,
and handle the new --debug option.
(pclmul_supported): Diagnose various failures and attempts.
* NEWS: Mention the new option.
</content>
</entry>
<entry>
<title>cksum: use pclmul hardware instruction for CRC32 calculation</title>
<updated>2021-03-15T12:44:22Z</updated>
<author>
<name>Kristoffer Brånemyr</name>
<email>ztion1@yahoo.se</email>
</author>
<published>2021-02-03T09:35:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=4b9118cdb316093e1733264d229c6b7279179e1e'/>
<id>urn:sha1:4b9118cdb316093e1733264d229c6b7279179e1e</id>
<content type='text'>
Use cpuid to detect CPU support for hardware instruction.
Fall back to slice by 8 algorithm if not supported.
A 500MiB file improves from 1.40s to 0.67s on an i3-2310M

* configure.ac [USE_PCLMUL_CRC32]: A new conditional,
set when __get_cpuid() and clmul compiler intrinsics are supported.
* src/cksum.c (pclmul_supported): A new function using __get_cpuid()
to determine if pclmul instructions are supported.
(cksum): A new function refactored from cksum_slice8(),
which calls pclmul_supported() and then cksum_slice8()
or cksum_pclmul() as appropriate.
* src/cksum.h: Export the crctab array for use in the new module.
* src/cksum_pclmul.c: A new module to implement using pclmul intrinsics.
* po/POTFILES.in: Reference the new cksum_pclmul module.
* src/local.mk: Likewise.  Note we build it as a separate library
so that it can be portably built with separate -mavx etc. flags.
* tests/misc/cksum.sh: Add new test modes for pertinent buffer sizes.
</content>
</entry>
</feed>
