1 /****************************************************************************
2  *                                                                          *
3  * The contents of this file are subject to the WebStone Public License     *
4  * Version 1.0 (the "License"); you may not use this file except in         *
5  * compliance with the License. You may obtain a copy of the License        *
6  * at http://www.mindcraft.com/webstone/license10.html                      *
7  *                                                                          *
8  * Software distributed under the License is distributed on an "AS IS"      *
9  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See      *
10  * the License for the specific language governing rights and limitations   *
11  * under the License.                                                       *
12  *                                                                          *
13  * The Original Code is WebStone 2.5.                                       *
14  *                                                                          *
15  * The Initial Developer of the Original Code is Silicon Graphics, Inc.     *
16  * and Mindcraft, Inc.. Portions created by Silicon Graphics. and           *
17  * Mindcraft. are Copyright (C) 1995-1998 Silicon Graphics, Inc. and        *
18  * Mindcraft, Inc. All Rights Reserved.                                     *
19  *                                                                          *
20  * Contributor(s): ______________________________________.                  *
21  *                                                                          *
22  * @(#) bench.c 2.4@(#)                                                     *
23  ***************************************************************************/
24 
25 
26 #include "sysdep.h"
27 /* strerror() */
28 #ifndef HAVE_STRERROR
29 /* strerror is not available on SunOS 4.1.3 and others */
30 extern int sys_nerr;
31 extern char *sys_errlist[];
32 extern int errno;
33 
strerror(int errnum)34 char *strerror(int errnum)
35 {
36 
37     if (errnum<sys_nerr)
38     {
39 	return(sys_errlist[errnum]);
40     }
41 
42     return(NULL);
43 }
44 
45 #endif /* strerror() */
46 
47 
48 /* stub routines for NT */
49 
50 #ifdef WIN32
51 #include <winsock.h>
52 #include <process.h>
53 
getpid(void)54 int getpid(void) {
55 
56     return GetCurrentThreadId();
57 }
58 
sleep(int sec)59 void sleep(int sec) {
60 
61     Sleep(sec*1000);
62 }
63 #endif /* WIN32 */
64 
65