1*2321c474SPedro F. Giffuni /*- 2*2321c474SPedro F. Giffuni * SPDX-License-Identifier: BSD-3-Clause 3*2321c474SPedro F. Giffuni * 48466ae90SGarrett Wollman * Copyright (c) 1989, 1993 58466ae90SGarrett Wollman * The Regents of the University of California. All rights reserved. 68466ae90SGarrett Wollman * (c) UNIX System Laboratories, Inc. 78466ae90SGarrett Wollman * All or some portions of this file are derived from material licensed 88466ae90SGarrett Wollman * to the University of California by American Telephone and Telegraph 98466ae90SGarrett Wollman * Co. or Unix System Laboratories, Inc. and are reproduced herein with 108466ae90SGarrett Wollman * the permission of UNIX System Laboratories, Inc. 118466ae90SGarrett Wollman * 128466ae90SGarrett Wollman * Redistribution and use in source and binary forms, with or without 138466ae90SGarrett Wollman * modification, are permitted provided that the following conditions 148466ae90SGarrett Wollman * are met: 158466ae90SGarrett Wollman * 1. Redistributions of source code must retain the above copyright 168466ae90SGarrett Wollman * notice, this list of conditions and the following disclaimer. 178466ae90SGarrett Wollman * 2. Redistributions in binary form must reproduce the above copyright 188466ae90SGarrett Wollman * notice, this list of conditions and the following disclaimer in the 198466ae90SGarrett Wollman * documentation and/or other materials provided with the distribution. 20f2556687SWarner Losh * 3. Neither the name of the University nor the names of its contributors 218466ae90SGarrett Wollman * may be used to endorse or promote products derived from this software 228466ae90SGarrett Wollman * without specific prior written permission. 238466ae90SGarrett Wollman * 248466ae90SGarrett Wollman * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 258466ae90SGarrett Wollman * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 268466ae90SGarrett Wollman * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 278466ae90SGarrett Wollman * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 288466ae90SGarrett Wollman * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 298466ae90SGarrett Wollman * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 308466ae90SGarrett Wollman * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 318466ae90SGarrett Wollman * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 328466ae90SGarrett Wollman * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 338466ae90SGarrett Wollman * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 348466ae90SGarrett Wollman * SUCH DAMAGE. 358466ae90SGarrett Wollman */ 368466ae90SGarrett Wollman 378466ae90SGarrett Wollman /* 388466ae90SGarrett Wollman */ 398466ae90SGarrett Wollman 408466ae90SGarrett Wollman #ifndef _TIMECONV_H_ 418466ae90SGarrett Wollman #define _TIMECONV_H_ 428466ae90SGarrett Wollman 438466ae90SGarrett Wollman #include <sys/cdefs.h> 44abbd8902SMike Barcroft #include <sys/_types.h> 458466ae90SGarrett Wollman 46abbd8902SMike Barcroft #ifndef _TIME_T_DECLARED 47abbd8902SMike Barcroft typedef __time_t time_t; 48abbd8902SMike Barcroft #define _TIME_T_DECLARED 498466ae90SGarrett Wollman #endif 508466ae90SGarrett Wollman 518466ae90SGarrett Wollman time_t _time32_to_time(__int32_t t32); 528466ae90SGarrett Wollman __int32_t _time_to_time32(time_t t); 538466ae90SGarrett Wollman time_t _time64_to_time(__int64_t t64); 548466ae90SGarrett Wollman __int64_t _time_to_time64(time_t t); 558466ae90SGarrett Wollman long _time_to_long(time_t t); 568466ae90SGarrett Wollman time_t _long_to_time(long tlong); 578466ae90SGarrett Wollman int _time_to_int(time_t t); 588466ae90SGarrett Wollman time_t _int_to_time(int tint); 598466ae90SGarrett Wollman 608466ae90SGarrett Wollman #endif /* _TIMECONV_H_ */ 61