compat_localtime.c revision 1.2.4.1 1 1.2.4.1 bouyer /* $NetBSD: compat_localtime.c,v 1.2.4.1 2011/03/05 15:09:19 bouyer 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.4.1 bouyer __weak_alias(ctime_rz,_ctime_rz)
20 1.2 christos __weak_alias(gmtime_r,_gmtime_r)
21 1.2 christos __weak_alias(localtime_r,_localtime_r)
22 1.2.4.1 bouyer __weak_alias(localtime_rz,_localtime_rz)
23 1.2.4.1 bouyer __weak_alias(mktime_z,_mktime_z)
24 1.2 christos __weak_alias(offtime,_offtime)
25 1.2 christos __weak_alias(posix2time,_posix2time)
26 1.2.4.1 bouyer __weak_alias(posix2time_z,_posix2time_z)
27 1.2 christos __weak_alias(time2posix,_time2posix)
28 1.2 christos __weak_alias(timegm,_timegm)
29 1.2 christos __weak_alias(timelocal,_timelocal)
30 1.2 christos __weak_alias(timeoff,_timeoff)
31 1.2 christos __weak_alias(tzset,_tzset)
32 1.2 christos __weak_alias(tzsetwall,_tzsetwall)
33 1.2 christos #endif
34 1.2 christos
35 1.2 christos __warn_references(ctime_r,
36 1.2 christos "warning: reference to compatibility ctime_r();"
37 1.2 christos " include <time.h> for correct reference")
38 1.2.4.1 bouyer __warn_references(ctime_rz,
39 1.2.4.1 bouyer "warning: reference to compatibility ctime_rz();"
40 1.2.4.1 bouyer " include <time.h> for correct reference")
41 1.2 christos __warn_references(gmtime_r,
42 1.2 christos "warning: reference to compatibility gmtime_r();"
43 1.2 christos " include <time.h> for correct reference")
44 1.2 christos __warn_references(localtime_r,
45 1.2 christos "warning: reference to compatibility localtime_r();"
46 1.2 christos " include <time.h> for correct reference")
47 1.2.4.1 bouyer __warn_references(localtime_rz,
48 1.2.4.1 bouyer "warning: reference to compatibility localtime_rz();"
49 1.2.4.1 bouyer " include <time.h> for correct reference")
50 1.2.4.1 bouyer __warn_references(mktime_z,
51 1.2.4.1 bouyer "warning: reference to compatibility mktime_z();"
52 1.2.4.1 bouyer " include <time.h> for correct reference")
53 1.2 christos __warn_references(offtime,
54 1.2 christos "warning: reference to compatibility offtime();"
55 1.2 christos " include <time.h> for correct reference")
56 1.2 christos __warn_references(posix2time,
57 1.2 christos "warning: reference to compatibility posix2time();"
58 1.2 christos " include <time.h> for correct reference")
59 1.2.4.1 bouyer __warn_references(posix2time_z,
60 1.2.4.1 bouyer "warning: reference to compatibility posix2time_z();"
61 1.2.4.1 bouyer " include <time.h> for correct reference")
62 1.2 christos __warn_references(time2posix,
63 1.2 christos "warning: reference to compatibility time2posix();"
64 1.2 christos " include <time.h> for correct reference")
65 1.2 christos __warn_references(timegm,
66 1.2 christos "warning: reference to compatibility timegm();"
67 1.2 christos " include <time.h> for correct reference")
68 1.2 christos __warn_references(timelocal,
69 1.2 christos "warning: reference to compatibility timelocal();"
70 1.2 christos " include <time.h> for correct reference")
71 1.2 christos __warn_references(timeoff,
72 1.2 christos "warning: reference to compatibility timeoff();"
73 1.2 christos " include <time.h> for correct reference")
74 1.2 christos __warn_references(tzset,
75 1.2 christos "warning: reference to compatibility tzset();"
76 1.2 christos " include <time.h> for correct reference")
77 1.2 christos __warn_references(tzsetwall,
78 1.2 christos "warning: reference to compatibility tzsetwall();"
79 1.2 christos " include <time.h> for correct reference")
80 1.2 christos
81 1.2 christos #define timeval timeval50
82 1.2 christos #define timespec timespec50
83 1.2 christos #define time_t int32_t
84 1.2 christos
85 1.2 christos #include "time/localtime.c"
86