OSDN Git Service

(split) LDP: Update original to LDP v3.65
[linuxjm/LDP_man-pages.git] / original / man3 / offsetof.3
index 4987b68..83f314b 100644 (file)
@@ -25,7 +25,7 @@
 .\" 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
@@ -92,13 +92,19 @@ main(void)
 
     /* 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/.