build process improvements

builds with -Werror -Wall and without -Wno-unused now
GNU now uses improvements and mkstemp, too
correct version variable for sh(1)
This commit is contained in:
tg
2004-04-07 17:14:13 +00:00
parent bc29832339
commit 138338c10d
6 changed files with 33 additions and 28 deletions

9
io.c
View File

@@ -1,4 +1,5 @@
/* $OpenBSD: io.c,v 1.13 2003/11/10 21:26:39 millert Exp $ */
/* $MirBSD: io.c,v 1.2 2004/04/07 17:14:12 tg Exp $ */
/* $OpenBSD: io.c,v 1.13 2003/11/10 21:26:39 millert Exp $ */
/*
* shell buffered IO and formatted output
@@ -505,7 +506,9 @@ maketemp(ap, type, tlist)
Temp_type type;
struct temp **tlist;
{
#ifdef NO_MKSTEMP
static unsigned int inc;
#endif
struct temp *tp;
int len;
int fd;
@@ -519,7 +522,7 @@ maketemp(ap, type, tlist)
tp->name = path = (char *) &tp[1];
tp->shf = (struct shf *) 0;
tp->type = type;
#ifdef __OpenBSD__
#ifndef NO_MKSTEMP
shf_snprintf(path, len, "%s/shXXXXXXXX", dir);
fd = mkstemp(path);
if (fd >= 0)
@@ -550,7 +553,7 @@ maketemp(ap, type, tlist)
*/
break;
}
#endif /* __OpenBSD__ */
#endif /* !ndef NO_MKSTEMP */
tp->pid = procpid;
tp->next = *tlist;