<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/factor.c, branch v8.22</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.22</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.22'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2013-02-20T04:04:25Z</updated>
<entry>
<title>maint: cleanup up various uses of __attribute__</title>
<updated>2013-02-20T04:04:25Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2013-02-19T10:58:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=31861f663a440df498bdb7788fa43aa9d03133c5'/>
<id>urn:sha1:31861f663a440df498bdb7788fa43aa9d03133c5</id>
<content type='text'>
* src/cfg.mk (sc_prohibit-gl-attributes): Disallow the __attribute()
form without trailing underscores as that is not elided where required.
Also ensure we use gnulib macros rather than defining our own.
* src/system.h: Remove gnulib provided macros.
* src/chown-core.c: Likewise.
* src/chroot.c: Likewise.
* src/copy.c: Likewise.
* src/csplit.c: Likewise.
* src/dd.c: Likewise.
* src/expr.c: Likewise.
* src/extent-scan.c: Likewise.
* src/factor.c: Likewise.
* src/ls.c: Likewise.
* src/od.c: Likewise.
* src/paste.c: Likewise.
* src/ptx.c: Likewise.
* src/sort.c: Likewise.
* src/stat.c: Likewise.
* src/stty.c: Likewise.
* src/system.h: Likewise.
* src/tac.c: Likewise.
* src/test.c: Likewise.
* src/tsort.c: Likewise.
</content>
</entry>
<entry>
<title>build: avoid link failure in devmsg() on older linkers</title>
<updated>2013-02-14T03:24:46Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2013-02-14T02:32:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=302564444383169087fbbec36983789abbac9aa5'/>
<id>urn:sha1:302564444383169087fbbec36983789abbac9aa5</id>
<content type='text'>
On linkers that don't remove unused functions,
there will be a reference to a missing dev_debug symbol
in the devmsg() function.  So for now ...

* src/system.h: ... move devmsg() from here ...
* src/numfmt.c: ... to here, and document future cleanup.
* src/factor.c: Likewise.
</content>
</entry>
<entry>
<title>maint: consolidate developer debug messages</title>
<updated>2013-02-10T20:30:53Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2013-02-10T12:47:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3309e880fb2b5d4316809c5ceef4f5b2b8d34a38'/>
<id>urn:sha1:3309e880fb2b5d4316809c5ceef4f5b2b8d34a38</id>
<content type='text'>
Both factor and numfmt recently introduced debug messages
for developers, enabled by --verbose and ---devdebug respectively.
There were a few issues though:
 1. They used different mechanisms to enable these messages.
 2. factor used --verbose which might be needed for something else
 3. They used different methods to output the messages,
    and numfmt used error() which added an unwanted newline
 4. numfmt marked all these messages for translation and factor
    marked a couple.  We really don't need these translated.
So we fix the above issues here while renaming the enabling
option for both commands to ---debug (still undocumented).

* src/factor.c (verbose): Rename to dev_debug and change from int to
bool as it's just a toggle flag.
(long_options): Rename --verbose to ---debug.
* src/system.h (devmsg): A new inline function to output a message
if enabled by a global dev_debug variable in the compilation unit.
* src/numfmt.c: Use devmsg() rather than error().
Also remove the translation tags from these messages.
Also change debug flag to bool from int.
* tests/misc/numfmt.pl: Adjust for the ---devdebug to ---debug change.
* cfg.mk (sc_marked_devdiagnostics): Add a syntax check to ensure
translations are not added to devmsg calls.

Reported by Göran Uddeborg in http://bugs.gnu.org/13665
</content>
</entry>
<entry>
<title>factor: apply a more general fix to enable correct assembly</title>
<updated>2013-01-07T02:11:36Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2013-01-04T18:07:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=05382299cd9953a32c95f89b7cdef6f512176a81'/>
<id>urn:sha1:05382299cd9953a32c95f89b7cdef6f512176a81</id>
<content type='text'>
In addition to the previous 64 bit guards we've placed in longlong.h
there are additional _LP64 guards required for mips with -mcpu &gt;= 3,
to avoid a build failure (http://bugs.gnu.org/13353) and on sparc
with -mcpu &gt;= v9 in 32 bit mode where for example,
`factor 2123123123123123123123` would go into an infinite loop.

Since factor.c currently operates on uintmax_t, we restrict the use
of the assembly in longlong.h to when 'long' has the same width, to
provide a more general guard for this code.

* src/factor.c: Restrict the use of longlong.h assembly code,
to when the width of intmax_t == long.
* src/longlong.h: Remove the previous _LP64 guards to avoid
divergence from GMP's longlong.h
* NEWS: Adjust the info on build and runtime fixes.
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2013-01-01T03:51:20Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2013-01-01T02:54:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=77da73c75432f3c5b4beebae7b0797a1e33160bc'/>
<id>urn:sha1:77da73c75432f3c5b4beebae7b0797a1e33160bc</id>
<content type='text'>
Run "make update-copyright", but then also run this,
  perl -pi -e 's/2\d\d\d-//' tests/sample-test
to make that one script use the single most recent year number.
</content>
</entry>
<entry>
<title>maint: remove a redundant odd sized alloc from factor.c</title>
<updated>2012-12-04T12:30:05Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2012-11-30T15:08:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=2bf0c52d5b82e5781adb0ac1f0d77ad6cf916cd2'/>
<id>urn:sha1:2bf0c52d5b82e5781adb0ac1f0d77ad6cf916cd2</id>
<content type='text'>
* src/factor.c (mp_factor_init): Init the pointers with NULL,
which xrealloc (or realloc) handles fine.
</content>
</entry>
<entry>
<title>build: fix compilation failure on x32</title>
<updated>2012-11-18T21:32:02Z</updated>
<author>
<name>Daniel Schepler</name>
<email>dschepler@gmail.com</email>
</author>
<published>2012-11-18T18:04:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=6a5843d92fca254f0b27c3fee88a11840034ce32'/>
<id>urn:sha1:6a5843d92fca254f0b27c3fee88a11840034ce32</id>
<content type='text'>
* src/factor.c [HAVE_ATTRIBUTE_MODE]: Fix typo in #if test:
s/HAVE_LONG_LONG/HAVE_LONG_LONG_INT/.  Otherwise, factor.c would
elicit assembler errors on x32: it was incorrectly defining DItype
to long instead of long long.  Patch and report in
http://bugs.debian.org/693337;  Mike Stone notified upstream.
</content>
</entry>
<entry>
<title>maint: correct indentation of W_TYPE_SIZE-defining cpp directives</title>
<updated>2012-11-18T18:15:47Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2012-11-18T17:45:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=e2e3f1ad07c509d505b5fdbc02130343af349c1e'/>
<id>urn:sha1:e2e3f1ad07c509d505b5fdbc02130343af349c1e</id>
<content type='text'>
* src/factor.c: Indent cpp directives to reflect their nesting.
</content>
</entry>
<entry>
<title>maint: avoid unnecessary #include to fix syntax-check failure</title>
<updated>2012-11-13T06:03:01Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2012-11-13T06:03:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=7b4df77dbebe6d11710a81c9e06a60e8086b9146'/>
<id>urn:sha1:7b4df77dbebe6d11710a81c9e06a60e8086b9146</id>
<content type='text'>
* src/factor.c: Remove unneeded #inclusion of"verify.h".
It's already included via system.h.
</content>
</entry>
<entry>
<title>factor: maintainer builds primes.h, not builder</title>
<updated>2012-11-12T16:32:31Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2012-11-12T16:32:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f16e251dae43117c2cd19359c26ce7b5e05165b6'/>
<id>urn:sha1:f16e251dae43117c2cd19359c26ce7b5e05165b6</id>
<content type='text'>
With this change, the maintainer builds primes.h and it is part of
the tarball.  primes.h's contents are not architecture-specific.
* .gitignore: Remove /src/primes.h.
* src/factor.c: Include verify.h.
(W): New constant.  Verify that uintmax_t lacks holes
and that W is no wider than the integers used to generate primes.h.
* src/local.mk (EXTRA_DIST): Add src/primes.h.
(BUILT_SOURCES, CLEANFILES): Remove src/primes.h.
($(top_srcdir)/src/primes.h): Rename from src/primes.h.
Do not depend on src/make-prime-list.  Instead, use sub-make to
build, so that we build primes.h only if it does not exist.
* src/make-prime-list.c: Include &lt;limits.h&gt;, for ULONG_MAX.
(wide_uint): Define to uintmax_t or unsigned __int128 if not #defined.
(struct prime, binvert, process_prime): Use it instead of uintmax_t.
(print_wide_uint): New function.  This generates the proper pinv
value regardless of the width of uintmax_t on the target, so long
as the width doesn't exceed that of the width of wide_uint on the
maintainer host that generated src/primes.h.
(output_primes): Use it.  Output WIDE_UINT_BITS, too.  Let the
target compute its own lim, since its uintmax_t may be narrower
than ours.
(SZ): Remove.
* src/primes.h: New file, generated with 128-bit integers and usable
on any host where uintmax_t's width is no greater than 128 bits.
</content>
</entry>
</feed>
