Re: svn commit: r362333 - in head: contrib/flex contrib/flex/src usr.bin/lex usr.bin/lex/lib

2020-06-24 Thread Joerg Sonnenberger
On Wed, Jun 24, 2020 at 12:09:03PM +0200, Dimitry Andric wrote: > On 24 Jun 2020, at 02:41, Kyle Evans wrote: > > > > On Thu, Jun 18, 2020 at 1:09 PM Jung-uk Kim wrote: > >> > >> Author: jkim > >> Date: Thu Jun 18 18:09:16 2020 > >> New Revision: 362333 > >> URL:

Re: svn commit: r358248 - head/sys/vm

2020-02-22 Thread Joerg Sonnenberger
On Sat, Feb 22, 2020 at 08:24:45PM +0100, Dimitry Andric wrote: > It might be better to define our own UNREACHABLE macro, similar to what > llvm itself does, roughly something like: > > __noreturn void internal_unreachable(const char *, const char *, int); > #define UNREACHABLE(msg)

Re: svn commit: r358133 - head/sys/vm

2020-02-19 Thread Joerg Sonnenberger
On Wed, Feb 19, 2020 at 10:34:23PM +, Jeff Roberson wrote: > Author: jeff > Date: Wed Feb 19 22:34:22 2020 > New Revision: 358133 > URL: https://svnweb.freebsd.org/changeset/base/358133 > > Log: > Silence a gcc warning about no return from a function that handles every > possible enum in

Re: svn commit: r355569 - head/sys/amd64/linux32

2019-12-09 Thread Joerg Sonnenberger
On Mon, Dec 09, 2019 at 07:18:06PM +, John Baldwin wrote: > Author: jhb > Date: Mon Dec 9 19:18:05 2019 > New Revision: 355569 > URL: https://svnweb.freebsd.org/changeset/base/355569 > > Log: > Use 4 byte stack alignment instead of 8 byte. > > This was an old bug prior to r355373 and

Re: svn commit: r343633 - head/usr.bin/shar

2019-02-02 Thread Joerg Sonnenberger
On Thu, Jan 31, 2019 at 03:29:03PM -0800, Bryan Drewery wrote: > On 1/31/19 3:21 PM, Bryan Drewery wrote: > > Author: bdrewery > > Date: Thu Jan 31 23:21:18 2019 > > New Revision: 343633 > > URL: https://svnweb.freebsd.org/changeset/base/343633 > > > > Log: > > Shar files may be seen as binary

Re: svn commit: r337921 - head/lib/libbe

2018-08-16 Thread Joerg Sonnenberger
On Thu, Aug 16, 2018 at 06:37:48PM +, Kyle Evans wrote: > Author: kevans > Date: Thu Aug 16 18:37:47 2018 > New Revision: 337921 > URL: https://svnweb.freebsd.org/changeset/base/337921 > > Log: > libbe(3): Prefer safer versions of strcat/strcpy Why not use snprintf in both cases? Joerg

Re: Deorbiting i386

2018-05-28 Thread Joerg Sonnenberger
On Sun, May 27, 2018 at 03:15:05PM -0700, Maxim Sobolev wrote: > Well, strip extra 32 bits, use slower memory and busses (extra decoding > logic etc). Voila, you suddenly have platform that can run 99% of code in > wild today with just few hundred mW of power. Try that with arm32, you > would be

Re: svn commit: r333482 - head/usr.bin/expand

2018-05-12 Thread Joerg Sonnenberger
On Fri, May 11, 2018 at 04:57:06PM -0700, John Baldwin wrote: > On Friday, May 11, 2018 06:55:03 AM Eitan Adler wrote: > > Author: eadler > > Date: Fri May 11 06:55:02 2018 > > New Revision: 333482 > > URL: https://svnweb.freebsd.org/changeset/base/333482 > > > > Log: > > [expand] add __dead2

Re: svn commit: r331510 - in head: share/man/man4 sys/conf sys/dev/vmware/vmci sys/modules/vmware sys/modules/vmware/vmci

2018-03-25 Thread Joerg Sonnenberger
On Sun, Mar 25, 2018 at 09:46:16AM -0700, Rodney W. Grimes wrote: > > On Sun, Mar 25, 2018 at 09:03:20AM -0700, Rodney W. Grimes wrote: > > > Kirk would have to back me up on this, but my understanding of the > > > decisions that the UCB Regents legal staff came to was that each > > > file should

Re: svn commit: r331510 - in head: share/man/man4 sys/conf sys/dev/vmware/vmci sys/modules/vmware sys/modules/vmware/vmci

2018-03-25 Thread Joerg Sonnenberger
On Sun, Mar 25, 2018 at 09:03:20AM -0700, Rodney W. Grimes wrote: > Kirk would have to back me up on this, but my understanding of the > decisions that the UCB Regents legal staff came to was that each > file should have a complete copyright and license clause and any > thing less causes problems

Re: svn commit: r329164 - in head: include sys/amd64/include sys/i386/include sys/mips/include sys/powerpc/include sys/sparc64/include

2018-02-12 Thread Joerg Sonnenberger
On Mon, Feb 12, 2018 at 02:48:14PM +, Warner Losh wrote: > Author: imp > Date: Mon Feb 12 14:48:14 2018 > New Revision: 329164 > URL: https://svnweb.freebsd.org/changeset/base/329164 > > Log: > We don't support gcc < 4.2.1, so varargs.h now is just #error > always. Unifdef for versions

Re: svn commit: r328446 - head/stand/uboot/lib

2018-01-26 Thread Joerg Sonnenberger
On Fri, Jan 26, 2018 at 09:51:00PM +, Warner Losh wrote: > Author: imp > Date: Fri Jan 26 21:50:59 2018 > New Revision: 328446 > URL: https://svnweb.freebsd.org/changeset/base/328446 > > Log: > Now that exit is __dead2, we need to tag ub_exit() as __dead2. To do > that, we have to put a

Re: svn commit: r328159 - head/sys/modules

2018-01-21 Thread Joerg Sonnenberger
On Fri, Jan 19, 2018 at 08:40:56PM +0200, Andriy Gapon wrote: > I seem to recall that the actual shift happens to be N % 32 for 32-bit > registers > (at least on some processors). It depends. That's the behavior some architectures implement. Others will just give you 0 as result for N>32. This

Re: svn commit: r325816 - head/libexec/rtld-elf/mips

2017-11-18 Thread Joerg Sonnenberger
On Tue, Nov 14, 2017 at 05:16:03PM +, John Baldwin wrote: > Author: jhb > Date: Tue Nov 14 17:16:03 2017 > New Revision: 325816 > URL: https://svnweb.freebsd.org/changeset/base/325816 > > Log: > Appease old GCC by disabling .cfi_sections for GCC 4.x. This commit message makes no sense to

Re: svn commit: r321969 - in head/sys/boot: arm/at91/libat91 arm/ixp425/boot2 i386/boot2

2017-08-03 Thread Joerg Sonnenberger
On Thu, Aug 03, 2017 at 05:53:43PM +1000, Bruce Evans wrote: > Freestanding versions (static and otherwise) cause problems with builtins. > -ffreestanding turns off all builtins. The static memcpy used to be > ifdefed so as to use __builtin_memcpy instead of the static one if the > compiler is

Re: svn commit: r320579 - head/usr.bin/patch

2017-07-03 Thread Joerg Sonnenberger
On Mon, Jul 03, 2017 at 10:42:15AM -0500, Pedro Giffuni wrote: > IMHO, the (new) BSD patch behavior is somewhat more natural in the sense > that no one asked git to add a prefix to the path so it makes sense to > ignore it. Recent GNU patch does support many git-specific features that we > don't.

Re: svn commit: r313494 - head/libexec/rtld-elf

2017-02-09 Thread Joerg Sonnenberger
On Thu, Feb 09, 2017 at 11:33:06PM +, Konstantin Belousov wrote: > Protected symbol reference in GOT of the defining object must be > resolved to itself, same as -Bsymbolic globally. This doesn't make sense to me. Why do they remain in the DSO, they should have been resolved the linker

Re: svn commit: r311109 - head/usr.bin/patch

2017-01-03 Thread Joerg Sonnenberger
On Tue, Jan 03, 2017 at 11:27:28AM -0500, Pedro Giffuni wrote: > I think this is a valid reason to leave things as they are. FWIW, both > NetBSD and OpenBSD seem be fine with just SHORT_MAX. NetBSD's patch doesn't use (U)SHRT_MAX. Joerg ___

Re: svn commit: r311109 - head/usr.bin/patch

2017-01-03 Thread Joerg Sonnenberger
On Tue, Jan 03, 2017 at 08:52:03AM -0700, Ian Lepore wrote: > I'm also trying to picture the real-world need to diff and patch lines > of ascii text longer than 64K, but for every problem out there, there > is someone with a perverse need to solve that problem outside of the > normal lines we all

Re: svn commit: r310171 - head/sys/sys

2016-12-19 Thread Joerg Sonnenberger
On Mon, Dec 19, 2016 at 12:37:27PM -0800, Ravi Pokala wrote: > With all apologies to Churchill, SCN/PRI are the worst way to address > this in a machine-independent way, except for all the other ways that > have been tried from time to time. :-P They can't be the worst as they at least don't

Re: svn commit: r310138 - head/lib/libc/stdio

2016-12-16 Thread Joerg Sonnenberger
On Fri, Dec 16, 2016 at 02:45:19PM -0800, John Baldwin wrote: > In general I agree with something like this instead, but it is quite a bit > more > tedious to use as you have to run it once to determine the length, allocate a > buffer, and then run it again. Why do you need to determine the

Re: svn commit: r308563 - in head/lib: libgcc_eh libgcc_s

2016-11-11 Thread Joerg Sonnenberger
On Fri, Nov 11, 2016 at 11:28:08PM +, Ed Maste wrote: > Author: emaste > Date: Fri Nov 11 23:28:07 2016 > New Revision: 308563 > URL: https://svnweb.freebsd.org/changeset/base/308563 > > Log: > libcc_{s,eh}: build without SSP > > As in the gnu/lib/libgcc Makefile: > libgcc is

Re: svn commit: r305392 - head/sys/conf

2016-09-04 Thread Joerg Sonnenberger
On Sun, Sep 04, 2016 at 09:31:19PM +0200, Dimitry Andric wrote: > On 04 Sep 2016, at 20:57, Conrad Meyer wrote: > > > > On Sun, Sep 4, 2016 at 10:55 AM, Dimitry Andric wrote: > >> Author: dim > >> Date: Sun Sep 4 17:55:22 2016 > >> New Revision: 305392 > >>

Re: svn commit: r300375 - head/sys/arm/include

2016-05-21 Thread Joerg Sonnenberger
On Sat, May 21, 2016 at 04:52:38PM +, Ian Lepore wrote: > Author: ian > Date: Sat May 21 16:52:38 2016 > New Revision: 300375 > URL: https://svnweb.freebsd.org/changeset/base/300375 > > Log: > Adjust _ALIGNBYTES to the proper value for arm and armv6 arches. Modern > compilers can emit

Re: svn commit: r296124 - in head: share/man/man7 share/mk sys/conf

2016-02-26 Thread Joerg Sonnenberger
On Fri, Feb 26, 2016 at 02:19:33PM -0800, Bryan Drewery wrote: > On 2/26/16 2:14 PM, Bryan Drewery wrote: > > Author: bdrewery > > Date: Fri Feb 26 22:14:00 2016 > > New Revision: 296124 > > URL: https://svnweb.freebsd.org/changeset/base/296124 > > > > Log: > > Import bsd.clang-analyze.mk based

Re: svn commit: r291666 - head/libexec/rtld-elf

2015-12-03 Thread Joerg Sonnenberger
On Thu, Dec 03, 2015 at 10:50:28AM +0200, Konstantin Belousov wrote: > > Modified: head/libexec/rtld-elf/Makefile > > == > > --- head/libexec/rtld-elf/Makefile Thu Dec 3 00:02:01 2015 > > (r291665) > > +++

Re: svn commit: r290499 - head/usr.bin/localedef

2015-11-07 Thread Joerg Sonnenberger
On Sat, Nov 07, 2015 at 04:22:29PM +, Baptiste Daroussin wrote: > Author: bapt > Date: Sat Nov 7 16:22:29 2015 > New Revision: 290499 > URL: https://svnweb.freebsd.org/changeset/base/290499 > > Log: > Workaround an issue on i386 to unbreak the build until the real issue is > tracked >

Re: svn commit: r287217 - head/usr.sbin/syslogd

2015-08-30 Thread Joerg Sonnenberger
On Sun, Aug 30, 2015 at 03:36:27PM +1000, Bruce Evans wrote: On Fri, 28 Aug 2015, Joerg Sonnenberger wrote: On Fri, Aug 28, 2015 at 10:17:56PM +1000, Bruce Evans wrote: -static void die(int); +static void die(int) __dead2; Since the function is static, it is very easy

Re: svn commit: r287217 - head/usr.sbin/syslogd

2015-08-30 Thread Joerg Sonnenberger
On Sun, Aug 30, 2015 at 11:53:00AM +0200, Ed Schouten wrote: 2015-08-28 16:38 GMT+02:00 Joerg Sonnenberger jo...@britannica.bec.de: But the compiler can't tell if it is the *intention* that the function never returns. The warning behavior exists because that can easily change with macros

Re: svn commit: r287217 - head/usr.sbin/syslogd

2015-08-28 Thread Joerg Sonnenberger
On Fri, Aug 28, 2015 at 10:17:56PM +1000, Bruce Evans wrote: -static void die(int); +static void die(int) __dead2; Since the function is static, it is very easy for the compiler to see that it doesn't return. But the compiler can't tell if it is the *intention* that the function never

Re: svn commit: r286100 - in head/sys: net netipsec

2015-08-11 Thread Joerg Sonnenberger
On Thu, Jul 30, 2015 at 10:32:01PM -0700, John-Mark Gurney wrote: Ryan Stone wrote this message on Fri, Jul 31, 2015 at 01:03 -0400: You can't use CTASSERT in a header. You'll get a compile error if two Testing a fix now... different headers included in the same translation unit have a

Re: svn commit: r285552 - head/usr.bin/xargs

2015-07-19 Thread Joerg Sonnenberger
On Wed, Jul 15, 2015 at 10:29:22AM +0100, David Chisnall wrote: On 15 Jul 2015, at 01:02, Xin Li delp...@delphij.net wrote: My only concern with strtonum() is that it's English only. Given that strtonum() wraps strtoll, it ought to support whatever the current locale is (assuming that

Re: svn commit: r284898 - in head: . share/mk

2015-06-28 Thread Joerg Sonnenberger
On Sun, Jun 28, 2015 at 11:48:48AM +0200, Dimitry Andric wrote: What is actually the perceived problem with having paths in those linker scripts? If you use --sysroot, the libraries are searched relative to that sysroot, right? Depends. A plain absolute path stays a plain absolute path. One

Re: svn commit: r284898 - in head: . share/mk

2015-06-28 Thread Joerg Sonnenberger
On Sun, Jun 28, 2015 at 12:13:11AM -0700, Adrian Chadd wrote: One must use -I=/usr/include - then the sysroot stuff gets appended correctly. You really want to use -isysroot =/usr/include. One issue the NetBSD patches solves is that GCC seems to consider sysroot vs non-sysroot as property for

Re: svn commit: r268137 - head/sys/sys

2015-06-19 Thread Joerg Sonnenberger
On Fri, Jun 19, 2015 at 03:22:49PM +0100, David Chisnall wrote: NetBSD: sys/cdefs_elf.h #define __weak __attribute__((__weak__)) FreeBSD: sys/cdefs.h #define __weak __attribute__((__weak__)) NetBSD is the only system that I’m aware of that has actually shipped this, and

Re: svn commit: r283320 - head/sys/kern

2015-05-26 Thread Joerg Sonnenberger
On Sat, May 23, 2015 at 07:09:04PM +, Konstantin Belousov wrote: Author: kib Date: Sat May 23 19:09:04 2015 New Revision: 283320 URL: https://svnweb.freebsd.org/changeset/base/283320 Log: If thread requested to not stop on non-boundary, then not only stopping signals should obey,

Re: svn commit: r281959 - head/usr.bin/whois

2015-04-26 Thread Joerg Sonnenberger
On Sat, Apr 25, 2015 at 11:04:46AM -0400, Shawn Webb wrote: On Sat, 2015-04-25 at 16:51 +0200, Joerg Sonnenberger wrote: On Sat, Apr 25, 2015 at 12:51:44AM +, Xin LI wrote: Attempt to connect to alternate addresses if the connect doesn't succeed in 180ms, and cut wait time between

Re: svn commit: r281959 - head/usr.bin/whois

2015-04-25 Thread Joerg Sonnenberger
On Sat, Apr 25, 2015 at 12:51:44AM +, Xin LI wrote: Attempt to connect to alternate addresses if the connect doesn't succeed in 180ms, and cut wait time between connection attempts in half for each additional, if no connection was established. 180ms is very short. I have such latency

Re: svn commit: r279236 - head/sys/netinet

2015-02-24 Thread Joerg Sonnenberger
On Tue, Feb 24, 2015 at 11:59:02AM -0700, Ian Lepore wrote: ETHER_ALIGN is wonderful... if you're on a platform that can DMA to an arbitrary boundary. Isn't it generally more a case of if the device's DMA engine isn't extremely bad designed? There is a strong correlation between devices not

Re: svn commit: r279236 - head/sys/netinet

2015-02-24 Thread Joerg Sonnenberger
On Tue, Feb 24, 2015 at 12:57:04PM +, Zbigniew Bodek wrote: In fact, the assumption that 'struct ip' is always 4-byte aligned is definitely false, as we have no impact on data alignment of packet stream received. Pretty much all drivers do guarantee this by setting up buffers

Re: svn commit: r277203 - in head/sys: kern sys

2015-01-15 Thread Joerg Sonnenberger
On Wed, Jan 14, 2015 at 11:44:00PM +, Robert Watson wrote: - As we anticipate embedding mbufs headers within variable-size regions of memory in the future, change the definitions of byte arrays embedded in mbufs to be of size [0] rather than [MLEN] and [MHLEN]. This is not valid

Re: svn commit: r276565 - in head/gnu: lib/libstdc++/doc usr.bin/diff usr.bin/diff/doc usr.bin/gdb usr.bin/gperf usr.bin/gperf/doc

2015-01-03 Thread Joerg Sonnenberger
On Fri, Jan 02, 2015 at 10:35:57PM +0100, Baptiste Daroussin wrote: The man pages remains, for binutils for examples, the manpages were generated out of the texinfo files meaning the manpage contains the same amount of informations Have you actually looked at them? as(1) for example doesn't

Re: svn commit: r273331 - in head: sbin/ifconfig share/man/man4 sys/conf sys/modules sys/modules/if_vxlan sys/net sys/sys

2014-12-01 Thread Joerg Sonnenberger
On Mon, Dec 01, 2014 at 03:24:20PM +0100, Dag-Erling Smørgrav wrote: Adrian Chadd adr...@freebsd.org writes: Dag-Erling Smørgrav d...@des.no writes: I added code to cmd_register() in ifconfig.c to warn about duplicate commands. [...] Would you mind committing that code, so we at least

Re: svn commit: r268566 - head/usr.bin/users

2014-07-14 Thread Joerg Sonnenberger
On Sat, Jul 12, 2014 at 09:34:28PM +1000, Bruce Evans wrote: Run time: C++ sort() was twice as slow as qsort() for sorting 1 million dummy users in the allocation tests. About 8 seconds instead of 4, except when compiled with -g -O0 it was 15 seconds instead of 4. I find that claim strange

Re: svn commit: r268566 - head/usr.bin/users

2014-07-14 Thread Joerg Sonnenberger
On Mon, Jul 14, 2014 at 08:37:56PM +0100, Alexander Nasonov wrote: Joerg Sonnenberger wrote: On Sat, Jul 12, 2014 at 09:34:28PM +1000, Bruce Evans wrote: Run time: C++ sort() was twice as slow as qsort() for sorting 1 million dummy users in the allocation tests. About 8 seconds

Re: svn commit: r261283 - in head: contrib/libc++ contrib/libc++/include contrib/libc++/include/experimental contrib/libc++/include/ext contrib/libc++/src etc/mtree lib/libc++ sys/sys tools/build/mk

2014-02-04 Thread Joerg Sonnenberger
On Tue, Feb 04, 2014 at 12:07:29PM -0700, Warner Losh wrote: On Feb 4, 2014, at 1:41 AM, David Chisnall wrote: It sounds like you're just looking at the output from nm, without bothering to check how the symbols are used. With all due respect, if it is in nm output, it is part of the

Re: svn commit: r257203 - head/sys/arm/arm

2013-10-27 Thread Joerg Sonnenberger
On Mon, Oct 28, 2013 at 08:43:37AM +1100, Bruce Evans wrote: Oops, the parser easily can't do this right because macro parameters must usually have redundant parentheses and C parsers are specified to act as if on the output of the preprocessor so they can't easily either have a special case

Re: svn commit: r247713 - head/lib/libedit

2013-03-03 Thread Joerg Sonnenberger
On Sun, Mar 03, 2013 at 10:34:36AM -0500, Pedro Giffuni wrote: I have no idea why NetBSD survives without linking ncurses here but next time I will test this further before trusting the package author. libedit links against libterminfo on NetBSD. Joerg

Re: svn commit: r244760 - head/sys/kern

2012-12-30 Thread Joerg Sonnenberger
On Fri, Dec 28, 2012 at 02:43:33AM +, David Xu wrote: Author: davidxu Date: Fri Dec 28 02:43:33 2012 New Revision: 244760 URL: http://svnweb.freebsd.org/changeset/base/244760 Log: Use strlcpy to NULL-terminate error message even if user provided a short buffer. Are you sure that

Re: svn commit: r243665 - head/sbin/dump

2012-11-29 Thread Joerg Sonnenberger
On Thu, Nov 29, 2012 at 02:01:47PM +0200, Konstantin Belousov wrote: Also, being quite removed from the function definition, there is a chance that some future modification would make the attribute a lie. At least clang enforces the correctness of the attribute. Joerg

Re: svn commit: r236582 - head/lib/libc/stdlib

2012-06-05 Thread Joerg Sonnenberger
On Tue, Jun 05, 2012 at 04:39:01PM +0400, Andrey Chernov wrote: Moreover, standard metion unsuccessful call case for free() where errno state is totally undefined. ...which would be a programming mistake in first place and is valid as justification. Joerg

Re: svn commit: r236582 - head/lib/libc/stdlib

2012-06-05 Thread Joerg Sonnenberger
On Tue, Jun 05, 2012 at 05:13:05PM +0400, Andrey Chernov wrote: On Tue, Jun 05, 2012 at 02:55:20PM +0200, Joerg Sonnenberger wrote: On Tue, Jun 05, 2012 at 04:39:01PM +0400, Andrey Chernov wrote: Moreover, standard metion unsuccessful call case for free() where errno state is totally

Re: svn commit: r236582 - head/lib/libc/stdlib

2012-06-05 Thread Joerg Sonnenberger
On Tue, Jun 05, 2012 at 06:31:14PM +0400, Andrey Chernov wrote: BTW, if general consensus will be to track unpublished standard, I will back out my change (in hope our malloc() maintainer will change free() to directly save errno). The standard is quite irrelevant here. FreeBSD is free to

Re: svn commit: r236582 - head/lib/libc/stdlib

2012-06-05 Thread Joerg Sonnenberger
On Wed, Jun 06, 2012 at 01:01:54AM +0400, Andrey Chernov wrote: On Wed, Jun 06, 2012 at 06:11:01AM +1000, Bruce Evans wrote: This is essentially unusable (so a bad idea). Instead of unconditionally saving and restoring errno around calls to free(), portable POSIX code can soon use a messy

Re: svn commit: r235209 - head/games/fortune/datfiles

2012-05-09 Thread Joerg Sonnenberger
On Wed, May 09, 2012 at 04:05:09PM -0700, Garrett Cooper wrote: I've been told multiple times that YMMV for make -C vs cd ; make, FYI, so I've modified my behavior to match the cd ; make idiom. Interesting why I've only been told this in BSD circles though... Please note that it should be cd

Re: svn commit: r234353 - in head: . contrib/llvm contrib/llvm/include/llvm contrib/llvm/include/llvm-c contrib/llvm/include/llvm-c/Transforms contrib/llvm/include/llvm/ADT contrib/llvm/include/llvm/A

2012-04-19 Thread Joerg Sonnenberger
On Thu, Apr 19, 2012 at 09:14:41PM +, Alexander Best wrote: On Mon Apr 16 12, Dimitry Andric wrote: Author: dim Date: Mon Apr 16 21:23:25 2012 New Revision: 234353 URL: http://svn.freebsd.org/changeset/base/234353 Log: Upgrade our copy of llvm/clang to trunk r154661, in

Re: svn commit: r233700 - head/sys/kern

2012-03-31 Thread Joerg Sonnenberger
On Fri, Mar 30, 2012 at 09:49:51PM +0200, Dimitry Andric wrote: On 2012-03-30 15:30, Stefan Farfeleder wrote: here are a few similar cases. Hm, what about this one that clang warns about: sys/dev/asr/asr.c:2420:57: warning: for loop has empty body [-Wempty-body] for (ha =

Re: svn commit: r232894 - head/contrib/llvm/tools/clang/lib/Basic

2012-03-13 Thread Joerg Sonnenberger
On Tue, Mar 13, 2012 at 04:14:25PM +1100, Bruce Evans wrote: clang and gcc define __FLT_EVAL_METHOD__, but get it wrong in different ways, so this definition is unusuable. For example, it is always 0 for clang; this is correct with SSE, but without SSE, -1 is correct. Thus

Re: svn commit: r232275 - in head/sys: amd64/include i386/include pc98/include x86/include

2012-03-02 Thread Joerg Sonnenberger
On Fri, Mar 02, 2012 at 03:11:21PM +1100, Bruce Evans wrote: If we could add the returns_twice attribute to setjmp() then the compiler makes sure all registers are dead before calling it and jmp_buf wouldn't have to be that big. I think compilers already do stuff like that automatically.

Re: svn commit: r230864 - in head: lib/libc/amd64/gen lib/libc/arm/gen lib/libc/i386/gen lib/libc/ia64/gen lib/libc/mips/gen lib/libc/powerpc/gen lib/libc/powerpc64/gen lib/libc/sparc64/gen sys/sys

2012-02-01 Thread Joerg Sonnenberger
On Wed, Feb 01, 2012 at 01:33:53PM +, Konstantin Belousov wrote: Log: Make the sys/ucontext.h self-contained by changing the return type of __getcontextx_size(3) from size_t to int. Are you sure that this doesn't break the ABI? That is: are you sure that it doesn't return garbage in

Re: svn commit: r230231 - head/sys/kern

2012-01-16 Thread Joerg Sonnenberger
On Mon, Jan 16, 2012 at 08:42:56PM +, Sergey Kandaurov wrote: Log: Be pedantic and change // comment to C-style one. If you want to be pedantic, at least be correct. // is perfectly valid C99. Joerg ___ svn-src-all@freebsd.org mailing list

Re: svn commit: r228614 - head/sbin/dhclient

2011-12-17 Thread Joerg Sonnenberger
On Sat, Dec 17, 2011 at 01:19:07AM +, Dimitry Andric wrote: Log: In sbin/dhclient, work around warnings about the size argument to strlcpy appearing to be the size of the source buffer, instead of the destination. If you touch this and don't want to use strdup-like functions, at

Re: svn commit: r228650 - head/usr.bin/netstat

2011-12-17 Thread Joerg Sonnenberger
On Sat, Dec 17, 2011 at 09:53:56PM +, Bjoern A. Zeeb wrote: On 17. Dec 2011, at 17:21 , Dimitry Andric wrote: Author: dim Date: Sat Dec 17 17:21:47 2011 New Revision: 228650 URL: http://svn.freebsd.org/changeset/base/228650 Log: In usr.bin/netstat/atalk.c, work around a

Re: svn commit: r228670 - head/usr.sbin/pkg_install/updating

2011-12-17 Thread Joerg Sonnenberger
On Sat, Dec 17, 2011 at 11:35:46PM +, Dimitry Andric wrote: Modified: head/usr.sbin/pkg_install/updating/main.c == --- head/usr.sbin/pkg_install/updating/main.c Sat Dec 17 23:18:14 2011 (r228669) +++

Re: svn commit: r228435 - in head/libexec/rtld-elf: . amd64 arm i386 ia64 mips powerpc powerpc64 sparc64

2011-12-12 Thread Joerg Sonnenberger
On Mon, Dec 12, 2011 at 11:03:15AM +, Konstantin Belousov wrote: To allow use of external references from the dispatch function, resolution of the R_MACHINE_IRESOLVE relocations in PLT is postponed until GOT entries for PLT are prepared, and normal resolution of the GOT entries is

Re: svn commit: r228435 - in head/libexec/rtld-elf: . amd64 arm i386 ia64 mips powerpc powerpc64 sparc64

2011-12-12 Thread Joerg Sonnenberger
On Mon, Dec 12, 2011 at 07:21:32PM +0200, Kostik Belousov wrote: On Mon, Dec 12, 2011 at 06:17:09PM +0100, Joerg Sonnenberger wrote: On Mon, Dec 12, 2011 at 11:03:15AM +, Konstantin Belousov wrote: To allow use of external references from the dispatch function, resolution

Re: svn commit: r228004 - in head: contrib/libcxxrt lib/libcxxrt

2011-11-26 Thread Joerg Sonnenberger
On Sat, Nov 26, 2011 at 06:46:33PM +, David Chisnall wrote: Log: Update libcxxrt to remove the pthread dependency. This looks wrong. I think it is perfectly sensible to require libc to provide working stubs for the locking primitives. TLS support falls into the same categoriy -- it

Re: svn commit: r227812 - head/lib/libc/string

2011-11-22 Thread Joerg Sonnenberger
On Tue, Nov 22, 2011 at 02:20:15PM +, David Chisnall wrote: In this case, either | or || is fine, because neither reads any memory or has side effects so | and || are equivalent to the compiler, but the use of | tells a human reading the code that the order is unimportant. The use of |

Re: svn commit: r225815 - head/usr.bin/fetch

2011-09-28 Thread Joerg Sonnenberger
On Wed, Sep 28, 2011 at 02:47:22PM +0200, Dag-Erling Smørgrav wrote: Maybe it would be nice if both files were UTF-8, but I'm not sure if manpages support that. They do. Not really. If it seems to work, it is by accident, not by design. Joerg

Re: svn commit: r219084 - in head: bin/test tools/regression/bin/test

2011-02-27 Thread Joerg Sonnenberger
On Sun, Feb 27, 2011 at 12:28:06PM +, Xin LI wrote: Author: delphij Date: Sun Feb 27 12:28:06 2011 New Revision: 219084 URL: http://svn.freebsd.org/changeset/base/219084 Log: Accept == as an alias of = which is a popular GNU extension. It is not a popular GNU extension. It is crap

Re: svn commit: r219084 - in head: bin/test tools/regression/bin/test

2011-02-27 Thread Joerg Sonnenberger
On Sun, Feb 27, 2011 at 03:11:43PM +0100, Erik Trulsson wrote: On Sun, Feb 27, 2011 at 01:30:58PM +0100, Joerg Sonnenberger wrote: On Sun, Feb 27, 2011 at 12:28:06PM +, Xin LI wrote: Author: delphij Date: Sun Feb 27 12:28:06 2011 New Revision: 219084 URL: http://svn.freebsd.org

Re: svn commit: r214210 - head/sys/boot/i386/boot2

2010-10-22 Thread Joerg Sonnenberger
On Fri, Oct 22, 2010 at 06:07:21PM +, Roman Divacky wrote: Log: Avoid using memcpy() for copying 32bit chunks. This shrinks the resulting code a little. Can't you force the use of the builtin memcpy for this? Joerg ___

Re: svn commit: r213002 - in stable/8: include lib/libc/gen

2010-09-22 Thread Joerg Sonnenberger
On Wed, Sep 22, 2010 at 07:32:25PM +0100, Gavin Atkinson wrote: Ours (just introduced): char * basename_r(path, bname) Android (from [1]): intbasename_r(const char* path, char* buffer, size_t bufflen) The semantics seem very different. Ours allocates a buffer, on

Re: svn commit: r210578 - head/usr.bin/grep

2010-07-28 Thread Joerg Sonnenberger
On Thu, Jul 29, 2010 at 12:11:14AM +, Gabor Kovesdan wrote: - Some improvements on the exiting code, like replacing memcpy with strlcpy/strcpy Why is this an improvement? At least for non-trivial sizes, it is quite likely to be a regression. Especially using strlcpy as replacement for

Re: svn commit: r206843 - head/sbin/ipfw

2010-04-19 Thread Joerg Sonnenberger
On Mon, Apr 19, 2010 at 03:44:25PM -0700, Julian Elischer wrote: Index: sbin/ipfw/ipfw2.c === --- sbin/ipfw/ipfw2.c (revision 206844) +++ sbin/ipfw/ipfw2.c (working copy) @@ -326,7 +326,7 @@ #ifdef TCC #define U64_FMT I64

Re: svn commit: r206043 - in head/usr.sbin/pkg_install: add delete lib version

2010-04-03 Thread Joerg Sonnenberger
On Sat, Apr 03, 2010 at 04:32:15AM -0700, Garrett Cooper wrote: I'm sorry but I'm a little bit confused by this statement: do you mean that you're replacing PATH_MAX sized buffers to FILENAME_MAX sized buffers? If so this may cause an issue because several of the variables used in

Re: svn commit: r204493 - head/lib/libc/stdlib

2010-03-02 Thread Joerg Sonnenberger
On Tue, Mar 02, 2010 at 12:04:02PM +, Bruce Simpson wrote: Have you looked at sys/tree.h ? It is used by pf and the multicast code. The implementation in sys/tree.h is certainly not the most efficient on various scales. Joerg ___

Re: svn commit: r201999 - head/lib/libc/stdio

2010-01-11 Thread Joerg Sonnenberger
On Mon, Jan 11, 2010 at 02:29:03PM +1100, Bruce Evans wrote: calloc() has the same overflow bug, if any. Standards seem to require fread and calloc to work even if the multiplication would occur, though they cannot work in most cases where the multiplication would occur, even if the overflow

Re: svn commit: r199670 - head/sys/dev/bge

2009-11-23 Thread Joerg Sonnenberger
On Mon, Nov 23, 2009 at 12:53:24PM -0800, Pyun YongHyeon wrote: On Mon, Nov 23, 2009 at 02:05:11AM +0100, Joerg Sonnenberger wrote: On Sun, Nov 22, 2009 at 08:50:27PM +, Pyun YongHyeon wrote: Log: Fix two long standing bugs on bge(4). Most pre BCM5755 controllers have a DMA bug

Re: svn commit: r196752 - head/lib/libc/stdtime

2009-09-03 Thread Joerg Sonnenberger
On Thu, Sep 03, 2009 at 11:08:26AM +0200, Dag-Erling Smørgrav wrote: @@ -65,6 +65,15 @@ .It \031\ EM \t032\ SUB \t033\ ESC \t034\ FS \t035\ GS .It \036\ RS \t037\ US \t177\ DEL .El +.Pp +.Em NOTE : +if the value passed to the +.Fn iscntrl +function is a +.Vt signed char , +as is

Re: svn commit: r196752 - head/lib/libc/stdtime

2009-09-03 Thread Joerg Sonnenberger
On Thu, Sep 03, 2009 at 03:25:26PM +0200, Dag-Erling Smørgrav wrote: This is actually not good enough. ISO C doesn't specify whether plain char is signed or unsigned. This is FreeBSD. Our char is signed. On systems where it isn't (IRIX is the only one I know of), the cast is a no-op.

Re: svn commit: r194681 - head/usr.sbin/wpa/ndis_events

2009-07-01 Thread Joerg Sonnenberger
On Wed, Jul 01, 2009 at 03:25:33PM +0400, Maxim Konovalov wrote: static void usage() { /* Insert an empty line if the function has no local variables. */ ... Apart from the empty line, what's wrong? It is KR style. It should be static void usage(void) { ... Joerg

Re: svn commit: r194493 - head/usr.bin/catman

2009-06-22 Thread Joerg Sonnenberger
On Sun, Jun 21, 2009 at 08:12:51PM -0500, Matthew D. Fuller wrote: Actually, I looked at this sort of things some years ago when I was sitting in front of a PPro (which was way outdated by that time), and even the largest manpage I could find in base didn't take more than 6 or 8 seconds to

Re: svn commit: r192908 - in head: share/man/man9 sys/conf sys/kern sys/sys

2009-05-29 Thread Joerg Sonnenberger
On Thu, May 28, 2009 at 07:28:45PM +0200, Dag-Erling Sm?rgrav wrote: Bruce A. Mah b...@freebsd.org writes: My understanding is that we do this to let groff manage the whitespace between sentences. Groff doesn't need anyone's help to manage the whitespace between sentences... A short

Re: svn commit: r189765 - in head: . lib/libc lib/libc/nls

2009-03-14 Thread Joerg Sonnenberger
On Fri, Mar 13, 2009 at 01:36:07PM -0500, Sean C. Farley wrote: I have not explored either. The Citrus version appears to have more functionality, however, the Citrus website is ambiguous about the license. Please forget whatever you read on the Citrus website and just look inside the

Re: svn commit: r187713 - head/sbin/ipfw

2009-01-26 Thread Joerg Sonnenberger
On Mon, Jan 26, 2009 at 02:03:39PM +, Luigi Rizzo wrote: Some implementations of getopt() expect that argv[0] is always the program name, and ignore that entry. ipfw2.c code instead skips this entry and starts with options at offset 0, relying on a more tolerant implementation of

Re: svn commit: r184471 - in head/bin: cat cp

2008-11-03 Thread Joerg Sonnenberger
On Mon, Nov 03, 2008 at 12:34:47AM +0100, Ivan Voras wrote: It looks like it's probably worth pushing the limit up to 8 MB when we have lots of memory :) Yes, it's an improvement, but who will ever notice? :) Is even the improvement from 64KB to 1MB even measurable? I mean on anything but