Annotation of src/usr.bin/rdist/os-openbsd.h, Revision 1.16
1.1 dm 1: /*
2: * Copyright (c) 1993 Michael A. Cooper
3: * Copyright (c) 1993 Regents of the University of California.
4: * All rights reserved.
5: *
6: * Redistribution and use in source and binary forms, with or without
7: * modification, are permitted provided that the following conditions
8: * are met:
9: * 1. Redistributions of source code must retain the above copyright
10: * notice, this list of conditions and the following disclaimer.
11: * 2. Redistributions in binary form must reproduce the above copyright
12: * notice, this list of conditions and the following disclaimer in the
13: * documentation and/or other materials provided with the distribution.
1.13 millert 14: * 3. Neither the name of the University nor the names of its contributors
1.1 dm 15: * may be used to endorse or promote products derived from this software
16: * without specific prior written permission.
17: *
18: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28: * SUCH DAMAGE.
29: */
30:
31: /*
1.16 ! guenther 32: * $OpenBSD: os-openbsd.h,v 1.15 2014/07/05 06:18:58 guenther Exp $
1.1 dm 33: */
34:
35: /*
1.12 millert 36: * OpenBSD os-*.h file
1.1 dm 37: */
38:
39: /*
1.10 millert 40: * NOTE: OpenBSD uses 64-bit file size semantics, and so you
1.1 dm 41: * must be careful when using varargs-type functions
42: * like the *printf family when printing elements which
43: * might be 64-bits (such as stat->st_size from stat.h).
44: */
45:
46: /*
47: * Set process args to messages that show up when running ps(1)
48: *
1.10 millert 49: * OpenBSD has setproctitle() in libc so we don't want to use rdist's.
1.1 dm 50: */
1.10 millert 51: #define HAVE_SETPROCTITLE
1.1 dm 52:
53: /*
54: * Define the type of directory routines your system has.
55: */
56: #define DIR_TYPE DIR_DIRENT
57:
58: /*
59: * Determine what routines we have to get filesystem info.
60: */
61: #define FSI_TYPE FSI_GETFSSTAT
62:
63: /*
64: * Select the type of statfs() system call (if any).
65: */
1.12 millert 66: #define STATFS_TYPE STATFS_44BSD
67:
68: /*
69: * Use f_fstypename in struct statfs.
70: */
71: #define HAVE_FSTYPENAME 1
1.1 dm 72:
73: /*
74: * UID argument type for chown()
75: */
76: typedef uid_t CHOWN_UID_T;
77:
78: /*
79: * GID argument type for chown()
80: */
81: typedef gid_t CHOWN_GID_T;
82:
83: /*
84: * Our types, usually these are uid_t and gid_t.
85: */
86: typedef uid_t UID_T; /* Must be signed */
87: typedef gid_t GID_T; /* Must be signed */
88:
89: /*
90: * Generic pointer, used by memcpy, malloc, etc. Usually char or void.
91: */
92: typedef void POINTER;
93:
94: /*
95: * Type of set file time function available
96: */
97: #define SETFTIME_TYPE SETFTIME_UTIMES
98:
99: /*
100: * Things we have
101: */
102: #define HAVE_FCHOWN /* Have fchown() */
1.12 millert 103: #define HAVE_LCHOWN /* Have lchown() */
1.1 dm 104: #define HAVE_FCHMOD /* Have fchmod() */
1.12 millert 105: #define HAVE_FTRUNCATE /* Have ftruncate() */
1.1 dm 106: #define HAVE_SAVED_IDS /* Have POSIX style saved [ug]id's */
1.12 millert 107: #define HAVE_VIS /* Have vis() */
108: #define HAVE_VSNPRINTF /* Have vsnprintf() */
1.1 dm 109: #define POSIX_SIGNALS /* Have POSIX signals */
1.10 millert 110: #define HAVE_PATHS_H /* Have <paths.h> */
1.1 dm 111:
112: /*
1.12 millert 113: * Path to old-style rdist command
114: */
115: #define _PATH_OLDRDIST "/usr/bin/oldrdist"
116:
117: /*
118: * Path to remote shell command
1.1 dm 119: */
1.12 millert 120: #define _PATH_REMSH "/usr/bin/ssh"
1.1 dm 121:
122: /*
1.10 millert 123: * Use the system <paths.h>
1.8 millert 124: */
1.10 millert 125: #define PATHS_H <paths.h>