projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.29.13: relax CAST-EXTERNALLY-CHECKABLE-P a bit
[sbcl.git]
/
src
/
runtime
/
time.c
diff --git
a/src/runtime/time.c
b/src/runtime/time.c
index
b4049c8
..
7b4b167
100644
(file)
--- a/
src/runtime/time.c
+++ b/
src/runtime/time.c
@@
-18,6
+18,11
@@
#include "sbcl.h"
#include "runtime.h"
#include "sbcl.h"
#include "runtime.h"
+#ifdef LISP_FEATURE_HPUX
+struct tm *gmtime_r(const time_t *timer, struct tm *result);
+struct tm *localtime_r(const time_t *timer, struct tm *result);
+#endif
+
void get_timezone(time_t when, int *secwest, boolean *dst)
{
struct tm ltm, gtm;
void get_timezone(time_t when, int *secwest, boolean *dst)
{
struct tm ltm, gtm;
@@
-27,12
+32,12
@@
void get_timezone(time_t when, int *secwest, boolean *dst)
/* No _r versions on Windows, but the API documentation also
* doesn't warn them about being non-reentrant... So here's
* hoping they actually are -- once Windows grows threads
/* No _r versions on Windows, but the API documentation also
* doesn't warn them about being non-reentrant... So here's
* hoping they actually are -- once Windows grows threads
- * this better be checked, though.
+ * this better be checked, though.
*
* The Windows versions also don't support times before the
* epoch, so we kludge it. */
*
* The Windows versions also don't support times before the
* epoch, so we kludge it. */
- if (when < 0)
- when = -when;
+ if (when < 0)
+ when = 0;
ltm = *localtime(&when);
gtm = *gmtime(&when);
#else
ltm = *localtime(&when);
gtm = *gmtime(&when);
#else