2003-09-24 Christopher Faylor <cgf@redhat.com>
+ * include/tzfile.h: Add some missing entries.
+
+2003-09-24 Christopher Faylor <cgf@redhat.com>
+
* include/paths.h: Add some missing entries.
2003-09-24 Christopher Faylor <cgf@redhat.com>
DWORD rc = WaitForSingleObject (ev, 10000);
debug_printf ("WFSO rc=%d", rc);
CloseHandle (ev);
- return (rc == WAIT_OBJECT_0 ? 1 : 0 );
+ return (rc == WAIT_OBJECT_0 ? 1 : 0);
}
else
return 0;
{
if (!check_peer_secret_event (&sin, secret))
{
- debug_printf ( "accept from unauthorized server" );
+ debug_printf ("accept from unauthorized server");
secret_check_failed = TRUE;
}
}
/* Send EOF to slaves if master side is closed */
if (!get_ttyp ()->master_alive ())
{
- termios_printf ("no more masters left. sending EOF" );
+ termios_printf ("no more masters left. sending EOF");
SetEvent (input_available_event);
}
/* tzfile.h
- Copyright 2001 Red Hat, Inc.
+ Copyright 2001, 2002, 2003 Red Hat, Inc.
This file is part of Cygwin.
#ifndef _TZFILE_H
#define _TZFILE_H
-#define SECSPERDAY (60*60*24)
+#define SECSPERMIN 60
+#define MINSPERHOUR 60
+#define HOURSPERDAY 24
+#define DAYSPERWEEK 7
#define DAYSPERNYEAR 365
-#define DAYSPERLYEAR 366
+#define DAYSPERLYEAR 366
+#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR)
+#define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY)
+#define MONSPERYEAR 12
+
+#define TM_SUNDAY 0
+#define TM_MONDAY 1
+#define TM_TUESDAY 2
+#define TM_WEDNESDAY 3
+#define TM_THURSDAY 4
+#define TM_FRIDAY 5
+#define TM_SATURDAY 6
+
+#define TM_JANUARY 0
+#define TM_FEBRUARY 1
+#define TM_MARCH 2
+#define TM_APRIL 3
+#define TM_MAY 4
+#define TM_JUNE 5
+#define TM_JULY 6
+#define TM_AUGUST 7
+#define TM_SEPTEMBER 8
+#define TM_OCTOBER 9
+#define TM_NOVEMBER 10
+#define TM_DECEMBER 11
+#define TM_SUNDAY 0
+
+#define TM_YEAR_BASE 1900
+
+#define EPOCH_YEAR 1970
+#define EPOCH_WDAY TM_THURSDAY
#define isleap(y) (((y) % 4) == 0 && ((y) % 100) != 0 || ((y) % 400) == 0)
#endif
if (nsidstr && !strncmp (nsidstr, "S-1-", 4))
{
s = strtoul (nsidstr + 4, &lasts, 10);
- while ( cnt < 8 && *lasts == '-')
+ while (cnt < 8 && *lasts == '-')
r[cnt++] = strtoul (lasts + 1, &lasts, 10);
if (!*lasts)
return get_sid (s, cnt, r);
}
/* Construct appropriate inherit attribute for new directories */
- if (S_ISDIR (attribute) && !acl_exists )
+ if (S_ISDIR (attribute) && !acl_exists)
{
const DWORD inherit = SUB_CONTAINERS_AND_OBJECTS_INHERIT | INHERIT_ONLY;
}
DWORD resolution = gtod.resolution ();
DWORD req = ((rqtp->tv_sec * 1000 + (rqtp->tv_nsec + 999999) / 1000000
- + resolution - 1) / resolution ) * resolution;
+ + resolution - 1) / resolution) * resolution;
DWORD end_time = gtod.dmsecs () + req;
syscall_printf ("nanosleep (%ld)", req);
{
int result = 0;
- if (InterlockedCompareExchange ((long *)&lock_counter, 1, 0 ) == 0)
+ if (InterlockedCompareExchange ((long *) &lock_counter, 1, 0) == 0)
set_owner (self);
else if (type == PTHREAD_MUTEX_RECURSIVE && pthread::equal (owner, self))
result = lock_recursive ();