=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ranlib/Attic/touch.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** src/usr.bin/ranlib/Attic/touch.c 1996/06/26 05:38:07 1.2 --- src/usr.bin/ranlib/Attic/touch.c 1999/09/21 13:15:43 1.3 *************** *** 1,4 **** ! /* $OpenBSD: touch.c,v 1.2 1996/06/26 05:38:07 deraadt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. --- 1,4 ---- ! /* $OpenBSD: touch.c,v 1.3 1999/09/21 13:15:43 espie Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. *************** *** 38,44 **** #ifndef lint /*static char sccsid[] = "from: @(#)touch.c 5.3 (Berkeley) 3/12/91";*/ ! static char rcsid[] = "$OpenBSD: touch.c,v 1.2 1996/06/26 05:38:07 deraadt Exp $"; #endif /* not lint */ #include --- 38,44 ---- #ifndef lint /*static char sccsid[] = "from: @(#)touch.c 5.3 (Berkeley) 3/12/91";*/ ! static char rcsid[] = "$OpenBSD: touch.c,v 1.3 1999/09/21 13:15:43 espie Exp $"; #endif /* not lint */ #include *************** *** 51,60 **** #include #include #include extern CHDR chdr; /* converted header */ - extern char *archive; /* archive name */ touch() { int afd; --- 51,61 ---- #include #include #include + #include "extern.h" extern CHDR chdr; /* converted header */ + int touch() { int afd; *************** *** 72,77 **** --- 73,79 ---- return(0); } + void settime(afd) int afd; { *************** *** 82,88 **** size = SARMAG + sizeof(hdr->ar_name); if (lseek(afd, size, SEEK_SET) == (off_t)-1) error(archive); ! (void)sprintf(buf, "%-12ld", time((time_t *)NULL) + RANLIBSKEW); if (write(afd, buf, sizeof(hdr->ar_date)) != sizeof(hdr->ar_date)) error(archive); } --- 84,90 ---- size = SARMAG + sizeof(hdr->ar_name); if (lseek(afd, size, SEEK_SET) == (off_t)-1) error(archive); ! (void)sprintf(buf, "%-12ld", (long int)time((time_t *)NULL) + RANLIBSKEW); if (write(afd, buf, sizeof(hdr->ar_date)) != sizeof(hdr->ar_date)) error(archive); }