aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/lib/java/lang/Byte.class
diff options
context:
space:
mode:
authorGCC Administrator <gccadmin@gcc.gnu.org>2008-12-30 00:17:00 +0000
committerGCC Administrator <gccadmin@gcc.gnu.org>2008-12-30 00:17:00 +0000
commitb72bc5243fdc2830e2e4290526d43d210ff3178a (patch)
treec8b0108aff26ea22a0c21fd2404f760b43cc44a2 /libjava/classpath/lib/java/lang/Byte.class
parent31375f4d8dd4149c5aeafcd0b757825d3f23841a (diff)
downloadgcc-b72bc5243fdc2830e2e4290526d43d210ff3178a.zip
gcc-b72bc5243fdc2830e2e4290526d43d210ff3178a.tar.gz
gcc-b72bc5243fdc2830e2e4290526d43d210ff3178a.tar.bz2
Daily bump.
From-SVN: r142957
Diffstat (limited to 'libjava/classpath/lib/java/lang/Byte.class')
0 files changed, 0 insertions, 0 deletions
r_getstack'>roland/pthread_attr_getstack Unnamed repository; edit this file 'description' to name the repository.root
aboutsummaryrefslogtreecommitdiff
path: root/time/ftime.c
blob: 94dfbcc98bb88fde1ab3b36ab1d75328dc902bf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* Copyright (C) 1994, 1996, 1997, 2001 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, write to the Free
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
   02111-1307 USA.  */

#include <errno.h>
#include <time.h>
#include <sys/timeb.h>

int
ftime (timebuf)
     struct timeb *timebuf;
{
  int save = errno;
  struct tm tp;

  __set_errno (0);
  if (time (&timebuf->time) == (time_t) -1 && errno != 0)
    return -1;
  timebuf->millitm = 0;

  if (__localtime_r (&timebuf->time, &tp) == NULL)
    return -1;

  timebuf->timezone = tp.tm_gmtoff / 60;
  timebuf->dstflag = tp.tm_isdst;

  __set_errno (save);
  return 0;
}