diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-12-19 11:35:44 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-12-19 11:35:44 +0100 |
commit | a978bdda1e2de35c79e432f026869e163657a263 (patch) | |
tree | 73e36b02fe3b8515c1f05bf4d43ecfa0bbf7c420 /include/my_pthread.h | |
parent | 724dbaabc0d06c4446417eb217d8536f193461f9 (diff) | |
parent | 0773c7f422c426e5693fc901df9999092e56aef3 (diff) | |
download | mariadb-git-a978bdda1e2de35c79e432f026869e163657a263.tar.gz |
mysql-5.5.41 merge
Diffstat (limited to 'include/my_pthread.h')
-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); |