1f7923656Sespie #ifndef ARCH_H 2f7923656Sespie #define ARCH_H 3*1f89b472Sespie /* $OpenBSD: arch.h,v 1.8 2013/04/23 14:32:53 espie Exp $ */ 4f7923656Sespie 5f7923656Sespie /* 6f7923656Sespie * Copyright (c) 2001 Marc Espie. 7f7923656Sespie * 8f7923656Sespie * Redistribution and use in source and binary forms, with or without 9f7923656Sespie * modification, are permitted provided that the following conditions 10f7923656Sespie * are met: 11f7923656Sespie * 1. Redistributions of source code must retain the above copyright 12f7923656Sespie * notice, this list of conditions and the following disclaimer. 13f7923656Sespie * 2. Redistributions in binary form must reproduce the above copyright 14f7923656Sespie * notice, this list of conditions and the following disclaimer in the 15f7923656Sespie * documentation and/or other materials provided with the distribution. 16f7923656Sespie * 17f7923656Sespie * THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT AND CONTRIBUTORS 18f7923656Sespie * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19f7923656Sespie * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20f7923656Sespie * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBSD 21f7923656Sespie * PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22f7923656Sespie * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23f7923656Sespie * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24f7923656Sespie * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25f7923656Sespie * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26f7923656Sespie * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27f7923656Sespie * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28f7923656Sespie */ 29f7923656Sespie 30f7923656Sespie /*- 31f7923656Sespie * arch -- 32f7923656Sespie * Functions to manipulate libraries, archives and their members. 33f7923656Sespie */ 34f7923656Sespie 35*1f89b472Sespie #include <sys/time.h> 36f7923656Sespie 37f7923656Sespie /* Initialization and cleanup */ 38f7923656Sespie extern void Arch_Init(void); 39f7923656Sespie 40f7923656Sespie /* ok = Arch_ParseArchive(&begin, nodeLst, ctxt); 41f7923656Sespie * Given an archive specification, add list of corresponding GNodes to 42f7923656Sespie * nodeLst, one for each member in the spec. 43f7923656Sespie * false is returned if the specification is invalid for some reason. 44f7923656Sespie * Side-effect: begin is bumped to the end of the specification. */ 45981d9684Sespie extern bool Arch_ParseArchive(const char **, Lst, SymTable *); 46f7923656Sespie /* Arch_Touch(node); 47f7923656Sespie * Alter the modification time of the archive member described by node 48f7923656Sespie * to the current time. */ 49f7923656Sespie extern void Arch_Touch(GNode *); 50f7923656Sespie /* stamp = Arch_MTime(node); 51f7923656Sespie * Find the modification time of a member of an archive *in the 52f7923656Sespie * archive*, and returns it. 53f7923656Sespie * The time is also stored in the member's GNode. */ 54*1f89b472Sespie extern struct timespec Arch_MTime(GNode *); 55f7923656Sespie /* stamp = Arch_MemMTime(node); 56f7923656Sespie * Find the modification time of a member of an archive and returns it. 57f7923656Sespie * To use when the member only exists within the archive. */ 58*1f89b472Sespie extern struct timespec Arch_MemMTime(GNode *); 59f7923656Sespie 60f7923656Sespie #endif 61