diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2014-12-22 20:09:25 -0500 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2014-12-22 20:09:25 -0500 |
commit | eda3db826f741b6cb62bb6903bd6b55a6aca4c3a (patch) | |
tree | 6af5f833c5ff996e73796708525e2d8dcfc8b859 /include | |
parent | cb47155c68f38c6931fd539a8615373199b4ee64 (diff) | |
parent | 0f64a927a93239f7f0f5e413b893f7fc1233de15 (diff) | |
download | mariadb-git-eda3db826f741b6cb62bb6903bd6b55a6aca4c3a.tar.gz |
Merge revisions from maria/5.5 (5.5.41)
bzr merge -r4393 lp:maria/5.5
Diffstat (limited to 'include')
-rw-r--r-- | include/my_pthread.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h index 3a3f304dcff..17c971cd621 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -1,5 +1,5 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. - Copyright (c) 2009, 2013, Monty Program Ab. +/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. + Copyright (c) 2009, 2014, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -104,8 +104,18 @@ int pthread_attr_init(pthread_attr_t *connect_att); int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack); int pthread_attr_destroy(pthread_attr_t *connect_att); int my_pthread_once(my_pthread_once_t *once_control,void (*init_routine)(void)); -struct tm *localtime_r(const time_t *timep,struct tm *tmp); -struct tm *gmtime_r(const time_t *timep,struct tm *tmp); + +static inline struct tm *localtime_r(const time_t *timep, struct tm *tmp) +{ + localtime_s(tmp, timep); + return tmp; +} + +static inline struct tm *gmtime_r(const time_t *clock, struct tm *res) +{ + gmtime_s(res, clock); + return res; +} void pthread_exit(void *a); int pthread_join(pthread_t thread, void **value_ptr); |