[vlc-devel] commit: Provide gmtime_r ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed May 7 18:10:04 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Wed May  7 19:11:19 2008 +0300| [d8023cde60406013265bdd5aaa6ab69b352b5de2]

Provide gmtime_r

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d8023cde60406013265bdd5aaa6ab69b352b5de2
---

 include/vlc_fixups.h |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 98c167a..98b6174 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -119,6 +119,15 @@ static inline struct tm *localtime_r (const time_t *timep, struct tm *result)
     *result = *s;
     return result;
 }
+static inline struct tm *gmtime_r (const time_t *timep, struct tm *result)
+{
+    struct tm *s = gmtime (timep);
+    if (s == NULL)
+        return NULL;
+
+    *result = *s;
+    return result;
+}
 #endif
 
 #ifndef HAVE_DIRENT_H




More information about the vlc-devel mailing list