Project

General

Profile

Bug #13327

struct timespec not POSIX compliant

Added by David Gutteridge 10 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
lib - userland libraries
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

The POSIX 2008 standard documents struct timespec with members tv_sec and tv_nsec. However, if standards are requested, these become __tv_sec and __tv_nsec on illumos derviates. There are comments in the relevant headers referring to the latter names as "standards namespace safe versions of these definitions"[1], but that doesn't make sense, as those member names don't comply with a defined standard. I realize that was done some time ago (2004 or earlier), and I understand that there may be legacy concerns that led to that approach originally being taken.

1. [[https://github.com/illumos/illumos-gate/blob/4e0c5eff9af325c80994e9527b7cb8b3a1ffd1d4/usr/src/uts/common/sys/stat.h#L42]]
and
[[https://github.com/illumos/illumos-gate/blob/4e0c5eff9af325c80994e9527b7cb8b3a1ffd1d4/usr/src/uts/common/sys/time_std_impl.h#L28]]

No data to display

Also available in: Atom PDF