Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(697)

Side by Side Diff: fusl/src/time/timegm.c

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fusl/src/time/time_impl.h ('k') | fusl/src/time/timer_create.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #define _GNU_SOURCE
2 #include "time_impl.h"
3 #include <errno.h>
4
5 extern const char __gmt[];
6
7 time_t timegm(struct tm *tm)
8 {
9 struct tm new;
10 long long t = __tm_to_secs(tm);
11 if (__secs_to_tm(t, &new) < 0) {
12 errno = EOVERFLOW;
13 return -1;
14 }
15 *tm = new;
16 tm->tm_isdst = 0;
17 tm->__tm_gmtoff = 0;
18 tm->__tm_zone = __gmt;
19 return t;
20 }
OLDNEW
« no previous file with comments | « fusl/src/time/time_impl.h ('k') | fusl/src/time/timer_create.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698