home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 1
/
ADE-1.bin
/
ade-dist
/
pdksh-4.9-src.tgz
/
tar.out
/
contrib
/
pdksh
/
std
/
posix
/
unistd.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-09-28
|
536b
|
44 lines
/* misc. POSIX emulation */
#ifndef lint
static char *RCSid = "$Id: unistd.c,v 1.3 93/05/05 21:17:55 sjg Exp $";
#endif
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <unistd.h>
#if _V7 || _BSD
char *
getcwd(buf, len)
char *buf;
size_t len;
{
char cwd [1024];
extern char *getwd();
if (getwd(cwd) == NULL)
return NULL;
if (strlen(cwd)+1 >= len) {
errno = ERANGE;
return NULL;
}
return strcpy(buf, cwd);
}
#endif
#if _V7
long
ulimit(cmd, limit)
int cmd;
long limit;
{
return 0;
}
#endif