.\" References:
.\" /usr/lib/gcc/i486-linux-gnu/4.1.1/include/stddef.h
.\" glibc-doc
-.TH OFFSETOF 3 2008-07-12 "GNU" "Linux Programmer's Manual"
+.TH OFFSETOF 3 2014-04-06 "GNU" "Linux Programmer's Manual"
.SH NAME
offsetof \- offset of a structure member
.SH SYNOPSIS
/* Output is compiler dependent */
- printf("offsets: i=%ld; c=%ld; d=%ld a=%ld\\n",
- (long) offsetof(struct s, i),
- (long) offsetof(struct s, c),
- (long) offsetof(struct s, d),
- (long) offsetof(struct s, a));
- printf("sizeof(struct s)=%ld\\n", (long) sizeof(struct s));
+ printf("offsets: i=%zd; c=%zd; d=%zd a=%zd\\n",
+ offsetof(struct s, i), offsetof(struct s, c),
+ offsetof(struct s, d), offsetof(struct s, a));
+ printf("sizeof(struct s)=%zd\\n", sizeof(struct s));
exit(EXIT_SUCCESS);
}
.fi
+.SH COLOPHON
+This page is part of release 3.65 of the Linux
+.I man-pages
+project.
+A description of the project,
+and information about reporting bugs,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.