> > > 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
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
> >
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
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
> > > 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
> > > 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
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
> 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
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
> > 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
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.
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
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.
> >
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
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
> \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
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
17 matches
Mail list logo