aboutsummaryrefslogtreecommitdiff
path: root/include/time.h
Commit message (Collapse)AuthorAgeFilesLines
* Copy the new CLOCK_ defines from sys/time.h for SUSv3 compatibility.John Birrell2006-04-151-0/+8
| | | | | | | Approved by: rwatson Notes: svn path=/head/; revision=157766
* Add POSIX timer interfaces.David Xu2005-10-301-1/+9
| | | | Notes: svn path=/head/; revision=151870
* Define CLOCK_* and TIMER_* in time.h, where they are supposed to be.David Schultz2005-04-021-1/+20
| | | | Notes: svn path=/head/; revision=144529
* Change the definition of NULL on ia64 (for LP64 compilations) fromMarcel Moolenaar2003-12-071-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | an int constant to a long constant. This change improves consistency in the following two ways: 1. The first 8 arguments are always passed in registers on ia64, which by virtue of the generated code implicitly widens ints to longs and allows the use of an 32-bit integral type for 64-bit arguments. Subsequent arguments are passed onto the memory stack, which does not exhibit the same behaviour and consequently do not allow this. In practice this means that variadic functions taking pointers and given NULL (without cast) work as long as the NULL is passed in one of the first 8 arguments. A SIGSEGV is more likely the result if such would be done for stack-based arguments. This is due to the fact that the upper 4 bytes remain undefined. 2. All 64-bit platforms that FreeBSD supports, with the obvious exception of ia64, allow 32-bit integral types (specifically NULL) when 64-bit pointers are expected in variadic functions by way of how the compiler generates code. As such, code that works correctly (whether rightfully so or not) on any platform other than ia64, may fail on ia64. To more easily allow tweaking of the definition of NULL, this commit removes the 12 definitions in the various headers and puts it in a new header that can be included whenever NULL is to be made visible. This commit fixes GNOME, emacs, xemacs and a whole bunch of ports that I don't particularly care about at this time... Notes: svn path=/head/; revision=123257
* Style: One space between "restrict" qualifier and "*".Tim J. Robbins2002-09-061-4/+4
| | | | Notes: svn path=/head/; revision=103012
* Now that _BSD_CLK_TCK_ and _BSD_CLOCKS_PER_SEC_ are the same on allMike Barcroft2002-09-031-4/+2
| | | | | | | | architectures, move the definition directly into <time.h> and finish the removal of <machine/ansi.h>. Notes: svn path=/head/; revision=102874
* o Merge <machine/ansi.h> and <machine/types.h> into a new headerMike Barcroft2002-08-211-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | called <machine/_types.h>. o <machine/ansi.h> will continue to live so it can define MD clock macros, which are only MD because of gratuitous differences between architectures. o Change all headers to make use of this. This mainly involves changing: #ifdef _BSD_FOO_T_ typedef _BSD_FOO_T_ foo_t; #undef _BSD_FOO_T_ #endif to: #ifndef _FOO_T_DECLARED typedef __foo_t foo_t; #define _FOO_T_DECLARED #endif Concept by: bde Reviewed by: jake, obrien Notes: svn path=/head/; revision=102227
* - Add the 'restrict' qualifier to the function definition ofRobert Drehmel2002-08-141-1/+2
| | | | | | | | | | | | strftime(3) for IEEE Std 1003.1-2001 compliance and remove excessive usage of the 'const' qualifier that was neither present in the prototype in the publice header, nor in the local prototype just above the function definition. - Replace the K&R function definition with a ANSI-C one. - Update the prototype of strftime(3) in its manual page. Notes: svn path=/head/; revision=101888
* - Add the C99 'restrict' qualifier using the '__restrict' macro toRobert Drehmel2002-08-141-1/+2
| | | | | | | | function prototype and definition of strptime(3). - Update the manual page. Notes: svn path=/head/; revision=101886
* The thread-safe time functions appear to have been introduced as ofGarrett Wollman2002-06-271-6/+7
| | | | | | | | ISO 9945-1: 1996 (according to the change bars therein), which corresponds to 1003.1c-1995. Give them appropriate visibility protection. Notes: svn path=/head/; revision=98930
* Resort namespace blocks into a more sensible order. Delete a redundantGarrett Wollman2002-06-271-8/+7
| | | | | | | comment. Notes: svn path=/head/; revision=98923
* Move dillon's time conversion functions to a new header <timeconv.h>.Garrett Wollman2002-06-171-11/+0
| | | | | | | | | Since they were never documented and have never appeared in a FreeBSD release, no repo-copy of the header is done. This removes namespace pollution from <time.h>. Notes: svn path=/head/; revision=98313
* Clean up a bit of namespace pollution which crept in with the last rev.Garrett Wollman2002-06-171-1/+1
| | | | | | | Submitted by: bde Notes: svn path=/head/; revision=98312
* Partially fix namespace visibility issues by using new visibility macros.Garrett Wollman2002-06-151-25/+19
| | | | | | | | Some issues still remain, and will require research in old POSIX standards if we care to get them right. Notes: svn path=/head/; revision=98269
* Breath deep and take __P out of the system include files.Warner Losh2002-03-231-31/+31
| | | | | | | | | # This appears to not break X11, but I'm having problems compiling the # glide part of the server with or without this patch, so I can't tell # for sure. Notes: svn path=/head/; revision=93032
* I've been meaning to do this for a while. Add an underscore to theMatthew Dillon2002-01-191-8/+8
| | | | | | | | | | | time_to_xxx() and xxx_to_time() functions. e.g. _time_to_xxx() instead of time_to_xxx(), to make it more obvious that these are stopgap functions & placemarkers and not meant to create a defacto standard. They will eventually be replaced when a real standard comes out of committee. Notes: svn path=/head/; revision=89572
* Add time_to_int(), int_to_time(), time_to_long(), long_to_time().Matthew Dillon2001-10-281-0/+4
| | | | Notes: svn path=/head/; revision=85636
* Add routines to convert time_t to/from fixed-bit fields. These routinesMatthew Dillon2001-10-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | serve two purposes: (1) so we can maintain backwards compatibility with protocols (rwhod, dump, etc...) that either assume time_t is 32 bits or assume sizeof(time_t) == sizeof(int), or make other similar assumptions. (2) To tag such routines (by the presence of these calls) for future cleanup/extension work. The 32->64 routine, time32_to_time() (when time_t is 64 bits, that is), is defined specifically to implement temporal locality to properly set the msb bits of a 64 bit time_t quantity, using the 50 year rule. The locality code has not been implemented yet (and doesn't need to be for a while), but that is the intent. This will allow us to maintain backwards protocol compatibility past 2038. These routines are intended to be platform and time_t agnostic. MFC after: 1 week Notes: svn path=/head/; revision=85634
* It's not CUT (the french would accept that back in 1879) and TUC wasn'tPoul-Henning Kamp2001-03-311-1/+5
| | | | | | | | | | palatable to the rest of the world. UTC was the compromise. PR: 26238 Submitted by: Ying-Chieh Liao <ijliao@terry.dragon2.net> Notes: svn path=/head/; revision=75033
* Make ctime_r, asctime_r, gmtime_r, and localtime_r available in libc.Dmitrij Tejblum1999-01-041-7/+4
| | | | Notes: svn path=/head/; revision=42293
* Change return type of strptime from const char* to char*.Dmitrij Tejblum1998-09-121-1/+1
| | | | | | | const char* was wrong and nonstandard. Notes: svn path=/head/; revision=39113
* Add extern declaration for `tzname[]' to make this header comply betterJoseph Koshy1998-08-211-0/+4
| | | | | | | | | to POSIX90. 2-rounds-of-review-by: bde Notes: svn path=/head/; revision=38464
* ctime_r and asctime_r are not implemented.Poul-Henning Kamp1998-04-191-2/+2
| | | | | | | | | | | prototypes in time.h do not match POSIX. PR: 6345 Reviewed by: phk Submitted by: Dmitry Khrustalev <dima@xyzzy.machaon.ru> Notes: svn path=/head/; revision=35285
* Finish _POSIX_PRIORITY_SCHEDULING. Needs P1003_1B andPeter Dufault1998-03-281-1/+7
| | | | | | | | | | | | | | | | | | | _KPOSIX_PRIORITY_SCHEDULING options to work. Changes: Change all "posix4" to "p1003_1b". Misnamed files are left as "posix4" until I'm told if I can simply delete them and add new ones; Add _POSIX_PRIORITY_SCHEDULING system calls for FreeBSD and Linux; Add man pages for _POSIX_PRIORITY_SCHEDULING system calls; Add options to LINT; Minor fixes to P1003_1B code during testing. Notes: svn path=/head/; revision=34925
* Import strptime(3) into libc. We've got permission by Kevin Ruddy toJoerg Wunsch1997-08-091-0/+1
| | | | | | | | | | | modify the original `no modifications' copyright message, and i've included his mail into the source file. The common localization functions between strptime(3) and strftime(3) have been broken out into timelocal.[ch]. Notes: svn path=/head/; revision=28021
* struct timespec needs to be useable with just <time.h>, but needs to notPeter Wemm1997-05-131-7/+27
| | | | | | | | | conflict with the kernel visible one. Make the new stuff not visible if _ANSI_SOURCE or _POSIX_SOURCE is defined (!) because the new things are not part of the base 1003.1-1990 standard (or ansi). Notes: svn path=/head/; revision=25773
* Add clockid_t definition like in sys/types.h to allow time.hAndrey A. Chernov1997-05-131-0/+5
| | | | | | | to be included without sys/types.h, it fixes broken groff compilation Notes: svn path=/head/; revision=25769
* Oops, move clock_*() and nanosleep() to time.hPeter Wemm1997-05-121-0/+4
| | | | | | | Submitted by: Peter Dufault <dufault@hda.com> Notes: svn path=/head/; revision=25749
* Change prototypes for gmtime_r() and localtime_r() in accordance withJeffrey Hsu1996-11-111-3/+3
| | | | | | | IEEE pthreads specification. Notes: svn path=/head/; revision=19639
* Reviewed by: julian and (hsu?)Julian Elischer1996-01-221-0/+7
| | | | | | | | | Submitted by: John Birrel(L?) changes for threadsafe operations Notes: svn path=/head/; revision=13545
* Define CLK_TCK right.Bruce Evans1995-02-081-1/+1
| | | | Notes: svn path=/head/; revision=6243
* Define CLOCKS_PER_SEC.Bruce Evans1995-02-031-2/+11
| | | | | | | | | | | Define CLK_TCK only if _ANSI_SOURCE is not defined. Don't include <machine/limits.h> to get the definition of CLK_TCK. CLK_TCK should never have been defined there, and the inclusion polluted the namespace. Notes: svn path=/head/; revision=6164
* Declare useful functions (timelocal() and timegm())Andrey A. Chernov1994-12-261-0/+2
| | | | Notes: svn path=/head/; revision=5231
* BSD 4.4 Lite Include SourcesRodney W. Grimes1994-05-241-0/+104
Notes: svn path=/head/; revision=1539