mirror of
https://github.com/openbsd/src.git
synced 2026-04-27 15:46:02 +00:00
time.h: const correct tm_zone in struct tm
The Base Specifications, Issue 8 incorporated Austin Group Defect 1533 adding long tm_gmtoff (which we already have) and const char *tm_zone, which we have but without const. Adapt our struct. This was tested in an amd64 bulk without fallout and fixes a bunch of compiler warnings from strptime.c r1.32 where gmt[] and utc[] were moved to rodata. https://austingroupbugs.net/view.php?id=1533 ok jca millert
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: time.h,v 1.32 2022/10/25 16:30:30 millert Exp $ */
|
||||
/* $OpenBSD: time.h,v 1.33 2025/11/20 10:58:11 tb Exp $ */
|
||||
/* $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $ */
|
||||
|
||||
/*
|
||||
@@ -106,7 +106,7 @@ struct tm {
|
||||
int tm_yday; /* days since January 1 [0-365] */
|
||||
int tm_isdst; /* Daylight Saving Time flag */
|
||||
long tm_gmtoff; /* offset from UTC in seconds */
|
||||
char *tm_zone; /* timezone abbreviation */
|
||||
const char *tm_zone; /* timezone abbreviation */
|
||||
};
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.\" $OpenBSD: ctime.3,v 1.49 2025/06/23 13:53:11 millert Exp $
|
||||
.\" $OpenBSD: ctime.3,v 1.50 2025/11/20 10:58:11 tb Exp $
|
||||
.\"
|
||||
.\"
|
||||
.Dd $Mdocdate: June 23 2025 $
|
||||
.Dd $Mdocdate: November 20 2025 $
|
||||
.Dt CTIME 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -241,7 +241,7 @@ includes the following fields:
|
||||
int tm_yday; /* day of year (0 \- 365) */
|
||||
int tm_isdst; /* is summer time in effect? */
|
||||
long tm_gmtoff; /* offset from UT in seconds */
|
||||
char *tm_zone; /* abbreviation of timezone name */
|
||||
const char *tm_zone; /* abbreviation of timezone name */
|
||||
.Ed
|
||||
.Pp
|
||||
The
|
||||
|
||||
Reference in New Issue
Block a user