1*e48f47ddSSimon J. Gerraty /* $NetBSD: meta.h,v 1.5 2016/05/12 20:28:34 sjg Exp $ */ 23955d011SMarcel Moolenaar 33955d011SMarcel Moolenaar /* 43955d011SMarcel Moolenaar * Things needed for 'meta' mode. 53955d011SMarcel Moolenaar */ 63955d011SMarcel Moolenaar /* 73955d011SMarcel Moolenaar * Copyright (c) 2009-2010, Juniper Networks, Inc. 83955d011SMarcel Moolenaar * 93955d011SMarcel Moolenaar * Redistribution and use in source and binary forms, with or without 103955d011SMarcel Moolenaar * modification, are permitted provided that the following conditions 113955d011SMarcel Moolenaar * are met: 123955d011SMarcel Moolenaar * 1. Redistributions of source code must retain the above copyright 133955d011SMarcel Moolenaar * notice, this list of conditions and the following disclaimer. 143955d011SMarcel Moolenaar * 2. Redistributions in binary form must reproduce the above copyright 153955d011SMarcel Moolenaar * notice, this list of conditions and the following disclaimer in the 163955d011SMarcel Moolenaar * documentation and/or other materials provided with the distribution. 173955d011SMarcel Moolenaar * 3. Neither the name of the copyright holders nor the names of its 183955d011SMarcel Moolenaar * contributors may be used to endorse or promote products derived 193955d011SMarcel Moolenaar * from this software without specific prior written permission. 203955d011SMarcel Moolenaar * 213955d011SMarcel Moolenaar * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 223955d011SMarcel Moolenaar * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 233955d011SMarcel Moolenaar * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 243955d011SMarcel Moolenaar * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 253955d011SMarcel Moolenaar * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 263955d011SMarcel Moolenaar * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 273955d011SMarcel Moolenaar * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 283955d011SMarcel Moolenaar * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 293955d011SMarcel Moolenaar * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 303955d011SMarcel Moolenaar * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 313955d011SMarcel Moolenaar * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 323955d011SMarcel Moolenaar */ 333955d011SMarcel Moolenaar 343955d011SMarcel Moolenaar typedef struct BuildMon { 353955d011SMarcel Moolenaar char meta_fname[MAXPATHLEN]; 363955d011SMarcel Moolenaar int filemon_fd; 373955d011SMarcel Moolenaar int mon_fd; 383955d011SMarcel Moolenaar FILE *mfp; 393955d011SMarcel Moolenaar } BuildMon; 403955d011SMarcel Moolenaar 413955d011SMarcel Moolenaar extern Boolean useMeta; 423955d011SMarcel Moolenaar 433955d011SMarcel Moolenaar struct Job; /* not defined yet */ 441748de26SSimon J. Gerraty void meta_init(void); 45be19d90bSSimon J. Gerraty void meta_finish(void); 461748de26SSimon J. Gerraty void meta_mode_init(const char *); 473955d011SMarcel Moolenaar void meta_job_start(struct Job *, GNode *); 483955d011SMarcel Moolenaar void meta_job_child(struct Job *); 493955d011SMarcel Moolenaar void meta_job_error(struct Job *, GNode *, int, int); 503955d011SMarcel Moolenaar void meta_job_output(struct Job *, char *, const char *); 51*e48f47ddSSimon J. Gerraty int meta_cmd_finish(void *); 52*e48f47ddSSimon J. Gerraty int meta_job_finish(struct Job *); 533955d011SMarcel Moolenaar Boolean meta_oodate(GNode *, Boolean); 543955d011SMarcel Moolenaar void meta_compat_start(void); 553955d011SMarcel Moolenaar void meta_compat_child(void); 563955d011SMarcel Moolenaar void meta_compat_parent(void); 57