17c478bdstevel@tonic-gate/*
2f430f59robbin * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
380868c5robbin * Use is subject to license terms.
47c478bdstevel@tonic-gate */
57c478bdstevel@tonic-gate
67c478bdstevel@tonic-gate#ifndef	_PRIVATE_H
77c478bdstevel@tonic-gate#define	_PRIVATE_H
87c478bdstevel@tonic-gate
97c478bdstevel@tonic-gate#pragma ident	"%Z%%M%	%I%	%E% SMI"
107c478bdstevel@tonic-gate
117c478bdstevel@tonic-gate/*
127c478bdstevel@tonic-gate * This file is in the public domain, so clarified as of
137c478bdstevel@tonic-gate * June 5, 1996 by Arthur David Olson (arthur_david_olson@nih.gov).
147c478bdstevel@tonic-gate */
157c478bdstevel@tonic-gate
167c478bdstevel@tonic-gate/*
177c478bdstevel@tonic-gate * This header is for use ONLY with the time conversion code.
187c478bdstevel@tonic-gate * There is no guarantee that it will remain unchanged,
197c478bdstevel@tonic-gate * or that it will remain at all.
207c478bdstevel@tonic-gate * Do NOT copy it to any system include directory.
217c478bdstevel@tonic-gate * Thank you!
227c478bdstevel@tonic-gate */
237c478bdstevel@tonic-gate
247c478bdstevel@tonic-gate#ifdef	__cplusplus
257c478bdstevel@tonic-gateextern "C" {
267c478bdstevel@tonic-gate#endif
277c478bdstevel@tonic-gate
287c478bdstevel@tonic-gate/*
297c478bdstevel@tonic-gate * Nested includes
307c478bdstevel@tonic-gate */
317c478bdstevel@tonic-gate#include <sys/types.h>	/* for time_t */
327c478bdstevel@tonic-gate#include <stdio.h>
337c478bdstevel@tonic-gate#include <errno.h>
347c478bdstevel@tonic-gate#include <string.h>
357c478bdstevel@tonic-gate#include <limits.h>	/* for CHAR_BIT */
367c478bdstevel@tonic-gate#include <time.h>
377c478bdstevel@tonic-gate#include <stdlib.h>
387c478bdstevel@tonic-gate#include <libintl.h>	/* for F_OK and R_OK */
397c478bdstevel@tonic-gate#include <unistd.h>
4080868c5robbin#include <sys/wait.h>
417c478bdstevel@tonic-gate
4280868c5robbin/* static char	privatehid[] = "@(#)private.h	7.55"; */
4380868c5robbin
4480868c5robbin#define	GRANDPARENTED	"Local time zone must be set--see zic manual page"
457c478bdstevel@tonic-gate
467c478bdstevel@tonic-gate/* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX.  */
477c478bdstevel@tonic-gate#define	is_digit(c)		((unsigned)(c) - '0' <= 9)
487c478bdstevel@tonic-gate
497c478bdstevel@tonic-gate/*
507c478bdstevel@tonic-gate * Private function declarations.
517c478bdstevel@tonic-gate */
5280868c5robbinchar 	*icatalloc(char *old, const char *new);
5380868c5robbinchar 	*icpyalloc(const char *string);
547c478bdstevel@tonic-gatechar 	*imalloc(int n);
5580868c5robbinvoid 	*irealloc(void *pointer, int size);
5680868c5robbinvoid	ifree(char *pointer);
57f430f59robbinconst char	*scheck(const char *string, const char *format);
587c478bdstevel@tonic-gate
597c478bdstevel@tonic-gate/*
607c478bdstevel@tonic-gate * Finally, some convenience items.
617c478bdstevel@tonic-gate */
627c478bdstevel@tonic-gate
637c478bdstevel@tonic-gate#ifndef TRUE
647c478bdstevel@tonic-gate#define	TRUE	1
657c478bdstevel@tonic-gate#endif /* !defined TRUE */
667c478bdstevel@tonic-gate
677c478bdstevel@tonic-gate#ifndef FALSE
687c478bdstevel@tonic-gate#define	FALSE	0
697c478bdstevel@tonic-gate#endif /* !defined FALSE */
707c478bdstevel@tonic-gate
717c478bdstevel@tonic-gate#ifndef TYPE_BIT
727c478bdstevel@tonic-gate#define	TYPE_BIT(type)	(sizeof (type) * CHAR_BIT)
737c478bdstevel@tonic-gate#endif /* !defined TYPE_BIT */
747c478bdstevel@tonic-gate
757c478bdstevel@tonic-gate#ifndef TYPE_SIGNED
767c478bdstevel@tonic-gate#define	TYPE_SIGNED(type) (((type) -1) < 0)
777c478bdstevel@tonic-gate#endif /* !defined TYPE_SIGNED */
787c478bdstevel@tonic-gate
797c478bdstevel@tonic-gate/*
807c478bdstevel@tonic-gate * INITIALIZE(x)
817c478bdstevel@tonic-gate */
827c478bdstevel@tonic-gate
837c478bdstevel@tonic-gate#ifndef INITIALIZE
847c478bdstevel@tonic-gate#ifdef lint
857c478bdstevel@tonic-gate#define	INITIALIZE(x)	((x) = 0)
867c478bdstevel@tonic-gate#endif /* defined lint */
877c478bdstevel@tonic-gate#ifndef lint
887c478bdstevel@tonic-gate#define	INITIALIZE(x)
897c478bdstevel@tonic-gate#endif /* !defined lint */
907c478bdstevel@tonic-gate#endif /* !defined INITIALIZE */
917c478bdstevel@tonic-gate
927c478bdstevel@tonic-gate#ifdef	__cplusplus
937c478bdstevel@tonic-gate}
947c478bdstevel@tonic-gate#endif
957c478bdstevel@tonic-gate
967c478bdstevel@tonic-gate#endif	/* _PRIVATE_H */
97