blob: 630b1fbe780989cf42053b1bfa7024666ad61317 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/**************************************************************************
* *
* Copyright (C) 1995 Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs were *
* developed by SGI for public use. If any changes are made to this code*
* please try to get the changes back to the author. Feel free to make *
* modifications and changes to the code and release it. *
* *
**************************************************************************/
#include "sysdep.h"
/* strerror() */
#ifndef HAVE_STRERROR
/* strerror is not available on SunOS 4.1.3 and others */
extern int sys_nerr;
extern char *sys_errlist[];
extern int errno;
char *strerror(int errnum)
{
if (errnum<sys_nerr)
{
return(sys_errlist[errnum]);
}
return(NULL);
}
#endif /* strerror() */
/* stub routines for NT */
#ifdef WIN32
#include <winsock.h>
#include <process.h>
int getpid(void) {
return GetCurrentThreadId();
}
void sleep(int sec) {
Sleep(sec*1000);
}
#endif /* WIN32 */
|