diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2005-02-08 20:59:41 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2005-02-08 20:59:41 +0000 |
commit | b6bddccad6115a21c7b41e6ec3bad048338fcd82 (patch) | |
tree | 96780161b6630e4ef2793dff62fffd2c77b78d7b | |
parent | 18d3a03bd4e998a54ad07b06d9b9f36de2c11315 (diff) | |
download | cygnal-b6bddccad6115a21c7b41e6ec3bad048338fcd82.tar.gz cygnal-b6bddccad6115a21c7b41e6ec3bad048338fcd82.tar.bz2 cygnal-b6bddccad6115a21c7b41e6ec3bad048338fcd82.zip |
* times.cc (timeval_to_filetime): Define first parameter const.
(utimes): Define second parameter to const according to SUSv3.
(utime): Ditto.
* include/sys/utime.h (utime) : Change declaration accordingly.
-rw-r--r-- | winsup/cygwin/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/utime.h | 2 | ||||
-rw-r--r-- | winsup/cygwin/times.cc | 8 |
3 files changed, 12 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c0bf1ff37..58ba9561f 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,12 @@ 2005-02-08 Corinna Vinschen <corinna@vinschen.de> + * times.cc (timeval_to_filetime): Define first parameter const. + (utimes): Define second parameter to const according to SUSv3. + (utime): Ditto. + * include/sys/utime.h (utime) : Change declaration accordingly. + +2005-02-08 Corinna Vinschen <corinna@vinschen.de> + * cygthread.cc (cygthread::detach): Just test thread handle after signal arrived, don't wait infinitely for it. diff --git a/winsup/cygwin/include/sys/utime.h b/winsup/cygwin/include/sys/utime.h index 5565b361d..cdd04ea7a 100644 --- a/winsup/cygwin/include/sys/utime.h +++ b/winsup/cygwin/include/sys/utime.h @@ -21,7 +21,7 @@ struct utimbuf time_t modtime; }; -int _EXFUN(utime, (const char *__path, struct utimbuf *__buf)); +int _EXFUN(utime, (const char *__path, const struct utimbuf *__buf)); #ifdef __cplusplus }; diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc index 4cdb4b26c..7ed9e5ec2 100644 --- a/winsup/cygwin/times.cc +++ b/winsup/cygwin/times.cc @@ -30,7 +30,7 @@ details. */ #define FACTOR (0x19db1ded53e8000LL) #define NSPERSEC 10000000LL -static void __stdcall timeval_to_filetime (timeval *time, FILETIME *out); +static void __stdcall timeval_to_filetime (const struct timeval *time, FILETIME *out); /* Cygwin internal */ static unsigned long long __stdcall @@ -185,7 +185,7 @@ time_t_to_filetime (time_t time_in, FILETIME *out) /* Cygwin internal */ static void __stdcall -timeval_to_filetime (timeval *time_in, FILETIME *out) +timeval_to_filetime (const struct timeval *time_in, FILETIME *out) { long long x = time_in->tv_sec * NSPERSEC + time_in->tv_usec * (NSPERSEC/1000000) + FACTOR; @@ -446,7 +446,7 @@ gmtime (const time_t *tim_p) /* utimes: standards? */ extern "C" int -utimes (const char *path, struct timeval *tvp) +utimes (const char *path, const struct timeval *tvp) { int res = 0; struct timeval tmp[2]; @@ -528,7 +528,7 @@ utimes (const char *path, struct timeval *tvp) /* utime: POSIX 5.6.6.1 */ extern "C" int -utime (const char *path, struct utimbuf *buf) +utime (const char *path, const struct utimbuf *buf) { struct timeval tmp[2]; |