Bug#368646: Re: Bug#368646: manpages-dev: offsetof: please include documentation

2006-05-26 Thread Michael Kerrisk
> > > One reason such things aren't as noticable is because most network > > > protocols put the members in decreasing order of size, in an attempt > > > to satisty the requirements for alignment and such, and inhibit any > > > such compiler-specific :) things. > > > > ? Low level network protocol

Bug#368646: manpages-dev: offsetof: please include documentation

2006-05-26 Thread Justin Pryzby
On Thu, May 25, 2006 at 11:20:06PM +0200, Michael Kerrisk wrote: > Justin, > > > On Tue, May 23, 2006 at 10:07:57PM +0200, Michael Kerrisk wrote: > > > > \fBoffsetof\fP() is a macro provided to compute the offset of a given > > > > element within a structure. The ordering within memory of a C > >

Bug#368646: manpages-dev: offsetof: please include documentation

2006-05-25 Thread Michael Kerrisk
Justin, > On Tue, May 23, 2006 at 10:07:57PM +0200, Michael Kerrisk wrote: > > > \fBoffsetof\fP() is a macro provided to compute the offset of a given > > > element within a structure. The ordering within memory of a C > > > structure is undefined, as is its size; compilers are allowed to > > > r

Bug#368646: manpages-dev: offsetof: please include documentation

2006-05-25 Thread Justin Pryzby
On Tue, May 23, 2006 at 10:07:57PM +0200, Michael Kerrisk wrote: > > \fBoffsetof\fP() is a macro provided to compute the offset of a given > > element within a structure. The ordering within memory of a C > > structure is undefined, as is its size; compilers are allowed to > > reorder and pad stru

Bug#368646: Re: Bug#368646: manpages-dev: offsetof: please include documentation

2006-05-24 Thread Michael Kerrisk
> > > anyway) and to make sure I still understood it. Do you have a glibc > > > source, too? > > > > There are many glibc sources (different versions) -- I > > have the source of a large number of them. > Oops I meant to note that I found it (glibc doc, section on c language > foo). > > On that

Bug#368646: manpages-dev: offsetof: please include documentation

2006-05-24 Thread Michael Kerrisk
> > > Included is a manpage documenting the offsetof() macro; please > > > consider including it. > > > > Excellent idea! Thanks for the page. It will go in 2.34. > It was my idea .. I guess I found it in undocumented.3. Yep -- I removed it from undocumented.3 already. [...] > > > pri

Bug#368646: Re: Bug#368646: manpages-dev: offsetof: please include documentation

2006-05-24 Thread Justin Pryzby
On Wed, May 24, 2006 at 08:14:01PM +0200, Michael Kerrisk wrote: > > > This macro is useful because the sizes of the fields that compose > > > a structure can vary across implementations, > > > and compilers may insert different numbers of padding > > s/numbers/amounts/ > > Umm. "number of ... by

Bug#368646: Re: Bug#368646: manpages-dev: offsetof: please include documentation

2006-05-24 Thread Michael Kerrisk
> On Wed, May 24, 2006 at 08:14:01PM +0200, Michael Kerrisk wrote: > > > > This macro is useful because the sizes of the fields that compose > > > > a structure can vary across implementations, > > > > and compilers may insert different numbers of padding > > > s/numbers/amounts/ > > > > Umm. "nu

Bug#368646: Re: Bug#368646: manpages-dev: offsetof: please include documentation

2006-05-24 Thread Justin Pryzby
On Wed, May 24, 2006 at 08:32:17PM +0200, Michael Kerrisk wrote: > > > > anyway) and to make sure I still understood it. Do you have a glibc > > > > source, too? > > > > > > There are many glibc sources (different versions) -- I > > > have the source of a large number of them. > > Oops I meant to

Bug#368646: Re: Bug#368646: manpages-dev: offsetof: please include documentation

2006-05-24 Thread Michael Kerrisk
> > This macro is useful because the sizes of the fields that compose > > a structure can vary across implementations, > > and compilers may insert different numbers of padding > s/numbers/amounts/ Umm. "number of ... bytes" seems more correct than "amount of ... bytes". M -- Michael Kerrisk m

Bug#368646: manpages-dev: offsetof: please include documentation

2006-05-24 Thread Justin Pryzby
On Wed, May 24, 2006 at 08:18:00PM +0200, Michael Kerrisk wrote: > > > > Included is a manpage documenting the offsetof() macro; please > > > > consider including it. > > > > > > Excellent idea! Thanks for the page. It will go in 2.34. > > It was my idea .. I guess I found it in undocumented.3.

Bug#368646: manpages-dev: offsetof: please include documentation

2006-05-24 Thread Justin Pryzby
On Wed, May 24, 2006 at 12:22:43AM +0200, Michael Kerrisk wrote: > This macro is useful because the sizes of the fields that compose > a structure can vary across implementations, > and compilers may insert different numbers of padding s/numbers/amounts/ > .fi > .\" .SH NOTES > .\" \fBoffsetof\fP

Bug#368646: manpages-dev: offsetof: please include documentation

2006-05-24 Thread Justin Pryzby
On Tue, May 23, 2006 at 09:55:46PM +0200, Michael Kerrisk wrote: > Justin, > > > Included is a manpage documenting the offsetof() macro; please > > consider including it. > > Excellent idea! Thanks for the page. It will go in 2.34. It was my idea .. I guess I found it in undocumented.3. > >

Bug#368646: manpages-dev: offsetof: please include documentation

2006-05-23 Thread Michael Kerrisk
Justin, Below is the current version of the page I plan to include in 2.34. Any comments? (At the moment, I removed mention of field reordering, and I've commented out the NOTE section, since it seems to me a detail that is probably not needed, and anyway, most systems I know of do things a bit d

Bug#368646: manpages-dev: offsetof: please include documentation

2006-05-23 Thread Justin Pryzby
Package: manpages-dev Version: 2.28-1 Severity: wishlist Tags: patch Included is a manpage documenting the offsetof() macro; please consider including it. .\" Copyright (C) 2006 Justin Pryzby <[EMAIL PROTECTED]> .\" .\" Permission is hereby granted, free of charge, to any person obtaining .\" a c

Bug#368646: manpages-dev: offsetof: please include documentation

2006-05-23 Thread Michael Kerrisk
> \fBoffsetof\fP() is a macro provided to compute the offset of a given > element within a structure. The ordering within memory of a C > structure is undefined, as is its size; compilers are allowed to > reorder and pad structures. ^^^ Is that really true? I can't recall a case where I

Bug#368646: manpages-dev: offsetof: please include documentation

2006-05-23 Thread Michael Kerrisk
Justin, > Included is a manpage documenting the offsetof() macro; please > consider including it. Excellent idea! Thanks for the page. It will go in 2.34. > .\" Copyright (C) 2006 Justin Pryzby <[EMAIL PROTECTED]> > .\" > .\" Permission is hereby granted, free of charge, to any person obtainin