blob: 62e86f0d55c20f30f7ddc23a93333afb4c991f75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
$NetBSD: patch-aa,v 1.2 2004/10/29 17:06:50 tv Exp $
--- ftmain.c.orig Thu May 20 06:31:47 2004
+++ ftmain.c
@@ -218,9 +218,9 @@ void usage(int cmd)
}
}
-#ifdef __CYGWIN__
-/* The CYGWIN libc does not have a timegm() function */
-time_t cyg_timegm(struct tm *tm)
+#if defined(__CYGWIN__) || defined(__INTERIX)
+/* Replacement timegm() function for libc's missing it */
+time_t timegm(struct tm *tm)
{
time_t time_temp;
struct tm *tm_temp;
@@ -234,7 +234,9 @@ time_t cyg_timegm(struct tm *tm)
tm_temp = gmtime(&time_temp);
return (time_t)(time_temp + (time_temp - mktime(tm_temp)));
}
+#endif
+#ifdef __CYGWIN__
////////////////////////////////////////////////////////
// private popen2() - in-fact this is exact copy of
// newlib/libc/posix.c/popen.c with fork() instead of vfork()
@@ -420,8 +422,7 @@ int main(int argc, char **argv)
} else {
progname = strdup(argv[0]);
free(progpath);
- progpath = calloc(256, 1);
- getcwd(progpath, 256);
+ progpath = FT_BIN;
}
ext = strrchr(progname, '.');
if (NULL == ext) {
|