aboutsummaryrefslogtreecommitdiff
path: root/sys/sys
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2019-03-12 04:49:47 +0000
committerWarner Losh <imp@FreeBSD.org>2019-03-12 04:49:47 +0000
commit329f0aa95244ad1e615e8c2abb50366b5b957bdf (patch)
tree3e7ca8140cee70adbe8ba8c469e9c629237f9e30 /sys/sys
parent42a5a356a886b864cab196ee7526fd5c9b3548e7 (diff)
downloadsrc-329f0aa95244ad1e615e8c2abb50366b5b957bdf.tar.gz
src-329f0aa95244ad1e615e8c2abb50366b5b957bdf.zip
Kill tz_minuteswest and tz_dsttime.
Research Unix, 7th Edition introduced TIMEZONE and DSTFLAG compile-time constants in sys/param.h to communicate these values for the machine. 4.2BSD moved from the compile-time to run-time and introduced these variables and used for localtime() to return the right offset from UTC (sometimes referred to as GMT, for this purpose is the same). 4.4BSD migrated to using the tzdata code/database and these variables were basically unused. FreeBSD removed the real need for these with adjkerntz in 1995. However, some RTC clocks continued to use these variables, though they were largely unused otherwise. Later, phk centeralized most of the uses in utc_offset, but left it using both tz_minuteswest and adjkerntz. POSIX (IEEE Std 1003.1-2017) states in the gettimeofday specification "If tzp is not a null pointer, the behavior is unspecified" so there's no standards reason to retain it anymore. In fact, gettimeofday has been marked as obsolecent, meaning it could be removed from a future release of the standard. It is the only interface defined in POSIX that references these two values. All other references come from the tzdata database via tzset(). These were used to more faithfully implement early unix ABIs which have been removed from FreeBSD. NetBSD has completely eliminated these variables years ago. Linux has migrated to tzdata as well, though these variables technically still exist for compatibility with unspecified older programs. So, there's no real reason to have them these days. They are a historical vestige that's no longer used in any meaningful way. Reviewed By: jhb@, brooks@ Differential Revision: https://reviews.freebsd.org/D19550
Notes
Notes: svn path=/head/; revision=345049
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/clock.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/sys/sys/clock.h b/sys/sys/clock.h
index bfbd6efd2ad3..790efdfee19f 100644
--- a/sys/sys/clock.h
+++ b/sys/sys/clock.h
@@ -51,12 +51,6 @@
#ifdef _KERNEL /* No user serviceable parts */
-/*
- * Timezone info from settimeofday(2), usually not used
- */
-extern int tz_minuteswest;
-extern int tz_dsttime;
-
int utc_offset(void);
/*