diff options
author | Craig A. Berry <craigberry@mac.com> | 2009-03-26 10:44:41 -0500 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2009-03-26 10:44:41 -0500 |
commit | 7430375d1909c2b62c1fb3f9c6ed4b9d24dfcf32 (patch) | |
tree | 238a31eba2d15f4b292688f8d9b11dd815116046 /time64.h | |
parent | 5c1e544edd3a9f584fd8b4c8d2f6dcbf01639ec2 (diff) | |
download | perl-7430375d1909c2b62c1fb3f9c6ed4b9d24dfcf32.tar.gz |
Namespace clean-up for time64.
All of the time64 functions are only visible within pp_sys.c and are not
part of the public API, so make them all static and give them the S_ prefix.
A side effect of this is that we now unambiguously use S_localtime64_r and
S_gmtime64_r and should no longer collide with system-supplied versions, if
any.
One possible future direction is that if and when Configure detects any
system-supplied *time64_r functions, their prototypes, and their valid
time ranges, we could optionally select those instead of the home-grown
ones.
Another possible future direction is that we could s/S_/Perl_/ and make
the *time64_r functions part of the public API in some post-5.10.x
release. Currently they are only exposed to the outside world via
Perl_pp_gmtime.
Also gave some TRACE macros more specific names.
Diffstat (limited to 'time64.h')
-rw-r--r-- | time64.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -45,22 +45,22 @@ struct TM64 { #endif -/* Declare public functions */ -struct TM *gmtime64_r (const Time64_T *, struct TM *); -struct TM *localtime64_r (const Time64_T *, struct TM *); -Time64_T timegm64 (struct TM *); +/* Declare functions */ +static struct TM *S_gmtime64_r (const Time64_T *, struct TM *); +static struct TM *S_localtime64_r (const Time64_T *, struct TM *); +static Time64_T S_timegm64 (struct TM *); /* Not everyone has gm/localtime_r(), provide a replacement */ #ifdef HAS_LOCALTIME_R # define LOCALTIME_R(clock, result) (L_R_TZSET localtime_r(clock, result)) #else -# define LOCALTIME_R(clock, result) (L_R_TZSET fake_localtime_r(clock, result)) +# define LOCALTIME_R(clock, result) (L_R_TZSET S_localtime_r(clock, result)) #endif #ifdef HAS_GMTIME_R # define GMTIME_R(clock, result) gmtime_r(clock, result) #else -# define GMTIME_R(clock, result) fake_gmtime_r(clock, result) +# define GMTIME_R(clock, result) S_gmtime_r(clock, result) #endif #endif |