#include "libbb.h"
#include "runit_lib.h"
-#ifndef O_NONBLOCK
-#define O_NONBLOCK O_NDELAY
-#endif
-
/*** buffer.c ***/
void buffer_init(buffer *s,int (*op)(int fd,char *buf,unsigned len),int fd,char *buf,unsigned len)
/*** stralloc_cat.c ***/
+#if 0
int stralloc_cat(stralloc *sato,const stralloc *safrom)
{
GEN_ALLOC_append(stralloc,char,s,len,a,i,n,x,30,stralloc_readyplus,stralloc_append)
+#endif /* stralloc */
/*** iopause.c ***/
}
-/*** ndelay_off.c ***/
-
-int ndelay_off(int fd)
-{
- return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) & ~O_NONBLOCK);
-}
-
-
-/*** ndelay_on.c ***/
-
-int ndelay_on(int fd)
-{
- return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) | O_NONBLOCK);
-}
-
-
/*** open_append.c ***/
int open_append(const char *fn)
{
- return open(fn,O_WRONLY | O_NDELAY | O_APPEND | O_CREAT,0600);
+ return open(fn, O_WRONLY|O_NDELAY|O_APPEND|O_CREAT, 0600);
}
int open_read(const char *fn)
{
- return open(fn,O_RDONLY | O_NDELAY);
+ return open(fn, O_RDONLY|O_NDELAY);
}
int open_write(const char *fn)
{
- return open(fn,O_WRONLY | O_NDELAY);
+ return open(fn, O_WRONLY|O_NDELAY);
}
/*** openreadclose.c ***/
-
+#if 0
int openreadclose(const char *fn,stralloc *sa,unsigned bufsize)
{
int fd;
if (readclose(fd,sa,bufsize) == -1) return -1;
return 1;
}
+#endif
/*** pathexec_env.c ***/
-
+#if 0
static stralloc plus;
static stralloc tmp;
pathexec_run(*argv,argv,e);
free(e);
}
-
+#endif
/*** pathexec_run.c ***/
-
+#if 0
static stralloc tmp;
void pathexec_run(const char *file,char *const *argv,char *const *envp)
path += 1;
}
}
-
+#endif
/*** pmatch.c ***/
/*** readclose.c ***/
-
+#if 0
int readclose_append(int fd,stralloc *sa,unsigned bufsize)
{
int r;
if (!stralloc_copys(sa,"")) { close(fd); return -1; }
return readclose_append(fd,sa,bufsize);
}
-
+#endif
/*** scan_ulong.c ***/