summaryrefslogtreecommitdiff
path: root/time64.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2015-07-20 11:51:47 +0300
committerJarkko Hietaniemi <jhi@iki.fi>2015-07-22 08:33:24 -0400
commitf832b29a2b3f71c66c6e6b76a02b5faefe0ebeb1 (patch)
tree2405e698da778a41c6af6535c99f5a7e154b774e /time64.c
parenta55c5245146801ac2b2be2914342a6a829670513 (diff)
downloadperl-f832b29a2b3f71c66c6e6b76a02b5faefe0ebeb1.tar.gz
Add time64 as its own build target.
Diffstat (limited to 'time64.c')
-rw-r--r--time64.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/time64.c b/time64.c
index f0e8d7114d..7d6246f7ad 100644
--- a/time64.c
+++ b/time64.c
@@ -33,12 +33,15 @@ long' type can use localtime64_r() and gmtime64_r() which correctly
converts the time even on 32-bit systems. Whether you have 64-bit time
values will depend on the operating system.
-S_localtime64_r() is a 64-bit equivalent of localtime_r().
+Perl_localtime64_r() is a 64-bit equivalent of localtime_r().
-S_gmtime64_r() is a 64-bit equivalent of gmtime_r().
+Perl_gmtime64_r() is a 64-bit equivalent of gmtime_r().
*/
+#include "EXTERN.h"
+#define PERL_IN_TIME64_C
+#include "perl.h"
#include "time64.h"
static const char days_in_month[2][12] = {
@@ -340,7 +343,7 @@ static struct tm * S_gmtime_r(const time_t *clock, struct tm *result) {
}
#endif
-static struct TM *S_gmtime64_r (const Time64_T *in_time, struct TM *p)
+struct TM *Perl_gmtime64_r (const Time64_T *in_time, struct TM *p)
{
int v_tm_sec, v_tm_min, v_tm_hour, v_tm_mon, v_tm_wday;
Time64_T v_tm_tday;
@@ -467,7 +470,7 @@ static struct TM *S_gmtime64_r (const Time64_T *in_time, struct TM *p)
}
-static struct TM *S_localtime64_r (const Time64_T *time, struct TM *local_tm)
+struct TM *Perl_localtime64_r (const Time64_T *time, struct TM *local_tm)
{
time_t safe_time;
struct tm safe_date;
@@ -491,7 +494,7 @@ static struct TM *S_localtime64_r (const Time64_T *time, struct TM *local_tm)
return local_tm;
}
- if( S_gmtime64_r(time, &gm_tm) == NULL ) {
+ if( Perl_gmtime64_r(time, &gm_tm) == NULL ) {
TIME64_TRACE1("gmtime64_r returned null for %lld\n", *time);
return NULL;
}