Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:54:02

0001 /*
0002  * Copyright (c) 1989, 1993
0003  *  The Regents of the University of California.  All rights reserved.
0004  * (c) UNIX System Laboratories, Inc.
0005  * All or some portions of this file are derived from material licensed
0006  * to the University of California by American Telephone and Telegraph
0007  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
0008  * the permission of UNIX System Laboratories, Inc.
0009  *
0010  * Redistribution and use in source and binary forms, with or without
0011  * modification, are permitted provided that the following conditions
0012  * are met:
0013  * 1. Redistributions of source code must retain the above copyright
0014  *    notice, this list of conditions and the following disclaimer.
0015  * 2. Redistributions in binary form must reproduce the above copyright
0016  *    notice, this list of conditions and the following disclaimer in the
0017  *    documentation and/or other materials provided with the distribution.
0018  * 3. Neither the name of the University nor the names of its contributors
0019  *    may be used to endorse or promote products derived from this software
0020  *    without specific prior written permission.
0021  *
0022  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
0023  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0024  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0025  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
0026  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
0027  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
0028  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
0029  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
0030  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
0031  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
0032  * SUCH DAMAGE.
0033  *
0034  *  @(#)time.h  8.3 (Berkeley) 1/21/94
0035  */
0036 
0037 /*
0038  * $FreeBSD$
0039  */
0040 
0041 #ifndef LIBBSD_TIMECONV_H
0042 #define LIBBSD_TIMECONV_H
0043 
0044 #ifdef LIBBSD_OVERLAY
0045 #include <sys/cdefs.h>
0046 #else
0047 #include <bsd/sys/cdefs.h>
0048 #endif
0049 #include <stdint.h>
0050 #include <time.h>
0051 
0052 time_t _time32_to_time(int32_t t32);
0053 int32_t _time_to_time32(time_t t);
0054 time_t _time64_to_time(int64_t t64);
0055 int64_t _time_to_time64(time_t t);
0056 long _time_to_long(time_t t);
0057 time_t _long_to_time(long tlong);
0058 int _time_to_int(time_t t);
0059 time_t _int_to_time(int tint);
0060 
0061 #if LIBBSD_SYS_TIME_BITS == 32 && LIBBSD_SYS_HAS_TIME64
0062 #if defined _TIME_BITS &&  _TIME_BITS == 64
0063 time_t LIBBSD_REDIRECT(_time32_to_time, (int32_t t32), _time32_to_time_time64);
0064 int32_t LIBBSD_REDIRECT(_time_to_time32, (time_t t), _time_to_time32_time64);
0065 time_t LIBBSD_REDIRECT(_time64_to_time, (int64_t t64), _time64_to_time_time64);
0066 int64_t LIBBSD_REDIRECT(_time_to_time64, (time_t t), _time_to_time64_time64);
0067 long LIBBSD_REDIRECT(_time_to_long, (time_t t), _time_to_long_time64);
0068 time_t LIBBSD_REDIRECT(_long_to_time, (long tlong), _long_to_time_time64);
0069 int LIBBSD_REDIRECT(_time_to_int, (time_t t), _time_to_int_time64);
0070 time_t LIBBSD_REDIRECT(_int_to_time, (int tint), _int_to_time_time64);
0071 #endif
0072 #endif
0073 
0074 #endif /* LIBBSD_TIMECONV_H */