1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-04 23:35:36 -08:00
Commit Graph

32 Commits

Author SHA1 Message Date
millert
3d0c28f3eb Move CLOCKS_PER_SEC to sys/_time.h so the kernel has access to it.
This will be used in waitid(2) to set si_utime and si_stime.
The definition of struct timespec also moves from time.h to sys/_time.h
for struct itimerspec.  OK kettenis@
2022-10-25 16:30:30 +00:00
guenther
6151004e8c Add C11's timespec_get(3); minor bump for libc.
Tweaked diff from brad@
manpage tweaks florian@ and jmc@
ok deraadt@ millert@
2018-10-30 16:28:42 +00:00
schwarze
3a628b46e7 New POSIX xlocale implementation written from scratch.
Complete in the sense that all POSIX *locale(3) and *_l(3) functions
are included, but in OpenBSD, we of course only really care about
LC_CTYPE and we only support ASCII and UTF-8.

With important help from kettenis@, guenther@, and jca@.
Repeated testing in ports bulk builds by naddy@.
Additional testing by jca@, sebastia@, dcoppa@, and others.
OK kettenis@ dcoppa@, and guenther@ on an earlier version.
Riding guenther@'s libc/librthread major bump.
2017-09-05 03:16:13 +00:00
millert
6ecde746de Move the 10 (!) defintions of NULL to their own mini header file and
update the NULL definition for C++11.  OK deraadt@ guenther@ kettenis@
2016-09-09 18:12:37 +00:00
millert
c9da469ac9 Remove obsolete timezone() function.
Add timezone and daylight symbols for XSI compatibility.
2015-04-07 01:47:04 +00:00
millert
78badebcb0 Eliminate use of TM_YEAR_BASE. OK guenther@ deraadt@ miod@ 2015-03-17 19:31:30 +00:00
millert
f7055df57d tzfile.h is an internal header that should never have been installed.
What's worse, the tzfile.h that gets installed is over 20 years old
and doesn't match the real tzfile.h in libc/time.  This makes the
tree safe for /usr/include/tzfile.h removal.  The TM_YEAR_BASE
define has been moved to time.h temporarily until its usage is
replaced by 1900 in the tree.  Actual removal of tzfile.h is pending
a ports build.  Based on a diff from deraadt@
2015-03-15 00:41:27 +00:00
guenther
7b36c281ba Add support for the _POSIX_CPUTIME and _POSIX_THREAD_CPUTIME options,
including CLOCK_{PROCESS,THREAD}_CPUTIME_ID constants and
{clock,pthread}_getcpuclockid() functions.

Worked out at t2k13 with help from tedu@ and matthew@ and testing by aja@
ok matthew@
2013-06-17 19:11:54 +00:00
guenther
1ec1251e0e Pull in <sys/_types.h> instead of <machine/_types.h> in prep for the future
ok deraadt@
2013-04-02 05:16:14 +00:00
guenther
2c79e7cc0b More compliance fixes: hiding non-standard stuff behind __BSD_VISIBLE,
making files stand-alone, some __restrict additions.

tweaks kettenis@; ports testing and fixes landry@ and jasper@
ok millert@
2012-10-01 00:21:19 +00:00
kettenis
329a58af35 Recongnize that:
* strptime(3) was introduced in XPG 4.0
* clock_gettime(3) and friends were introduced in 1003.1b-1993
* asctime_r(3) and friends were introduced in 1003.1c-1995

and conditionally provide prototypes and associated types accordingly.
This makes our <time.h> standards compliant except for some functions that are
still missing.

ok guenther@
2012-05-10 19:13:12 +00:00
kettenis
c7280c708a Once more the people behind POSIX didn't think and put clock_gettime(2) and
friends in <time.h>.  The kernel needs access to the associated #defines, but
can't get them from <time.h>, so introduce a new header <sys/_time.h> and
include that from <time.h> for userland and <sys/time.h> for the kernel.

ok matthew@, guenther@, millert@
2012-05-07 22:34:00 +00:00
jsg
c4ff7bee63 As pointed out by Richard Guenther our definition
of NULL was incorrect for c++ compilers that aren't
gcc (or pretend to be gcc like clang).

ok miod@
2011-07-03 18:51:01 +00:00
miod
0c2a5da7f0 Define NULL as a void * instead of a long integer, as required by Single Unix.
Kernel and bootblocks still use the old 0L value until all the NULL abuses
in the code are fixed.
2011-04-06 11:39:42 +00:00
millert
c916d9484c Adapt things to use __type_t instead of _BSD_TYPE_T_
Add new sys/_types.h header
Include machine/_types.h or sys/_types.h where applicable
2006-01-06 18:53:04 +00:00
millert
52a0e6034e First step in include files overhaul. Use __FOO_VISIBLE (as defined
in sys/cdefs.h) instead of _FOO_SOURCE.  Also fix several namespace
pollution issues, including the byte order defines.  OK deraadt@
2005-12-13 00:35:22 +00:00
avsm
89b95c1c6c add __bounded__ attributes for userland headers; enabled with -Wbounded
ok deraadt@
2003-08-01 17:38:33 +00:00
avsm
3e87668a71 backout the __bounded__ attributes for a while; requested by deraadt@ 2003-06-26 19:34:17 +00:00
avsm
585be00bb5 Mark various standard library functions with the __bounded__ attribute.
You must have an up-to-date gcc for this!
deraadt@ ok
2003-06-26 18:35:13 +00:00
millert
e33d3bd3b8 Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.
2003-06-02 19:34:12 +00:00
millert
8248c2b451 NULL is now 0L so it is the same size as a pointer.
OK mickey@ and discussed with deraadt@
2002-10-25 21:55:28 +00:00
millert
c72b5b24e1 Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically. 2002-02-16 21:27:05 +00:00
millert
57441323d9 Move nanosleep() proto to from sys/time.h to time.h where it belongs.
Problem noted by Jean-Baptiste Marchand
2001-03-09 02:18:00 +00:00
millert
f0348535b0 Prototype timelocal(), timegm(), and timeoff() in the non-ANSI, non-POSIX
section.
2000-08-22 13:59:44 +00:00
espie
ad7ac144d1 Be thorough about NULL as __null for C++. 1999-09-17 13:13:46 +00:00
espie
6689767d41 Define NULL to be __null for C++: better quality of implementation.
__null is a magic constant of integral type that converts to a null pointer
as should be, but warns for ambiguity when used to resolved an overload
between an integral type and a pointer type.
1999-06-11 22:47:47 +00:00
aaron
d39cbccfdf use UTC when abbreviating Coordinated Universal Time, not CUT 1999-05-14 23:18:54 +00:00
pjanzen
86eac1108e Daylight Saving Time, not savings 1999-03-10 02:43:10 +00:00
d
92efb73507 Add thread-safety to libc, so that libc_r will build (on i386 at least).
All POSIX libc api now there (to P1003.1c/D10)
  (more md stuff is needed for other libc/arch/*)
  (setlogin is no longer a special syscall)
Add -pthread option to gcc (that makes it use -lc_r and -D_POSIX_THREADS).
Doc some re-entrant routines
Add libc_r to intro(3)
dig() uses some libc srcs and an extra -I was needed there.
Add more md stuff to libc_r.
Update includes for the pthreads api
Update libc_r TODO
1998-11-20 11:18:22 +00:00
deraadt
cbf52ec6ca strptime() proto; Andreas.Gunnarsson@emw.ericsson.se 1998-02-08 18:50:05 +00:00
niklas
5ea2d675e0 Well, as we are heading for a release people are encouraged to rebuild their
entire trees for testing anyway, I might as well do this intrusive touching
of include files now.  Added openBSD tags.
1997-09-21 10:45:23 +00:00
deraadt
df930be708 initial import of NetBSD tree 1995-10-18 08:37:01 +00:00