tzcode: Move configuration into separate header.
MFC after: 1 week Sponsored by: Klara, Inc.
This commit is contained in:
parent
d68f154205
commit
394cf6719a
@ -7,21 +7,8 @@
|
|||||||
/*
|
/*
|
||||||
** This file is in the public domain, so clarified as of
|
** This file is in the public domain, so clarified as of
|
||||||
** 1996-06-05 by Arthur David Olson.
|
** 1996-06-05 by Arthur David Olson.
|
||||||
**
|
|
||||||
** $FreeBSD$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Stuff moved from Makefile.inc to reduce clutter */
|
|
||||||
#ifndef TM_GMTOFF
|
|
||||||
#define TM_GMTOFF tm_gmtoff
|
|
||||||
#define TM_ZONE tm_zone
|
|
||||||
#define PCTS 1
|
|
||||||
#define HAVE_LONG_DOUBLE 1
|
|
||||||
#define HAVE_UNISTD_H 1
|
|
||||||
#define LOCALE_HOME _PATH_LOCALE
|
|
||||||
#define TZDIR "/usr/share/zoneinfo"
|
|
||||||
#endif /* ndef TM_GMTOFF */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** This header is for use ONLY with the time conversion code.
|
** This header is for use ONLY with the time conversion code.
|
||||||
** There is no guarantee that it will remain unchanged,
|
** There is no guarantee that it will remain unchanged,
|
||||||
@ -524,12 +511,6 @@ typedef unsigned long uintmax_t;
|
|||||||
# define restrict /* empty */
|
# define restrict /* empty */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)
|
|
||||||
# define ATTRIBUTE_PURE __attribute__ ((__pure__))
|
|
||||||
#else
|
|
||||||
# define ATTRIBUTE_PURE /* empty */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Workarounds for compilers/systems.
|
** Workarounds for compilers/systems.
|
||||||
*/
|
*/
|
||||||
|
19
contrib/tzcode/tzconfig.h
Normal file
19
contrib/tzcode/tzconfig.h
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#ifndef TZCONFIG_H_INCLUDED
|
||||||
|
#define TZCONFIG_H_INCLUDED
|
||||||
|
|
||||||
|
#define TM_GMTOFF tm_gmtoff
|
||||||
|
#define TM_ZONE tm_zone
|
||||||
|
|
||||||
|
#define HAVE_GETTEXT false
|
||||||
|
#define HAVE_SYS_STAT_H true
|
||||||
|
#define HAVE_UNISTD_H true
|
||||||
|
#define HAVE_STDINT_H true
|
||||||
|
|
||||||
|
#define PCTS 1
|
||||||
|
#define NETBSD_INSPIRED 0
|
||||||
|
#define STD_INSPIRED 1
|
||||||
|
#define HAVE_TZNAME 2
|
||||||
|
#define USG_COMPAT 0
|
||||||
|
#define ALTZONE 0
|
||||||
|
|
||||||
|
#endif /* !TZCONFIG_H_INCLUDED */
|
@ -176,6 +176,8 @@ SRCS+= __getosreldate.c \
|
|||||||
|
|
||||||
CFLAGS.arc4random.c= -I${SRCTOP}/sys -I${SRCTOP}/sys/crypto/chacha20
|
CFLAGS.arc4random.c= -I${SRCTOP}/sys -I${SRCTOP}/sys/crypto/chacha20
|
||||||
|
|
||||||
|
CFLAGS.sysconf.c= -I${SRCTOP}/contrib/tzcode
|
||||||
|
|
||||||
CFLAGS.dlfcn.c= ${RTLD_HDRS}
|
CFLAGS.dlfcn.c= ${RTLD_HDRS}
|
||||||
CFLAGS.tls.c= ${RTLD_HDRS}
|
CFLAGS.tls.c= ${RTLD_HDRS}
|
||||||
|
|
||||||
|
@ -3,17 +3,20 @@
|
|||||||
|
|
||||||
.PATH: ${LIBC_SRCTOP}/stdtime ${SRCTOP}/contrib/tzcode
|
.PATH: ${LIBC_SRCTOP}/stdtime ${SRCTOP}/contrib/tzcode
|
||||||
|
|
||||||
SRCS+= asctime.c difftime.c localtime.c strftime.c strptime.c timelocal.c \
|
TZCODE_SRCS= asctime.c difftime.c localtime.c
|
||||||
time32.c
|
STDTIME_SRCS= strftime.c strptime.c timelocal.c
|
||||||
|
SRCS+= ${TZCODE_SRCS} ${STDTIME_SRCS} time32.c
|
||||||
|
|
||||||
SYM_MAPS+= ${LIBC_SRCTOP}/stdtime/Symbol.map
|
SYM_MAPS+= ${LIBC_SRCTOP}/stdtime/Symbol.map
|
||||||
|
|
||||||
CFLAGS+= -I${SRCTOP}/contrib/tzcode -I${LIBC_SRCTOP}/stdtime
|
.for src in ${TZCODE_SRCS} ${STDTIME_SRCS}
|
||||||
|
CFLAGS.${src}+= -I${SRCTOP}/contrib/tzcode -include tzconfig.h
|
||||||
|
.endfor
|
||||||
|
.for src in ${STDTIME_SRCS}
|
||||||
|
CFLAGS.${src}+= -I${LIBC_SRCTOP}/stdtime
|
||||||
|
.endfor
|
||||||
|
|
||||||
CFLAGS.localtime.c= -fwrapv
|
|
||||||
CFLAGS.localtime.c+= -DALL_STATE -DTHREAD_SAFE
|
CFLAGS.localtime.c+= -DALL_STATE -DTHREAD_SAFE
|
||||||
CFLAGS.localtime.c+= -DHAVE_TZNAME=2 -DUSG_COMPAT=0 -DALTZONE=0
|
|
||||||
CFLAGS.localtime.c+= -DNETBSD_INSPIRED=0 -DSTD_INSPIRED=1
|
|
||||||
.if ${MK_DETECT_TZ_CHANGES} != "no"
|
.if ${MK_DETECT_TZ_CHANGES} != "no"
|
||||||
CFLAGS.localtime.c+= -DDETECT_TZ_CHANGES
|
CFLAGS.localtime.c+= -DDETECT_TZ_CHANGES
|
||||||
.endif
|
.endif
|
||||||
|
@ -6,7 +6,6 @@ PROG= zdump
|
|||||||
MAN= zdump.8
|
MAN= zdump.8
|
||||||
SRCS= zdump.c
|
SRCS= zdump.c
|
||||||
|
|
||||||
CFLAGS+= -DNETBSD_INSPIRED=0 -DSTD_INSPIRED=1
|
CFLAGS+= -I${SRCTOP}/contrib/tzcode -include tzconfig.h
|
||||||
CFLAGS+= -I${SRCTOP}/contrib/tzcode
|
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
|
@ -6,7 +6,6 @@ PROG= zic
|
|||||||
MAN= zic.8
|
MAN= zic.8
|
||||||
SRCS= zic.c
|
SRCS= zic.c
|
||||||
|
|
||||||
CFLAGS+= -DNETBSD_INSPIRED=0 -DSTD_INSPIRED=1
|
CFLAGS+= -I${SRCTOP}/contrib/tzcode -include tzconfig.h
|
||||||
CFLAGS+= -I${SRCTOP}/contrib/tzcode
|
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
|
Loading…
Reference in New Issue
Block a user