summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdtime
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2002-01-19 23:20:02 +0000
committerdillon <dillon@FreeBSD.org>2002-01-19 23:20:02 +0000
commitc3dbbbabdf7c1b6b8d7fe43ade44b555671e1c67 (patch)
tree262f00c422f3272c4031c870d746ed14c2f757d5 /lib/libc/stdtime
parent6f44d9644f580c480b97e8c64ced8a7be849944e (diff)
downloadFreeBSD-src-c3dbbbabdf7c1b6b8d7fe43ade44b555671e1c67.zip
FreeBSD-src-c3dbbbabdf7c1b6b8d7fe43ade44b555671e1c67.tar.gz
I've been meaning to do this for a while. Add an underscore to the
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.
Diffstat (limited to 'lib/libc/stdtime')
-rw-r--r--lib/libc/stdtime/time32.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/libc/stdtime/time32.c b/lib/libc/stdtime/time32.c
index ed3d3e0..34174c5 100644
--- a/lib/libc/stdtime/time32.c
+++ b/lib/libc/stdtime/time32.c
@@ -21,7 +21,7 @@
* implement the 50-year rule to handle post-2038 conversions.
*/
time_t
-time32_to_time(__int32_t t32)
+_time32_to_time(__int32_t t32)
{
return((time_t)t32);
}
@@ -32,7 +32,7 @@ time32_to_time(__int32_t t32)
* converted back to a temporally local 64 bit time_t using time32_to_time.
*/
__int32_t
-time_to_time32(time_t t)
+_time_to_time32(time_t t)
{
return((__int32_t)t);
}
@@ -43,7 +43,7 @@ time_to_time32(time_t t)
* past 2038.
*/
time_t
-time64_to_time(__int64_t t64)
+_time64_to_time(__int64_t t64)
{
return((time_t)t64);
}
@@ -53,7 +53,7 @@ time64_to_time(__int64_t t64)
* as 32 bits we simply sign-extend and do not support times past 2038.
*/
__int64_t
-time_to_time64(time_t t)
+_time_to_time64(time_t t)
{
return((__int64_t)t);
}
@@ -63,18 +63,18 @@ time_to_time64(time_t t)
* may not require using the 50-year rule.
*/
long
-time_to_long(time_t t)
+_time_to_long(time_t t)
{
if (sizeof(long) == sizeof(__int64_t))
- return(time_to_time64(t));
+ return(_time_to_time64(t));
return((long)t);
}
time_t
-long_to_time(long tlong)
+_long_to_time(long tlong)
{
if (sizeof(long) == sizeof(__int32_t))
- return(time32_to_time(tlong));
+ return(_time32_to_time(tlong));
return((time_t)tlong);
}
@@ -83,18 +83,18 @@ long_to_time(long tlong)
* may not require using the 50-year rule.
*/
int
-time_to_int(time_t t)
+_time_to_int(time_t t)
{
if (sizeof(int) == sizeof(__int64_t))
- return(time_to_time64(t));
+ return(_time_to_time64(t));
return((int)t);
}
time_t
-int_to_time(int tint)
+_int_to_time(int tint)
{
if (sizeof(int) == sizeof(__int32_t))
- return(time32_to_time(tint));
+ return(_time32_to_time(tint));
return((time_t)tint);
}
OpenPOWER on IntegriCloud