martin
5621a8b94e
Avoid overflowing the "year" value by making the field uint64_t. Adapt
...
arguments and local variables accordingly.
This now fixes PR 49144 for real.
2014-09-07 11:50:23 +00:00
martin
97f844c0ec
Counting leap years was fine while we had 32bit time_t - but now it
...
is not a good idea for dates far away in the future.
For dates in the year 2000 or later, use arithmetic instead (since the
repeating periods are well aligned). Should fix PR 49144.
2014-09-06 18:04:28 +00:00
apb
d2f4f342ce
If HAVE_NBTOOL_CONFIG_H is set, then include "nbtool_config.h",
...
because this file is compiled as part of tools/makefs.
2014-09-01 12:25:52 +00:00
apb
5b258ea38b
Revert previous; test secs > __type_max(time_t) again, now
...
that __type_max is available in tools/compat/compat_defs.h.
2014-09-01 11:21:29 +00:00
martin
1800e89b77
Reformulate an overflow test so it can be used in tool builds (i.e. does
...
not depend on netbsd specific macros).
2014-09-01 07:49:43 +00:00
martin
0edf2e8fd2
Make this compile- and usable from userland as well.
2014-08-31 08:54:40 +00:00
rmind
9b6bd2d968
Remove clause 3 (UCB advertising clause) from the University of Utah
...
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.
Extra verification by snj@.
2011-02-08 20:20:06 +00:00
tsutsui
bf74993921
Use time_t to calculate days and secs to avoid potential overflow.
2009-12-12 11:22:59 +00:00
tsutsui
6621c5bd3f
KNF
2009-12-12 11:16:33 +00:00
perry
88e7f0dcf4
convert to ANSI function prototypes
2009-02-14 20:32:29 +00:00
christos
95e1ffb156
merge ktrace-lwp.
2005-12-11 12:16:03 +00:00
perry
18db93c7f6
de-__P
2005-02-04 02:10:35 +00:00
bjh21
8f7f78f2f0
In clock_ymdhms_to_secs(), rather than returning rubbish when presented with
...
a year before 1970 or a date beyond the time_t rollover, return -1 so callers
can detect it. Callers which expect the function not to fail just get a
different kind of rubbish from before.
2004-12-29 20:55:57 +00:00
ragge
303f533292
sys/types.h -> sys/param.h to get vax inlines correct.
2003-08-13 11:35:25 +00:00
agc
aad01611e7
Move UCB-licensed code from 4-clause to 3-clause licence.
...
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
lukem
2bbe2de647
add RCSIDs
2001-11-13 05:32:49 +00:00
thorpej
c8b4ac1b17
bcopy -> memcpy
...
bzero -> memset
2001-07-07 17:04:01 +00:00
tsutsui
df9baa1d7a
Move #define POSIX_BASE_YEAR to clock_subr.h.
2000-10-03 13:41:07 +00:00
gwr
01645a9745
Minor improvement to avoid re-defining days_in_month().
1997-10-14 17:25:57 +00:00
is
07b064e02e
New ARP system, supports IPv4 over any hardware link.
...
Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.
For the detailed change history, look at the commit log entries for
the is-newarp branch.
1997-03-15 18:09:08 +00:00
gwr
4f4bade9a7
Improve a comment.
1997-02-20 00:32:15 +00:00
gwr
d8b59a12b5
Shared functions to convert between year/month/day/hour/minute/second
...
and "seconds since 1970" (POSIX time_t). See sys/arch/sun3/sun3/clock.c
for an example of how these can be used.
1997-02-19 23:29:28 +00:00