1219820Sjeff/* $NetBSD: extern.h,v 1.18 2020/05/16 18:31:45 christos Exp $ */ 2219820Sjeff 3219820Sjeff/*- 4219820Sjeff * Copyright (c) 1991, 1993, 1994 5271127Shselasky * The Regents of the University of California. All rights reserved. 6219820Sjeff * 7219820Sjeff * Redistribution and use in source and binary forms, with or without 8219820Sjeff * modification, are permitted provided that the following conditions 9219820Sjeff * are met: 10219820Sjeff * 1. Redistributions of source code must retain the above copyright 11219820Sjeff * notice, this list of conditions and the following disclaimer. 12219820Sjeff * 2. Redistributions in binary form must reproduce the above copyright 13219820Sjeff * notice, this list of conditions and the following disclaimer in the 14219820Sjeff * documentation and/or other materials provided with the distribution. 15219820Sjeff * 3. Neither the name of the University nor the names of its contributors 16219820Sjeff * may be used to endorse or promote products derived from this software 17219820Sjeff * without specific prior written permission. 18219820Sjeff * 19219820Sjeff * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20219820Sjeff * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21219820Sjeff * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22219820Sjeff * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23219820Sjeff * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24219820Sjeff * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25219820Sjeff * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26219820Sjeff * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27219820Sjeff * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28219820Sjeff * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29271127Shselasky * SUCH DAMAGE. 30219820Sjeff * 31219820Sjeff * @(#)extern.h 8.2 (Berkeley) 4/1/94 32219820Sjeff */ 33219820Sjeff 34219820Sjeff#ifndef _EXTERN_H_ 35271127Shselasky#define _EXTERN_H_ 36271127Shselasky 37271127Shselaskytypedef struct { 38271127Shselasky char *p_end; /* pointer to NULL at end of path */ 39271127Shselasky char *target_end; /* pointer to end of target base */ 40271127Shselasky char p_path[MAXPATHLEN + 1]; /* pointer to the start of a path */ 41271127Shselasky} PATH_T; 42271127Shselasky 43219820Sjeffextern PATH_T to; 44271127Shselaskyextern uid_t myuid; 45271127Shselaskyextern int Rflag, rflag, Hflag, Lflag, Pflag, fflag, iflag, lflag, pflag, Nflag; 46271127Shselaskyextern mode_t myumask; 47271127Shselaskyextern sig_atomic_t pinfo; 48271127Shselasky 49271127Shselasky#include <sys/cdefs.h> 50271127Shselasky 51271127Shselasky__BEGIN_DECLS 52219820Sjeffint copy_fifo(struct stat *, int); 53219820Sjeffint copy_file(FTSENT *, int); 54219820Sjeffint copy_link(FTSENT *, int); 55219820Sjeffint copy_special(struct stat *, int); 56219820Sjeffint set_utimes(const char *, struct stat *); 57271127Shselaskyint setfile(struct stat *, int); 58271127Shselaskyint preserve_dir_acls(struct stat *, char *, char *); 59219820Sjeffint preserve_fd_acls(int, int); 60219820Sjeffvoid usage(void) __attribute__((__noreturn__)); 61219820Sjeff__END_DECLS 62 63#endif /* !_EXTERN_H_ */ 64