Merge branch 'vendor/DIFFUTILS'
[dragonfly.git] / contrib / diffutils / lib / timegm.c
1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* Convert UTC calendar time to simple time.  Like mktime but assumes UTC.
4
5    Copyright (C) 1994, 1997, 2003, 2004, 2006, 2007, 2009, 2010 Free Software
6    Foundation, Inc.  This file is part of the GNU C Library.
7
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 3, or (at your option)
11    any later version.
12
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software Foundation,
20    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
21
22 #ifndef _LIBC
23 # include <config.h>
24 #endif
25
26 #include <time.h>
27
28 #ifndef _LIBC
29 # undef __gmtime_r
30 # define __gmtime_r gmtime_r
31 # define __mktime_internal mktime_internal
32 # include "mktime-internal.h"
33 #endif
34
35 time_t
36 timegm (struct tm *tmp)
37 {
38   static time_t gmtime_offset;
39   tmp->tm_isdst = 0;
40   return __mktime_internal (tmp, __gmtime_r, &gmtime_offset);
41 }