xref: /titanic_51/usr/src/man/man3c/offsetof.3c (revision 45e662eb8429b38c18931ebeed30f2e5287ae51b)
te
Copyright 1989 AT&T Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
OFFSETOF 3C "Dec 29, 1996"
NAME
offsetof - offset of structure member
SYNOPSIS

#include <stddef.h>

size_t offsetof(type, member-designator);
DESCRIPTION

The offsetof() macro defined in <stddef.h> expands to an integral constant expression that has type size_t. The value of this expression is the offset in bytes to the structure member (designated by member-designator) from the beginning of its structure (designated by type).

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
MT-Level MT-Safe
SEE ALSO

attributes(5)