Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-10-21 05:00:58 +0400
committerChristopher Faylor <me@cgf.cx>2002-10-21 05:00:58 +0400
commit5ec14fe40ae1a6b11d27b975feca1b20de435467 (patch)
tree568cd69f0dca513973fc6e6646fe6ea4b3b9dafe /winsup/cygwin/times.cc
parentccefaab1d5735466b54f8c5dd279a310d6020a77 (diff)
Change _function() to function() throughout.
* cygwin.din: Remove last vestiges (?) of newlib wrappers. * cygthread.cc (cygthread::detach): Always wait for event or suffer an apparently inavoidable race. * dcrt0.cc (dll_crt0_1): Allocate threads after stack has been relocated. * debub.cc (lock_debug): Don't acquire lock on exit. * fork.cc (fork_child): Recreate mmaps before doing anything else since Windows has a habit of using blocks of memory in the child that could previously have been occupied by shared memory in the parent. * mmap.cc (fhandler_disk_file::fixup_mmap_after_fork): Issue error here and provide some details about what went wrong. (fixup_mmaps_after_fork): Remove error message. * shared.cc (open_shared): Move warning message so that more detail is possible. * sigproc.cc (sigproc_init): Initialize sync_proc_subproc to avoid a race. (sigproc_terminate): Specifically wait for process thread to terminate.
Diffstat (limited to 'winsup/cygwin/times.cc')
-rw-r--r--winsup/cygwin/times.cc29
1 files changed, 11 insertions, 18 deletions
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc
index 06a98dde4..d56dbabc8 100644
--- a/winsup/cygwin/times.cc
+++ b/winsup/cygwin/times.cc
@@ -46,7 +46,7 @@ __to_clock_t (FILETIME * src, int flag)
/* times: POSIX 4.5.2.1 */
extern "C" clock_t
-_times (struct tms * buf)
+times (struct tms *buf)
{
FILETIME creation_time, exit_time, kernel_time, user_time;
@@ -86,6 +86,8 @@ _times (struct tms * buf)
return tc;
}
+extern "C" clock_t _times (struct tms *) __attribute__((alias ("times")));
+
/* settimeofday: BSD */
extern "C" int
settimeofday (const struct timeval *tv, const struct timezone *tz)
@@ -168,11 +170,8 @@ gettimeofday (struct timeval *tv, struct timezone *tz)
return 0;
}
-extern "C" int
-_gettimeofday (struct timeval *p, struct timezone *z)
-{
- return gettimeofday (p, z);
-}
+extern "C" int _gettimeofday (struct timeval *, struct timezone *)
+ __attribute__((alias ("gettimeofday")));
/* Cygwin internal */
void
@@ -266,8 +265,7 @@ time_as_timestruc_t (timestruc_t * out)
/* time: POSIX 4.5.1.1, C 4.12.2.4 */
/* Return number of seconds since 00:00 UTC on jan 1, 1970 */
-extern "C"
-time_t
+extern "C" time_t
time (time_t * ptr)
{
time_t res;
@@ -409,8 +407,7 @@ corelocaltime (const time_t * tim_p)
* localtime takes a time_t (which is in UTC)
* and formats it into a struct tm as a local time.
*/
-extern "C"
-struct tm *
+extern "C" struct tm *
localtime (const time_t *tim_p)
{
time_t tim = *tim_p;
@@ -434,8 +431,7 @@ localtime (const time_t *tim_p)
* gmtime takes a time_t (which is already in UTC)
* and just puts it into a struct tm.
*/
-extern "C"
-struct tm *
+extern "C" struct tm *
gmtime (const time_t *tim_p)
{
time_t tim = *tim_p;
@@ -452,8 +448,7 @@ gmtime (const time_t *tim_p)
#endif /* POSIX_LOCALTIME */
/* utimes: standards? */
-extern "C"
-int
+extern "C" int
utimes (const char *path, struct timeval *tvp)
{
int res = 0;
@@ -532,8 +527,7 @@ utimes (const char *path, struct timeval *tvp)
}
/* utime: POSIX 5.6.6.1 */
-extern "C"
-int
+extern "C" int
utime (const char *path, struct utimbuf *buf)
{
struct timeval tmp[2];
@@ -549,8 +543,7 @@ utime (const char *path, struct utimbuf *buf)
}
/* ftime: standards? */
-extern "C"
-int
+extern "C" int
ftime (struct timeb *tp)
{
struct timeval tv;