169069Stef /* 2*69076Stef * Copyright (c) 1995 3*69076Stef * The Regents of the University of California. All rights reserved. 469069Stef * 5*69076Stef * %sccs.include.redist.c% 669069Stef */ 769069Stef 8*69076Stef /* 9*69076Stef * Auxillary functions to aid portability to other systems. 10*69076Stef * These are 4.4BSD routines that are often not found on other systems. 1169069Stef * 12*69076Stef * !!!USE THIS FILE ONLY IF YOU ARE NOT RUNNING 4.4BSD!!! 1369069Stef */ 1469069Stef 1569069Stef #ifdef PREPOSIX 1669069Stef #define dirent direct 1769069Stef extern int errno; 1869069Stef #endif 1969069Stef 2069069Stef #ifdef NO_RINDEX 2169069Stef #define index strchr 2269069Stef #define rindex strrchr 2369069Stef #endif 2469069Stef 2569069Stef #ifdef BSDWAIT 2669069Stef #define WAITARG_T(a) ((int *)(a)) 2769069Stef #else 2869069Stef #define WAITARG_T(a) (a) 2969069Stef #endif 3069069Stef 3169069Stef #ifdef SETPGID 3269069Stef #define setpgrp(a, b) setpgid((pid_t)(a), (pid_t)(b)) 3369069Stef #endif 3469069Stef 3569069Stef #ifndef FD_COPY 3669069Stef #define FD_COPY(f, t) memcpy((char *)t, (char *)f, sizeof(*(f))) 3769069Stef #endif 3869069Stef 3969069Stef #ifdef NO_SNPRINTF 4069069Stef int snprintf __P((char *str, size_t n, const char *fmt, ...)); 4169069Stef #endif 42