group.c revision 8af2c5b9bdbf69a55f079d7ad9483d38fae9f023
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * CDDL HEADER START
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * The contents of this file are subject to the terms of the
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * Common Development and Distribution License (the "License").
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * You may not use this file except in compliance with the License.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * See the License for the specific language governing permissions
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * and limitations under the License.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * When distributing Covered Code, include this CDDL HEADER in each
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * If applicable, add the following below this CDDL HEADER, with the
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * fields enclosed by brackets "[]" replaced with your own identifying
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * information: Portions Copyright [yyyy] [name of copyright owner]
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * CDDL HEADER END
a4aeef46cda1835da2b19f8f62b4526de6521e6cDonghai Qiao * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * Use is subject to license terms.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#pragma ident "%Z%%M% %I% %E% SMI"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin MSG_GPH_ZERO_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin MSG_GPH_LDSO_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin MSG_GPH_FIRST_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin MSG_GPH_FILTEE_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin MSG_GPH_INITIAL_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin MSG_GPH_NOPENDLAZY_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin CONV_INV_BUFSIZE + CONV_EXPN_FIELD_DEF_SUFFIX_SIZE
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * Ensure that Conv_grphdl_flags_buf_t is large enough:
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * HDLSZ is the real minimum size of the buffer required by conv_grphdl_flags().
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * However, Conv_grphdl_flags_buf_t uses CONV_GRPHDL_FLAGS_BUFSIZE to set the
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * buffer size. We do things this way because the definition of HDLSZ uses
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * information that is not available in the environment of other programs
ce67301fa82625f5594913e8ab6abf9e0aa461d0Roland Mainz * that include the conv.h header file.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#if (CONV_GRPHDL_FLAGS_BUFSIZE < HDLSZ) && !defined(__lint)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#error "CONV_GRPHDL_FLAGS_BUFSIZE is not large enough"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * String conversion routine for Grp_hdl flags.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinconv_grphdl_flags(uint_t flags, Conv_grphdl_flags_buf_t *grphdl_flags_buf)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin { GPH_NOPENDLAZY, MSG_ORIG(MSG_GPH_NOPENDLAZY) },
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define DESCSZ CONV_EXPN_FIELD_DEF_PREFIX_SIZE + \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin MSG_GPD_DLSYM_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin MSG_GPD_RELOC_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin MSG_GPD_ADDEPS_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin MSG_GPD_PARENT_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin MSG_GPD_FILTER_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin MSG_GPD_PROMOTE_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin MSG_GPD_REMOVE_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin CONV_INV_BUFSIZE + CONV_EXPN_FIELD_DEF_SUFFIX_SIZE
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * Ensure that Conv_grpdesc_flags_buf_t is large enough:
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * DESCSZ is the real min size of the buffer required by conv_grpdesc_flags().
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * However, Conv_grpdesc_flags_buf_t uses CONV_GRPDESC_FLAGS_BUFSIZE to set the
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * buffer size. We do things this way because the definition of DESCSZ uses
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * information that is not available in the environment of other programs
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * that include the conv.h header file.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#if (CONV_GRPDESC_FLAGS_BUFSIZE < DESCSZ) && !defined(__lint)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#error "CONV_GRPDESC_FLAGS_BUFSIZE is not large enough"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * String conversion routine for Grp_desc flags.