SCCS-vsn: usr.bin/ranlib/build.c 5.2
SCCS-vsn: usr.bin/ranlib/misc.c 5.2
SCCS-vsn: usr.bin/ranlib/ranlib.c 5.6
SCCS-vsn: usr.bin/ranlib/touch.c 5.2
-static char sccsid[] = "@(#)build.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)build.c 5.2 (Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
#endif /* not lint */
#include <sys/types.h>
RLIB *rhead, **pnext;
FILE *fp;
RLIB *rhead, **pnext;
FILE *fp;
+static void rexec(), symobj();
* Read the exec structure; ignore any files that don't look
* exactly right.
*/
* Read the exec structure; ignore any files that don't look
* exactly right.
*/
rexec(rfd, wfd)
register int rfd;
int wfd;
rexec(rfd, wfd)
register int rfd;
int wfd;
* Write the symbol table into the archive, computing offsets as
* writing.
*/
* Write the symbol table into the archive, computing offsets as
* writing.
*/
symobj()
{
register RLIB *rp;
symobj()
{
register RLIB *rp;
/* Put out the ranlib archive file header. */
#define DEFMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
(void)sprintf(hb, HDR2, RANLIBMAG, 0L, getuid(), getgid(),
/* Put out the ranlib archive file header. */
#define DEFMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
(void)sprintf(hb, HDR2, RANLIBMAG, 0L, getuid(), getgid(),
- DEFMODE & ~umask(), ransize, ARFMAG);
+ DEFMODE & ~umask(0), ransize, ARFMAG);
if (!fwrite(hb, sizeof(struct ar_hdr), 1, fp))
error(tname);
if (!fwrite(hb, sizeof(struct ar_hdr), 1, fp))
error(tname);
-static char sccsid[] = "@(#)misc.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)misc.c 5.2 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#include <sys/signal.h>
#endif /* not lint */
#include <sys/param.h>
#include <sys/signal.h>
+#include <errno.h>
+#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)ranlib.c 5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)ranlib.c 5.6 (Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
#include <dirent.h>
#include <stdio.h>
#endif /* not lint */
#include <sys/types.h>
#include <dirent.h>
#include <stdio.h>
#include <archive.h>
CHDR chdr;
#include <archive.h>
CHDR chdr;
-static char sccsid[] = "@(#)touch.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)touch.c 5.2 (Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
#include <fcntl.h>
#endif /* not lint */
#include <sys/types.h>
#include <fcntl.h>
#include <dirent.h>
#include <ranlib.h>
#include <ar.h>
#include <dirent.h>
#include <ranlib.h>
#include <ar.h>
+#include <time.h>
+#include <unistd.h>
extern CHDR chdr; /* converted header */
extern char *archive; /* archive name */
extern CHDR chdr; /* converted header */
extern char *archive; /* archive name */