#include "gup.h"

#ifdef NO_DUP2
int
dup2(oldfd, newfd)

    int		oldfd;
    int		newfd;

{
    int		tryfd;

    close(newfd);
    tryfd = dup(oldfd);

    return (newfd == tryfd) ? 0 : -1;
}
#endif


#ifdef NO_STRERROR
const char *
strerror(err)

    int		err;

{
    static	char	buf[8];

    sprintf(buf, "%d", err);

    return buf;
}
#endif
