1249033Ssjg/*      $NetBSD: meta.h,v 1.3 2013/03/23 05:31:29 sjg Exp $ */
2236769Sobrien
3236769Sobrien/*
4236769Sobrien * Things needed for 'meta' mode.
5236769Sobrien */
6236769Sobrien/*
7236769Sobrien * Copyright (c) 2009-2010, Juniper Networks, Inc.
8236769Sobrien *
9236769Sobrien * Redistribution and use in source and binary forms, with or without
10236769Sobrien * modification, are permitted provided that the following conditions
11236769Sobrien * are met:
12236769Sobrien * 1. Redistributions of source code must retain the above copyright
13236769Sobrien *    notice, this list of conditions and the following disclaimer.
14236769Sobrien * 2. Redistributions in binary form must reproduce the above copyright
15236769Sobrien *    notice, this list of conditions and the following disclaimer in the
16236769Sobrien *    documentation and/or other materials provided with the distribution.
17236769Sobrien * 3. Neither the name of the copyright holders nor the names of its
18236769Sobrien *    contributors may be used to endorse or promote products derived
19236769Sobrien *    from this software without specific prior written permission.
20236769Sobrien *
21236769Sobrien * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22236769Sobrien * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23236769Sobrien * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24236769Sobrien * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25236769Sobrien * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26236769Sobrien * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27236769Sobrien * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28236769Sobrien * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29236769Sobrien * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30236769Sobrien * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31236769Sobrien * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32236769Sobrien */
33236769Sobrien
34236769Sobrientypedef struct BuildMon {
35236769Sobrien    char	meta_fname[MAXPATHLEN];
36236769Sobrien    int		filemon_fd;
37236769Sobrien    int		mon_fd;
38236769Sobrien    FILE	*mfp;
39236769Sobrien} BuildMon;
40236769Sobrien
41236769Sobrienextern Boolean useMeta;
42236769Sobrien
43236769Sobrienstruct Job;				/* not defined yet */
44249033Ssjgvoid meta_init(void);
45249033Ssjgvoid meta_mode_init(const char *);
46236769Sobrienvoid meta_job_start(struct Job *, GNode *);
47236769Sobrienvoid meta_job_child(struct Job *);
48236769Sobrienvoid meta_job_error(struct Job *, GNode *, int, int);
49236769Sobrienvoid meta_job_output(struct Job *, char *, const char *);
50236769Sobrienvoid meta_cmd_finish(void *);
51236769Sobrienvoid meta_job_finish(struct Job *);
52236769SobrienBoolean meta_oodate(GNode *, Boolean);
53236769Sobrienvoid meta_compat_start(void);
54236769Sobrienvoid meta_compat_child(void);
55236769Sobrienvoid meta_compat_parent(void);
56