timeconv.h revision 98313
198313Swollman/*
298313Swollman * Copyright (c) 1989, 1993
398313Swollman *	The Regents of the University of California.  All rights reserved.
498313Swollman * (c) UNIX System Laboratories, Inc.
598313Swollman * All or some portions of this file are derived from material licensed
698313Swollman * to the University of California by American Telephone and Telegraph
798313Swollman * Co. or Unix System Laboratories, Inc. and are reproduced herein with
898313Swollman * the permission of UNIX System Laboratories, Inc.
998313Swollman *
1098313Swollman * Redistribution and use in source and binary forms, with or without
1198313Swollman * modification, are permitted provided that the following conditions
1298313Swollman * are met:
1398313Swollman * 1. Redistributions of source code must retain the above copyright
1498313Swollman *    notice, this list of conditions and the following disclaimer.
1598313Swollman * 2. Redistributions in binary form must reproduce the above copyright
1698313Swollman *    notice, this list of conditions and the following disclaimer in the
1798313Swollman *    documentation and/or other materials provided with the distribution.
1898313Swollman * 3. All advertising materials mentioning features or use of this software
1998313Swollman *    must display the following acknowledgement:
2098313Swollman *	This product includes software developed by the University of
2198313Swollman *	California, Berkeley and its contributors.
2298313Swollman * 4. Neither the name of the University nor the names of its contributors
2398313Swollman *    may be used to endorse or promote products derived from this software
2498313Swollman *    without specific prior written permission.
2598313Swollman *
2698313Swollman * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2798313Swollman * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2898313Swollman * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2998313Swollman * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
3098313Swollman * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3198313Swollman * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3298313Swollman * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3398313Swollman * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3498313Swollman * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3598313Swollman * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3698313Swollman * SUCH DAMAGE.
3798313Swollman *
3898313Swollman *	@(#)time.h	8.3 (Berkeley) 1/21/94
3998313Swollman */
4098313Swollman
4198313Swollman/*
4298313Swollman * $FreeBSD: head/include/timeconv.h 98313 2002-06-17 01:42:33Z wollman $
4398313Swollman */
4498313Swollman
4598313Swollman#ifndef _TIMECONV_H_
4698313Swollman#define	_TIMECONV_H_
4798313Swollman
4898313Swollman#include <sys/cdefs.h>
4998313Swollman#include <machine/ansi.h>
5098313Swollman
5198313Swollman#ifdef	_BSD_TIME_T_
5298313Swollmantypedef	_BSD_TIME_T_	time_t;
5398313Swollman#undef	_BSD_TIME_T_
5498313Swollman#endif
5598313Swollman
5698313Swollmantime_t _time32_to_time(__int32_t t32);
5798313Swollman__int32_t _time_to_time32(time_t t);
5898313Swollmantime_t _time64_to_time(__int64_t t64);
5998313Swollman__int64_t _time_to_time64(time_t t);
6098313Swollmanlong _time_to_long(time_t t);
6198313Swollmantime_t _long_to_time(long tlong);
6298313Swollmanint _time_to_int(time_t t);
6398313Swollmantime_t _int_to_time(int tint);
6498313Swollman
6598313Swollman#endif /* _TIMECONV_H_ */
66