Annotation of coherent/a/usr/bob/korn/unistd.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * misc. POSIX emulation for COHERENT
        !             3:  */
        !             4: 
        !             5: #include <string.h>
        !             6: #include <errno.h>
        !             7: #include <sys/types.h>
        !             8: #include <unistd.h>
        !             9: 
        !            10: #if COHERENT
        !            11: char *
        !            12: getcwd(buf, len)
        !            13: char *buf;
        !            14: size_t len;
        !            15: {
        !            16:        extern char *getwd();
        !            17:        char    *cwd;
        !            18: 
        !            19:        if ((cwd = getwd()) == NULL)
        !            20:                return NULL;
        !            21:        if (strlen(cwd)+1 >= len) {
        !            22:                errno = ERANGE;
        !            23:                return NULL;
        !            24:        }
        !            25:        return strcpy(buf, cwd);
        !            26: }
        !            27: 
        !            28: long
        !            29: ulimit(cmd, limit)
        !            30: int cmd;
        !            31: long limit;
        !            32: {
        !            33:        return 0;
        !            34: }
        !            35: #endif
        !            36: 

unix.superglobalmegacorp.com

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