src/protocols/zephyr/Zinternal.c

changeset 10867
b39f9b646d6c
parent 8792
b0645c9dc276
child 11105
842fa517e08c
equal deleted inserted replaced
10866:40eab743e22b 10867:b39f9b646d6c
2 * It contains source for the internal Zephyr routines. 2 * It contains source for the internal Zephyr routines.
3 * 3 *
4 * Created by: Robert French 4 * Created by: Robert French
5 * 5 *
6 * $Source$ 6 * $Source$
7 * $Author: chipx86 $ 7 * $Author: thekingant $
8 * 8 *
9 * Copyright (c) 1987,1988,1991 by the Massachusetts Institute of 9 * Copyright (c) 1987,1988,1991 by the Massachusetts Institute of
10 * Technology. 10 * Technology.
11 * For copying and distribution information, see the file 11 * For copying and distribution information, see the file
12 * "mit-copyright.h". 12 * "mit-copyright.h".
13 */ 13 */
14 /* $Header$ */ 14 /* $Header$ */
15 15
16 #include "internal.h" 16 #include "internal.h"
17 #ifdef WIN32
18 #include <winsock2.h>
19
20 #ifndef ZEPHYR_USES_KERBEROS
21 int gettimeofday(struct timeval* p, struct timezone* tz ){
22 union {
23 long long ns100; /*time since 1 Jan 1601 in 100ns units */
24 FILETIME ft;
25 } _now;
26
27 GetSystemTimeAsFileTime( &(_now.ft) );
28 p->tv_usec=(long)((_now.ns100 / 10LL) % 1000000LL );
29 p->tv_sec= (long)((_now.ns100-(116444736000000000LL))/10000000LL);
30 return 0;
31 }
32 #endif
33
34 #else
17 #include <arpa/inet.h> 35 #include <arpa/inet.h>
18 #include <sys/socket.h> 36 #include <sys/socket.h>
19 #include <utmp.h> 37 #include <utmp.h>
38 #endif
20 39
21 #ifndef lint 40 #ifndef lint
22 static const char rcsid_Zinternal_c[] = 41 static const char rcsid_Zinternal_c[] =
23 "$Id: Zinternal.c 9554 2004-04-24 09:02:28Z chipx86 $"; 42 "$Id: Zinternal.c 12553 2005-04-25 01:53:01Z thekingant $";
24 static const char copyright[] = 43 static const char copyright[] =
25 "Copyright (c) 1987,1988,1991 by the Massachusetts Institute of Technology."; 44 "Copyright (c) 1987,1988,1991 by the Massachusetts Institute of Technology.";
26 #endif 45 #endif
27 46
28 extern char *inet_ntoa (); 47 extern char *inet_ntoa ();

mercurial