Home | History | Annotate | Line # | Download | only in time
compat_localtime.c revision 1.2
      1  1.2  christos /*	$NetBSD: compat_localtime.c,v 1.2 2009/01/11 03:46:25 christos Exp $	*/
      2  1.2  christos 
      3  1.2  christos /*
      4  1.2  christos  * Written by Jason R. Thorpe <thorpej (at) NetBSD.org>, October 21, 1997.
      5  1.2  christos  * Public domain.
      6  1.2  christos  */
      7  1.2  christos 
      8  1.2  christos #include "namespace.h"
      9  1.2  christos #include <sys/cdefs.h>
     10  1.2  christos 
     11  1.2  christos #define __LIBC12_SOURCE__
     12  1.2  christos #include <time.h>
     13  1.2  christos #include <sys/time.h>
     14  1.2  christos #include <compat/include/time.h>
     15  1.2  christos #include <compat/sys/time.h>
     16  1.2  christos 
     17  1.2  christos #ifdef __weak_alias
     18  1.2  christos __weak_alias(ctime_r,_ctime_r)
     19  1.2  christos __weak_alias(gmtime_r,_gmtime_r)
     20  1.2  christos __weak_alias(localtime_r,_localtime_r)
     21  1.2  christos __weak_alias(offtime,_offtime)
     22  1.2  christos __weak_alias(posix2time,_posix2time)
     23  1.2  christos __weak_alias(time2posix,_time2posix)
     24  1.2  christos __weak_alias(timegm,_timegm)
     25  1.2  christos __weak_alias(timelocal,_timelocal)
     26  1.2  christos __weak_alias(timeoff,_timeoff)
     27  1.2  christos __weak_alias(tzset,_tzset)
     28  1.2  christos __weak_alias(tzsetwall,_tzsetwall)
     29  1.2  christos #endif
     30  1.2  christos 
     31  1.2  christos __warn_references(ctime_r,
     32  1.2  christos     "warning: reference to compatibility ctime_r();"
     33  1.2  christos     " include <time.h> for correct reference")
     34  1.2  christos __warn_references(gmtime_r,
     35  1.2  christos     "warning: reference to compatibility gmtime_r();"
     36  1.2  christos     " include <time.h> for correct reference")
     37  1.2  christos __warn_references(localtime_r,
     38  1.2  christos     "warning: reference to compatibility localtime_r();"
     39  1.2  christos     " include <time.h> for correct reference")
     40  1.2  christos __warn_references(offtime,
     41  1.2  christos     "warning: reference to compatibility offtime();"
     42  1.2  christos     " include <time.h> for correct reference")
     43  1.2  christos __warn_references(posix2time,
     44  1.2  christos     "warning: reference to compatibility posix2time();"
     45  1.2  christos     " include <time.h> for correct reference")
     46  1.2  christos __warn_references(time2posix,
     47  1.2  christos     "warning: reference to compatibility time2posix();"
     48  1.2  christos     " include <time.h> for correct reference")
     49  1.2  christos __warn_references(timegm,
     50  1.2  christos     "warning: reference to compatibility timegm();"
     51  1.2  christos     " include <time.h> for correct reference")
     52  1.2  christos __warn_references(timelocal,
     53  1.2  christos     "warning: reference to compatibility timelocal();"
     54  1.2  christos     " include <time.h> for correct reference")
     55  1.2  christos __warn_references(timeoff,
     56  1.2  christos     "warning: reference to compatibility timeoff();"
     57  1.2  christos     " include <time.h> for correct reference")
     58  1.2  christos __warn_references(tzset,
     59  1.2  christos     "warning: reference to compatibility tzset();"
     60  1.2  christos     " include <time.h> for correct reference")
     61  1.2  christos __warn_references(tzsetwall,
     62  1.2  christos     "warning: reference to compatibility tzsetwall();"
     63  1.2  christos     " include <time.h> for correct reference")
     64  1.2  christos 
     65  1.2  christos #define timeval timeval50
     66  1.2  christos #define timespec timespec50
     67  1.2  christos #define	time_t	int32_t
     68  1.2  christos 
     69  1.2  christos #include "time/localtime.c"
     70