2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 /* winsock.c contains winsock related routines. */
12 #include <afs/param.h>
15 #include <sys/timeb.h>
16 #include <afs/afsutil.h>
18 /* afs_wsInit - LWP version
19 * Initialize the winsock 2 environment.
21 * Returns 0 on success, -1 on error.
23 int afs_winsockInit(void)
35 code = WSAStartup(sockVersion, &data);
39 if (data.wVersion != 2)
45 int afs_gettimeofday(struct timeval *tv, struct timezone *tz)
50 tv->tv_sec = myTime.time;
51 tv->tv_usec = myTime.millitm * 1000;
53 tz->tz_minuteswest = myTime.timezone;
54 tz->tz_dsttime = myTime.dstflag;