From nobody Wed Jan 11 10:40:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NsPNP49n8z2r1Zq; Wed, 11 Jan 2023 10:40:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NsPNP3g51z3RGQ; Wed, 11 Jan 2023 10:40:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673433653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tZBY5s5pbRQvRZbvtZcoLof1KFPF+rHMpawipFNVidU=; b=epFaIwlxkzcXU8OC6A3cqGVf+D0sH2ZQPf45nFEIlcHWwtdrisTZoTq/eLJe4LYWtZfu4E Jmv/RW0IOCn6IMi/drkZICJWyb8EupObt946i/1HE/jQMEewi8SI9U2G1Dn9MW7PBAmbai r5TTvscox+7n8YkyjIv+oC8wN2feqT7Y3J0rllSNC8FWCH29naM3T1k0aLDiWaRFIhC+RA K2aCzSs5ybVxrMIn80EQ7NCfSJHPkh37zz7St5pYJVzZmcqz5rGohEuh+MBeSijM7DOILV RFFUAuZ+kfzAW1npH3x4Qj/GZWveS7agoDGIE2u78pQyW/w2AdbW3IVsmPF06g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673433653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tZBY5s5pbRQvRZbvtZcoLof1KFPF+rHMpawipFNVidU=; b=Z6lUV/5okmQWiX7eDNrTxmghzwcytaF7j8njqiuUZvmwltlOaM2Ub3PUOmCoqTNl9Onszq 3DF2G4B7vQJNcwjeKtVFp1vleNVSU4xRdvCUQK2ekUEp4LAHUrCMRtYrP9gOenMXrYSuFk ybWbk3P9Lffl33DERwUxJOP8XHrFnRc8lDE75UkSZxv8TAIO7OqYweYqIwUk/Q6ErzoPxu 1x9khINss3sZFwAf/AAWh5zGNlHYFd0JQ9NG/xPSNtBtPFr723aIfke/DVCHFbtwmSFPFv BrGhrX6zTjQzOejgmt8Mo4rMQ9t3AP2AdW5Es8NoZAMMCe/EDwCWjrPQyLIFgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673433653; a=rsa-sha256; cv=none; b=Y+Bq1bIwNp+UE7n/zZ3Q+z6Manl4PLflYwlyo1qtEW9J/ncR8zD9i4I/PxE1iQTXLtohTs 8l6ppH2ahsiWZb1t9Uo0o5oDoa1i+xNlu0+FUpDjFJAEz61i05ewdTJ4crWwDGC7JiLOOa I9Jo1pSN1igplV9LyOYGuvbcO/DroDFH8NbiZ3KAYVkuB6WQD+91uvtrIQeYiIRgYFWurg /qP8ePNIcc/VIWaMSaVVENtVg6LL0xMo6bEBmxQwBMid4KP4iUEd0U1T8iubb2LZafJZOf U747qubd2Gv25yXDknXfOisTLkmi1C+Bzt6LSygAUHlXzVIkXCYI5oRl/fgXLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NsPNP2kSxzlYF; Wed, 11 Jan 2023 10:40:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30BAertY078521; Wed, 11 Jan 2023 10:40:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30BAerxV078520; Wed, 11 Jan 2023 10:40:53 GMT (envelope-from git) Date: Wed, 11 Jan 2023 10:40:53 GMT Message-Id: <202301111040.30BAerxV078520@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 394cf6719a3c - main - tzcode: Move configuration into separate header. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 394cf6719a3c665eabe24d96669409e0c5a78076 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=394cf6719a3c665eabe24d96669409e0c5a78076 commit 394cf6719a3c665eabe24d96669409e0c5a78076 Author: Dag-Erling Smørgrav AuthorDate: 2023-01-11 09:20:46 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-01-11 10:39:12 +0000 tzcode: Move configuration into separate header. MFC after: 1 week Sponsored by: Klara, Inc. --- contrib/tzcode/private.h | 19 ------------------- contrib/tzcode/tzconfig.h | 19 +++++++++++++++++++ lib/libc/gen/Makefile.inc | 2 ++ lib/libc/stdtime/Makefile.inc | 17 ++++++++++------- usr.sbin/zdump/Makefile | 3 +-- usr.sbin/zic/Makefile | 3 +-- 6 files changed, 33 insertions(+), 30 deletions(-) diff --git a/contrib/tzcode/private.h b/contrib/tzcode/private.h index 0bb70056a9d7..35d2444d4ec1 100644 --- a/contrib/tzcode/private.h +++ b/contrib/tzcode/private.h @@ -7,21 +7,8 @@ /* ** This file is in the public domain, so clarified as of ** 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. ** There is no guarantee that it will remain unchanged, @@ -524,12 +511,6 @@ typedef unsigned long uintmax_t; # define restrict /* empty */ #endif -#if 2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__) -# define ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define ATTRIBUTE_PURE /* empty */ -#endif - /* ** Workarounds for compilers/systems. */ diff --git a/contrib/tzcode/tzconfig.h b/contrib/tzcode/tzconfig.h new file mode 100644 index 000000000000..730043b36526 --- /dev/null +++ b/contrib/tzcode/tzconfig.h @@ -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 */ diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index 45977b6b9005..f222565fd0bc 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -176,6 +176,8 @@ SRCS+= __getosreldate.c \ CFLAGS.arc4random.c= -I${SRCTOP}/sys -I${SRCTOP}/sys/crypto/chacha20 +CFLAGS.sysconf.c= -I${SRCTOP}/contrib/tzcode + CFLAGS.dlfcn.c= ${RTLD_HDRS} CFLAGS.tls.c= ${RTLD_HDRS} diff --git a/lib/libc/stdtime/Makefile.inc b/lib/libc/stdtime/Makefile.inc index a7ef64650ba1..a55cbbb17e24 100644 --- a/lib/libc/stdtime/Makefile.inc +++ b/lib/libc/stdtime/Makefile.inc @@ -3,17 +3,20 @@ .PATH: ${LIBC_SRCTOP}/stdtime ${SRCTOP}/contrib/tzcode -SRCS+= asctime.c difftime.c localtime.c strftime.c strptime.c timelocal.c \ - time32.c +TZCODE_SRCS= asctime.c difftime.c localtime.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+= -DHAVE_TZNAME=2 -DUSG_COMPAT=0 -DALTZONE=0 -CFLAGS.localtime.c+= -DNETBSD_INSPIRED=0 -DSTD_INSPIRED=1 .if ${MK_DETECT_TZ_CHANGES} != "no" CFLAGS.localtime.c+= -DDETECT_TZ_CHANGES .endif diff --git a/usr.sbin/zdump/Makefile b/usr.sbin/zdump/Makefile index 43e4edaae2b6..cbf7c5c566c8 100644 --- a/usr.sbin/zdump/Makefile +++ b/usr.sbin/zdump/Makefile @@ -6,7 +6,6 @@ PROG= zdump MAN= zdump.8 SRCS= zdump.c -CFLAGS+= -DNETBSD_INSPIRED=0 -DSTD_INSPIRED=1 -CFLAGS+= -I${SRCTOP}/contrib/tzcode +CFLAGS+= -I${SRCTOP}/contrib/tzcode -include tzconfig.h .include diff --git a/usr.sbin/zic/Makefile b/usr.sbin/zic/Makefile index a3eb6f7dadba..88d3f12c3016 100644 --- a/usr.sbin/zic/Makefile +++ b/usr.sbin/zic/Makefile @@ -6,7 +6,6 @@ PROG= zic MAN= zic.8 SRCS= zic.c -CFLAGS+= -DNETBSD_INSPIRED=0 -DSTD_INSPIRED=1 -CFLAGS+= -I${SRCTOP}/contrib/tzcode +CFLAGS+= -I${SRCTOP}/contrib/tzcode -include tzconfig.h .include