exacct_common.xh revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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
* 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]
*
* CDDL HEADER END
*/
/*
* Copyright 2002-2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Common includes and defines for Sun::Solaris::Exacct.
*/
/* Exacct related includes. */
/*
* On i386 Solaris defines SP, which conflicts with the perl definition of SP
* We don't need the Solaris one, so get rid of it to avoid warnings.
*/
/* Perl XS includes. */
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
/* Root of the Exacct namespace. */
/* Debugging assertion macros. */
0))
#else
/*
* Object stash pointers - caching these speeds up the creation and
* typechecking of perl objects by removing the need to do a hash lookup.
* The peculiar variable names are so that typemaps can generate the correct
* package name using the typemap '$Package' variable as the root of the name.
*/
/* Populate the stash pointers, provided by Exacct.xs. */
extern void init_stashes(void);
/*
* Pointer to part of the hash tree built by define_catalog_constants in
* Catalog.xs. This is used by catalog_id_str() in Exacct.xs when mapping
* from a catalog to an id string.
*/
/*
* Structure for holding an ::Exacct::Object. Different bits of this structure
* will be populated depending on the type of Object (Item or Group), and on
* how the Object was created (read from file or by the script).
*
* Simple Items
* Only the ea_obj part is populated, and that points to an ea_object_t
* that is used to hold the Item.
*
* Items containing embedded Objects
* If an Item of this type has been read from file and has not been accessed,
* just the ea_obj part will be populated. If the object has been accessed, or
* if it has been created from within the script, the perl_obj part will be
* populated.
*
* Groups
* If a Group has been read from file and has not been accessed, just the
* ea_obj part will be populated. If the object has been accessed, or if it has
* been created from within the script, the perl_obj part will be populated.
*/
/* Macros for manipulating flag bits. */
/* Fast way to make catalog objects, provided by Exacct.xs. */
/* Return the integer catalog value from the passed object or SV. */
/* Fast way to make exacct objects, provided by Exacct.xs. */
/* Deflate an xs_ea_object, provided by Exacct.xs. */
/*
* Structure and associated function for creating perl constants
* and populating @_Constants, used for constant lookup by the modules.
* See Exacct.xs for the definition of define_constants().
*/
const char *name;
const int len;
const consttype_t consttype;
} constval_t;
#endif /* _EXACCT_COMMON_H */