home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / gnu / utils / bug / 2044 < prev    next >
Encoding:
Text File  |  1992-11-11  |  11.5 KB  |  387 lines

  1. Newsgroups: gnu.utils.bug
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!iggy.GW.Vitalink.COM!cs.widener.edu!eff!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!uk.ac.swan.SUnacm!dick
  3. From: dick@uk.ac.swan.SUnacm (Dick Porter, SUCS Admin)
  4. Subject: uptime bug in screen-3.2b
  5. Message-ID: <9146.9211111751@sunacm.swan.ac.uk>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Wed, 11 Nov 1992 17:51:02 GMT
  10. Approved: bug-gnu-utils@prep.ai.mit.edu
  11. Lines: 374
  12.  
  13. to get the uptime display working properly, I had to make a slight alteration
  14. to getloadavg.c:
  15.  
  16. the conditional section delimited by 
  17.  
  18. #ifndef FSCALE
  19. #endif
  20.  
  21. contained the definition of LDAV_CVT(n)  (((double) (n)) / FSCALE)
  22.  
  23. I moved the line "#endif /* Not FSCALE.  */ to above the LDAV_CVT define.
  24.  
  25. The diff (not very informative though) :
  26.  
  27. 119a120,121
  28. > #endif    /* Not FSCALE.  */ /* RHP mod, moved from 4 lines down */
  29. 123,124d124
  30. < #endif    /* Not FSCALE.  */
  31.  
  32. The hardware (output from uname -a) :
  33.  
  34. SunOS sunacm 4.1.1 1 sun3
  35.  
  36. The config.h file :
  37.  
  38. /* config.h.  Generated automatically by configure.  */
  39. /* Template configuration file for screen.  -*- C -*-
  40.  * Copyright (c) 1991
  41.  *      Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
  42.  *      Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
  43.  * Copyright (c) 1987 Oliver Laumann
  44.  *
  45.  * This program is free software; you can redistribute it and/or modify
  46.  * it under the terms of the GNU General Public License as published by
  47.  * the Free Software Foundation; either version 1, or (at your option)
  48.  * any later version.
  49.  *
  50.  * This program is distributed in the hope that it will be useful,
  51.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  52.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  53.  * GNU General Public License for more details.
  54.  *
  55.  * You should have received a copy of the GNU General Public License
  56.  * along with this program (see the file COPYING); if not, write to the
  57.  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  58.  *
  59.  * Noteworthy contributors to screen's design and implementation:
  60.  *    Wayne Davison (davison@borland.com)
  61.  *    Patrick Wolfe (pat@kai.com, kailand!pat)
  62.  *    Bart Schaefer (schaefer@cse.ogi.edu)
  63.  *    Nathan Glasser (nathan@brokaw.lcs.mit.edu)
  64.  *    Larry W. Virden (lwv27%cas.BITNET@CUNYVM.CUNY.Edu)
  65.  *    Howard Chu (hyc@hanauma.jpl.nasa.gov)
  66.  *    Tim MacKenzie (tym@dibbler.cs.monash.edu.au)
  67.  *    Markku Jarvinen (mta@{cc,cs,ee}.tut.fi)
  68.  *    Marc Boucher (marc@CAM.ORG)
  69.  *
  70.  ****************************************************************
  71.  * $Id: config.all,v 1.2 92/02/03 02:30:36 jnweiger Exp $ FAU
  72.  */
  73.  
  74. /*
  75.  * This file has two parts:
  76.  * 1.  Site configuration.  Preferences that depend on your tastes
  77.  *     or on details of your individual installation.
  78.  *     You should check these values by hand.
  79.  *
  80.  * 2.  O.S. configuration.  Variables that depend on what kind of
  81.  *     operating system you are running.
  82.  *     The configure script tries to set these correctly automatically
  83.  *     when it creates config.h from config.h.in.
  84.  *     If it messes up, you can set them by hand.
  85.  */
  86.  
  87.  
  88. /*
  89.  *        Site Configuration Section
  90.  */
  91.  
  92.  
  93. /*
  94.  * First, decide whether to install screen set-uid to root.
  95.  * This isn't necessary to use screen, but it allows the pseudo-ttys
  96.  * to be set to their proper owner (for security purposes), /etc/utmp to be
  97.  * updated, and /dev/kmem to be accessed to read the load average values.
  98.  *
  99.  * Failing to install it suid root (e.g., if you fear a trojan horse) doesn't
  100.  * have any major disadvantages, except that w(1) and some other utilities
  101.  * will display only "screen" as the current process, and the pseudo ttys
  102.  * (ptys) used for the virtual terminals won't have their owners set.  Screen
  103.  * can provide you some pty security by opening the ptys exclusively, but
  104.  * this has the unfortunate side-effect of keeping your own subprocesses from
  105.  * being able to open /dev/tty.
  106.  *
  107.  * An alternative to installing screen set-uid root is to install it set-gid
  108.  * utmp (with the file /etc/utmp installed to be group-utmp writable) or
  109.  * set-gid kmem (with /dev/kmem set to be group-kmem readable) or some other
  110.  * custom group to give you both.  The final alternative is to omit /etc/utmp
  111.  * updating and the /dev/kmem reading (see the following defines) and simply
  112.  * run screen as a regular program -- its major functions will be unaffected.
  113.  *
  114.  * If screen is going to be installed set-uid root, you MUST define SUIDROOT.
  115.  */
  116. #define SUIDROOT
  117.  
  118. /*
  119.  * If screen is installed with permissions to update /etc/utmp (such as if
  120.  * it is installed set-uid root), define UTMPOK.  Set LOGINDEFAULT to one (1)
  121.  * if you want entries added to /etc/utmp by default, else set it to zero (0).
  122.  */
  123. #define UTMPOK
  124. #define LOGINDEFAULT    1
  125.  
  126. /*
  127.  * If UTMPOK is defined and your system (incorrectly) counts logins by
  128.  * counting non-null entries in /etc/utmp (instead of counting non-null
  129.  * entries with no hostname that are not on a pseudo tty), define USRLIMIT
  130.  * to have screen put an upper-limit on the number of entries to write
  131.  * into /etc/utmp.  This helps to keep you from exceeding a limited-user
  132.  * license.
  133.  */
  134. #undef USRLIMIT
  135.  
  136. /*
  137.  * If screen is NOT installed set-uid root, screen can provide tty security
  138.  * by exclusively locking the ptys.  While this keeps other users from
  139.  * opening your ptys, it also keeps your own subprocesses from being able
  140.  * to open /dev/tty.  Define LOCKPTY to add this exclusive locking.
  141.  */
  142. #undef LOCKPTY
  143.  
  144. /*
  145.  * If your version of NFS supports named sockets and you install screen
  146.  * suid root, you may need to define NFS_HACK for screen to be able to
  147.  * open the sockets.
  148.  */
  149. #undef NFS_HACK
  150.  
  151. /*
  152.  * By default screen will create a directory named ".screen" in the user's
  153.  * HOME directory to contain the named sockets.  If this causes you problems
  154.  * (e.g., some user's HOME directories are NFS-mounted and don't support
  155.  * named sockets) you can have screen create the socket directories in a
  156.  * common subdirectory, such as /tmp or /usr/tmp.  It makes things a little
  157.  * more secure if you choose a directory where the "sticky" bit is on, but
  158.  * this isn't required.  Screen will name the subdirectories "S-$USER"
  159.  * (e.g /tmp/S-davison).
  160.  * Do not define TMPTEST unless it's for debugging purpose.
  161.  * If you want to have your socket directory in "/tmp/screens" then
  162.  * define LOCALSOCKDIR and change the definition of SOCKDIR below.
  163.  */
  164. #define LOCALSOCKDIR
  165.  
  166. #ifdef LOCALSOCKDIR
  167. # ifndef TMPTEST
  168. #  define SOCKDIR "/tmp/screens"
  169. # else
  170. #  define SOCKDIR "/tmp/testscreens"
  171. # endif
  172. #endif
  173.  
  174. /*
  175.  * If you'd rather see the status line on the first line of your
  176.  * terminal rather than the last, define TOPSTAT.
  177.  * This should really be screenrc-settable, not a compile option.
  178.  */
  179. #undef TOPSTAT
  180.  
  181. /*
  182.  * define LOCK if you want to use a lock program for a screenlock.
  183.  * define PASSWORD for secure reattach of your screen.
  184.  * define COPY_PASTE to use the famous hacker's treasure zoo.
  185.  * define POW_DETACH to have a detach_and_logout key.
  186.  * define REMOTE_DETACH (-d option) to move screen between terminals.
  187.  */
  188. #define LOCK
  189. #define PASSWORD
  190. #define COPY_PASTE
  191. #define REMOTE_DETACH
  192. #define POW_DETACH
  193.  
  194. /*
  195.  * As error messages are mostly meaningless to the user, we
  196.  * try to throw out phrases that are somewhat more familiar
  197.  * to ...well, at least familiar to us NetHack players.
  198.  */
  199. #define NETHACK
  200.  
  201.  
  202. /*
  203.  *        O.S. Configuration Section
  204.  *        configure defines these symbols if appropriate
  205.  */
  206.  
  207.  
  208. /*
  209.  * Define POSIX if your system supports IEEE Std 1003.1-1988 (POSIX).
  210.  */
  211. #define POSIX 1
  212.  
  213. /*
  214.  * Define BSDJOBS if you have BSD-style job control (both process
  215.  * groups and a tty that deals correctly with them).
  216.  */
  217. #define BSDJOBS 1
  218.  
  219. /*
  220.  * Define TERMIO if you have struct termio instead of struct sgttyb.
  221.  * This is usually the case for SVID systems, whereas BSD uses sgttyb.
  222.  * POSIX systems should define this anyway, even though they use
  223.  * struct termios.
  224.  */
  225. #define TERMIO 1
  226.  
  227. /*
  228.  * Define TERMINFO if your machine emulates the termcap routines
  229.  * with the terminfo database.
  230.  * Thus the .screenrc file is parsed for
  231.  * the command 'terminfo' and not 'termcap'.
  232.  */
  233. #undef TERMINFO
  234.  
  235. /*
  236.  * Define SYSV if your machine is SYSV complient (Sys V, HPUX, A/UX)
  237.  */
  238. #undef SYSV
  239.  
  240. /*
  241.  * Define SIGVOID if your signal handlers return void.  On older
  242.  * systems, they return int, but on newer ones, they return void.
  243.  */
  244. #define SIGVOID 1
  245.  
  246. /*
  247.  * Define DIRENT if your system has <dirent.h> instead of <sys/dir.h>
  248.  */
  249. #define DIRENT 1
  250.  
  251. /*
  252.  * If your system has getutent(), pututline(), etc. to write to the
  253.  * utmp file, define GETUTENT.
  254.  */
  255. #undef GETUTENT
  256.  
  257. /*
  258.  * Define UTHOST if the utmp file has a host field.
  259.  */
  260. #define UTHOST 1
  261.  
  262. /*
  263.  * If ttyslot() breaks getlogin() by returning indexes to utmp entries of
  264.  * type DEAD_PROCESS, then our getlogin() replacement should be selected by
  265.  * defining BUGGYGETLOGIN.  This is only known to happen on SVR4.
  266.  * This is only used if UTMPOK is defined.
  267.  */
  268. #undef BUGGYGETLOGIN
  269.  
  270. /*
  271.  * If your system does not have the calls setreuid() and setregid(), define
  272.  * NOREUID to force screen to use a forked process to safely create output
  273.  * files without retaining any special privileges.  (Output logging will be
  274.  * disabled, however.)
  275.  */
  276. #undef NOREUID
  277.  
  278. /*
  279.  * If your system has the new format /etc/ttys (like 4.3 BSD) and the
  280.  * getttyent(3) library functions, define GETTTYENT.
  281.  */
  282. #define GETTTYENT 1
  283.  
  284. /*
  285.  * Define USEBCOPY if the bcopy() from your system's C library supports the
  286.  * overlapping of source and destination blocks.  When undefined, screen
  287.  * uses its own (probably slower) version of bcopy().
  288.  */
  289. #undef USEBCOPY
  290.  
  291. /*
  292.  * If your system has vsprintf() and requires the use of the macros in
  293.  * <varargs.h> to use functions with variable arguments, define USEVARARGS.
  294.  */
  295. #define USEVARARGS 1
  296.  
  297. /*
  298.  * Define this if your system supports named pipes
  299.  * instead of sockets.
  300.  */
  301. #undef NAMEDPIPE
  302.  
  303. /*
  304.  * if your system does not come with a putenv()/getenv() functions, 
  305.  * you may bring in our own code by defining NEEDSETENV *and* adding 
  306.  * putenv.o to OFILES in your Makefile.
  307.  */
  308. #undef NEEDSETENV
  309.  
  310. /*
  311.  * Define if you have shadow passwords and <shadow.h>.
  312.  */
  313. #undef SHADOWPW
  314.  
  315. /*
  316.  * Define if you are not SYSV, POSIX, apollo, or sysV68,
  317.  * yet your headers define pid_t.
  318.  */
  319. #define PID_T_DEFINED 1
  320.  
  321. /*
  322.  * Define if your headers define sig_t.
  323.  */
  324. #undef SIG_T_DEFINED
  325.  
  326. /*
  327.  * Define if you have nlist.h.  For getting the load average.
  328.  */
  329. #define NLIST_STRUCT 1
  330.  
  331. /*
  332.  * Define each of these if the appropriate function is declared in
  333.  * your system header files.
  334.  */
  335. #undef CRYPT_DECLARED
  336. #undef GETHOSTNAME_DECLARED
  337. #undef KILLSTUFF_DECLARED /* kill and maybe killpg */
  338. #undef MEMFUNCS_DECLARED /* bzero, bcopy or memset */
  339. #undef MKNOD_DECLARED /* in sys/stat.h */
  340. #undef NLIST_DECLARED
  341. #undef PUTENV_DECLARED
  342. #undef REUID_DECLARED /* setres?[ug]id */
  343. #define SETPGID_DECLARED 1 /* in unistd.h */
  344. #undef VPRNT_DECLARED /* vsprintf */
  345. #undef WAITSTUFF_DECLARED /* wait3 */
  346.  
  347. /*
  348.  * If you are on a SYS V machine that restricts filename length to 14 
  349.  * characters, you may need to enforce that by defining this to 14.
  350.  */
  351. #ifndef NAME_MAX
  352. #undef NAME_MAX
  353. #endif
  354.  
  355. /*
  356.  * The characters to try when finding pty names to open,
  357.  * on some types of systems.
  358.  * Try each char in PTY_FIRST_CHARS followed by each char in
  359.  * PTY_SECOND_CHARS in succession until finding a free pty.
  360.  */
  361. #ifdef MIPS
  362. #define PTY_FIRST_CHARS "zyxwvutsrqp"
  363. #endif
  364.  
  365. #ifdef hpux
  366. #define PTY_FIRST_CHARS "pqrstuvw"
  367. #endif
  368.  
  369. #ifdef sun
  370. #define PTY_FIRST_CHARS "qprstuvwxyzPQRST"
  371. #endif
  372.  
  373. #ifndef PTY_FIRST_CHARS
  374. #define PTY_FIRST_CHARS "qpr"
  375. #endif
  376.  
  377. #ifndef PTY_SECOND_CHARS
  378. #define PTY_SECOND_CHARS "0123456789abcdef"
  379. #endif
  380.  
  381. Hoping this is useful
  382.  
  383. - Dick Porter
  384.  
  385.