minix/lib/libc/compat/time/compat_localtime.c
Ben Gras 2fe8fb192f Full switch to clang/ELF. Drop ack. Simplify.
There is important information about booting non-ack images in
docs/UPDATING. ack/aout-format images can't be built any more, and
booting clang/ELF-format ones is a little different. Updating to the
new boot monitor is recommended.

Changes in this commit:

	. drop boot monitor -> allowing dropping ack support
	. facility to copy ELF boot files to /boot so that old boot monitor
	  can still boot fairly easily, see UPDATING
	. no more ack-format libraries -> single-case libraries
	. some cleanup of OBJECT_FMT, COMPILER_TYPE, etc cases
	. drop several ack toolchain commands, but not all support
	  commands (e.g. aal is gone but acksize is not yet).
	. a few libc files moved to netbsd libc dir
	. new /bin/date as minix date used code in libc/
	. test compile fix
	. harmonize includes
	. /usr/lib is no longer special: without ack, /usr/lib plays no
	  kind of special bootstrapping role any more and bootstrapping
	  is done exclusively through packages, so releases depend even
	  less on the state of the machine making them now.
	. rename nbsd_lib* to lib*
	. reduce mtree
2012-02-14 14:52:02 +01:00

69 lines
2.2 KiB
C

/* $NetBSD: compat_localtime.c,v 1.2 2009/01/11 03:46:25 christos Exp $ */
/*
* Written by Jason R. Thorpe <thorpej@NetBSD.org>, October 21, 1997.
* Public domain.
*/
#include "namespace.h"
#include <sys/cdefs.h>
#define __LIBC12_SOURCE__
#include <time.h>
#include <sys/time.h>
#include <compat/include/time.h>
#include <compat/sys/time.h>
#ifdef __weak_alias
__weak_alias(ctime_r,_ctime_r)
__weak_alias(gmtime_r,_gmtime_r)
__weak_alias(localtime_r,_localtime_r)
__weak_alias(offtime,_offtime)
__weak_alias(posix2time,_posix2time)
__weak_alias(time2posix,_time2posix)
__weak_alias(timegm,_timegm)
__weak_alias(timelocal,_timelocal)
__weak_alias(timeoff,_timeoff)
__weak_alias(tzset,_tzset)
__weak_alias(tzsetwall,_tzsetwall)
#endif
__warn_references(ctime_r,
"warning: reference to compatibility ctime_r();"
" include <time.h> for correct reference")
__warn_references(gmtime_r,
"warning: reference to compatibility gmtime_r();"
" include <time.h> for correct reference")
__warn_references(localtime_r,
"warning: reference to compatibility localtime_r();"
" include <time.h> for correct reference")
__warn_references(offtime,
"warning: reference to compatibility offtime();"
" include <time.h> for correct reference")
__warn_references(posix2time,
"warning: reference to compatibility posix2time();"
" include <time.h> for correct reference")
__warn_references(time2posix,
"warning: reference to compatibility time2posix();"
" include <time.h> for correct reference")
__warn_references(timegm,
"warning: reference to compatibility timegm();"
" include <time.h> for correct reference")
__warn_references(timelocal,
"warning: reference to compatibility timelocal();"
" include <time.h> for correct reference")
__warn_references(timeoff,
"warning: reference to compatibility timeoff();"
" include <time.h> for correct reference")
__warn_references(tzset,
"warning: reference to compatibility tzset();"
" include <time.h> for correct reference")
__warn_references(tzsetwall,
"warning: reference to compatibility tzsetwall();"
" include <time.h> for correct reference")
#define timeval timeval50
#define timespec timespec50
#define time_t int32_t
#include "time/localtime.c"