ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/libptytty/src/ptytty_conf.h
Revision: 1.20
Committed: Mon May 24 13:53:53 2021 UTC (5 years, 4 months ago) by sf-exg
Content type: text/plain
Branch: MAIN
Changes since 1.19: +5 -0 lines
Log Message:
Rename and document the macro to disable the C api

File Contents

# User Rev Content
1 root 1.2 /*
2 root 1.3 * This file contains a few tunables for libptytty. Normally there should
3     * be little reason to change this file. It is provided to suit rare or
4     * special cases only.
5     */
6    
7     /*
8 root 1.2 * Default mode to restore when releasing the PTS device. It is relaxed to be
9 root 1.1 * compatible with most systems, change it to a more secure value if your
10     * system supports it (0640 for example).
11     */
12 root 1.13 #ifndef RESTORE_TTY_MODE
13     # define RESTORE_TTY_MODE 0666
14     #endif
15 root 1.1
16     /*
17 sf-exg 1.20 * Define if you want to enable the C api.
18     */
19     #define PTYTTY_C_API 1
20    
21     /*
22 root 1.1 * Define if you want to use a separate process for pty/tty handling
23     * when running setuid/setgid. You need this when making it setuid/setgid.
24     */
25 root 1.13 #ifndef PTYTTY_HELPER
26     # define PTYTTY_HELPER 1
27     #endif
28 root 1.1
29 root 1.2 /*
30 root 1.18 * Define if you want to use a single helper process from multiple
31     * threads OR forked processes. Without it, the user is responsible for
32 sf-exg 1.19 * serialising all calls to libptytty functions. Having it disabled
33 root 1.18 * avoids some syscalls and reduces codesize, but unless you are really
34     * short on cpu or memory, it's not worth disabling.
35 root 1.6 */
36 root 1.13 #ifndef PTYTTY_REENTRANT
37     # define PTYTTY_REENTRANT 1
38     #endif
39 root 1.6
40     /*
41 root 1.5 * printf-like functions to be called on fatal conditions
42     * (must exit), or warning conditions (only print message)
43     */
44 sf-exg 1.12 #ifndef PTYTTY_FATAL
45 sf-exg 1.17 #define PTYTTY_FATAL(msg) do { PTYTTY_WARN (msg); _exit (1); } while (0)
46 sf-exg 1.12 #endif
47     #ifndef PTYTTY_WARN
48 sf-exg 1.17 #define PTYTTY_WARN(msg) fputs (msg, stderr)
49 sf-exg 1.12 #endif
50 root 1.8