=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/arch.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/usr.bin/make/arch.c 1995/12/14 03:23:26 1.2 +++ src/usr.bin/make/arch.c 1996/02/22 22:24:43 1.3 @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.11 1995/11/22 17:39:53 christos Exp $ */ +/* $NetBSD: arch.c,v 1.13 1996/02/04 22:20:34 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)arch.c 5.7 (Berkeley) 12/28/90"; #else -static char rcsid[] = "$NetBSD: arch.c,v 1.11 1995/11/22 17:39:53 christos Exp $"; +static char rcsid[] = "$NetBSD: arch.c,v 1.13 1996/02/04 22:20:34 christos Exp $"; #endif #endif /* not lint */ @@ -100,9 +100,10 @@ #include #include #include -#ifndef __svr4__ +#if !defined(__svr4__) && !defined(__SVR4) #include #endif +#include #include #include #include "make.h" @@ -561,6 +562,12 @@ } cp[1] = '\0'; +#if defined(__svr4__) || defined(__SVR4) + /* svr4 names are slash terminated */ + if (cp[0] == '/') + cp[0] = '\0'; +#endif + #ifdef AR_EFMT1 /* * BSD 4.4 extended AR format: #1/, with name as the @@ -828,9 +835,10 @@ Arch_TouchLib (gn) GNode *gn; /* The node of the library to touch */ { +#ifdef RANLIBMAG FILE * arch; /* Stream open to archive */ struct ar_hdr arh; /* Header describing table of contents */ - struct timeval times[2]; /* Times for utimes() call */ + struct utimbuf times; /* Times for utime() call */ arch = ArchFindMember (gn->path, RANLIBMAG, &arh, "r+"); sprintf(arh.ar_date, "%-12ld", (long) now); @@ -839,10 +847,10 @@ (void)fwrite ((char *)&arh, sizeof (struct ar_hdr), 1, arch); fclose (arch); - times[0].tv_sec = times[1].tv_sec = now; - times[0].tv_usec = times[1].tv_usec = 0; - utimes(gn->path, times); + times.actime = times.modtime = now; + utime(gn->path, ×); } +#endif } /*- @@ -983,7 +991,7 @@ Var_Set (TARGET, gn->name, gn); #else Var_Set (TARGET, gn->path == (char *) NULL ? gn->name : gn->path, gn); -#endif LIBRARIES +#endif /* LIBRARIES */ } /*-