* Oliver Fromme wrote:
> If we push struct sockaddr to align(4), then we will also
> have to do the same with all others that are not already
> aligned to at least 4 bytes. That would be almost all of
> them.
Maybe it's better to just use __attribute__((aligned))? That makes it
use the worst ali
Oliver Fromme writes:
> I did a small survey of all the sockaddr_ variants:
I only did _in, _in6 and _un; who cares about the others? :P
DES
--
Dag-Erling Smørgrav - d...@des.no
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailma
Dag-Erling Smørgrav wrote:
> "M. Warner Losh" writes:
> > You'll find that a number of structures are potentially already
> > allocated with less than required alignment. There's about a dozen
> > places in the tree that would start to fail if we did this, or the
> > stronger form of __align
"M. Warner Losh" writes:
> You'll find that a number of structures are potentially already
> allocated with less than required alignment. There's about a dozen
> places in the tree that would start to fail if we did this, or the
> stronger form of __aligned(8). We could add that to the other
> s
On Wed, Aug 11, 2010 at 07:05:53AM +1000, Bruce Evans wrote:
> On Tue, 10 Aug 2010, M. Warner Losh wrote:
>
> > In message: <86sk2m1hsj@ds4.des.no>
> >Dag-Erling Sm�rgrav writes:
> > : "M. Warner Losh" writes:
> > : > /*
> > : > * Macros to cast a struct sockaddr, or parts there
On Tue, 10 Aug 2010, M. Warner Losh wrote:
In message: <86sk2m1hsj@ds4.des.no>
Dag-Erling Sm?rgrav writes:
: "M. Warner Losh" writes:
: > /*
: > * Macros to cast a struct sockaddr, or parts thereof.
: > * On architectures with strict alignment requirements, the compiler
: > *
"M. Warner Losh" writes:
> Dag-Erling Smørgrav writes:
> > "M. Warner Losh" writes:
> > > /*
> > > * Macros to cast a struct sockaddr, or parts thereof.
> > > * On architectures with strict alignment requirements, the compiler
> > > * can bogusly warn about alignment problems since its static
In message: <201008101956.o7aju5ms044...@haluter.fromme.com>
Oliver Fromme writes:
:
: M. Warner Losh wrote:
: > /*
: > * Macros to cast a struct sockaddr, or parts thereof. struct
: > * sockaddr's alginment is loose to later be cast to a sockaddr_in or
: > * sockaddr_in6. On
M. Warner Losh wrote:
> /*
> * Macros to cast a struct sockaddr, or parts thereof. struct
> * sockaddr's alginment is loose to later be cast to a sockaddr_in or
> * sockaddr_in6. On architectures with strict alignment requirements,
> * this leads to compiler warnings because the compile
In message: <11606.1281464...@critter.freebsd.dk>
"Poul-Henning Kamp" writes:
: In message <20100810.115457.1126759349893144516@bsdimp.com>, "M. Warner
Los
: h" writes:
: >In message: <20100811.023235.13138059@allbsd.org>
: >Hiroki Sato writes:
: >: Oliver Fromme
In message <20100810.115457.1126759349893144516@bsdimp.com>, "M. Warner Los
h" writes:
>In message: <20100811.023235.13138059@allbsd.org>
>Hiroki Sato writes:
>: Oliver Fromme wrote
>: in <201008101623.o7agns7i042...@haluter.fromme.com>:
>:
>: ol> -static int validate(
In message: <86sk2m1hsj@ds4.des.no>
Dag-Erling Smørgrav writes:
: "M. Warner Losh" writes:
: > /*
: > * Macros to cast a struct sockaddr, or parts thereof.
: > * On architectures with strict alignment requirements, the compiler
: > * can bogusly warn about alignment problems si
In message: <20100811.023235.13138059@allbsd.org>
Hiroki Sato writes:
: Oliver Fromme wrote
: in <201008101623.o7agns7i042...@haluter.fromme.com>:
:
: ol> -static int validate(struct sockaddr *, const char *);
: ol> -static void unmapped(struct sockaddr *);
: ol> +st
Hiroki Sato writes:
> Why is s/struct sockaddr */struct sockaddr_storage */ needed here?
Alignment. That's what this entire thread is about.
DES
--
Dag-Erling Smørgrav - d...@des.no
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/ma
"M. Warner Losh" writes:
> /*
> * Macros to cast a struct sockaddr, or parts thereof.
> * On architectures with strict alignment requirements, the compiler
> * can bogusly warn about alignment problems since its static analysis
> * is insufficient for it to know that with the APIs used, there
In message: <201008101623.o7agns7i042...@haluter.fromme.com>
Oliver Fromme writes:
:
: M. Warner Losh wrote:
: > In message: <201008101313.o7addhye040...@haluter.fromme.com>
: > Oliver Fromme writes:
: > : M. Warner Losh wrote:
: > : > The casting that syslogd does w
Oliver Fromme wrote
in <201008101623.o7agns7i042...@haluter.fromme.com>:
ol> -static int validate(struct sockaddr *, const char *);
ol> -static voidunmapped(struct sockaddr *);
ol> +static int validate(struct sockaddr_storage *, const char *);
ol> +static voidunmapped(struct soc
M. Warner Losh wrote:
> In message: <201008101313.o7addhye040...@haluter.fromme.com>
> Oliver Fromme writes:
> : M. Warner Losh wrote:
> : > The casting that syslogd does with struct sockaddrFOO is what triggers
> : > it. I'm not sure how to fix it, so there's about 6 or 8 pro
In message: <201008101313.o7addhye040...@haluter.fromme.com>
Oliver Fromme writes:
: M. Warner Losh wrote:
: > The casting that syslogd does with struct sockaddrFOO is what triggers
: > it. I'm not sure how to fix it, so there's about 6 or 8 programs in
: > the tree that have WARNS
M. Warner Losh wrote:
> The casting that syslogd does with struct sockaddrFOO is what triggers
> it. I'm not sure how to fix it, so there's about 6 or 8 programs in
> the tree that have WARNS lowered to 3 because of it.
I've given it try, please see the patch below.
This is not really pretty,
On Mon, 9 Aug 2010, M. Warner Losh wrote:
In message: <86tyn4tbuc@ds4.des.no>
Dag-Erling Sm?rgrav writes:
: Jilles Tjoelker writes:
: > In other cases, I propose adding a cast to void * in between, like
: > (struct sockaddr_in *)(void *)ai->ai_addr
:
: Better to cast through u
"M. Warner Losh" writes:
> I like the idea of a macro. Why is a cast through uintptr_t better?
Without the uintptr_t cast, you'll get an error, or at least a warning,
if the pointer is qualified (const and / or volatile).
DES
--
Dag-Erling Smørgrav - d...@des.no
___
In message: <86tyn4tbuc@ds4.des.no>
Dag-Erling Smørgrav writes:
: Jilles Tjoelker writes:
: > In other cases, I propose adding a cast to void * in between, like
: > (struct sockaddr_in *)(void *)ai->ai_addr
:
: Better to cast through uintptr_t. Perhaps we should have a
: __DEC
Jilles Tjoelker writes:
> In other cases, I propose adding a cast to void * in between, like
> (struct sockaddr_in *)(void *)ai->ai_addr
Better to cast through uintptr_t. Perhaps we should have a
__DECONST-like macro for this?
#define __ALIGNED_CAST(t, v) ((t)(uintptr_t)(v))
DES
--
Dag-Erli
On Mon, 9 Aug 2010, Jilles Tjoelker wrote:
On Sun, Aug 08, 2010 at 03:36:08PM -0600, M. Warner Losh wrote:
The casting that syslogd does with struct sockaddrFOO is what triggers
it. I'm not sure how to fix it, so there's about 6 or 8 programs in
the tree that have WARNS lowered to 3 because
On Sun, Aug 08, 2010 at 03:36:08PM -0600, M. Warner Losh wrote:
> In message: <201008082037.o78kbldt022...@haluter.fromme.com>
> Oliver Fromme writes:
> : M. Warner Losh wrote:
> : > In message: <201008071620.o77gkdbb091...@svn.freebsd.org>
> : > Oliver Fromme writes:
>
In message: <201008082037.o78kbldt022...@haluter.fromme.com>
Oliver Fromme writes:
:
: M. Warner Losh wrote:
: > In message: <201008071620.o77gkdbb091...@svn.freebsd.org>
: > Oliver Fromme writes:
: > : Author: olli
: > : Date: Sat Aug 7 16:20:12 2010
: > : New Revi
M. Warner Losh wrote:
> In message: <201008071620.o77gkdbb091...@svn.freebsd.org>
> Oliver Fromme writes:
> : Author: olli
> : Date: Sat Aug 7 16:20:12 2010
> : New Revision: 211023
> : URL: http://svn.freebsd.org/changeset/base/211023
> : Modified: head/usr.sbin/syslogd/Makef
In message: <201008071620.o77gkdbb091...@svn.freebsd.org>
Oliver Fromme writes:
: Author: olli
: Date: Sat Aug 7 16:20:12 2010
: New Revision: 211023
: URL: http://svn.freebsd.org/changeset/base/211023
: Modified: head/usr.sbin/syslogd/Makefile
: ==
Author: olli
Date: Sat Aug 7 16:20:12 2010
New Revision: 211023
URL: http://svn.freebsd.org/changeset/base/211023
Log:
syslogd(8) already supports *sending* log messages to non-
standard ports, but it can't *receive* them (port 514 is
hardcoded). This commit adds that missing feature.
30 matches
Mail list logo