Proper 2-arg/3-arg setenv checks (#15921).
[screen-lua.git] / src / acconfig.h
blob1660cb071518bc366276df3991b63681fcd647c7
1 /* Copyright (c) 1993-2000
2 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
3 * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
4 * Copyright (c) 1987 Oliver Laumann
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program (see the file COPYING); if not, write to the
18 * Free Software Foundation, Inc.,
19 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
21 ****************************************************************
22 * $Id$ FAU
29 /**********************************************************************
31 * User Configuration Section
35 * Maximum of simultaneously allowed windows per screen session.
37 #ifndef MAXWIN
38 # define MAXWIN 40
39 #endif
42 * Define SOCKDIR to be the directory to contain the named sockets
43 * screen creates. This should be in a common subdirectory, such as
44 * /usr/local or /tmp. It makes things a little more secure if you
45 * choose a directory which is not writable by everyone or where the
46 * "sticky" bit is on, but this isn't required.
47 * If SOCKDIR is not defined screen will put the named sockets in
48 * the user's home directory. Notice that this can cause you problems
49 * if some user's HOME directories are AFS- or NFS-mounted. Especially
50 * AFS is unlikely to support named sockets.
52 * Screen will name the subdirectories "S-$USER" (e.g /tmp/S-davison).
54 #undef SOCKDIR
57 * Define this if the SOCKDIR is not shared between hosts.
59 #define SOCKDIR_IS_LOCAL_TO_HOST
62 * Screen sources two startup files. First a global file with a path
63 * specified here, second your local $HOME/.screenrc
64 * Don't define this, if you don't want it.
66 #ifndef ETCSCREENRC
67 # define ETCSCREENRC "/usr/local/etc/screenrc"
68 #endif
71 * Screen can look for the environment variable $SYSSCREENRC and -if it
72 * exists- load the file specified in that variable as global screenrc.
73 * If you want to enable this feature, define ALLOW_SYSSCREENRC to one (1).
74 * Otherwise ETCSCREENRC is always loaded.
76 #define ALLOW_SYSSCREENRC 1
79 * Screen needs encoding files for the translation of utf8
80 * into some encodings, e.g. JIS, BIG5.
81 * Only needed if FONT, ENCODINGS and UTF8 are defined.
83 #ifndef SCREENENCODINGS
84 # define SCREENENCODINGS "/usr/local/lib/screen/encodings"
85 #endif
87 * Define CHECKLOGIN to force Screen users to enter their Unix password
88 * in addition to the screen password.
90 * Define NOSYSLOG if yo do not have logging facilities. Currently
91 * syslog() will be used to trace ``su'' commands only.
93 #define CHECKLOGIN 1
94 #undef NOSYSLOG
97 /*
98 * define PTYMODE if you do not like the default of 0622, which allows
99 * public write to your pty.
100 * define PTYGROUP to some numerical group-id if you do not want the
101 * tty to be in "your" group.
102 * Note, screen is unable to change mode or group of the pty if it
103 * is not installed with sufficient privilege. (e.g. set-uid-root)
104 * define PTYROFS if the /dev/pty devices are mounted on a read-only
105 * filesystem so screen should not even attempt to set mode or group
106 * even if running as root (e.g. on TiVo).
108 #undef PTYMODE
109 #undef PTYGROUP
110 #undef PTYROFS
113 * If screen is NOT installed set-uid root, screen can provide tty
114 * security by exclusively locking the ptys. While this keeps other
115 * users from opening your ptys, it also keeps your own subprocesses
116 * from being able to open /dev/tty. Define LOCKPTY to add this
117 * exclusive locking.
119 #undef LOCKPTY
122 * If you'd rather see the status line on the first line of your
123 * terminal rather than the last, define TOPSTAT.
125 #undef TOPSTAT
128 * define DETACH can detach a session. An absolute 'must'.
130 #define DETACH
133 * here come the erlangen extensions to screen:
134 * define LOCK if you want to use a lock program for a screenlock.
135 * define PASSWORD for secure reattach of your screen.
136 * define COPY_PASTE to use the famous hacker's treasure zoo.
137 * define POW_DETACH to have a detach_and_logout key (requires DETACH).
138 * define REMOTE_DETACH (-d option) to move screen between terminals.
139 * define AUTO_NUKE to enable Tim MacKenzies clear screen nuking
140 * define PSEUDOS to allow window input/output filtering
141 * define MULTI to allow multiple attaches.
142 * define MULTIUSER to allow other users attach to your session
143 * (if they are in the acl, of course)
144 * define MAPKEYS to include input keyboard translation.
145 * define FONT to support ISO2022/alternet charset support
146 * define COLOR to include ansi color support. This may expose
147 * a bug in x11r6-color-xterm.
148 * define DW_CHARS to include support for double-width character
149 * sets.
150 * define ENCODINGS to include support for encodings like euc or big5.
151 * Needs FONT to work.
152 * define UTF8 if you want support for UTF-8 encoding.
153 * Needs FONT and ENCODINGS to work.
154 * define COLORS16 if you want 16 colors.
155 * Needs COLOR to work.
156 * define BUILTIN_TELNET to add telnet support to screen.
157 * Syntax: screen //telnet host [port]
158 * define RXVT_OSC if you want support for rxvts special
159 * change fgcolor/bgcolor/bgpicture sequences
161 #undef SIMPLESCREEN
162 #ifndef SIMPLESCREEN
163 # define LOCK
164 # define PASSWORD
165 # define COPY_PASTE
166 # define REMOTE_DETACH
167 # define POW_DETACH
168 # define AUTO_NUKE
169 # define PSEUDOS
170 # define MULTI
171 # define MULTIUSER
172 # define MAPKEYS
173 # define COLOR
174 # define FONT
175 # define DW_CHARS
176 # define ENCODINGS
177 # define UTF8
178 # define COLORS16
179 # define ZMODEM
180 # define BLANKER_PRG
181 #endif /* SIMPLESCREEN */
183 #undef BUILTIN_TELNET
184 #undef RXVT_OSC
185 #undef COLORS256
189 * If you have a braille display you should define HAVE_BRAILLE.
190 * The code inside #ifdef HAVE_BRAILLE was contributed by Hadi Bargi
191 * Rangin (bargi@dots.physics.orst.edu).
192 * WARNING: this is more or less unsupported code, it may be full of
193 * bugs leading to security holes, enable at your own risk!
195 #undef HAVE_BRAILLE
199 * As error messages are mostly meaningless to the user, we
200 * try to throw out phrases that are somewhat more familiar
201 * to ...well, at least familiar to us NetHack players.
203 #ifndef NONETHACK
204 # define NETHACK
205 #endif /* NONETHACK */
208 * If screen is installed with permissions to update /etc/utmp (such
209 * as if it is installed set-uid root), define UTMPOK.
211 #define UTMPOK
213 /* Set LOGINDEFAULT to one (1)
214 * if you want entries added to /etc/utmp by default, else set it to
215 * zero (0).
216 * LOGINDEFAULT will be one (1) whenever LOGOUTOK is undefined!
218 #define LOGINDEFAULT 1
220 /* Set LOGOUTOK to one (1)
221 * if you want the user to be able to log her/his windows out.
222 * (Meaning: They are there, but not visible in /etc/utmp).
223 * Disabling this feature only makes sense if you have a secure /etc/utmp
224 * database.
225 * Negative examples: suns usually have a world writable utmp file,
226 * xterm will run perfectly without s-bit.
228 * If LOGOUTOK is undefined and UTMPOK is defined, all windows are
229 * initially and permanently logged in.
231 * Set CAREFULUTMP to one (1) if you want that users have at least one
232 * window per screen session logged in.
234 #define LOGOUTOK 1
235 #undef CAREFULUTMP
239 * If UTMPOK is defined and your system (incorrectly) counts logins by
240 * counting non-null entries in /etc/utmp (instead of counting non-null
241 * entries with no hostname that are not on a pseudo tty), define USRLIMIT
242 * to have screen put an upper-limit on the number of entries to write
243 * into /etc/utmp. This helps to keep you from exceeding a limited-user
244 * license.
246 #undef USRLIMIT
249 * both must be defined if you want to favor tcsendbreak over
250 * other calls to generate a break condition on serial lines.
251 * (Do not bother, if you are not using plain tty windows.)
253 #define POSIX_HAS_A_GOOD_TCSENDBREAK
254 #define SUNOS4_AND_WE_TRUST_TCSENDBREAK
257 * to lower the interrupt load on the host machine, you may want to
258 * adjust the VMIN and VTIME settings used for plain tty windows.
259 * See the termio(4) manual page (Non-Canonical Mode Input Processing)
260 * for details.
261 * if undefined, VMIN=1, VTIME=0 is used as a default - this gives you
262 * best user responsiveness, but highest interrupt frequency.
263 * (Do not bother, if you are not using plain tty windows.)
265 #define TTYVMIN 100
266 #define TTYVTIME 2
269 * looks like the above values are ignored by setting FNDELAY.
270 * This is default for all pty/ttys, you may disable it for
271 * ttys here. After playing with it for a while, one may find out
272 * that this feature may cause screen to lock up.
274 #ifdef bsdi
275 # define TTY_DISABLE_FNBLOCK /* select barfs without it ... */
276 #endif
280 * Some terminals, e.g. Wyse 120, use a bitfield to select attributes.
281 * This doesn't work with the standard so/ul/m? terminal entries,
282 * because they will cancel each other out.
283 * On TERMINFO machines, "sa" (sgr) may work. If you want screen
284 * to switch attributes only with sgr, define USE_SGR.
285 * This is *not* recomended, do this only if you must.
287 #undef USE_SGR
291 * Define USE_LOCALE if you want screen to use the locale names
292 * for the name of the month and day of the week.
294 #define USE_LOCALE
297 * Define USE_PAM if your system supports PAM (Pluggable Authentication
298 * Modules) and you want screen to use it instead of calling crypt().
299 * (You may also need to add -lpam to LIBS in the Makefile.)
301 #undef USE_PAM
304 * Define CHECK_SCREEN_W if you want screen to set TERM to screen-w
305 * if the terminal width is greater than 131 columns. No longer needed
306 * on modern systems which use $COLUMNS or the tty settings instead.
308 #undef CHECK_SCREEN_W
310 /**********************************************************************
312 * End of User Configuration Section
314 * Rest of this file is modified by 'configure'
315 * Change at your own risk!
320 * Some defines to identify special unix variants
322 #ifndef SVR4
323 #undef SVR4
324 #endif
326 /* #ifndef __osf__ */
327 #ifndef MIPS
328 #undef MIPS
329 #endif
330 /* #endif */
332 #ifndef OSX
333 #undef OSX
334 #endif
336 #ifndef ISC
337 #undef ISC
338 #endif
340 #ifndef sysV68
341 #undef sysV68
342 #endif
344 #ifndef _POSIX_SOURCE
345 #undef _POSIX_SOURCE
346 #endif
349 * Define POSIX if your system supports IEEE Std 1003.1-1988 (POSIX).
351 #undef POSIX
354 * Define BSDJOBS if you have BSD-style job control (both process
355 * groups and a tty that deals correctly with them).
357 #undef BSDJOBS
360 * Define TERMIO if you have struct termio instead of struct sgttyb.
361 * This is usually the case for SVID systems, where BSD uses sgttyb.
362 * POSIX systems should define this anyway, even though they use
363 * struct termios.
365 #undef TERMIO
368 * Define CYTERMIO if you have cyrillic termio modes.
370 #undef CYTERMIO
373 * Define TERMINFO if your machine emulates the termcap routines
374 * with the terminfo database.
375 * Thus the .screenrc file is parsed for
376 * the command 'terminfo' and not 'termcap'.
378 #undef TERMINFO
381 * If your library does not define ospeed, define this.
383 #undef NEED_OSPEED
386 * Define SYSV if your machine is SYSV complient (Sys V, HPUX, A/UX)
388 #ifndef SYSV
389 #undef SYSV
390 #endif
393 * Define SIGVOID if your signal handlers return void. On older
394 * systems, signal returns int, but on newer ones, it returns void.
396 #undef SIGVOID
399 * Define USESIGSET if you have sigset for BSD 4.1 reliable signals.
401 #undef USESIGSET
404 * Define SYSVSIGS if signal handlers must be reinstalled after
405 * they have been called.
407 #undef SYSVSIGS
410 * Define BSDWAIT if your system defines a 'union wait' in <sys/wait.h>
412 * Only allow BSDWAIT i.e. wait3 on nonposix systems, since
413 * posix implies wait(3) and waitpid(3). vdlinden@fwi.uva.nl
416 #ifndef POSIX
417 #undef BSDWAIT
418 #endif
421 * On RISCOS we prefer wait2() over wait3(). rouilj@sni-usa.com
423 #ifdef BSDWAIT
424 #undef USE_WAIT2
425 #endif
428 * Define HAVE_DIRENT_H if your system has <dirent.h> instead of
429 * <sys/dir.h>
431 #undef HAVE_DIRENT_H
434 * If your system has getutent(), pututline(), etc. to write to the
435 * utmp file, define GETUTENT.
437 #undef GETUTENT
440 * Define UTHOST if the utmp file has a host field.
442 #undef UTHOST
445 * Define if you have the utempter utmp helper program
447 #undef HAVE_UTEMPTER
450 * If ttyslot() breaks getlogin() by returning indexes to utmp entries
451 * of type DEAD_PROCESS, then our getlogin() replacement should be
452 * selected by defining BUGGYGETLOGIN.
454 #undef BUGGYGETLOGIN
457 * If your system has the calls setreuid() and setregid(),
458 * define HAVE_SETREUID. Otherwise screen will use a forked process to
459 * safely create output files without retaining any special privileges.
461 #undef HAVE_SETRESUID
462 #undef HAVE_SETREUID
465 * If your system supports BSD4.4's seteuid() and setegid(), define
466 * HAVE_SETEUID.
468 #undef HAVE_SETEUID
471 * If you want the "time" command to display the current load average
472 * define LOADAV. Maybe you must install screen with the needed
473 * privileges to read /dev/kmem.
474 * Note that NLIST_ stuff is only checked, when getloadavg() is not available.
476 #undef LOADAV
478 #undef LOADAV_NUM
479 #undef LOADAV_TYPE
480 #undef LOADAV_SCALE
481 #undef LOADAV_GETLOADAVG
482 #undef LOADAV_UNIX
483 #undef LOADAV_AVENRUN
484 #undef LOADAV_USE_NLIST64
486 #undef NLIST_DECLARED
487 #undef NLIST_STRUCT
488 #undef NLIST_NAME_UNION
491 * If your system has the new format /etc/ttys (like 4.3 BSD) and the
492 * getttyent(3) library functions, define GETTTYENT.
494 #undef GETTTYENT
497 * Define USEBCOPY if the bcopy/memcpy from your system's C library
498 * supports the overlapping of source and destination blocks. When
499 * undefined, screen uses its own (probably slower) version of bcopy().
501 * SYSV machines may have a working memcpy() -- Oh, this is
502 * quite unlikely. Tell me if you see one.
503 * "But then, memmove() should work, if at all available" he thought...
504 * Boing, never say "works everywhere" unless you checked SCO UNIX.
505 * Their memove fails the test in the configure script. Sigh. (Juergen)
507 #undef USEBCOPY
508 #undef USEMEMCPY
509 #undef USEMEMMOVE
512 * If your system has vsprintf() and requires the use of the macros in
513 * "varargs.h" to use functions with variable arguments,
514 * define USEVARARGS.
516 #undef USEVARARGS
519 * If your system has strerror() define this.
521 #undef HAVE_STRERROR
524 * If the select return value doesn't treat a descriptor that is
525 * usable for reading and writing as two hits, define SELECT_BROKEN.
527 #undef SELECT_BROKEN
530 * Define this if your system supports named pipes.
532 #undef NAMEDPIPE
535 * Define this if your system exits select() immediatly if a pipe is
536 * opened read-only and no writer has opened it.
538 #undef BROKEN_PIPE
541 * Define this if the unix-domain socket implementation doesn't
542 * create a socket in the filesystem.
544 #undef SOCK_NOT_IN_FS
547 * If your system has setenv() and unsetenv() define USESETENV
549 #undef USESETENV
552 * If setenv() takes 3 arguments sefine HAVE_SETENV_3
554 #undef HAVE_SETENV_3
557 * If setenv() takes 2 arguments sefine HAVE_SETENV_2
559 #undef HAVE_SETENV_2
562 * If your system does not come with a setenv()/putenv()/getenv()
563 * functions, you may bring in our own code by defining NEEDPUTENV.
565 #undef NEEDPUTENV
568 * If the passwords are stored in a shadow file and you want the
569 * builtin lock to work properly, define SHADOWPW.
571 #undef SHADOWPW
574 * If you are on a SYS V machine that restricts filename length to 14
575 * characters, you may need to enforce that by setting NAME_MAX to 14
577 #undef NAME_MAX /* KEEP_UNDEF_HERE override system value */
578 #undef NAME_MAX
581 * define HAVE_RENAME if your system has a rename() function
583 #undef HAVE_RENAME
586 * define HAVE__EXIT if your system has the _exit() call.
588 #undef HAVE__EXIT
591 * define HAVE_LSTAT if your system has symlinks and the lstat() call.
593 #undef HAVE_LSTAT
596 * define HAVE_UTIMES if your system has the utimes() call.
598 #undef HAVE_UTIMES
601 * define HAVE_FCHOWN if your system has the fchown() call.
603 #undef HAVE_FCHOWN
606 * define HAVE_FCHMOD if your system has the fchmod() call.
608 #undef HAVE_FCHMOD
611 * define HAVE_VSNPRINTF if your system has vsnprintf() (GNU lib).
613 #undef HAVE_VSNPRINTF
616 * define HAVE_GETCWD if your system has the getcwd() call.
618 #undef HAVE_GETCWD
621 * define HAVE_SETLOCALE if your system has the setlocale() call.
623 #undef HAVE_SETLOCALE
626 * define HAVE_STRFTIME if your system has the strftime() call.
628 #undef HAVE_STRFTIME
631 * define HAVE_NL_LANGINFO if your system has the nl_langinfo() call
632 * and <langinfo.h> defines CODESET.
634 #undef HAVE_NL_LANGINFO
637 * Newer versions of Solaris include fdwalk, which can greatly improve
638 * the startup time of screen; otherwise screen spends a lot of time
639 * closing file descriptors.
641 #undef HAVE_FDWALK
644 * define HAVE_DEV_PTC if you have a /dev/ptc character special
645 * device.
647 #undef HAVE_DEV_PTC
650 * define HAVE_SVR4_PTYS if you have a /dev/ptmx character special
651 * device and support the ptsname(), grantpt(), unlockpt() functions.
653 #undef HAVE_SVR4_PTYS
656 * define HAVE_GETPT if you have the getpt() function.
658 #undef HAVE_GETPT
661 * define HAVE_OPENPTY if your system has the openpty() call.
663 #undef HAVE_OPENPTY
666 * define PTYRANGE0 and or PTYRANGE1 if you want to adapt screen
667 * to unusual environments. E.g. For SunOs the defaults are "qpr" and
668 * "0123456789abcdef". For SunOs 4.1.2
669 * #define PTYRANGE0 "pqrstuvwxyzPQRST"
670 * is recommended by Dan Jacobson.
672 #undef PTYRANGE0
673 #undef PTYRANGE1