diff options
Diffstat (limited to 'man3/offsetof.3')
-rw-r--r-- | man3/offsetof.3 | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/man3/offsetof.3 b/man3/offsetof.3 index 1c69152d8..5dbccc859 100644 --- a/man3/offsetof.3 +++ b/man3/offsetof.3 @@ -25,7 +25,7 @@ .\" References: .\" /usr/lib/gcc/i486-linux-gnu/4.1.1/include/stddef.h .\" glibc-doc -.TH offsetof 3 2022-12-29 "Linux man-pages 6.03" +.TH offsetof 3 2023-05-03 "Linux man-pages 6.05.01" .SH NAME offsetof \- offset of a structure member .SH LIBRARY @@ -64,7 +64,9 @@ within the given .IR type , in units of bytes. .SH STANDARDS -POSIX.1-2001, POSIX.1-2008, C99. +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89. .SH EXAMPLES On a Linux/i386 system, when compiled using the default .BR gcc (1) @@ -84,7 +86,7 @@ sizeof(struct s)=16 #include <stddef.h> #include <stdio.h> #include <stdlib.h> - +\& int main(void) { @@ -94,14 +96,14 @@ main(void) double d; char a[]; }; - +\& /* Output is compiler dependent */ - +\& printf("offsets: i=%zu; c=%zu; d=%zu a=%zu\en", offsetof(struct s, i), offsetof(struct s, c), offsetof(struct s, d), offsetof(struct s, a)); printf("sizeof(struct s)=%zu\en", sizeof(struct s)); - +\& exit(EXIT_SUCCESS); } .EE |