* include/tzfile.h: Add some missing entries.

This commit is contained in:
Christopher Faylor 2003-09-25 03:51:51 +00:00
parent dbf193cea8
commit cd2bce7142
8 changed files with 47 additions and 10 deletions

View File

@ -1,3 +1,7 @@
2003-09-24 Christopher Faylor <cgf@redhat.com>
* include/tzfile.h: Add some missing entries.
2003-09-24 Christopher Faylor <cgf@redhat.com> 2003-09-24 Christopher Faylor <cgf@redhat.com>
* include/paths.h: Add some missing entries. * include/paths.h: Add some missing entries.

View File

@ -247,7 +247,7 @@ fhandler_socket::check_peer_secret_event (struct sockaddr_in* peer, int* secret)
DWORD rc = WaitForSingleObject (ev, 10000); DWORD rc = WaitForSingleObject (ev, 10000);
debug_printf ("WFSO rc=%d", rc); debug_printf ("WFSO rc=%d", rc);
CloseHandle (ev); CloseHandle (ev);
return (rc == WAIT_OBJECT_0 ? 1 : 0 ); return (rc == WAIT_OBJECT_0 ? 1 : 0);
} }
else else
return 0; return 0;
@ -530,7 +530,7 @@ fhandler_socket::connect (const struct sockaddr *name, int namelen)
{ {
if (!check_peer_secret_event (&sin, secret)) if (!check_peer_secret_event (&sin, secret))
{ {
debug_printf ( "accept from unauthorized server" ); debug_printf ("accept from unauthorized server");
secret_check_failed = TRUE; secret_check_failed = TRUE;
} }
} }

View File

@ -1125,7 +1125,7 @@ fhandler_tty_common::close ()
/* Send EOF to slaves if master side is closed */ /* Send EOF to slaves if master side is closed */
if (!get_ttyp ()->master_alive ()) 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); SetEvent (input_available_event);
} }

View File

@ -1,6 +1,6 @@
/* tzfile.h /* tzfile.h
Copyright 2001 Red Hat, Inc. Copyright 2001, 2002, 2003 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.
@ -11,9 +11,42 @@ details. */
#ifndef _TZFILE_H #ifndef _TZFILE_H
#define _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 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) #define isleap(y) (((y) % 4) == 0 && ((y) % 100) != 0 || ((y) % 400) == 0)
#endif #endif

View File

@ -163,7 +163,7 @@ cygsid::getfromstr (const char *nsidstr)
if (nsidstr && !strncmp (nsidstr, "S-1-", 4)) if (nsidstr && !strncmp (nsidstr, "S-1-", 4))
{ {
s = strtoul (nsidstr + 4, &lasts, 10); s = strtoul (nsidstr + 4, &lasts, 10);
while ( cnt < 8 && *lasts == '-') while (cnt < 8 && *lasts == '-')
r[cnt++] = strtoul (lasts + 1, &lasts, 10); r[cnt++] = strtoul (lasts + 1, &lasts, 10);
if (!*lasts) if (!*lasts)
return get_sid (s, cnt, r); return get_sid (s, cnt, r);

View File

@ -1745,7 +1745,7 @@ alloc_sd (__uid32_t uid, __gid32_t gid, int attribute,
} }
/* Construct appropriate inherit attribute for new directories */ /* 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; const DWORD inherit = SUB_CONTAINERS_AND_OBJECTS_INHERIT | INHERIT_ONLY;

View File

@ -82,7 +82,7 @@ nanosleep (const struct timespec *rqtp, struct timespec *rmtp)
} }
DWORD resolution = gtod.resolution (); DWORD resolution = gtod.resolution ();
DWORD req = ((rqtp->tv_sec * 1000 + (rqtp->tv_nsec + 999999) / 1000000 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; DWORD end_time = gtod.dmsecs () + req;
syscall_printf ("nanosleep (%ld)", req); syscall_printf ("nanosleep (%ld)", req);

View File

@ -1574,7 +1574,7 @@ pthread_mutex::_trylock (pthread_t self)
{ {
int result = 0; int result = 0;
if (InterlockedCompareExchange ((long *)&lock_counter, 1, 0 ) == 0) if (InterlockedCompareExchange ((long *) &lock_counter, 1, 0) == 0)
set_owner (self); set_owner (self);
else if (type == PTHREAD_MUTEX_RECURSIVE && pthread::equal (owner, self)) else if (type == PTHREAD_MUTEX_RECURSIVE && pthread::equal (owner, self))
result = lock_recursive (); result = lock_recursive ();