summaryrefslogtreecommitdiff
path: root/src/pal
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal')
-rw-r--r--src/pal/inc/pal.h1
-rw-r--r--src/pal/src/cruntime/misc.cpp26
-rw-r--r--src/pal/src/include/pal/misc.h12
-rw-r--r--src/pal/src/include/pal/palinternal.h1
4 files changed, 35 insertions, 5 deletions
diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h
index cc4a695d04..0aa436504a 100644
--- a/src/pal/inc/pal.h
+++ b/src/pal/inc/pal.h
@@ -6027,6 +6027,7 @@ CoCreateGuid(OUT GUID * pguid);
#define localtime PAL_localtime
#define mktime PAL_mktime
#define rand PAL_rand
+#define time PAL_time
#define getenv PAL_getenv
#define fgets PAL_fgets
#define fgetws PAL_fgetws
diff --git a/src/pal/src/cruntime/misc.cpp b/src/pal/src/cruntime/misc.cpp
index 6ca340bf3f..107d5e316d 100644
--- a/src/pal/src/cruntime/misc.cpp
+++ b/src/pal/src/cruntime/misc.cpp
@@ -206,7 +206,7 @@ See MSDN for more details.
--*/
PAL_time_t
-__cdecl
+__cdecl
PAL_mktime(struct PAL_tm *tm)
{
time_t result;
@@ -260,6 +260,30 @@ PAL_rand(void)
}
+/*++
+Function:
+
+ time
+
+See MSDN for more details.
+--*/
+PAL_time_t
+__cdecl
+PAL_time(PAL_time_t *tloc)
+{
+ time_t result;
+
+ PERF_ENTRY(time);
+ ENTRY( "time( tloc=%p )\n",tloc );
+
+ result = time(tloc);
+
+ LOGEXIT( "time returning %#lx\n",result );
+ PERF_EXIT(time);
+ return result;
+}
+
+
PALIMPORT
void __cdecl
PAL_qsort(void *base, size_t nmemb, size_t size,
diff --git a/src/pal/src/include/pal/misc.h b/src/pal/src/include/pal/misc.h
index 99e7546215..2be2cc06b2 100644
--- a/src/pal/src/include/pal/misc.h
+++ b/src/pal/src/include/pal/misc.h
@@ -41,13 +41,20 @@ extern CRITICAL_SECTION gcsEnvironment;
Function :
PAL_rand
-
- Calls rand and mitigates the difference between RAND_MAX
+
+ Calls rand and mitigates the difference between RAND_MAX
on Windows and FreeBSD.
--*/
int __cdecl PAL_rand(void);
/*++
+Function :
+
+ PAL_time
+--*/
+PAL_time_t __cdecl PAL_time(PAL_time_t*);
+
+/*++
Function:
TIMEInitialize
@@ -128,4 +135,3 @@ void MiscUnsetenv(const char *name);
#endif // __cplusplus
#endif /* __MISC_H_ */
-
diff --git a/src/pal/src/include/pal/palinternal.h b/src/pal/src/include/pal/palinternal.h
index 9dbbf1cd00..070ffdf240 100644
--- a/src/pal/src/include/pal/palinternal.h
+++ b/src/pal/src/include/pal/palinternal.h
@@ -199,7 +199,6 @@ function_name() to call the system's implementation
#define srand DUMMY_srand
#define atoi DUMMY_atoi
#define atof DUMMY_atof
-#define time DUMMY_time
#define tm PAL_tm
#define size_t DUMMY_size_t
#define time_t PAL_time_t