home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / public_html / ckuins.txt.~1~ < prev    next >
Text File  |  2008-05-19  |  173KB  |  3,513 lines

  1.  
  2.    [ [1]Home ]   [ [2]Kermit 95 ]   [ [3]C-kermit ]   [ [4]Scripts ]
  3.    [ [5]Current ]   [ [6]New ]   [ [7]FAQ ]   [ [8]Support ]
  4.  
  5. C-Kermit 8.0 Unix Installation Instructions
  6.  
  7.    [ [9]Contents ] [ [10]C-Kermit ] [ [11]Kermit Home ]
  8.  
  9.    Frank da Cruz
  10.    The Kermit Project
  11.    Columbia University
  12.  
  13.       As of C-Kermit version: 8.0.211, 10 April 2004
  14.       This file last updated: Thu Oct 5 15:06:34 2006 (New York City time)
  15.  
  16.    IF YOU ARE READING A PLAIN-TEXT version of this document, note that
  17.    this file is a plain-text dump of a Web page. You can visit the
  18.    original (and possibly more up-to-date) Web page here:
  19.  
  20. [12]http://www.columbia.edu/kermit/ckuins.html
  21.   ___________________________________________________________________________
  22.  
  23. CONTENTS
  24.  
  25.      [13]OVERVIEW
  26.  
  27.     1. [14]INTERNET QUICK START
  28.     2. [15]INSTALLING FROM PACKAGES
  29.     3. [16]INSTALLING PREBUILT BINARIES
  30.     4. [17]BUILDING FROM SOURCE CODE
  31.     5. [18]INSTALLING THE KERMIT FILES
  32.     6. [19]INSTALLING UNIX C-KERMIT FROM DOS-FORMAT DISKETTES
  33.     7. [20]CHECKING THE RESULTS
  34.     8. [21]REDUCING THE SIZE OF THE EXECUTABLE PROGRAM IMAGE
  35.     9. [22]UNIX VERSIONS
  36.    10. [23]DIALING OUT AND COORDINATING WITH UUCP
  37.    11. [24]RUNNING UNIX C-KERMIT SETUID OR SETGID
  38.    12. [25]CONFIGURING UNIX WORKSTATIONS
  39.    13. [26]BIZARRE BEHAVIOR AT RUNTIME
  40.    14. [27]CRASHES AND CORE DUMPS
  41.    15. [28]SYSLOGGING
  42.    16. [29]BUILDING SECURE VERSIONS OF C-KERMIT 8.0
  43.    17. [30]INSTALLING C-KERMIT AS AN SSH SERVER SUBSYSTEM
  44.   ___________________________________________________________________________
  45.  
  46. OVERVIEW
  47.  
  48.    [ [31]Top ] [ [32]Contents ] [ [33]Next ]
  49.  
  50.      WARNING: This document contains notes that have been accumulating
  51.      since the early 1980s. Many of the products and Unix versions
  52.      mentioned here have not been heard of in a long while, but that does
  53.      not necessarily mean they are not still running in some obscure
  54.      nook.
  55.  
  56.    This file contains Unix-specific information. A lot of it. Unlike most
  57.    other packages, C-Kermit tries very hard to be portable to every Unix
  58.    variety (and every release of each one) known to exist, including many
  59.    that are quite old, as well as to other platforms like VMS, AOS/VS,
  60.    VOS, OS-9, the BeBox, the Amiga, etc.
  61.  
  62.    Since C-Kermit gets so deeply into the file system, i/o system, and
  63.    other areas that differ radically from one Unix platform to the next,
  64.    this means that a lot can go wrong when you try to install C-Kermit on
  65.    (for example) a new release of a particular variety of Unix, in which
  66.    certain things might have changed that C-Kermit depended upon.
  67.  
  68.    This file concentrates on installation. For a description of general
  69.    configuration options for C-Kermit, please read the [34]Configurations
  70.    Options document. For troubleshooting after installation, see the
  71.    [35]General Hints and Tips and [36]Unix-Specific Hints and Tips
  72.    documents. The latter, in particular, contains lots of information on
  73.    lots of specific Unix platforms. If you want to work on the source
  74.    code, see the [37]C-Kermit Program Logic Manual
  75.  
  76.    You may install C-Kermit:
  77.  
  78.      * From an "[38]install package", if one is available.
  79.      * As a [39]prebuilt binary, if available, plus accompanying text
  80.        files.
  81.      * By building from [40]source code.
  82.   ___________________________________________________________________________
  83.  
  84. 1. INTERNET QUICK START
  85.  
  86.    [ [41]Top ] [ [42]Contents ] [ [43]Next ] [ [44]Previous ]
  87.  
  88.    If your Unix computer is on the Internet and it has a C compiler,
  89.    here's how to download, build, and install C-Kermit directly from the
  90.    "tarballs" or Zip archives:
  91.  
  92.     1. Make a fresh directory and cd to it.
  93.     2. Download the C-Kermit source code:
  94.        [45]ftp://kermit.columbia.edu/kermit/archives/cku211.tar.Z
  95.        (compress format) or
  96.        [46]ftp://kermit.columbia.edu/kermit/archives/cku211.tar.gz (gunzip
  97.        format).
  98.     3. Uncompress the compressed tar file with "uncompress" or "gunzip",
  99.        according to which type of compressed file you downloaded. (If you
  100.        don't understand this, you could download a (much larger)
  101.        uncompressed tar archive directly:
  102.        [47]ftp://kermit.columbia.edu/kermit/archives/cku211.tar
  103.     4. Now type "tar xvf cku211.tar" to unpack the individual files from
  104.        the tar archive.
  105.     5. Type "rm cku211.tar" to get rid of the tar archive, which is no
  106.        longer needed.
  107.     6. Read the comments at the top of the makefile to find out which
  108.        target to use and then type the appropriate "make" command, such as
  109.        "make linux", "make solaris8", etc.
  110.     7. This produces a binary in your current directory called "wermit".
  111.        Start it by typing "./wermit" and [48]try it out to make sure it
  112.        works. Then read [49]Section 5 for how to install it, or simply
  113.        copy the wermit binary to the desired public directory, rename it
  114.        to kermit, and give it the needed permissions (and, if it is going
  115.        to be used to dial out, give it the same group and owner and
  116.        permissions as the cu, tip, or minicom program).
  117.  
  118.    For secure installations, see [50]Sections 5 and [51]16.
  119.   ___________________________________________________________________________
  120.  
  121. 2. INSTALLING FROM PACKAGES
  122.  
  123.    [ [52]Top ] [ [53]Contents ] [ [54]Next ] [ [55]Previous ]
  124.  
  125.    Various Unix varieties -- Linux, Solaris, AIX, etc -- now incorporate
  126.    the idea of "install packages", and many users expect to find all new
  127.    applications in this format. A selection of install packages might be
  128.    available for any given release of C-Kermit, but there is a tradeoff
  129.    between convenience and safety. Unix presents several notable problems
  130.    to the builder of install packages:
  131.  
  132.     a. Since C-Kermit is portable to many non-Unix platforms (VMS, VOS,
  133.        AOS/VS, etc), some of the files in the C-Kermit distribution do not
  134.        fit into the Unix application model. In particular, C-Kermit
  135.        includes some plain text files (described in [56]Section 5) and
  136.        Unix has no standard place to put such files. Typical Unix package
  137.        managers do not allow for them. Where should they go, and how will
  138.        the user know where to find them?
  139.     b. Installation of any program that will be used to make modem calls
  140.        requires some important decisions from the installer regarding
  141.        security and privilege.
  142.  
  143.    Item (b) is discussed at length in [57]Sections 10 and [58]11 of this
  144.    document, but the package-related aspects are also given here. The
  145.    basic problem is that Unix dialout devices and the UUCP "lock files"
  146.    that regulate contention for them (described in [59]Section 10) are
  147.    usually protected against "world". Therefore, the install procedure
  148.    must either run as root in order to give the Kermit binary the required
  149.    permissions, group, and/or owner, or else the dialout devices and
  150.    associated directories must be open for group or world reading and
  151.    writing. Otherwise, the Kermit program just installed WILL NOT WORK for
  152.    dialing out.
  153.  
  154.    Thus, a well-crafted installation procedure should present the options
  155.    and allow the installer to choose the method, if any, for regulating
  156.    access to the dialout devices:
  157.  
  158.     a. Check the permissions of the lockfile directory and the dialout
  159.        devices. If they do not allow group or world R/W access, then:
  160.     b. "Your UUCP lockfile directory and/or dialout devices require
  161.        privilege to access. You must either change their permissions or
  162.        install Kermit with privileges."
  163.     c. "If you wish to install Kermit with privileges, it will be given
  164.        the same owner, group, and permissions as the cu program so it can
  165.        use the dialout devices." (This is increasingly problematic as some
  166.        newer Unix systems like Mac OS X don't have a cu program, or even a
  167.        serial port!)
  168.     d. If they choose (c) but the user is not root, give a message that
  169.        the install procedure can be run only by root and then quit.
  170.  
  171.    It should go without saying, of course, that any binaries that are to
  172.    be included in an install package should be built fresh on the exact
  173.    platform (e.g. Red Hat 8.0 on Intel) for which the package is targeted;
  174.    prebuilt binaries ([60]next section) from other sites are likely to
  175.    have library mismatches. [61]CLICK HERE for more about building
  176.    C-Kermit install packages.
  177.  
  178.    The Kermit Project does not have the resources or the expertise to make
  179.    install packages for every platform. Most install packages, therefore,
  180.    are contributed by others, and they do not necessarily follow the
  181.    guidelines given above. Pay attention to what they do.
  182.  
  183.    If you are an end user who has obtained a C-Kermit install package for
  184.    a particular platform, you should be aware that some additional steps
  185.    might needed if you want to use Kermit to dial out. Read [62]Section 10
  186.    for details.
  187.   ___________________________________________________________________________
  188.  
  189. 3. INSTALLING PREBUILT BINARIES
  190.  
  191.    [ [63]Top ] [ [64]Contents ] [ [65]Next ] [ [66]Previous ]
  192.  
  193.    Hundreds of prebuilt C-Kermit binaries are available on the CDROM in
  194.    the BINARY tree [NOTE: The C-Kermit CDROM is still for version 7.0],
  195.    and at our ftp site in the [67]kermit/bin area (with names starting
  196.    with "ck"), also accessible on the [68]C-Kermit website. To install a
  197.    prebuilt binary:
  198.  
  199.     a. Rename the binary to "wermit".
  200.     b. Make sure it works; some tests are suggested in [69]Section 7.
  201.     c. Follow steps (b) through (e) in [70]Section 4.
  202.     d. Install related files as described in [71]Section 5.
  203.  
  204.    But first... Please heed the following cautions:
  205.  
  206.     a. If you pick the wrong binary, it won't work (or worse).
  207.     b. Even when you pick the appropriate binary, it still might not work
  208.        due to shared-library mismatches, etc. (see [72]Section 4.0).
  209.     c. Don't expect a binary built on or for version n of your OS to work
  210.        on version n - x (where x > 0). However, it is usually safe to run
  211.        a binary built on (or for) an older OS release on a newer one.
  212.  
  213.    Therefore, it is better to build your own binary from source code
  214.    ([73]next section) if you can. But since it is increasingly common for
  215.    Unix systems (not to mention VMS and other OS's) to be delivered
  216.    without C compilers, it is often impractical. In such cases, try the
  217.    most appropriate prebuilt binary or binaries, and if none of them work,
  218.    [74]contact us and we'll see what we can do to help.
  219.   ___________________________________________________________________________
  220.  
  221. 4. BUILDING FROM SOURCE CODE
  222.  
  223.    [ [75]Top ] [ [76]Contents ] [ [77]Next ] [ [78]Previous ]
  224.  
  225.    Also see: [79]Section 8 and [80]Section 9.
  226.  
  227.    C-Kermit is designed to be built and used on as many platforms as
  228.    possible: Unix and non-Unix, old and new (and ancient), ANSI C and K&R.
  229.    The Unix version does not use or depend on any external tools for
  230.    building except the "make" utility, the C compiler, the linker, and the
  231.    shell. It does not use any external automated configuration tools such
  232.    as configure, autoconf, automake, libtool, etc. Everything in C-Kermit
  233.    has been built by hand based on direct experience or reports or
  234.    contributions from users of each platform.
  235.  
  236.    The [81]C-Kermit makefile contains the rules for building the program
  237.    for each of the hundreds of different kinds of Unix systems that
  238.    C-Kermit attempts to support. It covers all Unix variations since about
  239.    1980 -- pretty much everything after Unix V6. Separate makefiles are
  240.    used for [82]Plan 9 and [83]2.x BSD.
  241.  
  242.    Prerequisites:
  243.  
  244.      * The C compiler, linker, and make program must be installed.
  245.      * The C libraries and header files must be installed (*).
  246.      * The C-Kermit source code and makefile in your current directory.
  247.      * The C-Kermit text files ([84]Section 5) in your current directory.
  248.  
  249.      * This is becoming problematic in this new age of "selective
  250.        installs" e.g. of Linux packages. C-Kermit builds will often fail
  251.        because replying "no" to some obscure Linux installation option
  252.        will result in missing libraries or header files. Ditto on
  253.        platforms like AIX and Solaris that don't come with C compilers,
  254.        and then later have gcc installed, but are still missing crucial
  255.        libraries, like libm (math).
  256.  
  257.    Plus:
  258.  
  259.      * For TCP/IP networking support, the sockets library and related
  260.        header files must be installed.
  261.      * The math library for floating-point arithmetic support (can be
  262.        deselected by adding -DNOFLOAT to CFLAGS and removing -lm from
  263.        LIBS).
  264.      * Many and varied security libraries for building a secure version
  265.        (Kerberos, SSL/TLS, SRP, Zlib,...) These are required only if you
  266.        select a secure target.
  267.      * For the curses-based fullscreen file-ransfer display, the curses or
  268.        ncurses header file(s) and library, and probably also the termcap
  269.        and/or termlib library. Note that the names and locations of these
  270.        files and libraries are likely to change capriciously with every
  271.        new release of your Unix product. If you discover that the C-Kermit
  272.        build procedure fails because your curses and/or termxxx headers or
  273.        libraries are not named or located as expected, please [85]let us
  274.        know. In the meantime, work around by installing symlinks.
  275.      * IMPORTANT: Modern Linux distributions might give you the choice
  276.        during installation of whether to install the "ncurses development
  277.        package" (perhaps called "ncurses-devel"). If you did not install
  278.        it, you won't be able to build C-Kermit with curses support
  279.        included. In this case, either go back and install ncurses, or else
  280.        choose (or create) a non-curses makefile target for your platform.
  281.        To install the ncurses developers tools in Red Hat Linux, do
  282.        "apt-get install ncurses-developer" or if you have the CD:
  283.  
  284. mount redhat cdrom
  285. goto RedHat/RPMS
  286. rpm -ivh ncurses-devel*.rpm
  287. or to have the exact name ls ncurse* and load as
  288. rpm -ivh filename
  289. then leave the cdrom and unmount it.
  290.  
  291.      * In AIX you might have to go back and install any or all of:
  292.  
  293. bos.adt.base
  294. bos.adt.include
  295. bos.adt.lib
  296. bos.adt.libm
  297. bos.adt.utils
  298.  
  299.        from the first installation CD.
  300.  
  301.    Depending on where you got it, the makefile might need to be renamed
  302.    from ckuker.mak to makefile. Directions:
  303.  
  304.     a. Type "make xxx" where xxx is the name of the makefile target most
  305.        appropriate to your platform, e.g. "make linux", "make aix43", etc.
  306.        Read the [86]comments at the top of the makefile for a complete
  307.        list of available targets (it's a long list).
  308.     b. Test the resulting 'wermit' file (see [87]Section 7 for
  309.        suggestions). If it's OK, proceed; otherwise [88]notify us.
  310.  
  311.      NOTE: steps (c) through (e) can be accomplished using the
  312.      [89]makefile 'install' target as described in [90]Section 5.4.
  313.     c. Rename the 'wermit' file to 'kermit', copy it to the desired binary
  314.        directory (such as /usr/local/bin or /opt/something), and if it is
  315.        to be used for dialing out, give it the same owner, group, and
  316.        permissions as the 'cu' program (IMPORTANT: read [91]Sections 10
  317.        and [92]11 for details).
  318.     d. Install the man page, ckuker.nr, with your other man pages.
  319.     e. Install the accompanying text files (see [93]Section 5).
  320.     f. If you want C-Kermit to also offer a Telnet command-line
  321.        personality, make a symbolic link as follows:
  322.  
  323. cd directory-where-kermit-binary-is
  324. ln -s kermit telnet
  325.  
  326.        If you want C-Kermit to be the default Telnet client, make sure the
  327.        directory in which you created the symlink is in the PATH ahead of
  328.        the where the regular Telnet client is.
  329.     g. If you want C-Kermit to also offer an FTP command-line personality,
  330.        make a symlink called "ftp" as in (f).
  331.     h. If you want C-Kermit to also offer an FTTP command-line
  332.        personality, make a symlink called "http" as in (f).
  333.     i. If you want to offer an Internet Kermit Service, follow the
  334.        directions in the [94]IKSD Administrator's Guide.
  335.     _________________________________________________________________________
  336.  
  337.   4.0. Special Considerations for C-Kermit 8.0
  338.  
  339.    [ [95]Top ] [ [96]Contents ] [ [97]Next ]
  340.  
  341.    Also see: [98]C-Kermit Configuration Options
  342.  
  343.    SECTION CONTENTS
  344.  
  345. 4.1. [99]The Unix Makefile
  346. 4.2. [100]The C-Kermit Initialization File
  347. 4.3. [101]The 2.x BSD Makefile
  348. 4.4. [102]The Plan 9 Makefile
  349. 4.5. [103]Makefile Failures
  350.  
  351.    (Also see the [104]Configurations Options document, [105]Section 8).
  352.  
  353.    Lots of new features have been added in versions 7.0 and 8.0 that
  354.    require access to new symbols, APIs, libraries, etc, and this will no
  355.    doubt cause problems in compiling, linking, or execution on platforms
  356.    where 6.0 and earlier built without incident. This section contains
  357.    what we know as of the date of this file.
  358.  
  359.    The first category concerns the new Kermit Service Daemon (IKSD; see
  360.    the [106]IKSD Administrator's Guide for details):
  361.  
  362.    The wtmp File
  363.           When C-Kermit is started as an IKSD (under inetd), it makes
  364.           syslog and wtmp entries, and also keeps its own ftpd-like log.
  365.           The code assumes the wtmp log is /var/log/wtmp on Linux and
  366.           /usr/adm/wtmp elsewhere. No doubt this assumption will need
  367.           adjustment. Use -DWTMPFILE=path to override at compile time
  368.           (there is also a runtime override). See [107]iksd.html for
  369.           details.
  370.  
  371.    UTMP, utsname(), etc
  372.           C-Kermit 7.0 gets as much info as it can about its job -- mainly
  373.           for IKSD logging -- from utmp. But of course utmp formats and
  374.           fields differ, and for that matter, there can be two different
  375.           header files, <utmp.h> and <utmpx.h>. Look for HAVEUTMPX and
  376.           HAVEUTHOST in [108]ckufio.c and let me know of any needed
  377.           adjustments.
  378.  
  379.    Password lookup
  380.           IKSD needs to authenticate incoming users against the password
  381.           list. In some cases, this requires the addition of -lcrypt (e.g.
  382.           in Unixware 2.x). In most others, the crypt functions are in the
  383.           regular C library. If you get "crypt" as an unresolved symbol at
  384.           link time, add -lcrypt to LIBS. If your site has local
  385.           replacement libraries for authentication, you might need a
  386.           special LIBS clause such as "LIBS=-L/usr/local/lib -lpwent".
  387.  
  388.           These days most Unix systems take advantage of shadow password
  389.           files or Pluggable Authentication Modules (PAM). If your system
  390.           uses shadow passwords you must add -DCK_SHADOW to the CFLAGS
  391.           list. If your system requires PAM you must add -DCK_PAM to the
  392.           CFLAGS and -lpam -ldl to LIBS.
  393.  
  394.    getusershell()
  395.           This is called by the IKSD at login time to see if a user has
  396.           been "turned off". But many Unix platforms lack this function.
  397.           In that case, you will get unresolved symbol reports at link
  398.           time for _getusershell, _endusershell; to work around, add
  399.           -DNOGETUSERSHELL.
  400.  
  401.    initgroups()
  402.           This is called by IKSD after successful authentication. But some
  403.           platforms do not have this function, so obviously it can't be
  404.           called there, in which case add -DNOINITGROUPS.
  405.  
  406.    setreuid(), setreuid(), setregid() not found or "deprecated"
  407.           Find out what your Unix variety wants you to use instead, and
  408.           make appropriate substitutions in routine zvpass(), module
  409.           [109]ckufio.c, and [110]let us know.
  410.  
  411.    printf()
  412.           IKSD installs a printf() substitute to allow redirection of
  413.           printf-like output to the connection. However, this can conflict
  414.           with some curses libraries. In this case, separate binaries must
  415.           be built for IKSD and non-IKSD use.
  416.  
  417.    If you encounter difficulties with any of the above, and you are not
  418.    interested in running C-Kermit as an IKSD, then simply add NOIKSD to
  419.    CFLAGS and rebuild. Example:
  420.  
  421. make sco286
  422. (get lots of errors)
  423. make clean
  424. make sco286 "KFLAGS=-DNOIKSD"
  425.  
  426.    Some non-IKSD things to watch out for:
  427.  
  428.    Return type of main()
  429.           The main() routine is in [111]ckcmai.c. If you get complaints
  430.           about "main: return type is not blah", define MAINTYPE on the CC
  431.           command line, e.g.:
  432.  
  433. make xxx "KFLAGS=-DMAINTYPE=blah
  434.  
  435.           (where blah is int, long, or whatever). If the complaint is
  436.           "Attempt to return a value from a function of type void" then
  437.           add -DMAINISVOID:
  438.  
  439. make xxx "KFLAGS=-DMAINISVOID=blah
  440.  
  441.    DNS Service Records
  442.           This feature allows a remote host to redirect C-Kermit to the
  443.           appropriate socket for the requested service; e.g. if C-Kermit
  444.           requests service "telnet" and the host offers Telnet service on
  445.           port 999 rather than the customary port 23. If you get
  446.           compile-time complaints about not being able to find <resolv.h>,
  447.           <netdb.h>, or <arpa/nameser.h>, add -DNO_DNS_SRV to CFLAGS. If
  448.           you get link-time complaints about unresolved symbols res_search
  449.           or dn_expand, try adding -lresolve to LIBS.
  450.  
  451.    \v(ipaddress)
  452.           If "echo \v(ipaddress)" shows an empty string rather than your
  453.           local IP address, add -DCKGHNLHOST to CFLAGS and rebuild.
  454.  
  455.    <sys/wait.h>
  456.           If this file can't be found at compile time, add -DNOREDIRECT to
  457.           CFLAGS. This disables the REDIRECT and PIPE commands and
  458.           anything else that needs the wait() system service.
  459.  
  460.    syslog()
  461.           C-Kermit can now write syslog records. Some older platforms
  462.           might not have the syslog facility. In that case, add
  463.           -DNOSYSLOG. Others might have it, but require addition of
  464.           -lsocket to LIBS (SCO OSR5 is an example). See [112]Section 15.
  465.  
  466.    putenv()
  467.           If "_putenv" comes up as an undefined symbol, add -DNOPUTENV to
  468.           CFLAGS and rebuild.
  469.  
  470.    "Passing arg1 of 'time' from incompatible pointer"
  471.           This is a mess. See the mass of #ifdefs in the appropriate
  472.           module, [113]ckutio.c or [114]ckufio.c.
  473.  
  474.    gettimeofday()
  475.           Wrong number of arguments. On most platforms, gettimeofday()
  476.           takes two arguments, but on a handful of others (e.g. Motorola
  477.           System V/88 V4, SNI Reliant UNIX 5.43, etc) it takes one. If
  478.           your version of gettimeofday() is being called with two args but
  479.           wants one, add -DGTODONEARG.
  480.  
  481.    "Assignment makes pointer from integer without a cast"
  482.           This warning might appear in [115]ckutio.c or [116]ckufio.c. (or
  483.           elsewhere), and usually can be traced to the use of a system or
  484.           library function that returns a pointer but that is not declared
  485.           in the system header files even though it should be. Several
  486.           functions are commonly associated with this error:
  487.  
  488.           + getcwd(): Add -DDCLGETCWD to CFLAGS and rebuild.
  489.           + popen() : Add -DDCLPOPEN to CFLAGS and rebuild.
  490.           + fdopen(): Add -DDCLFDOPEN to CFLAGS and rebuild.
  491.  
  492.    "Operands of = have incompatible types"
  493.    "Incompatible types in assignment"
  494.           If this comes from [117]ckcnet.c and comes from a statement
  495.           involving inet_addr(), try adding -DINADDRX to CFLAGS. If that
  496.           doesn't help, then try adding -DNOMHHOST.
  497.  
  498.    Complaints about args to get/setsockopt(), getpeername(), getsockname()
  499.           These are all in [118]ckcnet.c. Different platforms and OS's and
  500.           versions of the same OS change this all the time: int, size_t,
  501.           unsigned long, etc. All the affected variables are declared
  502.           according to #ifdefs within ckcnet.c, so find the declarations
  503.           and adjust the #ifdefs accordingly.
  504.  
  505.    size_t
  506.           In case of complaints about "unknown type size_t", add
  507.           -DSIZE_T=int (or other appropriate type) to CFLAGS.
  508.  
  509.    'tz' undefined
  510.    Use of undefined enum/struct/union 'timezone'
  511.           Left of 'tv_sec' specifies undefined struct/union 'timeval' And
  512.           similar complaints in [119]ckutio.c: Add -DNOGFTIMER and/or
  513.           -DNOTIMEVAL.
  514.  
  515.    Symlinks
  516.           The new built-in DIRECTORY command should show symlinks like "ls
  517.           -l" does. If it does not, check to see if your platform has the
  518.           lstat() and readlink() functions. If so, add -DUSE_LSTAT and
  519.           -DCKSYMLINK to CFLAGS and rebuild. On the other hand, if lstat()
  520.           is unresolved at link time, add -DNOLSTAT to CFLAGS. If
  521.           readlink() is also unresolved, add -DNOSYMLINK.
  522.  
  523.    realpath()
  524.           Link-time complains about realpath() -- find the library in
  525.           which it resides and add it to LIBS (example for Unixware 7.1:
  526.           "-lcudk70") or add -DNOREALPATH to CFLAGS and rebuild. If built
  527.           with realpath() but debug log file is truncated or mangled,
  528.           ditto (some realpath() implementations behave differently from
  529.           others). If built with realpath() and seemingly random core
  530.           dumps occur during file path resolution, ditto.
  531.  
  532.    Failure to locate header file <term.h>
  533.           Usually happens on Linux systems that have the C compiler
  534.           installed, but not the ncurses package (see comments about
  535.           selective installs above). Go back and install ncurses, or use
  536.           "make linuxnc" (Linux No Curses).
  537.  
  538.    "Can't find shared library libc.so.2.1"
  539.    "Can't find shared library libncurses.so.3.0", etc...
  540.           You are trying to run a binary that was built on a computer that
  541.           has different library versions than your computer, and your
  542.           computer's loader is picky about library version numbers.
  543.           Rebuild from source on your computer.
  544.  
  545.    Time (struct tm) related difficulties:
  546.           Errors like the following:
  547.  
  548. "ckutio.c", line 11994: incomplete struct/union/enum tm: _tm
  549. "ckutio.c", line 11995: error: cannot dereference non-pointer type
  550. "ckutio.c", line 11995: error: assignment type mismatch
  551. "ckutio.c", line 11997: warning: using out of scope declaration: localtime
  552. "ckutio.c", line 11997: error: unknown operand size: op "="
  553. "ckutio.c", line 11997: error: assignment type mismatch
  554. "ckutio.c", line 11998: error: undefined struct/union member: tm_year
  555. "ckutio.c", line 12000: error: undefined struct/union member: tm_mon
  556. "ckutio.c", line 12001: error: undefined struct/union member: tm_mday
  557. "ckutio.c", line 12002: error: undefined struct/union member: tm_hour
  558. "ckutio.c", line 12003: error: undefined struct/union member: tm_min
  559. "ckutio.c", line 12004: error: undefined struct/union member: tm_sec
  560.  
  561.           are due to failure to include the appropriate time.h header
  562.           files. Unix platforms generally have one or more of the
  563.           following: <time.h>, <sys/time.h>, and <sys/timeb.h>. Any
  564.           combination of these might be required. Defaults are set up for
  565.           each makefile target. The defaults can be corrected on the CC
  566.           command line by adding the appropriate definition from the
  567.           following list to CFLAGS:
  568.  
  569. -DTIMEH         Include <time.h>
  570. -DNOTIMEH       Don't include <time.h>
  571. -DSYSTIMEH      Include <sys/time.h>
  572. -DNOSYSTIMEH    Don't include <sys/time.h>
  573. -DSYSTIMEBH     Include <sys/timeb.h>
  574. -DNOSYSTIMEBH   Don't include <sys/timeb.h>
  575.  
  576.           Note that <sys/timeb.h> is relatively scarce in the System V and
  577.           POSIX environments; the only platform of recent vintage where it
  578.           was/is used is OSF/1 and its derivatives (Digital Unix and Tru64
  579.           Unix).
  580.  
  581.    Struct timeval and/or timezone not declared:
  582.           In some cases, merely including the appropriate time.h header
  583.           files is still not enough. POSIX.1 does not define the timeval
  584.           struct, and so the items we need from the header are protected
  585.           against us by #ifndef _POSIX_SOURCE or somesuch. In this case,
  586.           we have to declare the timeval (and timezone) structs ourselves.
  587.           To force this, include -DDCLTIMEVAL in CFLAGS.
  588.  
  589.    Warnings about dn_expand() Argument #4
  590.           WARNING: argument is incompatible with prototyp. It's the old
  591.           char versus unsigned char stupidity again. Try to find a
  592.           compiler switch like GCC's "-funsigned-char". Failing that, add
  593.           -DCKQUERYTYPE=xxx to CFLAGS, where xxx is whatever 'man
  594.           dn_expand' tells you the type of the 4th argument should be
  595.           (presumably either char or unsigned char; in the latter case use
  596.           CHAR to avoid confusion caused by multiple words.
  597.  
  598.    Switch Table Overflow (in [120]ckcuni.c)
  599.           Add -DNOUNICODE to CFLAGS.
  600.  
  601.    Compile-time warnings about ck_out() or tgetstr() or tputs():
  602.           Easy solution: Add -DNOTERMCAP to CFLAGS. But then you lose the
  603.           SCREEN function. Real solution: Try all different combinations
  604.           of the following CFLAGS:
  605.  
  606. -DTPUTSARGTYPE=char    -DTPUTSFNTYPE=int
  607. -DTPUTSARGTYPE=int     -DTPUTSFNTYPE=void
  608.  
  609.           Until the warnings go away, except maybe "ck_outc: return with a
  610.           value in a function returning void", and in that case also add
  611.           -DTPUTSISVOID.
  612.  
  613.    "Passing arg 1 of to tputs() makes pointer from integer without a
  614.           cast":
  615.           Add -DTPUTSARG1CONST to CFLAGS.
  616.  
  617.    "Undefined symbol: dup2"
  618.           Add -DNOZEXEC to CFLAGS.
  619.  
  620.    "header file 'termcap.h' not found"
  621.           Add -DNOHTERMCAP to CFLAGS.
  622.  
  623.    Other difficulties are generally of the "where is curses.h and what is
  624.    it called this week?" variety (most easily solved by making symlinks in
  625.    the include and lib directories), or overzealous complaints regarding
  626.    type mismatches in function calls because of the totally needless and
  627.    silly signed versus unsigned char conflict (*), etc. In any case,
  628.    please send any compilation or linking warnings or errors to the
  629.    author, preferably along with fixes.
  630.  
  631.      * C-Kermit does not use the signed property of chars at all anywhere,
  632.        ever. So if all chars and char *'s can be made unsigned at compile
  633.        time, as they can in gcc with "-funsigned-char", they should be.
  634.  
  635.    IMPORTANT: If you find any of these hints necessary for a particular
  636.    make target (or you hit upon others not listed here), PLEASE SEND A
  637.    REPORT TO:
  638.  
  639. [121]kermit-support@columbia.edu
  640.     _________________________________________________________________________
  641.  
  642.   4.1. The Unix Makefile
  643.  
  644.    [ [122]Top ] [ [123]Contents ] [ [124]Section Contents ] [ [125]Next ]
  645.    [ [126]Previous ]
  646.  
  647.    If your distribution does not contain a file with the name "makefile"
  648.    or "Makefile", then rename the file called ckuker.mak to makefile:
  649.  
  650. mv ckuker.mak makefile
  651.  
  652.    Then type "make xxx", where xxx is the platform you want to build
  653.    C-Kermit for. These are listed in the [127]comments at the top of the
  654.    makefile. For example, to build C-Kermit for Linux, type:
  655.  
  656. make linux
  657.  
  658.    Here are some typical examples:
  659.  
  660.      Target    Description
  661.      linux     Linux, any version on any hardware platform
  662.      openbsd   OpenBSD, any version on any hardware platform
  663.      aix43     AIX 4.3
  664.      aix43g    AIX 4.3, built with gcc
  665.      solaris9  Solaris 9
  666.      solaris9g Solaris 9 built with gcc
  667.      hpux1100  HP-UX 11-point-anything
  668.  
  669.    The makefile is quite long, and at least two versions of Unix, SCO
  670.    Xenix/286 and 2.x BSD, cannot cope with its length. An attempt to "make
  671.    sco286" gives the message "Make: Cannot alloc mem for env.. Stop".
  672.    Solution: edit away some or all of the nonrelevant material from the
  673.    makefile. (A separate version of the makefile is provided for BSD 2.x:
  674.    ckubs2.mak but C-Kermit 8.0 can't be built for BSD 2.x -- it has simply
  675.    grown too large.)
  676.  
  677.    Some make programs reportedly cannot handle continued lines (lines
  678.    ending in backslash (\)). If you have a problem with the makefile, try
  679.    editing the makefile to join the continued lines (remove the
  680.    backslashes and the following linefeed).
  681.  
  682.    Other makefile troubles may occur because tabs in the makefile have
  683.    somehow been converted to spaces. Spaces and tabs are distinct in Unix
  684.    makefiles.
  685.  
  686.    Similarly, carriage returns might have been added to the end of each
  687.    line, which also proves confusing to most Unix versions of make.
  688.  
  689.    Check to see if there are comments about your particular version in its
  690.    makefile target itself. In a text editor such as EMACS or VI, search
  691.    for the make entry name followed by a colon, e.g. "linux:" (if you
  692.    really are building C-Kermit for Linux, do this now).
  693.  
  694.    Check to see if there are comments about your particular version in the
  695.    [128]ckubwr.txt file ([129]CLICK HERE for the Web version).
  696.  
  697.    If you have trouble with building [130]ckwart.c, or running the
  698.    resulting wart preprocessor program on [131]ckcpro.w:
  699.  
  700.     1. Just "touch" the [132]ckcpro.c file that comes in the distribution
  701.        and then give the "make" command again, or:
  702.     2. Compile ckwart.c "by hand": cc -o wart ckwart.c, or:
  703.     3. Try various other tricks. E.g. one Linux user reported that that
  704.        adding the "static" switch to the rule for building wart fixed
  705.        everything:
  706.  
  707. wart: ckwart.$(EXT)
  708.         $(CC) -static -o wart ckwart.$(EXT) $(LIBS)
  709.  
  710.    If your compiler supports a compile-time option to treat ALL chars (and
  711.    char *'s, etc) as unsigned, by all means use it -- and send me email to
  712.    let me know what it is (I already know about gcc -funsigned-char).
  713.  
  714.    To add compilation options (which are explained later in this document)
  715.    to your makefile target without editing the makefile, include
  716.    "KFLAGS=..." on the make command line, for example:
  717.  
  718. make linux KFLAGS=-DNODEBUG
  719. make bsd "KFLAGS=-DKANJI -DNODEBUG -DNOTLOG -DDYNAMIC -UTCPSOCKET"
  720.  
  721.    Multiple options must be separated by spaces. Quotes are necessary if
  722.    the KFLAGS= clause includes spaces. The KFLAGS are added to the end of
  723.    the CFLAGS that are defined in the selected makefile target. For
  724.    example, the "bsd" entry includes -DBSD4 -DTCPSOCKET, so the second
  725.    example above compiles Kermit with the following options:
  726.  
  727. -DBSD4 -DTCPSOCKET -DKANJI -DNODEBUG -DNOTLOG -DDYNAMIC -UTCPSOCKET
  728.  
  729.    (Notice how "-UTCPSOCKET" is used to negate the effect of the
  730.    "-DTCPSOCKET" option that is included in the makefile target.)
  731.  
  732.    WARNING: Be careful with KFLAGS. If you build C-Kermit, change some
  733.    files, and then run make again using the same make entry but specifying
  734.    different KFLAGS than last time, make won't detect it and you could
  735.    easily wind up with inconsistent object modules, e.g. some of them
  736.    built with a certain option, others not. When in doubt, "make clean"
  737.    first to make sure all your object files are consistent. Similarly, if
  738.    you change CFLAGS, LIBS, or any other items in the makefile, or you
  739.    rebuild using a different makefile target, "make clean" first.
  740.  
  741.    If you create a new makefile target, use static linking if possible.
  742.    Even though this makes your C-Kermit binary bigger, the resulting
  743.    binary will be more portable. Dynamically linked binaries tend to run
  744.    only on the exact configuration and version where they were built; on
  745.    others, invocation tends to fail with a message like:
  746.  
  747. Can't find shared library "libc.so.2.1"
  748.     _________________________________________________________________________
  749.  
  750.   4.2. The C-Kermit Initialization File
  751.  
  752.    [ [133]Top ] [ [134]Contents ] [ [135]Section Contents ] [ [136]Next ]
  753.    [ [137]Previous ]
  754.  
  755.    (This section is obsolete.) Read [138]Section 5 about the
  756.    initialization file.
  757.     _________________________________________________________________________
  758.  
  759.   4.3. The 2.x BSD Makefile
  760.  
  761.    [ [139]Top ] [ [140]Contents ] [ [141]Section Contents ] [ [142]Next ]
  762.    [ [143]Previous ]
  763.  
  764.      This section is obsolete. C-Kermit 6.0 was the last release that
  765.      could be built on PDP-11 based BSD versions.
  766.     _________________________________________________________________________
  767.  
  768.   4.4. The Plan 9 Makefile
  769.  
  770.    [ [144]Top ] [ [145]Contents ] [ [146]Section Contents ] [ [147]Next ]
  771.    [ [148]Previous ]
  772.  
  773.    Use the separate makefile [149]ckpker.mk. NOTE: The Plan 9 version of
  774.    C-Kermit 8.0 has not yet been built. There should be no impediment to
  775.    building it. However, even when built successfully, certain key
  776.    features are missing, notably TCP/IP networking.
  777.     _________________________________________________________________________
  778.  
  779.   4.5. Makefile Failures
  780.  
  781.    [ [150]Top ] [ [151]Contents ] [ [152]Section Contents ] [
  782.    [153]Previous ]
  783.  
  784.    First, be sure the source files are stored on your current disk and
  785.    directory with the right names (in lowercase). Second, make sure that
  786.    the makefile itself does not contain any lines with leading spaces:
  787.    indented lines must all start with horizontal TAB, and no spaces.
  788.  
  789.    Then make sure that your Unix PATH is defined to find the appropriate
  790.    compiler for your makefile target. For example, on SunOS systems, "make
  791.    sunos41" builds C-Kermit for the BSD environment, and assumes that
  792.    /usr/ucb/cc will be used for compilation and linking. If your PATH has
  793.    /usr/5bin ahead of /usr/ucb, you can have problems at compile or link
  794.    time (a commonly reported symptom is the inability to find "ftime"
  795.    during linking). Fix such problems by redefining your Unix PATH, or by
  796.    specifying the appropriate "cc" in CC= and CC2= statements in your
  797.    makefile target.
  798.  
  799.    During edits 166-167, considerable effort went into making C-Kermit
  800.    compilable by ANSI C compilers. This includes prototyping all of
  801.    C-Kermit's functions, and including the ANSI-defined system header
  802.    files for system and library functions, as defined in K&R, second
  803.    edition: <string.h>, <stdlib.h>, <unistd.h> (except in NeXTSTEP this is
  804.    <libc.h>), and <sys/stdtypes.h>. If you get warnings about any of these
  805.    header files not being found, or about argument mismatches involving
  806.    pid_t, uid_t, or gid_t, look in ckcdeb.h and make amendments. C-Kermit
  807.    assumes it is being compiled by an ANSI-compliant C compiler if
  808.    __STDC__ is defined, normally defined by the compiler itself. You can
  809.    force ANSI compilation without defining __STDC__ (which some compilers
  810.    won't let you define) by including -DCK_ANSIC on the cc command line.
  811.  
  812.    On the other hand, if your compiler defines __STDC__ but still
  813.    complains about the syntax of Kermit's function prototypes, you can
  814.    disable the ANSI-style function prototyping by including -DNOANSI on
  815.    the command line.
  816.  
  817.    For SCO OpenServer, UNIX, ODT, and XENIX compilations, be sure to pick
  818.    the most appropriate [154]makefile target, and be sure you have
  819.    installed an SCO development system that is keyed to your exact SCO
  820.    operating system release, down to the minor version (like 2.3.1).
  821.  
  822.    Also note that SCO distributes some of its libraries in encrypted form,
  823.    and they must be decrypted before C-Kermit can be linked with them. If
  824.    not, you might see a message like:
  825.  
  826. ld: file /usr/lib/libsocket.a is of unknown type: magic number = 6365
  827.  
  828.    To decrypt, you must supply a key (password) that came with your
  829.    license. Call SCO for further info.
  830.  
  831.    If your compiler uses something other than int for the pid (process id)
  832.    data type, put -DPID_T=pid_t or whatever in your CFLAGS.
  833.  
  834.    If you get complaints about unknown data types uid_t and gid_t, put
  835.    -DUID_T=xxx -DGID_T=yyy in your CFLAGS, where xxx and yyy are the
  836.    appropriate types.
  837.  
  838.    If your compilation fails because of conflicting or duplicate
  839.    declarations for sys_errlist, add -DUSE_STRERROR or -DNDSYSERRLIST to
  840.    CFLAGS.
  841.  
  842.    If your compilation dies because getpwnam() is being redeclared (or
  843.    because of "conflicting types for getwpnam"), add -DNDGPWNAM to your
  844.    CFLAGS. If that doesn't work, then add -DDCGPWNAM to your CFLAGS (see
  845.    ckufio.c around line 440).
  846.  
  847.    If the compiler complains about the declaration of getpwnam() during an
  848.    ANSI C compilation, remove the declaration from ckufio.c or change the
  849.    argument in the prototype from (char *) to (const char *).
  850.  
  851.    If you get complaints that getpwuid() is being called with an improper
  852.    type, put -DPWID_T=xx in your CFLAGS.
  853.  
  854.    If you get compile-time warnings that t_brkc or t_eofc (tchars
  855.    structure members, used in BSD-based versions) are undefined, or
  856.    structure-member- related warnings that might be traced to this fact,
  857.    add -DNOBRKC to CFLAGS.
  858.  
  859.    If you get a linker message to the effect that _setreuid or _setregid
  860.    is not defined, add -DNOSETREU to CFLAGS, or add -DCKTYP_H=blah to
  861.    CFLAGS to make C-Kermit read the right <types.h>-kind-of-file to pick
  862.    up these definitions.
  863.  
  864.    If you get a message that _popen is undefined, add -DNOPOPEN to CFLAGS.
  865.  
  866.    If you get a complaint at compile time about an illegal pointer-integer
  867.    combination in ckufio.c involving popen(), or at link time that _popen
  868.    is an undefined symbol, add the declaration "FILE *popen();" to the
  869.    function zxcmd() in ckufio.c (this declaration is supposed to be in
  870.    <stdio.h>). If making this change does not help, then apparently your
  871.    Unix does not have the popen() function, so you should add -DNOPOPEN to
  872.    your make entry, in which case certain functions involving "file" i/o
  873.    to the standard input and output of subprocesses will not be available.
  874.  
  875.    If your linker complains that _getcwd is undefined, you can add a
  876.    getcwd() function to ckufio.c, or add it to your libc.a library using
  877.    ar:
  878.  
  879. #include <stdio.h>
  880.  
  881. char *
  882. getcwd(buf,size) char *buf; int size; {
  883. #ifndef NOPOPEN
  884. #ifdef DCLPOPEN
  885.     FILE *popen();
  886. #endif
  887.     FILE *pfp;
  888.  
  889.     if (!buf) return(NULL);
  890.     if (!(pfp = popen("pwd","r"))) return(NULL);
  891.     fgets(buf,size-2,pfp);
  892.     pclose(pfp);
  893.     buf[strlen(buf)-1] = '\0';
  894.     return((char *)buf);
  895. #else
  896.     buf[0] = '\0';
  897.     return(NULL);
  898. #endif /* NOPOPEN */
  899. }
  900.  
  901. #ifdef NOPOPEN
  902. FILE *popen(s,t) char *s,*t; {
  903.     return(NULL);
  904. }
  905. #endif /* NOPOPEN */
  906.  
  907.    If you get complaints about NPROC having an invalid value, add a valid
  908.    definition for it (depends on your system), as in the cray entry.
  909.  
  910.    If you get some symbol that's multiply defined, it probably means that
  911.    a variable name used by Kermit is also used in one of your system
  912.    libraries that Kermit is linked with. For example, under PC/IX some
  913.    library has a variable or function called "data", and the variable
  914.    "data" is also used extensively by Kermit. Rather than edit the Kermit
  915.    source files, just put a -D in the make entry CFLAGS to change the
  916.    Kermit symbol at compile time. In this example, it might be
  917.    -Ddata=xdata.
  918.  
  919.    Some symbol is defined in your system's header files, but it produces
  920.    conflicts with, or undesired results from, Kermit. Try undefining the
  921.    symbol in the makefile target's CFLAGS, for example -UFIONREAD.
  922.  
  923.    Some well-known symbol is missing from your system header files. Try
  924.    defining in the makefile target's CFLAGS, for example -DFREAD=1.
  925.  
  926.    You get many warnings about pointer mismatches. This probably means
  927.    that Kermit is assuming an int type for signal() when it should be
  928.    void, or vice-versa. Try adding -DSIG_I (for integer signal()) or
  929.    -DSIG_V (for void) to CFLAGS. Or just include KFLAGS=-DSIG_V (or
  930.    whatever) in your "make" command, for example:
  931.  
  932. make bsd KFLAGS=-DSIG_V
  933.  
  934.    You get many messages about variables that are declared and/or set but
  935.    never used. It is difficult to avoid these because of all the
  936.    conditional compilation in the program. Ignore these messages.
  937.  
  938.    Some of C-Kermit's modules are so large, or contain so many character
  939.    string constants, or are so offensive in some other way, that some C
  940.    compilers give up and refuse to compile them. This is usually because
  941.    the -O (optimize) option is included in the make entry. If this happens
  942.    to you, you can (a) remove the -O option from the make entry, which
  943.    will turn off the optimizer for ALL modules; or (b) compile the
  944.    offending module(s) by hand, including all the switches from make entry
  945.    except for -O, and then give the appropriate "make" command again; or
  946.    (c) increase the value of the -Olimit option, if your compiler supports
  947.    this option; or (d) change the [155]makefile target to first compile
  948.    each offending module explicitly without optimization, then compile the
  949.    others normally (with optimization), for example:
  950.  
  951. #Fortune 32:16, For:Pro 2.1 (mostly like 4.1bsd)
  952. ft21:
  953.         @echo 'Making C-Kermit $(CKVER) for Fortune 32:16 For:Pro 2.1...'
  954.         $(MAKE) ckuusx.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
  955.         -SYM 800 \ -DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short"
  956.         $(MAKE) ckuxla.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
  957.         -SYM 800 \ -DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short"
  958.         $(MAKE) ckudia.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
  959.         -SYM 800 \ -DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short"
  960.         $(MAKE) wermit "CFLAGS= -O -DNODEBUG -DBSD4 -DFT21 -DNOFILEH -SYM 800 \
  961.         -DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short" \
  962.         "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
  963.  
  964.    As an extreme example, some compilers (e.g. gcc on the DG AViiON) have
  965.    been known to dump core when trying to compile ckwart.c with
  966.    optimization. So just do this one "by hand":
  967.  
  968. cc -o wart ckwart.c
  969.  
  970.    or:
  971.  
  972. touch ckcpro.c
  973.  
  974.    and then give the "make" command again.
  975.  
  976.    Speaking of wart, it is unavoidable that some picky compilers might
  977.    generate "statement unreachable" messages when compiling ckcpro.c.
  978.    Unreachable statements can be generated by the wart program, which
  979.    generates ckcpro.c automatically from [156]ckcpro.w, which translates
  980.    lex-like state/input constructions into a big switch/case construction.
  981.  
  982.    Some function in Kermit wreaks havoc when it is called. Change all
  983.    invocations of the function into a macro that evaluates to the
  984.    appropriate return code that would have been returned by the function
  985.    had it been called and failed, for example: -Dzkself()=0. Obviously not
  986.    a good idea if the function is really needed.
  987.  
  988.    If you have just installed SunOS 4.1.2 or 4.1.3, you might find that
  989.    C-Kermit (and any other C program) fails to link because of unresolved
  990.    references from within libc. This is because of a mistake in Sun's
  991.    /usr/lib/shlib.etc files for building the new libc. Change the libc
  992.    Makefile so that the "ld" lines have "-ldl" at the end. Change the
  993.    README file to say "mv xccs.multibyte. xccs.multibyte.o" and follow
  994.    that instruction.
  995.   ___________________________________________________________________________
  996.  
  997. 5. INSTALLING THE KERMIT FILES
  998.  
  999.    [ [157]Top ] [ [158]Contents ] [ [159]Next ] [ [160]Previous ]
  1000.  
  1001.    SECTION CONTENTS
  1002.  
  1003. 5.1. [161]The C-Kermit Initialization File
  1004. 5.2. [162]Text Files
  1005. 5.3. [163]Installing the Kermit Files
  1006. 5.4. [164]The Makefile Install Target
  1007.  
  1008.    The C-Kermit executable does not need any external files to run.
  1009.    Unlike, say, the cu program, which on most platforms is useless unless
  1010.    you (as root) edit the /usr/spool/uucp/Systems and
  1011.    /usr/spool/uucp/Devices files to supply whatever obscure and
  1012.    undocumented syntax is required to match some supposedly user-friendly
  1013.    mnemonic to the real pathname of whatever device you want to use,
  1014.    Kermit runs on its own without needing any external configuration
  1015.    files, and lets you refer to device (and network hosts and services) by
  1016.    their own natural undisguised names.
  1017.  
  1018.    Nevertheless, a number of external files can be installed along with
  1019.    the C-Kermit executable if you wish. These include configuration and
  1020.    customization files that are read by Kermit as well as documentation
  1021.    files to be read by people. All of this material is (a) optional, and
  1022.    (b) available on the Kermit website:
  1023.  
  1024. [165]http://www.columbia.edu/kermit/
  1025.  
  1026.    and usually in a more pleasant form, perhaps also with updated content.
  1027.    So if your computer is on the Internet, there is no need to install
  1028.    anything but the Kermit executable if users know how to find the Kermit
  1029.    website (and if they don't, Kermit's "help" command tells them).
  1030.  
  1031.   5.1. The C-Kermit Initialization File
  1032.  
  1033.    In C-Kermit 7.0 and earlier, the standard initialization file was a key
  1034.    C-Kermit component because:
  1035.  
  1036.     a. It "loaded" the dialing and network directories.
  1037.     b. It defined all the macros and variables for the services directory.
  1038.     c. It defined macros for quickly changing Kermit's file-transfer
  1039.        performance tuning.
  1040.  
  1041.    The standard initialization file is quite long (more than 600 lines)
  1042.    and requires noticeable processing time (the slower the computer, the
  1043.    more noticeable), yet few people actually use the services directory,
  1044.    whose definition takes up most of its bulk. Meanwhile, in C-Kermit 8.0,
  1045.    many of the remaining functions of the standard initialization file are
  1046.    now built in; for example, the FAST, CAUTIOUS, and ROBUST commands.
  1047.  
  1048.    More to the point, many of the settings that could be made only in the
  1049.    initialization and customization files can now be picked up from
  1050.    environment variables. The first group identifies initialization and
  1051.    directory files:
  1052.  
  1053.    CKERMIT_INI
  1054.           The path of your Kermit initialization file, if any. This
  1055.           overrides the built-in search for $HOME/.kermrc.
  1056.  
  1057.    K_CHARSET
  1058.           The character set used for encoding local text files. Equivalent
  1059.           to SET FILE CHARACTER-SET.
  1060.  
  1061.    K_DIAL_DIRECTORY
  1062.           The full pathname of one or more Kermit dialing directory files.
  1063.           Equivalent to SET DIAL DIRECTORY.
  1064.  
  1065.    K_NET_DIRECTORY
  1066.           The full pathname of one or more Kermit network directory files.
  1067.           Equivalent to SET NETWORK DIRECTORY.
  1068.  
  1069.    K_INFO_DIRECTORY
  1070.    K_INFO_DIR
  1071.           The full pathname of a directory containing Kermit (if any)
  1072.           containing ckubwr.txt and other Kermit text files. Overrides
  1073.           Kermit's built-in search for this directory.
  1074.  
  1075.    The next group is related to dialing modems:
  1076.  
  1077.    K_COUNTRYCODE
  1078.           The telephonic numeric country code for this location, e.g. 1
  1079.           for North America or 39 for Italy. It is recommended that this
  1080.           one be set for all users, system-wide. Not only is it used to
  1081.           process portable-format dialing directory entries, but it is
  1082.           also compared against Kermit's built-in list of "tone countries"
  1083.           to see if tone dialing can be used. Equivalent to Kermit's SET
  1084.           DIAL COUNTRY-CODE command.
  1085.  
  1086.    K_AREACODE
  1087.           The telephonic numeric area code for this location, e.g. 212 for
  1088.           Manhattan, New York, USA. Recommend this one also be set
  1089.           system-wide, so shared portable-format dialing directories will
  1090.           work automatically for everybody. Equivalent to Kermit's SET
  1091.           DIAL AREA-CODE command.
  1092.  
  1093.    K_DIAL_METHOD
  1094.           TONE or PULSE. Equivalent to Kermit's SET DIAL METHOD command.
  1095.           If a dial method is not set explicitly (or implicitly from the
  1096.           country code), Kermit does not specify a dialing method, and
  1097.           uses the modem's default method, which tends to be pulse.
  1098.  
  1099.    K_INTL_PREFIX
  1100.           The telephonic numeric international dialing prefix for this
  1101.           location. Equivalent to Kermit's SET DIAL INTL-PREFIX command.
  1102.  
  1103.    K_LD_PREFIX
  1104.           The telephonic numeric long-distance dialing prefix for this
  1105.           location. Equivalent to Kermit's SET DIAL LD-PREFIX command.
  1106.  
  1107.    K_PBX_ICP
  1108.           The telephonic numeric PBX internal call prefix for this
  1109.           location. Equivalent to Kermit's SET DIAL PBX-INSIDE-PREFIX
  1110.           command.
  1111.  
  1112.    K_PBX_OCP
  1113.           The telephonic numeric PBX external call prefix for this
  1114.           location. Equivalent to Kermit's SET DIAL PBX-OUTSIDE-PREFIX
  1115.           command.
  1116.  
  1117.    K_PBX_XCH
  1118.           The telephonic numeric PBX exchange (first part of the
  1119.           subscriber number). Equivalent to Kermit's SET DIAL PBX-EXCHANGE
  1120.           command.
  1121.  
  1122.    K_TF_AREACODE
  1123.           A list of one or more telephonic numeric toll-free area codes.
  1124.  
  1125.    K_TF_PREFIX
  1126.           The telephonic numeric toll-free dialing prefix, in case it is
  1127.           different from the long-distance prefix. Equivalent to Kermit's
  1128.           SET DIAL TF-PREFIX command.
  1129.  
  1130.    The final group includes well-known environment variables that are also
  1131.    used by Kermit:
  1132.  
  1133.    CDPATH
  1134.           Where the CD command should look for relative directory names.
  1135.  
  1136.    SHELL
  1137.           The path of your Unix shell. Used by the RUN (!) command to
  1138.           choose the shell to execute its arguments.
  1139.  
  1140.    USER
  1141.           Your Unix username.
  1142.  
  1143.    EDITOR
  1144.           The name or path of your preferred editor (used by the EDIT
  1145.           command). Equivalent to SET EDITOR.
  1146.  
  1147.    BROWSER
  1148.           The name or path of your preferred web browser (used by the
  1149.           BROWSE command). Equivalent to Kermit's SET BROWSER command.
  1150.  
  1151.    Does this mean the initialization file can be abolished? I think so.
  1152.    Here's why:
  1153.  
  1154.      * Kermit already does everything most people want it to do without
  1155.        one.
  1156.      * Important site-specific customizations can be done with global
  1157.        environment variables.
  1158.      * There is no longer any need for everybody to have to use the
  1159.        standard initialization file.
  1160.      * This means that your initialization file, if you want one, can
  1161.        contain your own personal settings, definitions, and preferences,
  1162.        rather than 600 lines of "standard" setups.
  1163.      * If you still want the services directory, you can either TAKE the
  1164.        standard initialization file (which must be named anything other
  1165.        than $HOME/.kermrc to avoid being executed automatically every time
  1166.        you start Kermit), or you can make it a kerbang script and execute
  1167.        it "directly" (the [166]makefile install target does this for you
  1168.        by putting ckermit.ini in the same directory as the Kermit binary,
  1169.        adding the appropriate Kerbang line to the top, and giving it
  1170.        execute permission).
  1171.  
  1172.    In fact, you can put any number of kerbang scripts in your PATH to
  1173.    start up C-Kermit in different ways, to have it adopt certain settings,
  1174.    make particular connections, execute complicated scripts, whatever you
  1175.    want.
  1176.  
  1177.   5.2. Text Files
  1178.  
  1179.    These are entirely optional. Many of them are to be found at the Kermit
  1180.    website in HTML form (i.e. as Web pages with clickable links, etc), and
  1181.    very likely also more up to date. Plain-text files that correspond to
  1182.    Web pages were simply "dumped" by Lynx from the website to plain ASCII
  1183.    text. The format is whatever Lynx uses for this purpose. If you wish,
  1184.    you can install them on your computer as described in the [167]next
  1185.    section.
  1186.  
  1187.    [168]COPYING.TXT
  1188.           Copyright notice, permissions, and disclaimer.
  1189.  
  1190.    [169]ckermit.ini
  1191.           The standard initialization file, intended more for reference
  1192.           (in most cases) than actual use; see [170]Section 5.1.
  1193.  
  1194.    [171]ckermod.ini
  1195.           A sample customization file.
  1196.  
  1197.    [172]ckermit70.txt
  1198.           Supplement to [173]Using C-Kermit for version 7.0. Available on
  1199.           the Kermit website as:
  1200.           [174]http://www.columbia.edu/kermit/ckermit70.html
  1201.  
  1202.    [175]ckermit80.txt
  1203.           Supplement to [176]Using C-Kermit for version 8.0. Available on
  1204.           the Kermit website as:
  1205.           [177]http://www.columbia.edu/kermit/ckermit80.html
  1206.  
  1207.    [178]ckcbwr.txt
  1208.           The general C-Kermit hints and tips ("beware") file. Available
  1209.           on the Kermit website as:
  1210.           [179]http://www.columbia.edu/kermit/ckcbwr.html
  1211.  
  1212.    [180]ckubwr.txt
  1213.           The Unix-specific C-Kermit hints and tips file. Available on the
  1214.           Kermit website as:
  1215.           [181]http://www.columbia.edu/kermit/ckubwr.html
  1216.  
  1217.    [182]ckuins.txt
  1218.           Unix C-Kermit Installation Instructions (this file). Available
  1219.           on the Kermit website as:
  1220.           [183]http://www.columbia.edu/kermit/ckuins.html
  1221.  
  1222.    [184]ckccfg.txt
  1223.           C-Kermit compile-time configuration options. Available on the
  1224.           Kermit website as:
  1225.           [185]http://www.columbia.edu/kermit/ckccfg.html
  1226.  
  1227.    [186]ckcplm.txt
  1228.           The C-Kermit program logic manual. Available on the Kermit
  1229.           website as:
  1230.           [187]http://www.columbia.edu/kermit/ckcplm.html
  1231.  
  1232.    [188]ca_certs.pem
  1233.           Certificate Authority certificates for secure connections (see
  1234.           [189]Section 16).
  1235.  
  1236.   5.3. Installing the Kermit Files
  1237.  
  1238.    There is an "install" target in the [190]makefile that you can use if
  1239.    you wish. However, since every site has its own layout and
  1240.    requirements, it is often better to install the Kermit files by hand.
  1241.    You don't have to use the makefile install target to install C-Kermit.
  1242.    This is especially true since not all sites build C-Kermit from source,
  1243.    and therefore might not even have the makefile. But you should read
  1244.    this section in any case.
  1245.  
  1246.      If your computer already has an older version of C-Kermit installed,
  1247.      you should rename it (e.g. to "kermit6" or "kermit7") so in case you
  1248.      have any trouble with the new version, the old one is still
  1249.      available.
  1250.  
  1251.    In most cases, you need to be root to install C-Kermit, if only to gain
  1252.    write access to directories in which the binary and manual page are to
  1253.    be copied. The C-Kermit binary should be installed in a directory that
  1254.    is in the users' PATH, but that is not likely to be overwritten when
  1255.    you install a new version of the operating system. A good candidate
  1256.    would be the /usr/local/bin/ directory, but the specific choice is site
  1257.    dependent. Example (assuming the appropriate Kermit binary is stored in
  1258.    your current directory as "wermit", e.g. because you just built it from
  1259.    source and that's the name the makefile gave it):
  1260.  
  1261. mv wermit /usr/local/bin/kermit
  1262. chmod 755 /usr/local/bin/kermit
  1263.  
  1264.    or (only after you finish reading this section!) simply:
  1265.  
  1266. make install
  1267.  
  1268.    IMPORTANT: IF C-KERMIT IS TO BE USED FOR DIALING OUT, you must also do
  1269.    something to give it access to the dialout devices and lockfile
  1270.    directories. The 'install' target does not attempt to set Kermit's
  1271.    owner, group, and permissions to allow dialing out. This requires
  1272.    privileges, open eyes, and human decision-making. Please read
  1273.    [191]Sections 10 and [192]11 below, make the necessary decisions, and
  1274.    then implement them by hand as described in those sections.
  1275.  
  1276.    You should also install the man page, which is called ckuker.nr, in the
  1277.    man page directory for local commands, such as /usr/man/man1/, renamed
  1278.    appropriately, e.g. to kermit.1. This is also taken care of by "make
  1279.    install".
  1280.  
  1281.    Optionally, the text files listed in the [193]previous section can be
  1282.    placed in a publicly readable directory. Suggested directory names are:
  1283.  
  1284. /usr/local/doc/kermit/
  1285. /usr/local/lib/kermit/
  1286. /usr/share/lib/kermit/
  1287. /opt/kermit/doc/
  1288.  
  1289.    (or any of these without the "/kermit"). Upon startup, C-Kermit checks
  1290.    the following environment variables whose purpose is to specify the
  1291.    directory where the C-Kermit text files are, in the following order:
  1292.  
  1293. K_INFO_DIRECTORY
  1294. K_INFO_DIR
  1295.  
  1296.    If either of these is defined, C-Kermit checks for the existence of the
  1297.    ckubwr.txt file (Unix C-Kermit Hints and Tips). If not found, it checks
  1298.    the directories listed above (both with and without the "/kermit") plus
  1299.    several others to see if they contain the ckubwr.txt file. If found,
  1300.    various C-Kermit messages can refer the user to this directory.
  1301.  
  1302.    Finally, if you want to put the source code files somewhere for people
  1303.    to look at, you can do that too.
  1304.  
  1305.   5.4. The Makefile Install Target
  1306.  
  1307.    The makefile "install" target does almost everything for you if you
  1308.    give it the information it needs by setting the variables described
  1309.    below. You can use this target if:
  1310.  
  1311.      * You downloaded the [194]complete C-Kermit archive and built
  1312.        C-Kermit from source; or:
  1313.      * You downloaded an [195]individual C-Kermit binary and the
  1314.        [196]C-Kermit text-file archive, and your computer has a "make"
  1315.        command.
  1316.  
  1317.    Here are the parameters you need to know:
  1318.  
  1319.    BINARY
  1320.           Name of the binary you want to install as "kermit". Default:
  1321.           "wermit".
  1322.  
  1323.    prefix
  1324.           (lower case) If you define this variable, its value is prepended
  1325.           to all the following xxxDIR variables (8.0.211 and later).
  1326.  
  1327.    DESTDIR
  1328.           If you want to install the Kermit files in a directory structure
  1329.           like /opt/kermit/bin/, /opt/kermit/doc/, /opt/kermit/src/, then
  1330.           define DESTIR as the root of this structure; for example,
  1331.           /opt/kermit. The DESTDIR string should not end with a slash. By
  1332.           default, DESTDIR is not defined. If it is defined, but the
  1333.           directory does not exist, the makefile attempts to create it,
  1334.           which might require you to be root. Even so, this can fail if
  1335.           any segments in the path except the last one do not already
  1336.           exist. WARNING: If the makefile creates any directories, it
  1337.           gives them a mode of 755, and the default owner and group.
  1338.           Modify these by hand if necessary.
  1339.  
  1340.    BINDIR
  1341.           Directory in which to install the Kermit binary (and the
  1342.           standard C-Kermit initialization file, if it is found, as a
  1343.           Kerbang script). If DESTDIR is defined, BINDIR must start with a
  1344.           slash. BINDIR must not end with a slash. If DESTDIR is defined,
  1345.           BINDIR is a subdirectory of DESTDIR. If BINDIR does not exist,
  1346.           the makefile attempts to create it as with DESTDIR. Default:
  1347.           /usr/local/bin.
  1348.  
  1349.    MANDIR
  1350.           Directory in which to install the C-Kermit manual page as
  1351.           "kermit" followed by the manual-chapter extension (next item).
  1352.           Default: /usr/man/man1. If MANDIR is defined, the directory must
  1353.           already exist.
  1354.  
  1355.    MANEXT
  1356.           Extension for the manual page. Default: 1 (digit one).
  1357.  
  1358.    SRCDIR
  1359.           Directory in which to install the C-Kermit source code. If
  1360.           DESTDIR is defined, this is a subdirectory of DESTDIR. Default:
  1361.           None.
  1362.  
  1363.    CERTDIR
  1364.           For secure builds only: Directory in which to install the
  1365.           ca_certs.pem file. This must be the verification directory used
  1366.           by programs that use the SSL libraries at your site. Default:
  1367.           none. Possibilities include: /usr/local/ssl, /opt/ssl,
  1368.           /usr/lib/ssl, . . .     If CERTDIR is defined, the directory
  1369.           must already exist.
  1370.  
  1371.    INFODIR
  1372.           Directory in which to install the C-Kermit text files. If
  1373.           DESTDIR is defined, this is a subdirectory of DESTDIR. Default:
  1374.           None. If INFODIR is defined but does not exist, the makefile
  1375.           attempts to create it, as with DESTDIR.
  1376.  
  1377.    Examples:
  1378.  
  1379.    make install
  1380.           Installs "wermit" as /usr/local/bin/kermit with permissions 755,
  1381.           the default owner and group, and no special privileges. The
  1382.           manual page is installed as /usr/man/man1/kermit.1. Text files
  1383.           are not copied anywhere, nor are the sources.
  1384.  
  1385.    make MANDIR= install
  1386.           Just like "make install" but does not attempt to install the
  1387.           manual page.
  1388.  
  1389.    make DESTDIR=/opt/kermit BINDIR=/bin SRCDIR=/src INFODIR=/doc install
  1390.           Installs the Kermit binary "wermit" as /opt/kermit/bin/kermit,
  1391.           puts the source code in /opt/kermit/src, and puts the text files
  1392.           in /opt/kermit/doc, creating the directories if they don't
  1393.           already exist, and puts the man page in the default location.
  1394.  
  1395.    make BINDIR=/usr/local/bin CERTDIR=/usr/local/ssl install
  1396.           Installs the Kerberized Kermit binary "wermit" as
  1397.           /usr/local/bin/kermit, puts the CA Certificates file in
  1398.           /usr/local/ssl/, and the man page in the normal place.
  1399.  
  1400.    For definitive information, see the makefile. The following is
  1401.    excerpted from the 8.0.211 makefile:
  1402.  
  1403. # The following symbols are used to specify library and header file locations
  1404. # Redefine them to the values used on your system by:
  1405. # . editing this file
  1406. # . defining the values on the command line
  1407. # . defining the values in the environment and use the -e option
  1408. #
  1409. prefix  = /usr/local
  1410. srproot = $(prefix)
  1411. sslroot = $(prefix)
  1412. manroot = $(prefix)
  1413.  
  1414. K4LIB=-L/usr/kerberos/lib
  1415. K4INC=-I/usr/kerberos/include
  1416. K5LIB=-L/usr/kerberos/lib
  1417. K5INC=-I/usr/kerberos/include
  1418. SRPLIB=-L$(srproot)/lib
  1419. SRPINC=-I$(srproot)/include
  1420. SSLLIB=-L$(sslroot)/ssl/lib
  1421. SSLINC=-I$(sslroot)/ssl/include
  1422. ...
  1423. WERMIT = makewhat
  1424. BINARY = wermit
  1425. DESTDIR =
  1426. BINDIR = $(prefix)/bin
  1427. MANDIR = $(manroot)/man/man1
  1428. MANEXT = 1
  1429. SRCDIR =
  1430. INFODIR =
  1431. CERTDIR =
  1432.   ___________________________________________________________________________
  1433.  
  1434. 6. INSTALLING UNIX C-KERMIT FROM DOS-FORMAT DISKETTES
  1435.  
  1436.    [ [197]Top ] [ [198]Contents ] [ [199]Next ] [ [200]Previous ]
  1437.  
  1438.      This section is obsolete. We don't distribute C-Kermit on diskettes
  1439.      any more because (a)there is no demand, and (b) it no longer fits.
  1440.  
  1441.    If you received a DOS-format diskette containing a binary executable
  1442.    C-Kermit program plus supporting text files, be sure to chmod +x the
  1443.    executable before attempting to run it.
  1444.  
  1445.    In version 5A(190) and later, all the text files on the C-Kermit
  1446.    DOS-format diskettes are in Unix format: LF at the end of each line
  1447.    rather than CRLF. This means that no conversions are necessary when
  1448.    copying to your Unix file system, and that all the files on the
  1449.    diskette, text and binary, can be copied together. The following
  1450.    comments apply to the DOS-format diskettes furnished with version
  1451.    5A(189) and earlier or to other DOS-format diskettes you might have
  1452.    obtained from other sources.
  1453.  
  1454.    If you have received C-Kermit on MS-DOS format diskettes (such as those
  1455.    distributed by Columbia University), you should make sure that your
  1456.    DOS-to-Unix conversion utility (such as "dosread") both: (1) changes
  1457.    line terminators in all files from carriage-return linefeed (CRLF) to
  1458.    just linefeed (LF) (such as "dosread -a") and remove any Ctrl-Z's, and
  1459.    (2) that all filenames are converted from uppercase to lowercase. If
  1460.    these conversions were not done, you can use the following shell script
  1461.    on your Unix system to do them:
  1462.  
  1463. ---(cut here)---
  1464. #!/bin/sh
  1465. #
  1466. # Shell script to convert C-Kermit DOS-format files into Unix format.
  1467. # Lowercases the filenames, strips out carriage returns and Ctrl-Z's.
  1468. #
  1469. x=$1 # the name of the source directory
  1470. y=$2 # the name of the target directory if [ $# -lt 2 ]; then
  1471.   echo "usage: $0 source-directory target-directory"
  1472.   exit 1
  1473. fi
  1474. if cd $1 ; then
  1475.   echo "Converting files from $1 to $2"
  1476. else
  1477.   echo "$0: cannot cd to $1"
  1478.   exit 1
  1479. fi
  1480. for i in *; do
  1481.   j=`echo $i | tr 'A-Z' 'a-z'`
  1482.   echo $x/$i =\> $y/$j
  1483.   tr -d '\015\032' < $i > $y/$j
  1484. done
  1485. ---(cut here)---
  1486.  
  1487.    Cut out this shell script, save it as "convert.sh" (or any other name
  1488.    you prefer), then "chmod +x convert.sh". Then, create a new, empty
  1489.    directory to put the converted files in, and then "convert.sh /xxx
  1490.    /yyy" where /xxx is the name of the directory where the PC-format files
  1491.    are, and /yyy is the name of the new, empty directory. The converted
  1492.    files will appear in the new directory.
  1493.   ___________________________________________________________________________
  1494.  
  1495. 7. CHECKING THE RESULTS
  1496.  
  1497.    [ [201]Top ] [ [202]Contents ] [ [203]Next ] [ [204]Previous ]
  1498.  
  1499.    First some quick checks for problems that can be easily corrected by
  1500.    recompiling with different options:
  1501.  
  1502.    DIRECTORY listing is garbage
  1503.           Permissions, size, and date are random garbage (but the
  1504.           filenames are correct) in a C-Kermit DIRECTORY listing. On some
  1505.           platforms, the lstat() function is present but simply doesn't
  1506.           work; try adding -DNOLSTAT to CFLAGS and rebuild. If that
  1507.           doesn't fix it, also add -DNOLINKBITS. If it's still not fixed,
  1508.           remove -DNOLSTAT and -DNOLINKBITS and add -DNOSYMLINK.
  1509.  
  1510.    curses
  1511.           When you make a connection with C-Kermit and transfer files
  1512.           using the fullscreen (curses) file-transfer display, and then
  1513.           get the C-Kermit> prompt back afterwards, do characters echo
  1514.           when you type them? If not, the curses library has altered the
  1515.           buffering of /dev/tty. Try rebuilding with KFLAGS=-DCK_NEWTERM.
  1516.           If it already has -DCK_NEWTERM in CFLAGS, try removing it. If
  1517.           that doesn't help, then rebuild with -DNONOSETBUF (yes, two
  1518.           NO's). If none of this works (and you can't fix the code), then
  1519.           either don't use the fullscreen display, or rebuild with
  1520.           -DNOCURSES.
  1521.  
  1522.    Ctrl-L or any SCREEN command crashes C-Kermit:
  1523.           Rebuild with -DNOTERMCAP.
  1524.  
  1525.    No prompt after CONNECT:
  1526.           After escaping back from CONNECT mode, does your C-Kermit>
  1527.           prompt disappear? (Yet, typing "?" still produces a command
  1528.           list, etc) In that case, add -DCKCONINTB4CB to CFLAGS and
  1529.           rebuild.
  1530.  
  1531.    Here is a more thorough checklist can use to tell whether your version
  1532.    of C-Kermit was built correctly for your Unix system, with hints on how
  1533.    to fix or work around problems:
  1534.  
  1535.     a. Start C-Kermit (usually by typing "./wermit" in the directory where
  1536.        you ran the makefile). Do you see the C-Kermit> prompt? If not,
  1537.        C-Kermit incorrectly deduced that it was running in the background.
  1538.        The test is in conbgt() in [205]ckutio.c. If you can fix it for
  1539.        your system, please send in the fix (Hint: read about "PID_T"
  1540.        below). Otherwise, you can force C-Kermit to foreground mode by
  1541.        starting it with the -z command line option, as in "kermit -z", or
  1542.        giving the interactive command SET BACKGROUND OFF.
  1543.     b. When you type characters at the C-Kermit prompt, do they echo
  1544.        immediately? If not, something is wrong with concb() and probably
  1545.        the other terminal mode settings routines in [206]ckutio.c. Be sure
  1546.        you have used the most appropriate make entry.
  1547.     c. At the C-Kermit> prompt, type "send ./?". C-Kermit should list all
  1548.        the files in the current directory. If not, it was built for the
  1549.        wrong type of Unix file system. Details below. In the meantime, try
  1550.        SET WILDCARD-EXPANSION SHELL as a workaround.
  1551.     d. CD to a directory that contains a variety of files, symlinks, and
  1552.        subdirectories and give a DIRECTORY command at the C-Kermit>
  1553.        prompt. Do the permissions, size, and date appear correct? If not
  1554.        see [207]Section 4.0.
  1555.     e. Assuming your platform supports long file names, create a file with
  1556.        a long name in your current directory, e.g.:
  1557.  
  1558. $ touch thisisafilewithaveryveryveryveryveryveryveryverylooooooooongname
  1559.  
  1560.        (you might need to make it longer than this, perhaps as long as 257
  1561.        or even 1025 characters).
  1562.        Check with ls to see if your version of Unix truncated the name.
  1563.        Now start C-Kermit and type "send thisis<ESC>". Does Kermit
  1564.        complete the name, showing the same name as ls did? If not, wrong
  1565.        filesystem. Read on.
  1566.     f. Make sure that Kermit has the maximum path length right. Just type
  1567.        SHOW FILE and see what it says about this. If it is too short,
  1568.        there could be some problems at runtime. To correct, look in
  1569.        [208]ckcdeb.h to see how the symbol CKMAXPATH is set and make any
  1570.        needed adjustments.
  1571.     g. Send a file to your new Kermit program from a different Kermit
  1572.        program that is known to work. Is the date/timestamp of the new
  1573.        file identical to the original? If not, adjustments are needed in
  1574.        zstrdt() in [209]ckufio.c.
  1575.     h. Go to another computer (Computer B) from which you can send files
  1576.        to C-Kermit. Connect Computer B to the computer (A) where you are
  1577.        testing C-Kermit. Then:
  1578.     i. Send a file from B to A. Make sure it transferred OK and was
  1579.        created with the the right name.
  1580.     j. Send a file from B to A, specifying an "as-name" that is very, very
  1581.        long (longer than the maximum name length on computer A). Check to
  1582.        make sure that the file was received OK and that its name was
  1583.        truncated to Computer A's maximum length. If not, check the
  1584.        MAXNAMLEN definition in [210]ckufio.c.
  1585.     k. Tell C-Kermit on Computer A to "set receive pathnames relative" and
  1586.        then send it a file from Computer B specifying an as-name that
  1587.        contains several directory segments:
  1588.  
  1589. send foo dir1/dir2/dir3/foo
  1590.  
  1591.        Check to make sure that dir1/dir2/dir3/foo was created in Computer
  1592.        A's current directory (i.e. that three levels of directories were
  1593.        created).
  1594.     l. Repeat step k, but make each path segment in the pathname longer
  1595.        than Computer A's maximum name length. Make sure each directory
  1596.        name, and the final filename, were truncated properly.
  1597.     m. Type Ctrl-C (or whatever your Unix interrupt character is) at the
  1598.        prompt. Do you get "^C..." and a new prompt? If instead, you get a
  1599.        core dump (this shouldn't happen any more) "rm core" and then
  1600.        rebuild with -DNOCCTRAP added to your CFLAGS. If it did work, then
  1601.        type another Ctrl-C. If this does the same thing as the first one,
  1602.        then Ctrl-C handling is OK. Otherwise, the SIGINT signal is either
  1603.        not getting re-armed (shouldn't happen) or is being masked off
  1604.        after the first time it is caught, in which case, if your Unix is
  1605.        POSIX-based, try rebuilding C-Kermit with -DCK_POSIX_SIG.
  1606.     n. Type Ctrl-Z (or whatever your Unix suspend character is) to put
  1607.        C-Kermit in the background. Did it work? If nothing happened, then
  1608.        (a)your version of Unix does not support job control, or (b) your
  1609.        version of C-Kermit was probably built with -DNOJC. If your session
  1610.        became totally frozen, then you are probably running C-Kermit on a
  1611.        Unix version that supports job control, but under a shell that
  1612.        doesn't. If that's not the case, look in the congm() and psuspend()
  1613.        routines in [211]ckutio.c and see if you can figure out what's
  1614.        wrong. If you can't, rebuild with -DNOJC.
  1615.     o. Give a SET LINE command for a dialout device, e.g. "set line
  1616.        /dev/tty00". If you got some kind of permission or access denied
  1617.        message, go read [212]Section 10 and then come back here.
  1618.     p. After giving a successful SET LINE command, type "show comm" to see
  1619.        the communication parameters. Do they make sense?
  1620.     q. Type "set speed ?" and observe the list of available speeds. Is it
  1621.        what you expected? If not, see [213]Section 2) of the
  1622.        [214]Configurations Options document.
  1623.     r. Give a SET SPEED command to change the device's speed. Did it work?
  1624.        (Type "show comm" again to check.)
  1625.     s. Try dialing out: SET MODEM TYPE , SET LINE , SET SPEED , DIAL . If
  1626.        it doesn't work, keep reading. After dialing, can you REDIAL?
  1627.     t. If your version was built with TCP/IP network support, try the
  1628.        TELNET command.
  1629.     u. Transfer some files in remote mode on incoming asynchronous serial
  1630.        (direct or modem) connections, and on incoming network (telnet,
  1631.        rlogin, terminal server) connections. If you get lots of errors,
  1632.        try different SET FLOW settings on the remote Kermit program.
  1633.     v. Establish a serial connection from C-Kermit to another computer
  1634.        (direct or dialed) and transfer some files. If you have network
  1635.        support, do the same with a network connection.
  1636.     w. If your version was built with fullscreen file transfer display
  1637.        support, check that it works during local-mode file transfer. Also,
  1638.        check C-Kermit's operation afterwards: is the echoing funny? etc
  1639.        etc. If there are problems, see [215]Section 4.
  1640.     x. If your version was built with script programming language support,
  1641.        TAKE the ckedemo.ksc file to give it a workout.
  1642.     y. Does C-Kermit interlock correctly with UUCP-family programs (cu,
  1643.        tip, uucp, etc)? If not, read the section [216]DIALING OUT AND
  1644.        COORDINATING WITH UUCP below.
  1645.     z. Modem signals... Give a SET LINE command to a serial device and
  1646.        then type the SHOW MODEM command. If it says "Modem signals
  1647.        unavailable in this version of Kermit", then you might want to look
  1648.        at the ttgmdm() routine in [217]ckutio.c and add the needed code --
  1649.        if indeed your version of Unix provides a way to get modem signals
  1650.        (some don't; e.g. modem signals are a foreign concept to POSIX,
  1651.        requiring politically incorrect workarounds).
  1652.    aa. If it says "Modem signals unavailable", then it is likely that the
  1653.        API for getting modem signals is provided, but it doesn't actually
  1654.        do anything (e.g. ioctl(ttyfd,TIOCMGET,&x) returns EINVAL).
  1655.    ab. In any case, it still should be able to manipulate the DTR signal.
  1656.        To test, SET LINE , SET MODEM NONE, and HANGUP. The DTR light
  1657.        should go out momentarily. If it doesn't, see if you can add the
  1658.        needed code for your system to the tthang() routine in
  1659.        [218]ckutio.c.
  1660.    ac. If your version of Kermit has the SET FLOW RTS/CTS command, check
  1661.        to see if it works: give Kermit this command, set your modem for
  1662.        RTS/CTS, transfer some files (using big packet and window sizes)
  1663.        and watch the RTS and CTS lights on the modem. If they go on and
  1664.        off (and Kermit does not get packet errors), then it works. If your
  1665.        version of Kermit does not have this command, but your version of
  1666.        Unix does support hardware flow control, take a look at the
  1667.        tthflow() command in [219]ckutio.c and see if you can add the
  1668.        needed code (see the section on [220]HARDWARE FLOW CONTROL below).
  1669.        (And please [221]send back any added code, so that others can
  1670.        benefit from it and it can be carried forward into future
  1671.        releases.)
  1672.    ad. If C-Kermit starts normally and issues its prompt, echoing is
  1673.        normal, etc, but then after returning from a CONNECT session, the
  1674.        prompt no longer appears, try rebuilding with -DCKCONINTB4CB.
  1675.    ae. (8.0.206 or later) Type some commands at the C-Kermit prompt. Can
  1676.        you use the Up-arrow and Down-arrow keys on your keyboard to access
  1677.        Kermit's command history? If not, and you're a programmer, take a
  1678.        look at the USE_ARROWKEYS sections of ckucmd.c.
  1679.   ___________________________________________________________________________
  1680.  
  1681. 8. REDUCING THE SIZE OF THE EXECUTABLE PROGRAM IMAGE
  1682.  
  1683.    [ [222]Top ] [ [223]Contents ] [ [224]Next ] [ [225]Previous ]
  1684.  
  1685.    Also see: [226]C-Kermit Configuration Options
  1686.  
  1687.     a. Many of C-Kermit's options and features can be deselected at
  1688.        compile time. The greatest savings at the least sacrifice in
  1689.        functionality is to disable the logging of debug information by
  1690.        defining NODEBUG during compilation. See the [227]Configurations
  1691.        Options document for further information.
  1692.     b. Use shared libraries rather than static linking. This is the
  1693.        default on many Unix systems anyway. However, executables built for
  1694.        dynamic linking with shared libraries are generally not portable
  1695.        away from the machine they were built on, so this is recommended if
  1696.        the binary is for your use only.
  1697.     c. Most Unix systems have a "strip" command to remove symbol table
  1698.        information from an executable program image. "man strip" for
  1699.        further information. The same effect can be achieved by including
  1700.        "-s" among the link flags when building C-Kermit.
  1701.     d. SCO, Interactive, and some other Unix versions have an "mcs"
  1702.        command. "mcs -d wermit" can be used to delete the contents of the
  1703.        ".comment" section from the executable program image.
  1704.     e. Many modern optimizers can be instructed to optimize for space
  1705.        rather than execution efficiency. Check the CFLAGS in the makefile
  1706.        target, adjust as desired.
  1707.   ___________________________________________________________________________
  1708.  
  1709. 9. UNIX VERSIONS
  1710.  
  1711.    [ [228]Top ] [ [229]Contents ] [ [230]Next ] [ [231]Previous ]
  1712.  
  1713.    SECTION CONTENTS
  1714.  
  1715. 9.1 [232]Standards
  1716.      9.1.1. [233]POSIX
  1717.      9.1.2. [234]ANSI C
  1718.      9.1.3. [235]Other Standards
  1719. 9.2. [236]Library Issues
  1720. 9.3. [237]Unix File System Peculiarities
  1721. 9.4. [238]Hardware Flow Control
  1722. 9.5. [239]Terminal Speeds
  1723. 9.6. [240]Millisecond Sleeps
  1724. 9.7. [241]Nondestructive Input Buffer Peeking
  1725. 9.8. [242]Other System-Dependent Features
  1726. 9.9. [243]Terminal Interruption
  1727.  
  1728.    There are several major varieties of Unix: Bell Laboratories Seventh
  1729.    Edition, AT&T System V, Berkeley Standard Distribution (BSD), and
  1730.    POSIX. Each has many, many subvarieties and descendents, and there are
  1731.    also hybrids that exhibit symptoms of two or more varieties, plus
  1732.    special quirks of their own.
  1733.  
  1734.    Seventh edition versions of C-Kermit include the compile-time option
  1735.    -DV7 in the CFLAGS string in the makefile target. Various V7-based
  1736.    implementations are also supported: -DCOHERENT, -DMINIX, etc.
  1737.  
  1738.    AT&T-based versions of Unix Kermit include the compile-time option
  1739.    -DATTSV (standing for AT∓T Unix System V). This applies to System
  1740.    III and to System V up to and including Release 2. For System V Release
  1741.    3, the flag -DSVR3 should be used instead (which also implies -DATTSV).
  1742.    This is because the data type of signal() and several other functions
  1743.    was changed between SVR2 and SVR3. For System V Release 4, include
  1744.    -DSVR4 because of changes in UUCP lockfile conventions; this also
  1745.    implies -DSVR3 and -DATTSV.
  1746.  
  1747.    For BSD, the flag -BSDxx must be included, where xx is the BSD version
  1748.    number, for example BSD4 (for version 4.2 or later, using only 4.2
  1749.    features), -DBSD41 (for BSD 4.1 only), -DBSD43 (for 4.3), -DBSD29 (BSD
  1750.    2.9 for DEC PDP-11s). -DBSD44 is for 4.4BSD, which is the basis of
  1751.    FreeBSD, NetBSD, OpenBSD, BSDI, and Mac OS X, and which contains many
  1752.    POSIX features, and has little relation to 4.3BSD and earlier.
  1753.  
  1754.    For POSIX, include the flag -DPOSIX. POSIX defines a whole new set of
  1755.    terminal i/o functions that are not found in traditional AT&T or
  1756.    Berkeley implementations, and also defines the symbol _POSIX_SOURCE,
  1757.    which is used in many system and library header files, mainly to
  1758.    disable non-POSIX (i.e. useful) features.
  1759.  
  1760.    Note (circa 1997): In order to enable serial speeds higher than 38400
  1761.    bps, it is generally necessary to add -DPOSIX (among other things),
  1762.    since the older terminal APIs can not accommodate the new speeds -- out
  1763.    o' bits. But this often also means wholesale conversion to POSIX APIs.
  1764.    In general, just try adding -DPOSIX and then see what goes wrong. Be
  1765.    wary of features disappearing: when _POSIX_SOURCE is defined, all sorts
  1766.    of things that were perfectly OK before suddenly become politically
  1767.    incorrect -- like reading modem signals, doing hardware flow control,
  1768.    etc. POSIX was evidently not designed with serial communication in
  1769.    mind!
  1770.  
  1771.    Case in point: In UnixWare 7.0, #define'ing POSIX causes strictness
  1772.    clauses in the header files to take effect. These prevent <sys/time.h>
  1773.    from defining the timeval and timezone structs, which are needed for
  1774.    all sorts of things (like select()). Thus, if we want the high serial
  1775.    speeds, we have to circumvent the POSIX clauses.
  1776.  
  1777.    Similarly in SCO OpenServer R5.0.4 where, again, we must use the POSIX
  1778.    APIs to get at serial speeds higher than 38400, but then doing so
  1779.    removes hardware flow control -- just when we need it most! In cases
  1780.    like this, dirty tricks are the only recourse (search for SCO_OSR504 in
  1781.    [244]ckutio.c for examples).
  1782.  
  1783.    For reasons like this, Unix implementations tend to be neither pure
  1784.    AT&T nor pure BSD nor pure POSIX, but a mixture of two or more of
  1785.    these, with "compatibility features" allowing different varieties of
  1786.    programs to be built on the same computer. In general, Kermit tries not
  1787.    to mix and match but to keep a consistent repertoire throughout.
  1788.    However, there are certain Unix implementations that only work when you
  1789.    mix and match. For example, the Silicon Graphics IRIX operating system
  1790.    (prior to version 3.3) is an AT&T Unix but with a BSD file system. The
  1791.    only way you can build Kermit successfully for this configuration is to
  1792.    include -DSVR3 plus the special option -DLONGFN, meaning "pretend I was
  1793.    built with -DBSDxx when it's time to compile file-related code". See
  1794.    the "iris" makefile target.
  1795.     _________________________________________________________________________
  1796.  
  1797.   9.1. Standards
  1798.  
  1799.    [ [245]Top ] [ [246]Section Contents ] [ [247]Contents ] [ [248]Next ]
  1800.  
  1801.    SUBSECTION CONTENTS
  1802.  
  1803. 9.1.1. [249]POSIX
  1804. 9.1.2. [250]ANSI C
  1805. 9.1.3. [251]Other Standards
  1806.  
  1807.    In edits 166-167 (1988-89), C-Kermit was heavily modified to try to
  1808.    keep abreast of new standards while still remaining compatible with old
  1809.    versions of C and Unix. There are two new standards of interest: ANSI C
  1810.    (as described in Kernighan and Ritchie, "The C Programming Language",
  1811.    Second Edition, Prentice Hall, 1988) and POSIX.1 (IEEE Standard 1003.1
  1812.    and ISO/IEC 9945-1, 1990, "Portable Operating System Interface"). These
  1813.    two standards have nothing to do with each other: you can build
  1814.    C-Kermit with a non-ANSI compiler for a POSIX system, or for a
  1815.    non-POSIX system with with an ANSI compiler.
  1816.  
  1817.     9.1.1. POSIX
  1818.  
  1819.    POSIX.1 defines a repertoire of system functions and header files for
  1820.    use by C language programs. Most notably, the ioctl() function is not
  1821.    allowed in POSIX; all ioctl() functions have been replaced by
  1822.    device-specific functions like tcsetattr(), tcsendbreak(), etc.
  1823.  
  1824.    Computer systems that claim some degree of POSIX compliance have made
  1825.    some attempt to put their header files in the right places and give
  1826.    them the right names, and to provide system library functions with the
  1827.    right names and calling conventions. Within the header files,
  1828.    POSIX-compliant functions are supposed to be within #ifdef
  1829.    _POSIX_SOURCE..#endif conditionals, and non-POSIX items are not within
  1830.    these conditionals.
  1831.  
  1832.    If Kermit is built with neither -D_POSIX_SOURCE nor -DPOSIX, the
  1833.    functions and header files of the selected version of Unix (or VMS,
  1834.    etc) are used according to the CFLAGS Kermit was built with.
  1835.  
  1836.    If Kermit is built with -D_POSIX_SOURCE but not -DPOSIX, then one of
  1837.    the -DBSD or -DATTSV flags (or one that implies them) must also be
  1838.    defined, but it still uses only the POSIX features in the system header
  1839.    files. This allows C-Kermit to be built on BSD or AT&T systems that
  1840.    have some degree of POSIX compliance, but still use BSD or AT&T
  1841.    specific features.
  1842.  
  1843.    The dilimma is this: it is often necessary to define _POSIX_SOURCE to
  1844.    get at new or modern features, such as high serial speeds and the APIs
  1845.    to deal with them. But defining _POSIX_SOURCE also hides other APIs
  1846.    that Kermit needs, for example the ones dealing with modem signals
  1847.    (others are listed just below). Thus all sorts of hideous contortions
  1848.    are often required to get a full set of features.
  1849.  
  1850.    The POSIX standard does not define anything about uucp lockfiles. "make
  1851.    posix" uses NO (repeat, NO) lockfile conventions. If your
  1852.    POSIX-compliant Unix version uses a lockfile convention such as HDBUUCP
  1853.    (see below), use the "posix" entry, but include the appropriate
  1854.    lockfile option in your KFLAGS on the "make" command line, for example:
  1855.  
  1856. make posix "KFLAGS=-DHDBUUCP"
  1857.  
  1858.    POSIX.1 also lacks certain other features that Kermit needs. For
  1859.    example:
  1860.  
  1861.      * There is no defined way for an application to do wildcard matching
  1862.        of filenames. Kermit uses the inode in the directory structure, but
  1863.        POSIX.1 does not include this concept. (Later POSIX revisions
  1864.        include functions named (I think) glob() and fnmatch(), but these
  1865.        functions are not yet in Kermit, and might not be appropriate in
  1866.        any case.)
  1867.      * There is no POSIX mechanism for sensing or controlling modem
  1868.        signals, nor to enable RTS/CTS or other hardware flow control.
  1869.      * There is no select() for multiplexing i/o, and therefore no TCP/IP.
  1870.      * There is no way to check if characters are waiting in a
  1871.        communications device (or console) input buffer, short of trying to
  1872.        read them -- no select(), ioctl(fd,FIONREAD,blah), rdchk(), etc.
  1873.        This is bad for CONNECT mode and bad for sliding windows.
  1874.      * No way to do a millisecond sleep (no nap(), usleep(), select(),
  1875.        etc).
  1876.      * There is no popen().
  1877.  
  1878.    So at this point, there cannot be one single fully functional POSIX
  1879.    form of C-Kermit unless it also has "extensions", as do Linux, QNX,
  1880.    etc.
  1881.  
  1882.    More on POSIX (quoting from a newsgroup posting by Dave Butenhof):
  1883.  
  1884.      Standards tend to look at themselves as "enabling". So POSIX
  1885.      standards say that, in order to use POSIX functions, a program must
  1886.      define some macro that will put the development environment in
  1887.      "POSIX mode". For the ancient POSIX 1003.1-1990, the symbol is
  1888.      _POSIX_SOURCE. For recent revisions, it's _POSIX_C_SOURCE with an
  1889.      appropriate value. POSIX 1003.1-1996 says that, to use its features
  1890.      in a portable manner, you must define _POSIX_C_SOURCE=199506L before
  1891.      including any header files.
  1892.  
  1893.      But for Solaris, or Digital Unix, the picture is different. POSIX is
  1894.      one important but small part of the universe. Yet POSIX
  1895.      unconditionally and unambiguously REQUIRES that, when
  1896.      _POSIX_C_SOURCE=199506L, ALL of the functions and definitions
  1897.      required by the standard, and NO others (except in specific
  1898.      restricted namespaces, specifically "_" followed by an uppercase
  1899.      letter or "__" followed by a lowercase letter) shall be visible.
  1900.      That kinda puts a cramp on BSD and SVID support, because those
  1901.      require names that are not in the "protected" POSIX namespaces. It's
  1902.      ILLEGAL to make those symbols visible, unless you've done something
  1903.      else that's beyond the scope of POSIX to allow the system to infer
  1904.      that you didn't really mean it.
  1905.  
  1906.      In most cases, you should just compile, with no standards-related
  1907.      macros defined. The system will make available every interface and
  1908.      definition that isn't incompatible with the "main stream". There may
  1909.      indeed be cases where two standards cross, and you really can't use
  1910.      both together. But, in general, they play nicely together as long as
  1911.      you don't do anything rash -- like telling the system that it's not
  1912.      allowed to let them.
  1913.  
  1914.      In the area of threads, both Solaris and Digital Unix support
  1915.      incompatible thread APIs. We have POSIX and DCE, they have POSIX and
  1916.      UI. The nasty areas are in the _r routines and in some aspects of
  1917.      signal behavior. You cannot compile a single source file that uses
  1918.      both semantics. That's life. It sounds as if Solaris defaults to the
  1919.      UI variants, but allows you to define this _POSIX_THREAD_SEMANTICS
  1920.      to get around it. We default to POSIX, and allow you to define
  1921.      _PTHREAD_USE_D4 (automatically defined by the cc "-threads" switch)
  1922.      to select the DCE thread variants. That default, because you're
  1923.      operating outside of any individual standard, is really just a
  1924.      marketing decision.
  1925.       _______________________________________________________________________
  1926.  
  1927.     9.1.2. ANSI C
  1928.  
  1929.    [ [252]Top ] [ [253]Contents ] [ [254]Section Contents ] [
  1930.    [255]Subsection Contents ] [ [256]Next ] [ [257]Previous ]
  1931.  
  1932.    The major difference between ANSI C and earlier C compilers is function
  1933.    prototyping. ANSI C allows function arguments to be checked for type
  1934.    agreement, and (when possible) type coercion in the event of a
  1935.    mismatch. For this to work, functions and their arguments must be
  1936.    declared before they are called. The form for function declarations is
  1937.    different in ANSI C and non-ANSI C (ANSI C also accepts the earlier
  1938.    form, but then does not do type checking).
  1939.  
  1940.    As of edit 167, C-Kermit tries to take full advantage of ANSI C
  1941.    features, especially function prototyping. This removes many bugs
  1942.    introduced by differing data types used or returned by the same
  1943.    functions on different computers. ANSI C features are automatically
  1944.    enabled when the symbol __STDC__ is defined. Most ANSI C compilers,
  1945.    such as GNU CC and the new DEC C compiler define this symbol
  1946.    internally.
  1947.  
  1948.    On the downside, ANSI C compilation increases the
  1949.    administrative/bureacratic burden, spewing out countless unneeded
  1950.    warnings about mismatched types, especially when we are dealing with
  1951.    signed and unsigned characters, requiring casts everywhere to shut up
  1952.    the mindless complaints -- there is no use for signed chars in Kermit
  1953.    (or probably anywhere else). Some compilers, mercifully, include a
  1954.    "treat all chars as unsigned" option, and when available it should be
  1955.    used -- not only to stop the warnings, but also to avoid unhelpful sign
  1956.    extension on high-bit characters.
  1957.  
  1958.    To force use of ANSI C prototypes, include -DCK_ANSIC on the cc command
  1959.    line. To disable the use of ANSI prototypes, include -DNOANSI.
  1960.       _______________________________________________________________________
  1961.  
  1962.     9.1.3. Other Standards
  1963.  
  1964.    [ [258]Top ] [ [259]Contents ] [ [260]Section Contents ] [
  1965.    [261]Subsection Contents ] [ [262]Next ] [ [263]Previous ]
  1966.  
  1967.    As the years go by, standards with-which-all-must-comply continue to
  1968.    pile up: AES, XPG2, XPG3, XPG4, FIPS 151-2, successive generations of
  1969.    POSIX, OSF/1, X/Open, Spec 1170, UNIX95, Open Group UNIX98, ISO/IEC
  1970.    9945 parts 1-4, ISO 9899, 88Open, OS 99, Single Unix Specification
  1971.    (SUS, [264]IEEE 1003.1-2001, not to mention "mature standards" like V7,
  1972.    4.2/4.3BSD, System V R3 and R4 (SVID2 and SVID3), 4.4BSD (the basis for
  1973.    BSDI, OpenBSD, NetBSD, FreeBSD, Mac OS X etc), /usr/group, plus
  1974.    assorted seismic pronouncements of the neverending series of ephemeral
  1975.    corporate consortia, not to mention the libc-vs-glibc turmoil in the
  1976.    Linux arena and who knows what else.
  1977.  
  1978.    None of these standards simplifies life for portable applications like
  1979.    C-Kermit -- each one is simply one more environment to support (or
  1980.    circumvent, as in many cases these standards do more harm than good by
  1981.    denying access to facilities we need, e.g. as noted in above in
  1982.    [265]9.1.1).
  1983.     _________________________________________________________________________
  1984.  
  1985.   9.2. Library Issues
  1986.  
  1987.    [ [266]Top ] [ [267]Contents ] [ [268]Section Contents ] [
  1988.    [269]Subsection Contents ] [ [270]Next ] [ [271]Previous ]
  1989.  
  1990.    On most modern platforms, applications are -- and often must be --
  1991.    dynamically linked. This has numerous advantages (smaller executables,
  1992.    ability to patch a library and thereby patch all applications that use
  1993.    it, etc), but also causes some headaches: most commonly, the library ID
  1994.    built into the executable at link time does not match the ID of the
  1995.    corresponding library on the target system, and so the loader refuses
  1996.    to let the application run.
  1997.  
  1998.    This problem only gets worse over time. In the Linux and *BSD world, we
  1999.    also have totally different libraries (each with their own names and
  2000.    numbering systems) that cover the same territory; for example, curses
  2001.    vs ncurses, libc versus glibc. Combinations proliferate and any given
  2002.    Unix computer might have any combination. For this reason it is
  2003.    becoming increasingly difficult to produce a "Linux binary" for a given
  2004.    architecture (e.g. PC or Alpha). There has to be a separate binary for
  2005.    (at least) every combination of curses vs ncurses and libc vs glibc.
  2006.  
  2007.    In such cases, the best advice is for every user to build C-Kermit from
  2008.    source code on the system where it will run. Too bad most commercial
  2009.    Unix vendors have stopped including C compilers with the operating
  2010.    system!
  2011.     _________________________________________________________________________
  2012.  
  2013.   9.3. Unix File System Peculiarities
  2014.  
  2015.    [ [272]Top ] [ [273]Contents ] [ [274]Section Contents ] [ [275]Next ]
  2016.    [ [276]Previous ]
  2017.  
  2018.    Normally, including a BSD, System-V, POSIX, or DIRENT flag in the make
  2019.    entry selects the right file system code. But some versions of Unix are
  2020.    inconsistent in this regard, and building in the normal way either
  2021.    gives compiler or linker errors, or results in problems at runtime,
  2022.    typically failure to properly expand wildcard file specifications when
  2023.    you do something like "send *.*", or failure to recognize long
  2024.    filenames, as in "send filewithaveryveryveryveryverylongname".
  2025.  
  2026.    C-Kermit is supposed to know about all the various styles of Unix file
  2027.    systems, but it has to be told which one to use when you build it,
  2028.    usually in the makefile target CFLAGS as shown below, but you might
  2029.    also have to add something like -I/usr/include/bsd to CFLAGS, or
  2030.    something like -lbsd to LIBS.
  2031.  
  2032.    C-Kermit gives you the following CFLAGS switches to adapt to your file
  2033.    system's peculiarities:
  2034.  
  2035. -DDIRENT   - #include <dirent.h>
  2036. -DSDIRENT  - #include <sys/dirent.h>
  2037. -DNDIR     - #include <ndir.h>
  2038. -DXNDIR    - #include <sys/ndir.h>
  2039. -DRTU      - #include "/usr/lib/ndir.h", only if NDIR and XNDIR not defined.
  2040. -DSYSUTIMH - #include <sys/utime.h> for setting file creation dates.
  2041. -DUTIMEH   - #include <utime.h> for setting file creation dates.
  2042.  
  2043.    (Note, RTU should only be used for Masscomp RTU systems, because it
  2044.    also selects certain other RTU-specific features.)
  2045.  
  2046.    If none of these is defined, then <sys/dir.h> is used. IMPORTANT: If
  2047.    your system has the file /usr/include/dirent.h then be sure to add
  2048.    -DDIRENT to your makefile target's CFLAGS. "dirent" should be used in
  2049.    preference to any of the others, because it supports all the features
  2050.    of your file system, and the others probably don't.
  2051.  
  2052.    Having selected the appropriate directory header file, you might also
  2053.    need to tell Kermit how to declare the routines and variables it needs
  2054.    to read the directory. This happens most commonly on AT&T System-V
  2055.    based UNIXes, particularly System V R3 and earlier, that provide long
  2056.    file and directory names (longer than 14 characters). Examples include
  2057.    certain releases of HP-UX, DIAB DNIX, older versions of Silicon
  2058.    Graphics IRIX, and perhaps also MIPS. In this case, try adding -DLONGFN
  2059.    to your makefile target.
  2060.  
  2061.    Another problem child is <sys/file.h>. Most Unix C-Kermit versions need
  2062.    to #include this file from within [277]ckufio.c and [278]ckutio.c, but
  2063.    some not only do not need to include it, but MUST not include it
  2064.    because (a) it doesn't exist, or (b) it has already been included by
  2065.    some other header file and it doesn't protect itself against multiple
  2066.    inclusion, or (c) some other reason that prevents successful
  2067.    compilation. If you have compilation problems that seem to stem from
  2068.    including this file, then add the following switch to CFLAGS in your
  2069.    makefile target:
  2070.  
  2071. -DNOFILEH
  2072.  
  2073.    There are a few odd cases where <sys/file.h> must be included in one of
  2074.    the cku[ft]io.c files, but not the other. In that case, add the
  2075.    aforementioned switch, but go into the file that needs <sys/file.h> and
  2076.    add something like this:
  2077.  
  2078. #ifdef XXX       /* (where XXX is a symbol unique to your system) */
  2079. #undef NOFILEH
  2080. #endif /* XXX */
  2081.  
  2082.    before the section that includes <sys/file.h>.
  2083.  
  2084.    Kermit's SEND command expands wildcard characters "?" and "*" itself.
  2085.    Before version 5A, commands like "send *" would send all regular
  2086.    (non-directory) files, including "hidden files" (whose names start with
  2087.    "."). In version 5A, the default behavior is to match like the Bourne
  2088.    shell or the ls command, and not include files whose names start with
  2089.    dot. Such files can still be sent if the dot is included explicitly in
  2090.    the SEND command: "send .oofa, send .*". To change back to the old way
  2091.    and let leading wildcard characters match dot files, include the
  2092.    following in your CFLAGS:
  2093.  
  2094. -DMATCHDOT
  2095.  
  2096.    (In C-Kermit 6.0, there is also a command to control this at runtime.)
  2097.  
  2098.    Complaints about data-type mismatches:
  2099.  
  2100.      * If you get compile-time complaints about data type mismatches for
  2101.        process-ID related functions like getpid(), add -DPID_T=pid_t.
  2102.      * If you get compile-time complaints about data type mismatches for
  2103.        user ID related functions like getuid(), add -DUID_T=uid_t.
  2104.      * If you get compile-time complaints about data type mismatches for
  2105.        user-ID related functions like getgid(), add -DGID_T=gid_t.
  2106.      * If you get compile-time complaints about data type mismatches for
  2107.        getpwuid(), add -DPWID_T=uid_t (or whatever it should be).
  2108.  
  2109.    File creation dates: C-Kermit attempts to set the creation date/time of
  2110.    an incoming file according to the date/time given in the file's
  2111.    attribute packet, if any. If you find that the dates are set
  2112.    incorrectly, you might need to build Kermit with the -DSYSUTIMEH flag,
  2113.    to tell it to include <sys/utime.h>. If that doesn't help, look at the
  2114.    code in zstrdt() in [279]ckufio.c.
  2115.     _________________________________________________________________________
  2116.  
  2117.   9.4. Hardware Flow Control
  2118.  
  2119.    [ [280]Top ] [ [281]Contents ] [ [282]Section Contents ] [ [283]Next ]
  2120.    [ [284]Previous ]
  2121.  
  2122.    Hardware flow control is a problematic concept in many popular Unix
  2123.    implementations. Often it is lacking altogether, and when available,
  2124.    the application program interface (API) to it is inconsistent from
  2125.    system to system. Here are some examples:
  2126.  
  2127.     a. POSIX does not support hardware flow control.
  2128.     b. RTS/CTS flow control support MIGHT be available for System V R3 and
  2129.        later if /usr/include/termiox.h exists (its successful operation
  2130.        also depends on the device driver, and the device itself, not to
  2131.        mention the [285]cable, etc, actually supporting it). If your
  2132.        SVR3-or-later Unix system does have this file, add:
  2133.  
  2134. -DTERMIOX
  2135.  
  2136.        to your CFLAGS. If the file is in /usr/include/sys instead, add:
  2137.  
  2138. -DSTERMIOX
  2139.  
  2140.        Note that the presence of this file does not guarantee that RTS/CTS
  2141.        will actually work -- that depends on the device-driver
  2142.        implementation (reportedly, many Unix versions treat
  2143.        hardware-flow-control related ioctl's as no-ops).
  2144.     c. Search ("grep -i") through /usr/include/*.h and
  2145.        /usr/include/sys/*.h for RTS or CTS and see what turns up. For
  2146.        example, in SunOS 4.x we find "CRTSCTS". Figuring out how to use it
  2147.        is another question entirely! In IBM AIX RS/6000 3.x, we have to
  2148.        "add" a new "line discipline" (and you won't find uppercase RTS or
  2149.        CTS symbols in the header files).
  2150.     d. NeXTSTEP and IRIX, and possibly others, support hardware flow
  2151.        control, but do not furnish an API to control it, and thus on these
  2152.        systems Kermit has no command to select it -- instead, a special
  2153.        device name must be used. (NeXTSTEP: /dev/cufa instead of /dev/cua;
  2154.        IRIX: /dev/ttyf00)
  2155.  
  2156.    See the routine tthflow() in [286]ckutio.c for details. If you find
  2157.    that your system offers hardware flow control selection under program
  2158.    control, you can add this capability to C-Kermit as follows:
  2159.  
  2160.     a. See if it agrees with one of the methods already used in tthflow().
  2161.        if not, add new code, appropriately #ifdef'd.
  2162.     b. Add -DCK_RTSCTS to the compiler CFLAGS in your makefile target or
  2163.        define this symbol within the appropriate #ifdefs in [287]ckcdeb.h.
  2164.  
  2165.    To illustrate the difficulties with RTS/CTS, here is a tale from Jamie
  2166.    Watson <jw@adasoft.ch>, who added the RTS/CTS code for the RS/6000,
  2167.    about his attempts to do the same for DEC ULTRIX:
  2168.  
  2169.      "The number and type of hardware signals available to/from a serial
  2170.      port vary between different machines and different types of serial
  2171.      interfaces on each machine. This means that, for example, there are
  2172.      virtually no hardware signals in or out available on the DECsystem
  2173.      3000/3100 series; on the DECsystem 5000/2xx series all modem signals
  2174.      in/out are present on both built-in serial ports; on the DECsystem
  2175.      5100 some ports have all signals and some only have some; and so
  2176.      on... It looks to me as if this pretty well rules out any attempt to
  2177.      use hardware flow control on these platforms, even if we could
  2178.      figure out how to do it. The confusion on the user level about
  2179.      whether or not it should work for any given platform or port would
  2180.      be tremendous. And then it isn't clear how to use the hardware
  2181.      signals even in the cases where the device supports them."
  2182.     _________________________________________________________________________
  2183.  
  2184.   9.5. Terminal Speeds
  2185.  
  2186.    [ [288]Top ] [ [289]Contents ] [ [290]Section Contents ] [ [291]Next ]
  2187.    [ [292]Previous ]
  2188.  
  2189.    The allowable speeds for the SET SPEED command are defined in
  2190.    [293]ckcdeb.h. If your system supports speeds that are not listed in
  2191.    "set speed ?", you can add definitions for them to ckcdeb.h.
  2192.  
  2193.    Then if the speed you are adding is one that was never used before in
  2194.    Kermit, such as 921600, you'll also need to add the appropriate
  2195.    keywords to spdtab[] in [294]ckuus3.c, and the corresponding case to
  2196.    ttsspd() in [295]ckutio.c.
  2197.     _________________________________________________________________________
  2198.  
  2199.   9.6. Millisecond Sleeps
  2200.  
  2201.    [ [296]Top ] [ [297]Contents ] [ [298]Section Contents ] [ [299]Next ]
  2202.    [ [300]Previous ]
  2203.  
  2204.    There is no standard for millisecond sleeps, but at least five
  2205.    different functions have appeared in various Unix versions that can be
  2206.    used for this purpose: nap() (mostly in System V), usleep() (found at
  2207.    least in SunOS and NeXT OS), select() (found in 4.2BSD and later, and
  2208.    part of any TCP/IP sockets library), nanosleep(), and sginap(). If you
  2209.    have any of these available, pick one (in this order of preference, if
  2210.    you have more than one):
  2211.  
  2212. -DSELECT: Include this in CFLAGS if your system has the select() function.
  2213. -DNAP:    Include this in CFLAGS if your system has the nap() function.
  2214. -USLEEP:  Include this in CFLAGS if your system has the usleep() function.
  2215.  
  2216.    NOTE: The nap() function is assumed to be a function that puts the
  2217.    process to sleep for the given number of milliseconds. If your system's
  2218.    nap() function does something else or uses some other units of time
  2219.    (like the NCR Tower 32, which uses clock-ticks), do not include -DNAP.
  2220.  
  2221.    Reportedly, all versions of System V R4 for Intel-based computers, and
  2222.    possibly also SVR3.2, include nap() as a kernel call, but it's not in
  2223.    the library. To include code to use it via syscall(3112,x), without
  2224.    having to include Xenix compatibility features, include the following
  2225.    compile-time option:
  2226.  
  2227. -DNAPHACK
  2228.     _________________________________________________________________________
  2229.  
  2230.   9.7. Nondestructive Input Buffer Peeking
  2231.  
  2232.    [ [301]Top ] [ [302]Contents ] [ [303]Section Contents ] [ [304]Next ]
  2233.    [ [305]Previous ]
  2234.  
  2235.    Some AT&T Unix versions have no way to check if input is waiting on a
  2236.    tty device, but this is a very important feature for Kermit. Without
  2237.    it, sliding windows might not work very well (or at all), and you also
  2238.    have to type your escape character to get Kermit's attention in order
  2239.    to interrupt a local-mode file transfer. If your system offers an
  2240.    FIONREAD ioctl, the build procedure should pick that up automatically
  2241.    and use it, which is ideal.
  2242.  
  2243.    If your system lacks FIONREAD but has a select() function, this can be
  2244.    used instead. If the build procedure fails to include it (SHOW FEATURES
  2245.    will list SELECT), then you can add it to your CFLAGS:
  2246.  
  2247. -DSELECT
  2248.  
  2249.    Conversely, if the build procedure tries to use select() when it really
  2250.    is not there, add:
  2251.  
  2252. -DNOSELECT
  2253.  
  2254.    Note: select() is not part of System V nor of POSIX, but it has been
  2255.    added to various System-V- and POSIX-based systems as an extension.
  2256.  
  2257.    Some System-V variations (SCO Xenix/UNIX/ODT and DIAB DNIX) include a
  2258.    rdchk() function that can be used for buffer peeking. It returns 0 if
  2259.    no characters are waiting and 1 if characters are waiting (but unlike
  2260.    FIONREAD, it does not tell the actual number). If your system has
  2261.    rdchk(), add:
  2262.  
  2263. -DRDCHK:  Include this in CFLAGS if your system has the rdchk() function.
  2264.  
  2265.    Otherwise, if your version of Unix has the poll() function (and the
  2266.    /usr/include/poll.h file) -- which appears to be a standard part of
  2267.    System V going back to at least SVR3, include:
  2268.  
  2269. -DCK_POLL
  2270.     _________________________________________________________________________
  2271.  
  2272.   9.8. Other System-Dependent Features
  2273.  
  2274.    [ [306]Top ] [ [307]Contents ] [ [308]Section Contents ] [ [309]Next ]
  2275.    [ [310]Previous ]
  2276.  
  2277.    Systems with <termios.h> might have the symbol IEXTEN defined. This is
  2278.    used to turn "extended features" in the tty device driver on and off,
  2279.    such as Ctrl-O to toggle output flushing, Ctrl-V to quote input
  2280.    characters, etc.
  2281.  
  2282.    In most Unix implementations, it should be turned off during Kermit
  2283.    operation, so if [311]ckutio.c finds this symbol, it uses it. This is
  2284.    necessary, at least, on BSDI. On some systems, however, IEXTEN is
  2285.    either misdefined or misimplemented. The symptom is that CR, when typed
  2286.    to the command processor, is echoed as LF, rather than CRLF. This
  2287.    happens (at least) on Convex/OS 9.1. The solution is to add the
  2288.    following symbol to the makefile target's CFLACS:
  2289.  
  2290. -DNOIEXTEN
  2291.  
  2292.    However, in at least one Unix implementation, QNX 4.21, IEXTEN must be
  2293.    set before hardware flow control can be used.
  2294.  
  2295.    In edits 177 and earlier, workstation users noticed a "slow screen
  2296.    writing" phenomenon during interactive command parsing. This was traced
  2297.    to a setbuf() call in [312]ckutio.c that made console (stdout) writes
  2298.    unbuffered. This setbuf() call has been there forever, and could not be
  2299.    removed without some risk. Kermit's operation was tested on the NeXT in
  2300.    edit 178 with the setbuf() call removed, and the slow-writing symptom
  2301.    was cured, and everything else (command parsing, proper wakeup on ?,
  2302.    ESC, Ctrl-U, and other editing characters, terminal emulation,
  2303.    remote-mode and local-mode file transfer, etc) seemed to work as well
  2304.    as or better than before. In subsequent edits, this change was made to
  2305.    many other versions too, with no apparent ill effects. To remove the
  2306.    setbuf() call for your version of Kermit, add:
  2307.  
  2308. -DNOSETBUF
  2309.  
  2310.    Later reports indicate that adding -DNOSETBUF has other beneficial
  2311.    effects, like cutting down on swapping when Kermit is run on
  2312.    workstations with small memories. But BEWARE: on certain small Unix
  2313.    systems, notably the AT&T 6300 and 3B1 (the very same ones that benefit
  2314.    from NOSETBUF), NOSETBUF seems to conflict with CK_CURSES. The program
  2315.    builds and runs OK, but after once using the curses display, echoing is
  2316.    messed up. In this case, we use a System-V specific variation in the
  2317.    curses code, using newterm() to prevent System V from altering the
  2318.    buffering. See makefile entries for AT&T 6300 and 3B1.
  2319.  
  2320.    The Unix version of C-Kermit includes code to switch to file descriptor
  2321.    zero (stdin) for remote-mode file transfer. This code is necessary to
  2322.    prevent Kermit from giving the impression that it is "idle" during file
  2323.    transfers, which, at some sites, can result in the job being logged out
  2324.    in the middle of an active file transfer by idle-job monitors.
  2325.  
  2326.    However, this feature can interfere with certain setups; for example,
  2327.    there is a package which substitutes a pty/tty pair for /dev/tty and
  2328.    sets file descriptor 0 to be read-only, preventing Kermit from sending
  2329.    packets. Or... When a Unix shell is invoked under the PICK environment,
  2330.    file descriptor 0 is inoperative.
  2331.  
  2332.    To remove this feature and allow Kermit to work in such environments,
  2333.    add the compile-time option:
  2334.  
  2335. -DNOFDZERO
  2336.  
  2337.    On some versions of Unix, earlier releases of C-Kermit were reported to
  2338.    render a tty device unusable after a hangup operation. Examples include
  2339.    IBM AIX on the RT PC and RS/6000. A typical symptom of this phenomenon
  2340.    is that the DIAL command doesn't work, but CONNECTing to the device and
  2341.    dialing manually do work. A further test is to SET DIAL HANGUP OFF,
  2342.    which should make dialing work once by skipping the pre-dial hangup.
  2343.    However, after the connection is broken, it can't be used any more:
  2344.    subsequent attempts to DIAL the same device don't work. The cure is
  2345.    usually to close and reopen the device as part of the hangup operation.
  2346.    To do this, include the following compile-time option:
  2347.  
  2348. -DCLSOPN
  2349.  
  2350.    Similarly, there is a section of code in ttopen(), which does another
  2351.    close(open()) to force the O_NDELAY mode change. On some systems, the
  2352.    close(open()) is required to make the mode change take effect, and
  2353.    apparently on most others it does no harm. But reportedly on at least
  2354.    one System V R4 implementation, and on SCO Xenix 3.2, the close(open())
  2355.    operation hangs if the device lacks carrier, EVEN THOUGH the CLOCAL
  2356.    characteristic has just been set to avoid this very problem. If this
  2357.    happens to you, add this to your CFLAGS:
  2358.  
  2359. -DNOCOTFMC
  2360.  
  2361.    or, equivalently, in your KFLAGS on the make command line. It stands
  2362.    for NO Close(Open()) To Force Mode Change.
  2363.  
  2364.    C-Kermit renames files when you give a RENAME command and also
  2365.    according to the current SET FILE COLLISION option when receiving
  2366.    files. The normal Unix way to rename a file is via two system calls:
  2367.    link() and unlink(). But this leaves open a window of vulnerability.
  2368.    Some Unix systems also offer an atomic rename(oldname,newname)
  2369.    function. If your version of Unix has this function, add the following
  2370.    to your CFLAGS:
  2371.  
  2372. -DRENAME
  2373.  
  2374.    C-Kermit predefines the RENAME for several Unix versions in
  2375.    [313]ckcdeb.h (SVR4, SUNOS41, BSD44, AIXRS, etc). You can tell if
  2376.    rename() is being used if the SHOW FEATURES command includes RENAME in
  2377.    the compiler options list. If the predefined RENAME symbol causes
  2378.    trouble, then add NORENAME to your CFLAGS. Trouble includes:
  2379.  
  2380.     a. Linker complains that _rename is an unresolved symbol.
  2381.     b. Linking works, but Kermit's RENAME command doesn't work (which
  2382.        happens because older versions of rename() might have their
  2383.        arguments reversed).
  2384.  
  2385.    If rename() is not used, then Kermit uses link()/unlink(), which is
  2386.    equivalent except it is not atomic: there is a tiny interval in which
  2387.    some other process might "do something" to one of the files or links.
  2388.  
  2389.    Some Unix systems (Olivetti X/OS, Amdahl UTS/V, ICL SVR3, etc) define
  2390.    the S_ISREG and S_ISDIR macros incorrectly. This is compensated for
  2391.    automatically in [314]ckufio.c. Other systems might have this same
  2392.    problem. If you get a compile-time error message regarding S_ISREG
  2393.    and/or S_ISDIR, add the following to your CFLAGS:
  2394.  
  2395. -DISDIRBUG
  2396.  
  2397.    Finally, here's a symbol you should NEVER define:
  2398.  
  2399. -DCOMMENT
  2400.  
  2401.    It's used for commenting out blocks of code. If for some reason you
  2402.    find that your compiler has COMMENT defined, then add -UCOMMENT to
  2403.    CFLAGS or KFLAGS! Similarly, some header files have been known to
  2404.    define COMMENT, in which case you must add "#undef COMMENT" to each
  2405.    C-Kermit source module, after all the #includes.
  2406.     _________________________________________________________________________
  2407.  
  2408.   9.9. Terminal Interruption
  2409.  
  2410.    [ [315]Top ] [ [316]Contents ] [ [317]Section Contents ] [ [318]Next ]
  2411.    [ [319]Previous ]
  2412.  
  2413.    When C-Kermit enters interactive command mode, it sets a Control-C
  2414.    (terminal keyboard interrupt = SIGINT) trap to allow it to return to
  2415.    the command prompt whenever the user types Control-C (or whatever is
  2416.    assigned to be the interrupt character). This is implemented using
  2417.    setjmp() and longjmp(). On some systems, depending on the machine
  2418.    architecture and C compiler and who knows what else, you might get
  2419.    "Memory fault (coredump)" or "longjmp botch" instead of the desired
  2420.    effect (this should not happen in 5A(190) and later). In that case, add
  2421.    -DNOCCTRAP to your CFLAGS and rebuild the program.
  2422.  
  2423.    Job control -- the ability to "suspend" C-Kermit on a Unix system by
  2424.    typing the "susp" character (normally Ctrl-Z) and then resume execution
  2425.    later (with the "fg" command) -- is a tricky business. C-Kermit must
  2426.    trap suspend signals so it can put the terminal back into normal mode
  2427.    when you suspend it (Kermit puts the terminal into various strange
  2428.    modes during interactive command parsing, CONNECT, and file transfer).
  2429.    Supporting code is compiled into C-Kermit automatically if <signal.h>
  2430.    includes a definition for the SIGTSTP signal. HOWEVER... some systems
  2431.    define this signal without supporting job control correctly. You can
  2432.    build Kermit to ignore SIGTSTP signals by including the -DNOJC option
  2433.    in CFLAGS. (You can also do this at runtime by giving the command SET
  2434.    SUSPEND OFF.)
  2435.  
  2436.      NOTE: As of version 5A(190), C-Kermit makes another safety check.
  2437.      Even if job control is available in the operating system (according
  2438.      to the numerous checks made in congm()), it will still disable the
  2439.      catching of SIGTSTP signals if SIGTSTP was set to SIG_IGN at the
  2440.      time C-Kermit was started.
  2441.  
  2442.    System V R3 and earlier systems normally do not support job control. If
  2443.    you have an SVR3 system that does, include the following option in your
  2444.    CFLAGS:
  2445.  
  2446. -DSVR3JC
  2447.  
  2448.    On systems that correctly implement POSIX signal handling, signals can
  2449.    be handled more reliably than in Bell, Berkeley, or AT&T Unixes. On
  2450.    systems (such as QNX) that are "strictly POSIX", POSIX signal handling
  2451.    *must* be used, otherwise no signal will work more than once. If you
  2452.    have POSIX-based system and you find that your version of Kermit
  2453.    responds to Ctrl-C (SIGINT) or Ctrl-Z (SIGTSTP) only once, then you
  2454.    should add the following option to your CFLAGS:
  2455.  
  2456. -DCK_POSIX_SIG
  2457.  
  2458.    But be careful; some POSIX implementations, notably 4.4BSD, include
  2459.    POSIX signal handling symbols and functions as "stubs" only, which do
  2460.    nothing. Look in <signal.h> for sigsetjmp and siglongjmp and read the
  2461.    comments.
  2462.   ___________________________________________________________________________
  2463.  
  2464. 10. DIALING OUT AND COORDINATING WITH UUCP
  2465.  
  2466.    [ [320]Top ] [ [321]Contents ] [ [322]Next ] [ [323]Previous ]
  2467.  
  2468.    The short version (general):
  2469.  
  2470.      In order for C-Kermit to be able to dial out from your Unix
  2471.      computer, you need to give it the same owner, group, and permissions
  2472.      as your other dialout programs, such as cu, tip, minicom, uucp,
  2473.      seyon, etc.
  2474.  
  2475.    The short version for Linux only:
  2476.  
  2477.      Since Red Hat 7.2, about 2002, Linux does not leave the lockfile
  2478.      handling to each application, but instead provides an external
  2479.      application, /usr/sbin/lockdev, that all applications should invoke
  2480.      when they need to access a serial port; lockdev locks and unlocks
  2481.      the port without requiring the application to have privileges, since
  2482.      the privileges on the lockfile directory are assigned to lockdev.
  2483.      C-Kermit 8.0.211 and later support this method. But C-Kermit still
  2484.      needs to be able to open the port itself, and therefore if the
  2485.      port's permissions do not allow read/write access to the general
  2486.      public, the general rule must still be followed: in the most common
  2487.      case, it must be SETGID to the group uucp (explained below). If a
  2488.      pre-8.0.211 version of C-Kermit is to be installed for use with
  2489.      serial ports on any version of Linux, it must still be installed as
  2490.      described in the following sections.
  2491.  
  2492.    The long version:
  2493.  
  2494.    Make sure your dialout line is correctly configured for dialing out (as
  2495.    opposed to login). The method for doing this is different for each kind
  2496.    of Unix. Consult your system documentation for configuring lines for
  2497.    dialing out (for example, Sun SPARCstation IPC users should read the
  2498.    section "Setting up Modem Software" in the Desktop SPARC Sun System and
  2499.    Network Manager's Guide, or the Terminals and Modems section of the HP
  2500.    manual, "Configuring HP-UX for Peripherals" (e.g. /usr/sbin/sam =>
  2501.    Peripheral Devices => Terminals and Modems => Add Modem).
  2502.  
  2503.    Unlike most other multiuser, multitasking operating systems, Unix
  2504.    allows multiple users to access the same serial device at the same
  2505.    time, even though there is no earthly reason why two users should do
  2506.    this. When they do, user A will read some of the incoming characters,
  2507.    and user B will read the others. In all likelihood, neither user will
  2508.    see them all. Furthermore, User B can hang up User A's call, and so
  2509.    one.
  2510.  
  2511.    Rather than change Unix to enforce exclusive access to serial devices
  2512.    such as ttys, when it might still have been possible, Unix developers
  2513.    opted for a "lock file" mechanism. Any process that wants to open a tty
  2514.    device should first check to see if a file of a certain name exists,
  2515.    and if so, not to open the device. If the file does not exist, the
  2516.    process creates the file and then opens the device. When the process
  2517.    closes the device, it destroys the lockfile. This procedure was
  2518.    originated for use with Unix's UUCP, CU, and TIP programs, and so these
  2519.    lockfiles are commonly called "UUCP lockfiles" (UUCP = Unix-to-Unix
  2520.    Copy Program).
  2521.  
  2522.    As you can imagine, this method is riddled with pitfalls:
  2523.  
  2524.      * If a process does not observe the prevailing lockfile convention,
  2525.        then it can interfere with other "polite" processes. And in fact,
  2526.        very few Unix applications or commands handle lockfiles at all; an
  2527.        original design goal of Unix was that "everything is a file", and
  2528.        countless utilities operate on files directly (by opening them) or
  2529.        indirectly through redirection of standard i/o, without creating or
  2530.        looking for lockfiles.
  2531.      * If a process crashes while it has the device open, the lockfile is
  2532.        left behind, preventing further processes from using the device.
  2533.      * Various versions of Unix use different names for the lockfiles, put
  2534.        them in different directories, with different owners and groups and
  2535.        permissions, and specify their contents differently.
  2536.      * On a given platform, the lockfile conventions may change from one
  2537.        Unix release to the next (for example, SunOS 4.0 to 4.1) or, in the
  2538.        case of Linux, across different distributions.
  2539.      * The same tty device might have more than one name, and most
  2540.        lockfile conventions don't allow for this. Similarly for symbolic
  2541.        links.
  2542.  
  2543.    In an attempt to address the problem of "stale" lockfiles, most UUCP
  2544.    implementations put the PID (Process ID) of the creating process in the
  2545.    lockfile. Thus, another process that wants to open the corresponding
  2546.    device can check not only for the lockfile itself, but also can check
  2547.    the PID for validity. But this doesn't work well either:
  2548.  
  2549.      * PIDs are stored in diverse formats that change with every new
  2550.        release (short, integer, long, or string in any of various
  2551.        formats). If the reading program does not follow the same
  2552.        convention as the writing program, it can diagnose a valid PID to
  2553.        be invalid, and therefore not honor the lock.
  2554.      * PIDs recycle. If the lockfile was created by PID 1234, which later
  2555.        crashed without removing the lockfile, and then a new process 1234
  2556.        exists a the time the lockfile is checked, the lockfile will be
  2557.        improperly taken as valid, and access to the device denied
  2558.        unnecessarily.
  2559.  
  2560.    Several techniques address the problem of multiple names for the same
  2561.    device:
  2562.  
  2563.      * Multiple lockfiles. For example, if the user opens a device through
  2564.        a symlink, a lockfile is created for both the symlink name and the
  2565.        true name (obtained from readlink()). However, when multiple
  2566.        drivers are installed for the same device (e.g. /dev/cua,
  2567.        /dev/cufa, etc), this approach won't work unless all applications
  2568.        *know* all the different names for the same device and make
  2569.        lockfiles for all of them, which is obviously not practical.
  2570.      * Lockfiles whose names are not based on the device name. These
  2571.        lockfiles generally have names like LK.inode/major/minor, where
  2572.        inode, major, and minor are numbers, which will always be the same
  2573.        for any physical device, no matter what its name. This form of
  2574.        lockfile is used in System V R4 and its derivatives, such as
  2575.        Solaris, UnixWare, etc. If lockfiles must be used (as opposed to,
  2576.        say, kernel-based locks), this would seem to be the most effective
  2577.        form.
  2578.  
  2579.    Most versions of Unix were not designed to accommodate third-party
  2580.    communications software; thus vendors of these Unix products feel no
  2581.    compunction about changing lockfile conventions from release to
  2582.    release, since they also change their versions of the cu, uucp, tip,
  2583.    etc, programs at the same time to match. And since the source code to
  2584.    these programs might not be published, it is difficult for makers of
  2585.    third-party products like C-Kermit to find out what the new conventions
  2586.    are. It also forces release of new versions of C-Kermit whenever the OS
  2587.    vendor makes a change like this.
  2588.  
  2589.    Some Unix vendors have taken a small step to simplify communications
  2590.    application development for their products: the inclusion of lockfile
  2591.    routines in the standard system C runtime libraries to shield the
  2592.    application from the details of lockfile management (IBM AIX is an
  2593.    example). When such routines are used, communications applications do
  2594.    not need modification when lockfile conventions change (although they
  2595.    will need recompiling if the routines are statically linked into the
  2596.    application). In the AIX example, the simple function calls ttylock(),
  2597.    ttyunlock(), and ttylocked() replace hundreds of lines of ugly code in
  2598.    C-Kermit that attempts to keep pace with every release of every Unix
  2599.    product over the last 20 years. Inclusion of ttylock() code occurs
  2600.    when:
  2601.  
  2602. -DUSETTYLOCK
  2603.  
  2604.    is included in the CFLAGS.
  2605.  
  2606.    If such routines are available, they should be used. The rest of this
  2607.    section applies when they are not.
  2608.  
  2609.    To fit in with UUCP and other Unix-based serial-port communication
  2610.    software, C-Kermit must have the same idea as your system's uucp, cu,
  2611.    and tip programs about what the UUCP lock directory is called, what the
  2612.    lockfile itself is called, and what its contents should be. In most
  2613.    cases, C-Kermit preprocessor flags create the appropriate configuration
  2614.    at compile time if the appropriate makefile target was used (see
  2615.    [324]ckutio.c). The following CFLAGS options can be used to override
  2616.    the built-in configuration:
  2617.  
  2618.    -DLCKDIR
  2619.           Tells Kermit that the UUCP lock directory is
  2620.           /usr/spool/uucp/LCK.
  2621.  
  2622.    -DACUCNTRL
  2623.           Tells Kermit to use the BSD 4.3 acucntrl() program to turn off
  2624.           getty (login) on the line before using it, and restore getty
  2625.           when done.
  2626.  
  2627.    -DHDBUUCP
  2628.           Include this if your system uses Honey DanBer UUCP, in which the
  2629.           lockfile directory and format are relatively standardized.
  2630.  
  2631.    -DLOCK_DIR=\\\"/xxx/yyy\\\"
  2632.           Gives the lock directory name explicitly. The triple quoting is
  2633.           necessary. For example:
  2634.  
  2635. CFLAGS= -DBSD4 -DLOCK_DIR=\\\"/usr/local/locks\\\" -DNODEBUG
  2636.  
  2637.           (NOTE: The triple quoting assumes this is a "top-level" make
  2638.           entry, and not a make entry that calls another one.)
  2639.  
  2640.    -DLFDEVNO The lockfile name uses the tty device inode and major and
  2641.           minor
  2642.           numbers: LK.dev.maj.min, as in Sys V R4, e.g. LK.035.044.008.
  2643.  
  2644.    When the LK.inode.major.minor form is used, a single lockfile is
  2645.    enough. Otherwise, a single lockfile rarely suffices. For example, in
  2646.    Linux, it is common to have a /dev/modem symbolic link to an actual
  2647.    dialout device, like /dev/cua0 or /dev/ttyS0, whose purpose is to hide
  2648.    the details of the actual driver from the user. So if one user opens
  2649.    /dev/modem, a lockfile called LCK..modem is created, which does not
  2650.    prevent another user from simulataneously opening the same device by
  2651.    its real name.
  2652.  
  2653.    On SCO Unix platforms, we have a slightly different problem: the same
  2654.    device is, by convention, known by "lowercase" and "uppercase" names,
  2655.    depending on whether it has modem control. So by convention,
  2656.    communications programs are supposed to create the lockfiles based on
  2657.    the lowercase name. But some programs don't follow this convention. In
  2658.    HP-UX, we have several different names for each serial device. And so
  2659.    on.
  2660.  
  2661.    For this reason, on platforms where the LK.inode.major.minor form is
  2662.    not used, C-Kermit also creates a secondary lockfile (which is simply a
  2663.    link to the first) if:
  2664.  
  2665.     a. The given device name is a symbolic link. The secondary link is
  2666.        based on the device's real name.
  2667.     b. On SCO: The device name is not a symbolic link, but it contains
  2668.        uppercase letters. The primary link is based on the lowercase name;
  2669.        the secondary link is based on the name that was given.
  2670.     c. On HP-UX: The device name starts with "cu". The primary link is
  2671.        based on the name that was given; the secondary link is based on
  2672.        the corresponding "ttyd" device, e.g. "LCK..cua0p0" and
  2673.        "LCK..ttyd0p0".
  2674.  
  2675.    NOTE: symlinks are not handled in HP-UX.
  2676.  
  2677.    Honey DanBer (HDB) UUCP, the basis of many UUCP implementations, has
  2678.    two characteristics:
  2679.  
  2680.     a. Lockfiles are kept in /usr/spool/locks/ (usually).
  2681.     b. A lockfile contains the process id (pid) in ASCII, rather than as
  2682.        an int.
  2683.  
  2684.    Non-HDB selections assume the lockfile contains the pid in int form
  2685.    (or, more precisely, in PID_T form, where PID_T is either int or pid_t,
  2686.    depending on your system's C library and header files). (b), by the
  2687.    way, is subject to interpretation: the numeric ASCII string may or may
  2688.    not be terminated by a newline, it may or may not have leading spaces
  2689.    (or zeros), and the number of leading spaces or zeros can differ, and
  2690.    the differences can be significant.
  2691.  
  2692.    Even if you build the program with the right lockfile option, you can
  2693.    still have problems when you try to open the device. Here are the error
  2694.    messages you can get from SET LINE, and what they mean:
  2695.  
  2696.     a. "Timed out, no carrier." This one is not related to lockfiles. It
  2697.        means that you have SET CARRIER ON xx, where xx is the number of
  2698.        seconds to wait for carrier, and carrier did not appear within xx
  2699.        seconds. Solution: SET CARRIER AUTO or OFF.
  2700.     b. "Sorry, access to lock denied." Kermit has been configured to use
  2701.        lockfiles, but (a)the lockfile directory is write-protected against
  2702.        you, or (b) it does not exist. The "access to lock denied" message
  2703.        will tell you the reason. If the directory does not exist, check to
  2704.        make sure Kermit is using the right name. Just because version n of
  2705.        your Unix used a certain lockfile directory is no gurantee that
  2706.        version n.1 does not use a different one. Workaround: ask the
  2707.        system administrator to install a symbolic link from the old name
  2708.        to the new name. Other solutions: (see below)
  2709.     c. "Sorry, access to tty device denied." The tty device that you
  2710.        specified in your SET LINE command is read/write protected against
  2711.        you. Solution: (see below)
  2712.     d. "Sorry, device is in use." The tty device you have specified is
  2713.        currently being used by another user. A prefatory message gives you
  2714.        an "ls -l" listing of the lockfile, which should show the username
  2715.        of the person who created it, plus a message "pid = nnn" to show
  2716.        you the process id of the user's program. Solutions: try another
  2717.        device, wait until the other user is finished, ask the other user
  2718.        to hurry up, or ask the system manager for help.
  2719.     e. "Sorry, can't open connection: reason". The device cannot be opened
  2720.        for some other reason, which is listed.
  2721.     f. "sh: /usr/lib/uucp/acucntrl: not found". This means your Kermit
  2722.        program was built with the -DACUCNTRL switch, but your computer
  2723.        system does not have the BSD 4.3 acucntrl program. Solution:
  2724.        install the acucntrl program if you have it, or rebuild Kermit
  2725.        without the -DACUCNTRL switch.
  2726.  
  2727.    There are two solutions for problems (b) and (c), both of which involve
  2728.    intervention by your Unix system administrator (superuser):
  2729.  
  2730.     a. Have the superuser change the permission of the lockfile directory
  2731.        and to the tty devices so that everyone on the system has
  2732.        read/write permission.
  2733.  
  2734. su% chmod 777 /usr/spool/locks (or whatever the path is)
  2735. su% chmod 666 /dev/ttyXX
  2736.  
  2737.        One risk here is that people can write lots of junk into the
  2738.        lockfile directory, delete other people's files in the lockfile
  2739.        directory, and intercept other people's data as it goes in and out
  2740.        of the tty device. The major danger here would be intercepting a
  2741.        privileged password. Of course, any user could write a short,
  2742.        ordinary, unprivileged program to do exactly the same thing if the
  2743.        tty device was world read/writeable. The other risk as that
  2744.        telephone calls are not controlled -- anybody on your system can
  2745.        make them, without having to belong to any particular group, and
  2746.        this could run up your phone bill.
  2747.     b. Use groups to regulate access. Normally the lockfile directory and
  2748.        and the dialout devices will have the same group (such as uucp). If
  2749.        so, then put everybody who's allowed to dial out into that group,
  2750.        and make sure that the lockfile directory and the tty devices have
  2751.        group read AND write permission. Example:
  2752.  
  2753. su% chmod 770 /usr/spool/locks (or whatever the path is)
  2754. su% chmod 660 /dev/ttyXX
  2755.  
  2756.        User whatever tool is available on your platform to add users to
  2757.        the appropropriate group (e.g. edit the /etc/group file).
  2758.     c. Have the superuser change Kermit to run setuid and/or setgid to the
  2759.        owner and/or group of the lockfile directory and the tty devices if
  2760.        necessary), typically uucp (see [325]next section), but NOT root.
  2761.        Example:
  2762.  
  2763. su% chown uucp kermit          - or -  chgrp uucp kermit
  2764. su% chmod u+s kermit (setuid)  - or -  chmod g+s kermit (setgid)
  2765.  
  2766.        and then make sure the lockfile directory, and the tty devices,
  2767.        have owner (setuid) and/or group (setgid) write permission. For
  2768.        example:
  2769.  
  2770. su% chmod o+rwx /usr/spool/uucp
  2771. su% chown uucp /dev/ttyXX ; chmod 600 /dev/ttyXX
  2772.  
  2773.        In some cases, the owner and group must be distinct; the key point
  2774.        is that read/write access is required to both the UUCP lockfile
  2775.        directory and the tty itself.
  2776.  
  2777.    If you make C-Kermit setuid or setgid to root, it refuses to run:
  2778.  
  2779. Fatal: C-Kermit setuid to root!
  2780.  
  2781.    Example:
  2782.  
  2783. crw-r-----   1 uucp     uucp       5,  67 Feb 11 06:23 /dev/cua3
  2784. drwxrwxr-x   3 root     uucp         1024 Feb 11 06:22 /var/lock
  2785.  
  2786.    requires suid uucp to get read/write access on /dev/cua3 and sgid to
  2787.    get read/write access on /var/lock (since you can't set Kermit's uid or
  2788.    gid to root).
  2789.  
  2790.      The reason Kermit can't be setuid or setgid to root has to do with
  2791.      the fact that some Unix OS's can't switch user or group IDs in that
  2792.      case. Unfortunately, the prohibition against making Kermit setuid or
  2793.      setgid to root means that Unix C-Kermit can't be used to make rlogin
  2794.      connections by non-root users. (The rlogin port is privileged, which
  2795.      is why the regular rlogin command is setuid root -- which is safe
  2796.      because the rlogin program never has to create or access files like
  2797.      Kermit does.)
  2798.  
  2799.    For the lockfile mechanism to achieve its desired purpose -- prevention
  2800.    of access to the same tty device by more than one process at a time --
  2801.    ALL programs on a given computer that open, read or write, and close
  2802.    tty devices must use the SAME lockfile conventions. Unfortunately, this
  2803.    is often not the case. Here is a typical example of how this can go
  2804.    wrong: In SunOS 4.0 and earler, the lockfile directory was
  2805.    /usr/spool/uucp; in 4.1 it was changed to /var/spool/locks in the quest
  2806.    for political correctness. Consequently, any third-party programs (such
  2807.    as C-Kermit) that were not modified to account for this change,
  2808.    recompiled, and reinstalled, did not use the same lockfiles as uucp,
  2809.    tip, etc, and so the entire purpose of the lockfile is defeated.
  2810.  
  2811.    What if your Unix system does not have UUCP installed? For example, you
  2812.    have a Unix workstation, and you do not use uucp, cu, or tip, or UUCP
  2813.    was not even supplied with your version of Unix (QNX is an example). In
  2814.    this case, you have two choices:
  2815.  
  2816.     a. If there may be more than one person running Kermit at the same
  2817.        time, competing for the same tty device, then create a special
  2818.        lockfile directory just for Kermit, for example, /usr/spool/kermit,
  2819.        and make sure you have read/write access to it. Then add the
  2820.        following to your makefile target CFLAGS, as shown earlier:
  2821.  
  2822. -DLOCK_DIR=\\\"/usr/spool/kermit\\\"
  2823.  
  2824.     b. If you are the only user on your workstation, and no other
  2825.        processes will ever be competing with Kermit for the dialout tty
  2826.        device, then add -DNOUUCP to your makefile target's CFLAGS and
  2827.        rebuild Kermit.
  2828.   ___________________________________________________________________________
  2829.  
  2830. 11. RUNNING UNIX C-KERMIT SETUID OR SETGID
  2831.  
  2832.    [ [326]Top ] [ [327]Contents ] [ [328]Next ] [ [329]Previous ]
  2833.  
  2834.    Even if you don't intend to run C-Kermit setuid, somebody else might
  2835.    come along and chown and chmod it after it has been built. You should
  2836.    be sure that it is built correctly to run setuid on your system. For
  2837.    POSIX and AT&T Unix based versions, you don't have to do anything
  2838.    special.
  2839.  
  2840.    For 4.2 and 4.3 BSD-based Unix versions, you normally need not add
  2841.    anything special to the makefile. The program assumes that the
  2842.    setreuid() and setregid() functions are available, without which we
  2843.    cannot switch back and forth between real and effective uids. If "make"
  2844.    complains that _setreuid or _setregid is/are not defined, add
  2845.    -DNOSETREU to CFLAGS. In this case it is very likely (but not certain)
  2846.    that you cannot protect ttys and lockfiles against people and have them
  2847.    run Kermit setuid.
  2848.  
  2849.    If make does not complain about this, you should find out whether your
  2850.    BSD version (4.3 or other systems like SunOS 4.x that claim to include
  2851.    BSD 4.3 compatibility) includes the saved-setuid feature (see long
  2852.    notes under edit 146 in ckc178.upd). If it does, then add -DSAVEDUID to
  2853.    CFLAGS.
  2854.  
  2855.      IMPORTANT NOTE: Most Unix system documentation will not give you the
  2856.      required information. To determine whether your Unix system supplies
  2857.      the the saved-original-effective-user/group-id feature, use the
  2858.      ckuuid.c program. Read and follow the instructions in the comments
  2859.      at the beginning.
  2860.  
  2861.    C-Kermit for 4.4BSD-based systems automatically use sete[ug]id(). See
  2862.    [330]ckutio.c.
  2863.  
  2864.    If you have a version of Unix that is not BSD-based, but which supplies
  2865.    the setreuid() and setregid() functions, and these are the only way to
  2866.    switch between real and effective uid, add -DSETREUID to your makefile
  2867.    target.
  2868.  
  2869.      WARNING: There are two calls to access() in [331]ckufio.c, by which
  2870.      Kermit checks to see if it can create an output file. These calls
  2871.      will not work correctly when (a)you have installed C-Kermit setuid
  2872.      or setgid on a BSD-based Unix system, and (b) the
  2873.      saved-original-effective-uid/gid feature is not present, and (c) the
  2874.      access() function always checks what it believes to be the real ID
  2875.      rather than the effective ID. This is the case, for example, in
  2876.      Olivetti X/OS and in NeXTSTEP. In such cases, you can force correct
  2877.      operation of access() calls by defining the symbol SW_ACC_ID at
  2878.      compile time in CFLAGS.
  2879.  
  2880.    If you have a version of Unix that does not allow a process to switch
  2881.    back and forth between its effective and real user and group ids
  2882.    multiple times, you probably should not attempt to run Kermit setuid,
  2883.    because once having given up its effective uid or gid (which it must do
  2884.    in order to transfer files, fork a shell, etc) it can never get it
  2885.    back, and so it can not use the original effective uid or gid to create
  2886.    or delete uucp lockfiles. In this case, you'll either have to set the
  2887.    permissions on your lockfile directory to make them publicly
  2888.    read/writable, or dispense with locking altogether.
  2889.  
  2890.    MORAL: Are you thoroughly sickened and/or frightened by all that you
  2891.    have just read? You should be. What is the real answer? Simple. Serial
  2892.    devices -- such as ttys and magnetic tapes -- in Unix should be opened
  2893.    with exclusive access only, enforced by the Unix kernel. Shared access
  2894.    has no conceivable purpose, legitimate or otherwise, except by
  2895.    privileged system programs such as getty. The original design dates
  2896.    from the late 1960s, when Unix was developed for laboratory use under a
  2897.    philosophy of trust by people within shouting distance of each other --
  2898.    but even then, no useful purpose was served by this particular form of
  2899.    openness; it was probably more of a political statement. Since the
  2900.    emergence of Unix from the laboratory into the commercial market, we
  2901.    have seen every vestige of openness -- but this one -- stripped away.
  2902.    I'd like to see some influential Unix maker take the bold step of
  2903.    making the simple kernel change required to enforce exclusive access to
  2904.    serial devices. (Well, perhaps not so simple when bidirectionality must
  2905.    also be a goal -- but then other OS's like VMS solved this problem
  2906.    decades ago.)
  2907.   ___________________________________________________________________________
  2908.  
  2909. 12. CONFIGURING UNIX WORKSTATIONS
  2910.  
  2911.    [ [332]Top ] [ [333]Contents ] [ [334]Next ] [ [335]Previous ]
  2912.  
  2913.    On desktop workstations that are used by only the user at the console
  2914.    keyboard, C-Kermit is always used in local mode. But as delivered,
  2915.    C-Kermit runs in remote mode by default. To put it in local mode at
  2916.    startup, you can put a SET LINE command in your .mykermrc.
  2917.  
  2918.    You can also build C-Kermit to start up in local mode by default. To do
  2919.    this, include the following in the CFLAGS in your makefile target:
  2920.  
  2921. -DDFTTY=\\\"/dev/ttyxx\\\"
  2922.  
  2923.    where ttyxx is the name of the device you will be using for
  2924.    communications. Presently there is no way of setting the default modem
  2925.    type at compile time, so use this option only for direct lines.
  2926.  
  2927.    C-Kermit does not work well on certain workstations if it is not run
  2928.    from within a terminal window. For example, you cannot start C-Kermit
  2929.    on a NeXT by launching it directly from NeXTstep. Similarly for Sun
  2930.    workstations in the Open Windows environment. Run Kermit in a terminal
  2931.    window.
  2932.   ___________________________________________________________________________
  2933.  
  2934. 13. BIZARRE BEHAVIOR AT RUNTIME
  2935.  
  2936.    [ [336]Top ] [ [337]Contents ] [ [338]Next ] [ [339]Previous ]
  2937.  
  2938.    See the "beware file",
  2939.  
  2940.    [340]ckubwr.txt, for hints about runtime misbehavior. This section
  2941.    lists some runtime problems that can be cured by rebuilding C-Kermit.
  2942.  
  2943.    The program starts, but there is no prompt, and certain operations
  2944.    don't work (you see error messages like "Kermit command error in
  2945.    background execution"). This is because Kermit thinks it is running in
  2946.    the background. See conbgt() in [341]ckutio.c. Try rebuilding Kermit
  2947.    with:
  2948.  
  2949.  -DPID_T=pid_t
  2950.  
  2951.    added to your CFLAGS. If that doesn't help, find out the actual data
  2952.    type for pids (look in types.h or similar file) and use it in place of
  2953.    "pid_t", for example:
  2954.  
  2955.  -DPID_T=short
  2956.  
  2957.    Unexplainable and inappropriate error messages ("Sockets not supported
  2958.    on this device", etc) have been traced in at least one case to a lack
  2959.    of agreement between the system header files and the actual kernel.
  2960.    This happened because the GNU C compiler (gcc) was being used. gcc
  2961.    wants to have ANSI-C-compliant header files, and so part of the
  2962.    installation procedure for gcc is (or was) to run a shell script called
  2963.    "fixincludes", which translates the system's header files into a
  2964.    separate set of headers that gcc likes. So far so good. Later, a new
  2965.    version of the operating system is installed and nobody remembers to
  2966.    run fixincludes again. From that point, any program compiled with gcc
  2967.    that makes use of header files (particularly ioctl.h) is very likely to
  2968.    misbehave. Solution: run fixincludes again, or use your system's
  2969.    regular C compiler, libraries, and header files instead of gcc.
  2970.   ___________________________________________________________________________
  2971.  
  2972. 14. CRASHES AND CORE DUMPS
  2973.  
  2974.    [ [342]Top ] [ [343]Contents ] [ [344]Next ] [ [345]Previous ]
  2975.  
  2976.    If C-Kermit constitently dumps core at the beginning of a file
  2977.    transfer, look in SHOW FEATURES for CKREALPATH. If found, rebuild with
  2978.    -DNOREALPATH and see if that fixes the problem (some UNIXes have
  2979.    realpath() but it doesn't work).
  2980.  
  2981.    Total failure of the Kermit program can occur because of bad memory
  2982.    references, bad system calls, or problems with dynamic memory
  2983.    allocation. First, try to reproduce the problem with debugging turned
  2984.    on: run Kermit with the -d command-line option (for example, "wermit
  2985.    -d") and then examine the resulting debug.log file. The last entry
  2986.    should be in the vicinity of the crash. In VMS, a crash automatically
  2987.    produces a "stack dump" which shows the routine where the crash occurs.
  2988.    In some versions of Unix, you can get a stack dump with "adb" -- just
  2989.    type "adb wermit core" and then give the command "$c", then Ctrl-D to
  2990.    quit (note: replace "wermit" by "kermit" or by the full pathname of the
  2991.    executable that crashed if it is not in the current directory). Or use
  2992.    gdb to get a backtrace, etc.
  2993.  
  2994.    In edit 186, one implementation, UNISYS 5000/95 built with "make
  2995.    sys5r3", has been reported to run out of memory very quickly (e.g.
  2996.    while executing a short initialization file that contains a SET DIAL
  2997.    DIRECTORY command). Debug logs show that malloc calls are failing,
  2998.    reason unknown. For this and any other implementation that gives error
  2999.    messages about "malloc failure" or "memory allocation failure", rebuild
  3000.    the program *without* the -DDYNAMIC CFLAGS definition, for example:
  3001.  
  3002. make sys5r3 KFLAGS=-UDYNAMIC
  3003.  
  3004.    As of edit 169, C-Kermit includes a malloc() debugging package which
  3005.    you may link with the Kermit program to catch runtime malloc errors.
  3006.    See the makefile entries for sunos41md and nextmd for examples of how
  3007.    to select malloc debugging. Once you have linked Kermit with the malloc
  3008.    debugger, it will halt with an informative message if a malloc-related
  3009.    error occurs and, if possible, dump core. For this reason,
  3010.    malloc-debugging versions of Kermit should be built without the "-s"
  3011.    link option (which removes symbols, preventing analysis of the core
  3012.    dump). You have several ways to track down the malloc error: Analyze
  3013.    the core dump with adb. Or reproduce the problem with "log debug" and
  3014.    then look at the code around the last debug.log entry. If you have gcc,
  3015.    build the program with "-g" added to CFLAGS and then debug it with gdb,
  3016.    e.g.
  3017.  
  3018. gdb wermit
  3019. break main
  3020. run
  3021. .. set other breakpoints or watchpoints
  3022. continue
  3023.  
  3024.    Watchpoints are especially useful for finding memory leaks, but they
  3025.    make the program run about a thousand times slower than usual, so don't
  3026.    set them until the last possible moment. When a watchpoint is hit, you
  3027.    can use the "where" command to find out which C-Kermit source statement
  3028.    triggered it.
  3029.  
  3030.    If you have the Pure Software Inc "Purify" product, see the sunos41cp
  3031.    makefile entry for an example of how to use it to debug C-Kermit.
  3032.   ___________________________________________________________________________
  3033.  
  3034. 15. SYSLOGGING
  3035.  
  3036.    [ [346]Top ] [ [347]Contents ] [ [348]Next ] [ [349]Previous ]
  3037.  
  3038.    "Syslogging" means recording selected in the system log via the Unix
  3039.    syslog() facility, which is available in most Unix versions. Syslogging
  3040.    is not done unless C-Kermit is started with:
  3041.  
  3042. --syslog:n
  3043.  
  3044.    on the command-line, where n is a number greater than 0 to indicate the
  3045.    level of syslogging. See [350]Section 4.2 of the [351]IKSD
  3046.    Administrator's Guide for details.
  3047.  
  3048.    Obviously you can't depend on users to include --syslog:3 (or whatever)
  3049.    on the command line every time they start C-Kermit, so if you want
  3050.    certain kinds of records to be recorded in the system log, you can
  3051.    build C-Kermit with forced syslogging at the desired level, e.g.:
  3052.  
  3053. make linux KFLAGS=-DSYSLOGLEVEL=2
  3054.  
  3055.    Levels 2 and 3 are the most likely candidates for this treatment. Level
  3056.    2 forces logging of all successful dialout calls (e.g. for checking
  3057.    against or phone bills), and level 3 records all connections (SET LINE
  3058.    or SET HOST / TELNET / RLOGIN, etc) so you can see who is connecting
  3059.    out from your system, and to where.
  3060.  
  3061.    Level 2 and 3 records are equivalent to those in the connection log;
  3062.    see the [352]C-Kermit 7.0 Supplement) for a detailed description of the
  3063.    connection log.
  3064.   ___________________________________________________________________________
  3065.  
  3066. 16. BUILDING SECURE VERSIONS OF C-KERMIT 8.0
  3067.  
  3068.    [ [353]Top ] [ [354]Contents ] [ [355]Next ] [ [356]Previous ]
  3069.  
  3070.    C-Kermit 7.0 and later may be built with Kerberos(TM) and/or SRP(TM)
  3071.    (Secure Remote Password) and/or SSL/TLS security for strong
  3072.    authentication and encryption of Internet connections. These security
  3073.    methods require external libraries that, in their binary forms, are
  3074.    restricted from export by USA law. See the [357]Kermit Security
  3075.    Reference) for details. C-Kermit binaries themselves are likewise
  3076.    restricted; the C-Kermit binaries that are available for public
  3077.    download on the Internet are not allowed to contain the security
  3078.    options.
  3079.  
  3080.    Sample makefile entries are provided for Linux and many other operating
  3081.    systems. A list of secure makefile entries is included in the Makefile.
  3082.    Complete instructions on building C-Kermit 8.0 with MIT Kerberos;
  3083.    Secure Remote Password; and/or OpenSSL can be found in the [358]Kermit
  3084.    Security Reference.
  3085.  
  3086.    C-Kermit 8.0 comes with a current list of Certificate Authority
  3087.    certificates, including one for the Kermit Project that can be used for
  3088.    authentication to Columbia's [359]Internet Kermit Service (IKSD). You
  3089.    can use C-Kermit 7.0 or later to access Columbia's IKSD securely by
  3090.    installing the Kermit Project certificate in /usr/local/ssl/cert.pem
  3091.    (or the appropriate location based upon the installation of OpenSSL on
  3092.    your system). You can find a copy of the certificates file at:
  3093.  
  3094. [360]ftp://kermit.columbia.edu/kermit/c-kermit/ca_certs.pem
  3095.   ___________________________________________________________________________
  3096.  
  3097. 17. INSTALLING C-KERMIT AS AN SSH SERVER SUBSYSTEM
  3098.  
  3099.    [ [361]Top ] [ [362]Contents ] [ [363]Previous ]
  3100.  
  3101.    This requires C-Kermit 8.0.206 or later and an SSH v2 server. If you
  3102.    list C-Kermit as a Subsystem in the SSH v2 server configuration file
  3103.    (as, for example, SFTP is listed), users can make SSH connections
  3104.    direct to a Kermit server as explained here:
  3105.  
  3106. [364]http://www.columbia.edu/kermit/skermit.html
  3107.  
  3108.    The name and location of the SSH server configuration file depends on
  3109.    your platform, which SSH product(s) you have, etc. C-Kermit itself must
  3110.    be referred to in this file as "kermit-sshsub". On the host, install
  3111.    the C-Kermit 8.0.211 binary in the normal way. Then, in the same
  3112.    directory as the C-Kermit binary, make a symbolic link:
  3113.  
  3114. ln -s kermit kermit-sshsub
  3115.  
  3116.    (Note: the "make install" makefile target does this for you.) Then in
  3117.    the sshd configuration file, add a line:
  3118.  
  3119. Subsystem  kermit   /some/path/kermit-sshsub
  3120.  
  3121.    (where /some/path is the fully specified directory where the symlink
  3122.    is.) This is similar to the line that sets up the SFTP susbsystem.
  3123.    Example:
  3124.  
  3125. Subsystem   sftp    /usr/local/libexec/sftp-server
  3126. Subsystem   kermit  /usr/local/bin/kermit-sshsub
  3127.  
  3128.    The mechanics might vary for other SSH servers; "man sshd" for details.
  3129.    The method shown here is used because the OpenSSH server does not
  3130.    permit the subsystem invocation to include command-line options.
  3131.    C-Kermit would have no way of knowing that it should enter Server mode
  3132.    if it were not called by a special name.
  3133.  
  3134.    [ [365]Top ] [ [366]Contents ] [ [367]C-Kermit Home ] [ [368]C-Kermit
  3135.    8.0 Overview ] [ [369]Kermit Home ]
  3136.      __________________________________________________________________
  3137.  
  3138.  
  3139.     C-Kermit 8.0 Unix Installation Instructions / The Kermit Project /
  3140.     Columbia University / 23 June 2004 .. 23 May 2005
  3141.  
  3142. References
  3143.  
  3144.    1. http://www.columbia.edu/kermit/index.html
  3145.    2. http://www.columbia.edu/kermit/k95.html
  3146.    3. http://www.columbia.edu/kermit/ckermit.html
  3147.    4. http://www.columbia.edu/kermit/ckscripts.html
  3148.    5. http://www.columbia.edu/kermit/current.html
  3149.    6. http://www.columbia.edu/kermit/whatsnew.html
  3150.    7. http://www.columbia.edu/kermit/faq.html
  3151.    8. http://www.columbia.edu/kermit/support.html
  3152.    9. http://www.columbia.edu/kermit/ckuins.html#contents
  3153.   10. http://www.columbia.edu/kermit/ckermit.html
  3154.   11. http://www.columbia.edu/kermit/index.html
  3155.   12. http://www.columbia.edu/kermit/ckuins.html
  3156.   13. http://www.columbia.edu/kermit/ckuins.html#x0
  3157.   14. http://www.columbia.edu/kermit/ckuins.html#x1
  3158.   15. http://www.columbia.edu/kermit/ckuins.html#x2
  3159.   16. http://www.columbia.edu/kermit/ckuins.html#x3
  3160.   17. http://www.columbia.edu/kermit/ckuins.html#x4
  3161.   18. http://www.columbia.edu/kermit/ckuins.html#x5
  3162.   19. http://www.columbia.edu/kermit/ckuins.html#x6
  3163.   20. http://www.columbia.edu/kermit/ckuins.html#x7
  3164.   21. http://www.columbia.edu/kermit/ckuins.html#x8
  3165.   22. http://www.columbia.edu/kermit/ckuins.html#x9
  3166.   23. http://www.columbia.edu/kermit/ckuins.html#x10
  3167.   24. http://www.columbia.edu/kermit/ckuins.html#x11
  3168.   25. http://www.columbia.edu/kermit/ckuins.html#x12
  3169.   26. http://www.columbia.edu/kermit/ckuins.html#x13
  3170.   27. http://www.columbia.edu/kermit/ckuins.html#x14
  3171.   28. http://www.columbia.edu/kermit/ckuins.html#x15
  3172.   29. http://www.columbia.edu/kermit/ckuins.html#x16
  3173.   30. http://www.columbia.edu/kermit/ckuins.html#x16
  3174.   31. http://www.columbia.edu/kermit/ckuins.html#top
  3175.   32. http://www.columbia.edu/kermit/ckuins.html#contents
  3176.   33. http://www.columbia.edu/kermit/ckuins.html#x1
  3177.   34. http://www.columbia.edu/kermit/ckccfg.html
  3178.   35. http://www.columbia.edu/kermit/ckcbwr.html
  3179.   36. http://www.columbia.edu/kermit/ckubwr.html
  3180.   37. http://www.columbia.edu/kermit/ckcplm.html
  3181.   38. http://www.columbia.edu/kermit/ckuins.html#x2
  3182.   39. http://www.columbia.edu/kermit/ckuins.html#x3
  3183.   40. http://www.columbia.edu/kermit/ckuins.html#x4
  3184.   41. http://www.columbia.edu/kermit/ckuins.html#top
  3185.   42. http://www.columbia.edu/kermit/ckuins.html#contents
  3186.   43. http://www.columbia.edu/kermit/ckuins.html#x2
  3187.   44. http://www.columbia.edu/kermit/ckuins.html#x0
  3188.   45. ftp://kermit.columbia.edu/kermit/archives/cku211.tar.Z
  3189.   46. ftp://kermit.columbia.edu/kermit/archives/cku211.tar.gz
  3190.   47. ftp://kermit.columbia.edu/kermit/archives/cku211.tar
  3191.   48. http://www.columbia.edu/kermit/ckuins.html#x7
  3192.   49. http://www.columbia.edu/kermit/ckuins.html#x5
  3193.   50. http://www.columbia.edu/kermit/ckuins.html#x5
  3194.   51. http://www.columbia.edu/kermit/ckuins.html#x16
  3195.   52. http://www.columbia.edu/kermit/ckuins.html#top
  3196.   53. http://www.columbia.edu/kermit/ckuins.html#contents
  3197.   54. http://www.columbia.edu/kermit/ckuins.html#x3
  3198.   55. http://www.columbia.edu/kermit/ckuins.html#x1
  3199.   56. http://www.columbia.edu/kermit/ckuins.html#x5
  3200.   57. http://www.columbia.edu/kermit/ckuins.html#X10
  3201.   58. http://www.columbia.edu/kermit/ckuins.html#x11
  3202.   59. http://www.columbia.edu/kermit/ckuins.html#x10
  3203.   60. http://www.columbia.edu/kermit/ckuins.html#x3
  3204.   61. http://www.columbia.edu/kermit/ck80packages.html
  3205.   62. http://www.columbia.edu/kermit/ckuins.html#x10
  3206.   63. http://www.columbia.edu/kermit/ckuins.html#top
  3207.   64. http://www.columbia.edu/kermit/ckuins.html#contents
  3208.   65. http://www.columbia.edu/kermit/ckuins.html#x4
  3209.   66. http://www.columbia.edu/kermit/ckuins.html#x2
  3210.   67. ftp://kermit.columbia.edu/kermit/bin/
  3211.   68. http://www.columbia.edu/kermit/ck80binaries.html
  3212.   69. http://www.columbia.edu/kermit/ckuins.html#x7
  3213.   70. http://www.columbia.edu/kermit/ckuins.html#build
  3214.   71. http://www.columbia.edu/kermit/ckuins.html#x5
  3215.   72. http://www.columbia.edu/kermit/ckuins.html#x4
  3216.   73. http://www.columbia.edu/kermit/ckuins.html#x4
  3217.   74. mailto:kermit@columbia.edu
  3218.   75. http://www.columbia.edu/kermit/ckuins.html#top
  3219.   76. http://www.columbia.edu/kermit/ckuins.html#contents
  3220.   77. http://www.columbia.edu/kermit/ckuins.html#x5
  3221.   78. http://www.columbia.edu/kermit/ckuins.html#x3
  3222.   79. http://www.columbia.edu/kermit/ckuins.html#x8
  3223.   80. http://www.columbia.edu/kermit/ckuins.html#x9
  3224.   81. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
  3225.   82. ftp://kermit.columbia.edu/kermit/c-kermit/ckpker.mk
  3226.   83. ftp://kermit.columbia.edu/kermit/c-kermit/ckubsd.mak
  3227.   84. http://www.columbia.edu/kermit/ckuins.html#x5
  3228.   85. mailto:kermit-support@columbia.edu
  3229.   86. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
  3230.   87. http://www.columbia.edu/kermit/ckuins.html#x7
  3231.   88. mailto:kermit-support@columbia.edu
  3232.   89. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
  3233.   90. http://www.columbia.edu/kermit/ckuins.html#x5.4
  3234.   91. http://www.columbia.edu/kermit/ckuins.html#x10
  3235.   92. http://www.columbia.edu/kermit/ckuins.html#x11
  3236.   93. http://www.columbia.edu/kermit/ckuins.html#x5
  3237.   94. http://www.columbia.edu/kermit/iksd.html
  3238.   95. http://www.columbia.edu/kermit/ckuins.html#top
  3239.   96. http://www.columbia.edu/kermit/ckuins.html#contents
  3240.   97. http://www.columbia.edu/kermit/ckuins.html#x4.1
  3241.   98. http://www.columbia.edu/kermit/ckccfg.html
  3242.   99. http://www.columbia.edu/kermit/ckuins.html#x4.1
  3243.  100. http://www.columbia.edu/kermit/ckuins.html#x4.2
  3244.  101. http://www.columbia.edu/kermit/ckuins.html#x4.3
  3245.  102. http://www.columbia.edu/kermit/ckuins.html#x4.4
  3246.  103. http://www.columbia.edu/kermit/ckuins.html#x4.5
  3247.  104. http://www.columbia.edu/kermit/ckccfg.html
  3248.  105. http://www.columbia.edu/kermit/ckccfg.html#x8
  3249.  106. http://www.columbia.edu/kermit/iksd.html
  3250.  107. http://www.columbia.edu/kermit/iksd.html
  3251.  108. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  3252.  109. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  3253.  110. mailto:kermit-support@columbia.edu
  3254.  111. ftp://kermit.columbia.edu/kermit/c-kermit/ckcmai.c
  3255.  112. http://www.columbia.edu/kermit/ckuins.html#x15
  3256.  113. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  3257.  114. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  3258.  115. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  3259.  116. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  3260.  117. ftp://kermit.columbia.edu/kermit/c-kermit/ckcnet.c
  3261.  118. ftp://kermit.columbia.edu/kermit/c-kermit/ckcnet.c
  3262.  119. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  3263.  120. ftp://kermit.columbia.edu/kermit/c-kermit/ckcuni.c
  3264.  121. mailto:kermit-support@columbia.edu
  3265.  122. http://www.columbia.edu/kermit/ckuins.html#top
  3266.  123. http://www.columbia.edu/kermit/ckuins.html#contents
  3267.  124. http://www.columbia.edu/kermit/ckuins.html#x4
  3268.  125. http://www.columbia.edu/kermit/ckuins.html#x4.2
  3269.  126. http://www.columbia.edu/kermit/ckuins.html#x4.0
  3270.  127. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
  3271.  128. ftp://kermit.columbia.edu/kermit/c-kermit/ckubwr.txt
  3272.  129. http://www.columbia.edu/kermit/ckubwr.html
  3273.  130. ftp://kermit.columbia.edu/kermit/c-kermit/ckwart.c
  3274.  131. ftp://kermit.columbia.edu/kermit/c-kermit/ckcpro.w
  3275.  132. ftp://kermit.columbia.edu/kermit/c-kermit/ckcpro.c
  3276.  133. http://www.columbia.edu/kermit/ckuins.html#top
  3277.  134. http://www.columbia.edu/kermit/ckuins.html#contents
  3278.  135. http://www.columbia.edu/kermit/ckuins.html#x4
  3279.  136. http://www.columbia.edu/kermit/ckuins.html#x4.3
  3280.  137. http://www.columbia.edu/kermit/ckuins.html#x4.1
  3281.  138. http://www.columbia.edu/kermit/ckuins.html#x5
  3282.  139. http://www.columbia.edu/kermit/ckuins.html#top
  3283.  140. http://www.columbia.edu/kermit/ckuins.html#contents
  3284.  141. http://www.columbia.edu/kermit/ckuins.html#x4
  3285.  142. http://www.columbia.edu/kermit/ckuins.html#x4.4
  3286.  143. http://www.columbia.edu/kermit/ckuins.html#x4.2
  3287.  144. http://www.columbia.edu/kermit/ckuins.html#top
  3288.  145. http://www.columbia.edu/kermit/ckuins.html#contents
  3289.  146. http://www.columbia.edu/kermit/ckuins.html#x4
  3290.  147. http://www.columbia.edu/kermit/ckuins.html#x4.5
  3291.  148. http://www.columbia.edu/kermit/ckuins.html#x4.3
  3292.  149. ftp://kermit.columbia.edu/kermit/c-kermit/ckpker.mk
  3293.  150. http://www.columbia.edu/kermit/ckuins.html#top
  3294.  151. http://www.columbia.edu/kermit/ckuins.html#contents
  3295.  152. http://www.columbia.edu/kermit/ckuins.html#x4
  3296.  153. http://www.columbia.edu/kermit/ckuins.html#x4.4
  3297.  154. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
  3298.  155. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
  3299.  156. ftp://kermit.columbia.edu/kermit/c-kermit/ckcpro.w
  3300.  157. http://www.columbia.edu/kermit/ckuins.html#top
  3301.  158. http://www.columbia.edu/kermit/ckuins.html#contents
  3302.  159. http://www.columbia.edu/kermit/ckuins.html#x6
  3303.  160. http://www.columbia.edu/kermit/ckuins.html#x4
  3304.  161. http://www.columbia.edu/kermit/ckuins.html#x5.1
  3305.  162. http://www.columbia.edu/kermit/ckuins.html#x5.2
  3306.  163. http://www.columbia.edu/kermit/ckuins.html#x5.3
  3307.  164. http://www.columbia.edu/kermit/ckuins.html#x5.4
  3308.  165. http://www.columbia.edu/kermit/
  3309.  166. http://www.columbia.edu/kermit/ckuins.html#x5.4
  3310.  167. http://www.columbia.edu/kermit/ckuins.html#x5.3
  3311.  168. ftp://kermit.columbia.edu/kermit/c-kermit/COPYING.TXT
  3312.  169. ftp://kermit.columbia.edu/kermit/c-kermit/ckermit.ini
  3313.  170. http://www.columbia.edu/kermit/ckuins.html#x5.1
  3314.  171. ftp://kermit.columbia.edu/kermit/c-kermit/ckermod.ini
  3315.  172. ftp://kermit.columbia.edu/kermit/c-kermit/ckermit70.txt
  3316.  173. http://www.columbia.edu/kermit/ck60manual.html
  3317.  174. http://www.columbia.edu/kermit/ckermit70.html
  3318.  175. ftp://kermit.columbia.edu/kermit/c-kermit/ckermit80.txt
  3319.  176. http://www.columbia.edu/kermit/ck60manual.html
  3320.  177. http://www.columbia.edu/kermit/ckermit80.html
  3321.  178. ftp://kermit.columbia.edu/kermit/c-kermit/ckcbwr.txt
  3322.  179. http://www.columbia.edu/kermit/ckcbwr.html
  3323.  180. ftp://kermit.columbia.edu/kermit/c-kermit/ckubwr.txt
  3324.  181. http://www.columbia.edu/kermit/ckubwr.html
  3325.  182. ftp://kermit.columbia.edu/kermit/c-kermit/ckuins.txt
  3326.  183. http://www.columbia.edu/kermit/ckuins.html
  3327.  184. ftp://kermit.columbia.edu/kermit/c-kermit/ckccfg.txt
  3328.  185. http://www.columbia.edu/kermit/ckccfg.html
  3329.  186. ftp://kermit.columbia.edu/kermit/c-kermit/ckcplm.txt
  3330.  187. http://www.columbia.edu/kermit/ckcplm.html
  3331.  188. ftp://kermit.columbia.edu/kermit/c-kermit/ca_certs.pem
  3332.  189. http://www.columbia.edu/kermit/ckuins.html#x16"
  3333.  190. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
  3334.  191. http://www.columbia.edu/kermit/ckuins.html#x?
  3335.  192. http://www.columbia.edu/kermit/ckuins.html#x11
  3336.  193. http://www.columbia.edu/kermit/ckuins.html#x5.2
  3337.  194. http://www.columbia.edu/kermit/ckermit.html#download
  3338.  195. http://www.columbia.edu/kermit/ck80binaries.html
  3339.  196. http://www.columbia.edu/kermit/ckermit.html#download
  3340.  197. http://www.columbia.edu/kermit/ckuins.html#top
  3341.  198. http://www.columbia.edu/kermit/ckuins.html#contents
  3342.  199. http://www.columbia.edu/kermit/ckuins.html#x7
  3343.  200. http://www.columbia.edu/kermit/ckuins.html#x5
  3344.  201. http://www.columbia.edu/kermit/ckuins.html#top
  3345.  202. http://www.columbia.edu/kermit/ckuins.html#contents
  3346.  203. http://www.columbia.edu/kermit/ckuins.html#x8
  3347.  204. http://www.columbia.edu/kermit/ckuins.html#x6
  3348.  205. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  3349.  206. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  3350.  207. http://www.columbia.edu/kermit/ckuins.html#x4.0
  3351.  208. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
  3352.  209. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  3353.  210. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  3354.  211. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  3355.  212. http://www.columbia.edu/kermit/ckuins.html#x10
  3356.  213. http://www.columbia.edu/kermit/ckccfg.html#x2
  3357.  214. http://www.columbia.edu/kermit/ckccfg.html
  3358.  215. http://www.columbia.edu/kermit/ckuins.html#x4
  3359.  216. http://www.columbia.edu/kermit/ckuins.html#x10
  3360.  217. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  3361.  218. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  3362.  219. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  3363.  220. http://www.columbia.edu/kermit/ckuins.html#x9.4
  3364.  221. mailto:kermit-support@columbia.edu
  3365.  222. http://www.columbia.edu/kermit/ckuins.html#top
  3366.  223. http://www.columbia.edu/kermit/ckuins.html#contents
  3367.  224. http://www.columbia.edu/kermit/ckuins.html#x9
  3368.  225. http://www.columbia.edu/kermit/ckuins.html#x7
  3369.  226. http://www.columbia.edu/kermit/ckccfg.html
  3370.  227. http://www.columbia.edu/kermit/ckccfg.html
  3371.  228. http://www.columbia.edu/kermit/ckuins.html#top
  3372.  229. http://www.columbia.edu/kermit/ckuins.html#contents
  3373.  230. http://www.columbia.edu/kermit/ckuins.html#x10
  3374.  231. http://www.columbia.edu/kermit/ckuins.html#x8
  3375.  232. http://www.columbia.edu/kermit/ckuins.html#x9.1
  3376.  233. http://www.columbia.edu/kermit/ckuins.html#x9.1.1
  3377.  234. http://www.columbia.edu/kermit/ckuins.html#x9.1.2
  3378.  235. http://www.columbia.edu/kermit/ckuins.html#x9.1.3
  3379.  236. http://www.columbia.edu/kermit/ckuins.html#x9.2
  3380.  237. http://www.columbia.edu/kermit/ckuins.html#x9.3
  3381.  238. http://www.columbia.edu/kermit/ckuins.html#x9.4
  3382.  239. http://www.columbia.edu/kermit/ckuins.html#x9.5
  3383.  240. http://www.columbia.edu/kermit/ckuins.html#x9.6
  3384.  241. http://www.columbia.edu/kermit/ckuins.html#x9.7
  3385.  242. http://www.columbia.edu/kermit/ckuins.html#x9.8
  3386.  243. http://www.columbia.edu/kermit/ckuins.html#x9.9
  3387.  244. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  3388.  245. http://www.columbia.edu/kermit/ckuins.html#top
  3389.  246. http://www.columbia.edu/kermit/ckuins.html#x9
  3390.  247. http://www.columbia.edu/kermit/ckuins.html#contents
  3391.  248. http://www.columbia.edu/kermit/ckuins.html#x9.2
  3392.  249. http://www.columbia.edu/kermit/ckuins.html#x9.1.1
  3393.  250. http://www.columbia.edu/kermit/ckuins.html#x9.1.2
  3394.  251. http://www.columbia.edu/kermit/ckuins.html#x9.1.3
  3395.  252. http://www.columbia.edu/kermit/ckuins.html#top
  3396.  253. http://www.columbia.edu/kermit/ckuins.html#contents
  3397.  254. http://www.columbia.edu/kermit/ckuins.html#x9
  3398.  255. http://www.columbia.edu/kermit/ckuins.html#x9.1
  3399.  256. http://www.columbia.edu/kermit/ckuins.html#x9.1.3
  3400.  257. http://www.columbia.edu/kermit/ckuins.html#x9.1.1
  3401.  258. http://www.columbia.edu/kermit/ckuins.html#top
  3402.  259. http://www.columbia.edu/kermit/ckuins.html#contents
  3403.  260. http://www.columbia.edu/kermit/ckuins.html#x9
  3404.  261. http://www.columbia.edu/kermit/ckuins.html#x9.1
  3405.  262. http://www.columbia.edu/kermit/ckuins.html#x9.2
  3406.  263. http://www.columbia.edu/kermit/ckuins.html#x9.1.2
  3407.  264. http://www.opengroup.org/onlinepubs/007904975/
  3408.  265. http://www.columbia.edu/kermit/ckuins.html#x9.1.1
  3409.  266. http://www.columbia.edu/kermit/ckuins.html#top
  3410.  267. http://www.columbia.edu/kermit/ckuins.html#contents
  3411.  268. http://www.columbia.edu/kermit/ckuins.html#x9
  3412.  269. http://www.columbia.edu/kermit/ckuins.html#x9.1
  3413.  270. http://www.columbia.edu/kermit/ckuins.html#x9.3
  3414.  271. http://www.columbia.edu/kermit/ckuins.html#x9.1
  3415.  272. http://www.columbia.edu/kermit/ckuins.html#top
  3416.  273. http://www.columbia.edu/kermit/ckuins.html#contents
  3417.  274. http://www.columbia.edu/kermit/ckuins.html#x9
  3418.  275. http://www.columbia.edu/kermit/ckuins.html#x9.4
  3419.  276. http://www.columbia.edu/kermit/ckuins.html#x9.2
  3420.  277. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  3421.  278. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  3422.  279. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  3423.  280. http://www.columbia.edu/kermit/ckuins.html#top
  3424.  281. http://www.columbia.edu/kermit/ckuins.html#contents
  3425.  282. http://www.columbia.edu/kermit/ckuins.html#x9
  3426.  283. http://www.columbia.edu/kermit/ckuins.html#x9.5
  3427.  284. http://www.columbia.edu/kermit/ckuins.html#x9.3
  3428.  285. http://www.columbia.edu/kermit/cable.html
  3429.  286. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  3430.  287. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
  3431.  288. http://www.columbia.edu/kermit/ckuins.html#top
  3432.  289. http://www.columbia.edu/kermit/ckuins.html#contents
  3433.  290. http://www.columbia.edu/kermit/ckuins.html#x9
  3434.  291. http://www.columbia.edu/kermit/ckuins.html#x9.6
  3435.  292. http://www.columbia.edu/kermit/ckuins.html#x9.4
  3436.  293. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
  3437.  294. ftp://kermit.columbia.edu/kermit/c-kermit/ckuus3.c
  3438.  295. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  3439.  296. http://www.columbia.edu/kermit/ckuins.html#top
  3440.  297. http://www.columbia.edu/kermit/ckuins.html#contents
  3441.  298. http://www.columbia.edu/kermit/ckuins.html#x9
  3442.  299. http://www.columbia.edu/kermit/ckuins.html#x9.7
  3443.  300. http://www.columbia.edu/kermit/ckuins.html#x9.5
  3444.  301. http://www.columbia.edu/kermit/ckuins.html#top
  3445.  302. http://www.columbia.edu/kermit/ckuins.html#contents
  3446.  303. http://www.columbia.edu/kermit/ckuins.html#x9
  3447.  304. http://www.columbia.edu/kermit/ckuins.html#x9.8
  3448.  305. http://www.columbia.edu/kermit/ckuins.html#x9.6
  3449.  306. http://www.columbia.edu/kermit/ckuins.html#top
  3450.  307. http://www.columbia.edu/kermit/ckuins.html#contents
  3451.  308. http://www.columbia.edu/kermit/ckuins.html#x9
  3452.  309. http://www.columbia.edu/kermit/ckuins.html#x9.9
  3453.  310. http://www.columbia.edu/kermit/ckuins.html#x9.7
  3454.  311. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  3455.  312. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  3456.  313. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
  3457.  314. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  3458.  315. http://www.columbia.edu/kermit/ckuins.html#top
  3459.  316. http://www.columbia.edu/kermit/ckuins.html#contents
  3460.  317. http://www.columbia.edu/kermit/ckuins.html#x9
  3461.  318. http://www.columbia.edu/kermit/ckuins.html#x10
  3462.  319. http://www.columbia.edu/kermit/ckuins.html#x9.8
  3463.  320. http://www.columbia.edu/kermit/ckuins.html#top
  3464.  321. http://www.columbia.edu/kermit/ckuins.html#contents
  3465.  322. http://www.columbia.edu/kermit/ckuins.html#x11
  3466.  323. http://www.columbia.edu/kermit/ckuins.html#x9
  3467.  324. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  3468.  325. http://www.columbia.edu/kermit/ckuins.html#x11
  3469.  326. http://www.columbia.edu/kermit/ckuins.html#top
  3470.  327. http://www.columbia.edu/kermit/ckuins.html#contents
  3471.  328. http://www.columbia.edu/kermit/ckuins.html#x12
  3472.  329. http://www.columbia.edu/kermit/ckuins.html#x10
  3473.  330. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  3474.  331. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  3475.  332. http://www.columbia.edu/kermit/ckuins.html#top
  3476.  333. http://www.columbia.edu/kermit/ckuins.html#contents
  3477.  334. http://www.columbia.edu/kermit/ckuins.html#x13
  3478.  335. http://www.columbia.edu/kermit/ckuins.html#x11
  3479.  336. http://www.columbia.edu/kermit/ckuins.html#top
  3480.  337. http://www.columbia.edu/kermit/ckuins.html#contents
  3481.  338. http://www.columbia.edu/kermit/ckuins.html#x14
  3482.  339. http://www.columbia.edu/kermit/ckuins.html#x12
  3483.  340. ftp://kermit.columbia.edu/kermit/c-kermit/ckubwr.txt
  3484.  341. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  3485.  342. http://www.columbia.edu/kermit/ckuins.html#top
  3486.  343. http://www.columbia.edu/kermit/ckuins.html#contents
  3487.  344. http://www.columbia.edu/kermit/ckuins.html#x15
  3488.  345. http://www.columbia.edu/kermit/ckuins.html#x13
  3489.  346. http://www.columbia.edu/kermit/ckuins.html#top
  3490.  347. http://www.columbia.edu/kermit/ckuins.html#contents
  3491.  348. http://www.columbia.edu/kermit/ckuins.html#x16
  3492.  349. http://www.columbia.edu/kermit/ckuins.html#x14
  3493.  350. http://www.columbia.edu/kermit/iksd.html#x4.2
  3494.  351. http://www.columbia.edu/kermit/iksd.html
  3495.  352. http://www.columbia.edu/kermit/ckermit2.html
  3496.  353. http://www.columbia.edu/kermit/ckuins.html#top
  3497.  354. http://www.columbia.edu/kermit/ckuins.html#contents
  3498.  355. http://www.columbia.edu/kermit/ckuins.html#x17
  3499.  356. http://www.columbia.edu/kermit/ckuins.html#x15
  3500.  357. http://www.columbia.edu/kermit/security.html
  3501.  358. http://www.columbia.edu/kermit/security80.html
  3502.  359. http://www.columbia.edu/kermit/cuiksd.html
  3503.  360. ftp://kermit.columbia.edu/kermit/c-kermit/ca_certs.pem
  3504.  361. http://www.columbia.edu/kermit/ckuins.html#top
  3505.  362. http://www.columbia.edu/kermit/ckuins.html#contents
  3506.  363. http://www.columbia.edu/kermit/ckuins.html#x16
  3507.  364. http://www.columbia.edu/kermit/skermit.html
  3508.  365. http://www.columbia.edu/kermit/ckuins.html#top
  3509.  366. http://www.columbia.edu/kermit/ckuins.html#contents
  3510.  367. http://www.columbia.edu/kermit/ckermit.html
  3511.  368. http://www.columbia.edu/kermit/ck80.html
  3512.  369. http://www.columbia.edu/kermit/index.html
  3513.