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 <afsconfig.h>
13 #include <afs/param.h>
18 #include <sys/timeb.h>
19 #include <afs/afsutil.h>
21 /* afs_wsInit - LWP version
22 * Initialize the winsock 2 environment.
24 * Returns 0 on success, -1 on error.
34 code = WSAStartup(sockVersion, &data);
38 if (data.wVersion != 2)
44 afs_winsockCleanup(void)
49 /* This function will begin to fail in the year 2038 */
51 afs_gettimeofday(struct timeval *tv, struct timezone *tz)
56 tv->tv_sec = myTime.time;
57 tv->tv_usec = myTime.millitm * 1000;
59 tz->tz_minuteswest = myTime.timezone;
60 tz->tz_dsttime = myTime.dstflag;