aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/times.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-09-22 03:38:57 +0000
committerChristopher Faylor <me@cgf.cx>2002-09-22 03:38:57 +0000
commitc90e1cf179187d5d188a3003db503ffd86d80cfe (patch)
treead0890e2267f00de92aefc5a99d60017e4f15fe9 /winsup/cygwin/times.cc
parent228f6b6e07f1b08620dc08f389263f228da0079f (diff)
downloadnewlib-c90e1cf179187d5d188a3003db503ffd86d80cfe.zip
newlib-c90e1cf179187d5d188a3003db503ffd86d80cfe.tar.gz
newlib-c90e1cf179187d5d188a3003db503ffd86d80cfe.tar.bz2
* fhandler.cc (fhandler_base::dup): Don't set handle on failure. Caller has
already taken care of that. * fhandler_console.cc (fhandler_console::open): Initialize handles to NULL. (fhandler_console::close): Ditto. GNUify non-GNU formatted functions calls throughout.
Diffstat (limited to 'winsup/cygwin/times.cc')
-rw-r--r--winsup/cygwin/times.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc
index ed06802..6bb981d 100644
--- a/winsup/cygwin/times.cc
+++ b/winsup/cygwin/times.cc
@@ -96,7 +96,7 @@ settimeofday (const struct timeval *tv, const struct timezone *tz)
tz = tz; /* silence warning about unused variable */
- ptm = gmtime(&tv->tv_sec);
+ ptm = gmtime (&tv->tv_sec);
st.wYear = ptm->tm_year + 1900;
st.wMonth = ptm->tm_mon + 1;
st.wDayOfWeek = ptm->tm_wday;
@@ -106,7 +106,7 @@ settimeofday (const struct timeval *tv, const struct timezone *tz)
st.wSecond = ptm->tm_sec;
st.wMilliseconds = tv->tv_usec / 1000;
- res = !SetSystemTime(&st);
+ res = !SetSystemTime (&st);
syscall_printf ("%d = settimeofday (%x, %x)", res, tv, tz);
@@ -118,13 +118,13 @@ extern "C" char *
timezone ()
{
#ifdef _MT_SAFE
- char *b=_reent_winsup()->timezone_buf;
+ char *b=_reent_winsup ()->timezone_buf;
#else
static NO_COPY char b[20] = {0};
#endif
- tzset();
- __small_sprintf (b,"GMT%+d:%02d", (int) (-_timezone / 3600), (int) (abs(_timezone / 60) % 60));
+ tzset ();
+ __small_sprintf (b,"GMT%+d:%02d", (int) (-_timezone / 3600), (int) (abs (_timezone / 60) % 60));
return b;
}
@@ -158,7 +158,7 @@ gettimeofday (struct timeval *tv, struct timezone *tz)
{
if (!tzflag)
{
- tzset();
+ tzset ();
tzflag = true;
}
tz->tz_minuteswest = _timezone / 60;