=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/arch.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c -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 **** ! /* $NetBSD: arch.c,v 1.11 1995/11/22 17:39:53 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. --- 1,4 ---- ! /* $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,48 **** #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 $"; #endif #endif /* not lint */ --- 42,48 ---- #if 0 static char sccsid[] = "@(#)arch.c 5.7 (Berkeley) 12/28/90"; #else ! static char rcsid[] = "$NetBSD: arch.c,v 1.13 1996/02/04 22:20:34 christos Exp $"; #endif #endif /* not lint */ *************** *** 100,108 **** #include #include #include ! #ifndef __svr4__ #include #endif #include #include #include "make.h" --- 100,109 ---- #include #include #include ! #if !defined(__svr4__) && !defined(__SVR4) #include #endif + #include #include #include #include "make.h" *************** *** 561,566 **** --- 562,573 ---- } 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,836 **** Arch_TouchLib (gn) GNode *gn; /* The node of the library to touch */ { FILE * arch; /* Stream open to archive */ struct ar_hdr arh; /* Header describing table of contents */ ! struct timeval times[2]; /* Times for utimes() call */ arch = ArchFindMember (gn->path, RANLIBMAG, &arh, "r+"); sprintf(arh.ar_date, "%-12ld", (long) now); --- 835,844 ---- 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 utimbuf times; /* Times for utime() call */ arch = ArchFindMember (gn->path, RANLIBMAG, &arh, "r+"); sprintf(arh.ar_date, "%-12ld", (long) now); *************** *** 839,848 **** (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); } } /*- --- 847,856 ---- (void)fwrite ((char *)&arh, sizeof (struct ar_hdr), 1, arch); fclose (arch); ! times.actime = times.modtime = now; ! utime(gn->path, ×); } + #endif } /*- *************** *** 983,989 **** Var_Set (TARGET, gn->name, gn); #else Var_Set (TARGET, gn->path == (char *) NULL ? gn->name : gn->path, gn); ! #endif LIBRARIES } /*- --- 991,997 ---- Var_Set (TARGET, gn->name, gn); #else Var_Set (TARGET, gn->path == (char *) NULL ? gn->name : gn->path, gn); ! #endif /* LIBRARIES */ } /*-