/* $NetBSD: meta.h,v 1.15 2025/08/04 03:47:26 sjg Exp $ */12/*3* Things needed for 'meta' mode.4*/5/*6* Copyright (c) 2009-2010, Juniper Networks, Inc.7*8* Redistribution and use in source and binary forms, with or without9* modification, are permitted provided that the following conditions10* are met:11* 1. Redistributions of source code must retain the above copyright12* notice, this list of conditions and the following disclaimer.13* 2. Redistributions in binary form must reproduce the above copyright14* notice, this list of conditions and the following disclaimer in the15* documentation and/or other materials provided with the distribution.16* 3. Neither the name of the copyright holders nor the names of its17* contributors may be used to endorse or promote products derived18* from this software without specific prior written permission.19*20* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS21* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT22* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR23* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT24* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,25* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT26* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,27* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY28* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT29* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE30* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.31*/3233typedef struct BuildMon {34char meta_fname[MAXPATHLEN];35struct filemon *filemon;36int mon_fd;37FILE *mfp;38} BuildMon;3940struct Job;4142void meta_init(void);43void meta_finish(void);44void meta_mode_init(const char *);45void meta_job_start(struct Job *, GNode *);46void meta_job_child(struct Job *);47void meta_job_parent(struct Job *, pid_t);48int meta_job_fd(struct Job *) MAKE_ATTR_USE;49int meta_job_event(struct Job *) MAKE_ATTR_USE;50void meta_job_error(struct Job *, GNode *, bool, int);51void meta_job_output(struct Job *, const char *, size_t);52int meta_cmd_finish(void *);53int meta_job_finish(struct Job *);54bool meta_oodate(GNode *, bool) MAKE_ATTR_USE;55void meta_compat_start(void);56void meta_compat_child(void);57void meta_compat_parent(pid_t);5859extern bool useMeta;606162