Why is gcc stupid....
Modified: trunk/reactos/apps/utils/net/ftp/fake.c
Modified: trunk/reactos/apps/utils/net/ftp/prototypes.h
_____
Modified: trunk/reactos/apps/utils/net/ftp/fake.c
--- trunk/reactos/apps/utils/net/ftp/fake.c 2005-01-04 21:40:25 UTC
(rev 12803)
+++ trunk/reactos/apps/utils/net/ftp/fake.c 2005-01-04 22:11:50 UTC
(rev 12804)
@@ -298,3 +298,47 @@
{
return 0;
}
+
+#ifndef __GNUC__
+#define EPOCHFILETIME (116444736000000000i64)
+#else
+#define EPOCHFILETIME (116444736000000000LL)
+#endif
+
+struct timezone {
+ int tz_minuteswest; /* minutes W of Greenwich */
+ int tz_dsttime; /* type of dst correction */
+};
+
+__inline int gettimeofday(struct timeval *tv, struct timezone *tz)
+{
+ FILETIME ft;
+ LARGE_INTEGER li;
+ __int64 t;
+ static int tzflag;
+
+ if (tv)
+ {
+ GetSystemTimeAsFileTime(&ft);
+ //li.LowPart = ft.dwLowDateTime;
+ //li.HighPart = ft.dwHighDateTime;
+ t = li.QuadPart; /* In 100-nanosecond intervals */
+ t -= EPOCHFILETIME; /* Offset to the Epoch time */
+ t /= 10; /* In microseconds */
+ tv->tv_sec = (long)(t / 1000000);
+ tv->tv_usec = (long)(t % 1000000);
+ }
+
+ if (tz)
+ {
+ if (!tzflag)
+ {
+ _tzset();
+ tzflag++;
+ }
+ tz->tz_minuteswest = _timezone / 60;
+ tz->tz_dsttime = _daylight;
+ }
+
+ return 0;
+}
_____
Modified: trunk/reactos/apps/utils/net/ftp/prototypes.h
--- trunk/reactos/apps/utils/net/ftp/prototypes.h 2005-01-04
21:40:25 UTC (rev 12803)
+++ trunk/reactos/apps/utils/net/ftp/prototypes.h 2005-01-04
22:11:50 UTC (rev 12804)
@@ -30,50 +30,3 @@
int getit(int argc, char *argv[], int restartit, char *mode);
static int token(void);
int sleep(int time);
-
-#include <windows.h>
-#include <time.h>
-
-#ifndef __GNUC__
-#define EPOCHFILETIME (116444736000000000i64)
-#else
-#define EPOCHFILETIME (116444736000000000LL)
-#endif
-
-struct timezone {
- int tz_minuteswest; /* minutes W of Greenwich */
- int tz_dsttime; /* type of dst correction */
-};
-
-__inline int gettimeofday(struct timeval *tv, struct timezone *tz)
-{
- FILETIME ft;
- LARGE_INTEGER li;
- __int64 t;
- static int tzflag;
-
- if (tv)
- {
- GetSystemTimeAsFileTime(&ft);
- //li.LowPart = ft.dwLowDateTime;
- //li.HighPart = ft.dwHighDateTime;
- t = li.QuadPart; /* In 100-nanosecond intervals */
- t -= EPOCHFILETIME; /* Offset to the Epoch time */
- t /= 10; /* In microseconds */
- tv->tv_sec = (long)(t / 1000000);
- tv->tv_usec = (long)(t % 1000000);
- }
-
- if (tz)
- {
- if (!tzflag)
- {
- _tzset();
- tzflag++;
- }
- tz->tz_minuteswest = _timezone / 60;
- tz->tz_dsttime = _daylight;
- }
-
- return 0;
-}
Show replies by date