1*84d9c625SLionel Sambuc /* $NetBSD: meta.h,v 1.3 2013/03/23 05:31:29 sjg Exp $ */ 22e2caf59SThomas Veerman 32e2caf59SThomas Veerman /* 42e2caf59SThomas Veerman * Things needed for 'meta' mode. 52e2caf59SThomas Veerman */ 62e2caf59SThomas Veerman /* 72e2caf59SThomas Veerman * Copyright (c) 2009-2010, Juniper Networks, Inc. 82e2caf59SThomas Veerman * 92e2caf59SThomas Veerman * Redistribution and use in source and binary forms, with or without 102e2caf59SThomas Veerman * modification, are permitted provided that the following conditions 112e2caf59SThomas Veerman * are met: 122e2caf59SThomas Veerman * 1. Redistributions of source code must retain the above copyright 132e2caf59SThomas Veerman * notice, this list of conditions and the following disclaimer. 142e2caf59SThomas Veerman * 2. Redistributions in binary form must reproduce the above copyright 152e2caf59SThomas Veerman * notice, this list of conditions and the following disclaimer in the 162e2caf59SThomas Veerman * documentation and/or other materials provided with the distribution. 172e2caf59SThomas Veerman * 3. Neither the name of the copyright holders nor the names of its 182e2caf59SThomas Veerman * contributors may be used to endorse or promote products derived 192e2caf59SThomas Veerman * from this software without specific prior written permission. 202e2caf59SThomas Veerman * 212e2caf59SThomas Veerman * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 222e2caf59SThomas Veerman * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 232e2caf59SThomas Veerman * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 242e2caf59SThomas Veerman * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 252e2caf59SThomas Veerman * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 262e2caf59SThomas Veerman * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 272e2caf59SThomas Veerman * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 282e2caf59SThomas Veerman * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 292e2caf59SThomas Veerman * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 302e2caf59SThomas Veerman * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 312e2caf59SThomas Veerman * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 322e2caf59SThomas Veerman */ 332e2caf59SThomas Veerman 342e2caf59SThomas Veerman typedef struct BuildMon { 352e2caf59SThomas Veerman char meta_fname[MAXPATHLEN]; 362e2caf59SThomas Veerman int filemon_fd; 372e2caf59SThomas Veerman int mon_fd; 382e2caf59SThomas Veerman FILE *mfp; 392e2caf59SThomas Veerman } BuildMon; 402e2caf59SThomas Veerman 412e2caf59SThomas Veerman extern Boolean useMeta; 422e2caf59SThomas Veerman 432e2caf59SThomas Veerman struct Job; /* not defined yet */ 44*84d9c625SLionel Sambuc void meta_init(void); 45*84d9c625SLionel Sambuc void meta_mode_init(const char *); 462e2caf59SThomas Veerman void meta_job_start(struct Job *, GNode *); 472e2caf59SThomas Veerman void meta_job_child(struct Job *); 482e2caf59SThomas Veerman void meta_job_error(struct Job *, GNode *, int, int); 492e2caf59SThomas Veerman void meta_job_output(struct Job *, char *, const char *); 502e2caf59SThomas Veerman void meta_cmd_finish(void *); 512e2caf59SThomas Veerman void meta_job_finish(struct Job *); 522e2caf59SThomas Veerman Boolean meta_oodate(GNode *, Boolean); 532e2caf59SThomas Veerman void meta_compat_start(void); 542e2caf59SThomas Veerman void meta_compat_child(void); 552e2caf59SThomas Veerman void meta_compat_parent(void); 56