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