File:  [MW Coherent from dump] / coherent / a / usr / bob / korn / unistd.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:34 2019 UTC (7 years ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

/*
 * misc. POSIX emulation for COHERENT
 */

#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <unistd.h>

#if COHERENT
char *
getcwd(buf, len)
char *buf;
size_t len;
{
	extern char *getwd();
	char	*cwd;

	if ((cwd = getwd()) == NULL)
		return NULL;
	if (strlen(cwd)+1 >= len) {
		errno = ERANGE;
		return NULL;
	}
	return strcpy(buf, cwd);
}

long
ulimit(cmd, limit)
int cmd;
long limit;
{
	return 0;
}
#endif


unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.