=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/arch.c,v retrieving revision 1.80 retrieving revision 1.81 diff -c -r1.80 -r1.81 *** src/usr.bin/make/arch.c 2012/10/02 10:29:30 1.80 --- src/usr.bin/make/arch.c 2013/04/23 14:32:53 1.81 *************** *** 1,4 **** ! /* $OpenBSD: arch.c,v 1.80 2012/10/02 10:29:30 espie Exp $ */ /* $NetBSD: arch.c,v 1.17 1996/11/06 17:58:59 christos Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: arch.c,v 1.81 2013/04/23 14:32:53 espie Exp $ */ /* $NetBSD: arch.c,v 1.17 1996/11/06 17:58:59 christos Exp $ */ /* *************** *** 77,88 **** #include #include #include - #include #include #include #include #include ! #include "ohash.h" #include "config.h" #include "defines.h" #include "buf.h" --- 77,88 ---- #include #include #include #include + #include #include #include #include ! #include #include "config.h" #include "defines.h" #include "buf.h" *************** *** 133,139 **** /* Each archive member is tied to an arch_member structure, * suitable for hashing. */ struct arch_member { ! TIMESTAMP mtime; /* Member modification date. */ char date[AR_DATE_SIZE+1]; /* Same, before conversion to numeric * value. */ char name[1]; /* Member name. */ --- 133,139 ---- /* Each archive member is tied to an arch_member structure, * suitable for hashing. */ struct arch_member { ! struct timespec mtime; /* Member modification date. */ char date[AR_DATE_SIZE+1]; /* Same, before conversion to numeric * value. */ char name[1]; /* Member name. */ *************** *** 151,161 **** static struct arch_member *new_arch_member(struct ar_hdr *, const char *); ! static TIMESTAMP mtime_of_member(struct arch_member *); static long field2long(const char *, size_t); static Arch *read_archive(const char *, const char *); ! static TIMESTAMP ArchMTimeMember(const char *, const char *, bool); static FILE *ArchFindMember(const char *, const char *, struct ar_hdr *, const char *); static void ArchTouch(const char *, const char *); #if defined(__svr4__) || defined(__SVR4) || \ --- 151,161 ---- static struct arch_member *new_arch_member(struct ar_hdr *, const char *); ! static struct timespec mtime_of_member(struct arch_member *); static long field2long(const char *, size_t); static Arch *read_archive(const char *, const char *); ! static struct timespec ArchMTimeMember(const char *, const char *, bool); static FILE *ArchFindMember(const char *, const char *, struct ar_hdr *, const char *); static void ArchTouch(const char *, const char *); #if defined(__svr4__) || defined(__SVR4) || \ *************** *** 191,201 **** return n; } ! static TIMESTAMP mtime_of_member(struct arch_member *m) { if (is_out_of_date(m->mtime)) ! ts_set_from_time_t((time_t) strtol(m->date, NULL, 10), m->mtime); return m->mtime; } --- 191,201 ---- return n; } ! static struct timespec mtime_of_member(struct arch_member *m) { if (is_out_of_date(m->mtime)) ! ts_set_from_time_t((time_t) strtoll(m->date, NULL, 10), m->mtime); return m->mtime; } *************** *** 520,526 **** * Cache the whole archive contents if hash is true. *----------------------------------------------------------------------- */ ! static TIMESTAMP ArchMTimeMember( const char *archive, /* Path to the archive */ const char *member, /* Name of member. If it is a path, only the --- 520,526 ---- * Cache the whole archive contents if hash is true. *----------------------------------------------------------------------- */ ! static struct timespec ArchMTimeMember( const char *archive, /* Path to the archive */ const char *member, /* Name of member. If it is a path, only the *************** *** 533,539 **** unsigned int slot; /* Place of archive in the archives hash */ const char *end = NULL; const char *cp; ! TIMESTAMP result; ts_set_out_of_date(result); /* Because of space constraints and similar things, files are archived --- 533,539 ---- unsigned int slot; /* Place of archive in the archives hash */ const char *end = NULL; const char *cp; ! struct timespec result; ts_set_out_of_date(result); /* Because of space constraints and similar things, files are archived *************** *** 865,871 **** ArchTouch(Var(ARCHIVE_INDEX, gn), Var(MEMBER_INDEX, gn)); } ! TIMESTAMP Arch_MTime(GNode *gn) { gn->mtime = ArchMTimeMember(Var(ARCHIVE_INDEX, gn), --- 865,871 ---- ArchTouch(Var(ARCHIVE_INDEX, gn), Var(MEMBER_INDEX, gn)); } ! struct timespec Arch_MTime(GNode *gn) { gn->mtime = ArchMTimeMember(Var(ARCHIVE_INDEX, gn), *************** *** 874,880 **** return gn->mtime; } ! TIMESTAMP Arch_MemMTime(GNode *gn) { LstNode ln; --- 874,880 ---- return gn->mtime; } ! struct timespec Arch_MemMTime(GNode *gn) { LstNode ln;