Commit f28e8a68 by Richard Stallman

entered into RCS

From-SVN: r1697
parent 99df2465
......@@ -206,6 +206,25 @@ generic *xmalloc ();
extern char *index ();
extern char *rindex ();
#ifdef NO_DUP2
dup2 (oldfd, newfd)
int oldfd;
int newfd;
{
int fdtmp[256];
int fdx = 0;
int fd;
if (oldfd == newfd)
return 0;
close (newfd);
while ((fd = dup (oldfd)) != newfd) /* good enough for low fd's */
fdtmp[fdx++] = fd;
while (fdx > 0)
close (fdtmp[--fdx]);
}
#endif
char *
my_strerror (e)
int e;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment