scsh-users
[Top] [All Lists]

dynload.c and bsd/waitcodes.scm

To: scsh-bugs@martigny.ai.mit.edu
Subject: dynload.c and bsd/waitcodes.scm
From: Alan Bawden <Alan@LCS.MIT.EDU>
Date: Wed, 8 Jan 1997 01:38:28 -0500
Sender: Alan@LCS.MIT.EDU
Two problems to report in scsh 0.4.4:

------- #1

scsh-0.4.4/dynload.c contains the following code:

    newhandle=dlopen(pathname, S48_DLOPEN_MODE);
  #if defined(__NetBSD__) || defined(__FreeBSD__)
    if (newhandle == -1) {
      fprintf(stderr, " dynamic_load of %s can't dlopen %s",
              sharedobjname, pathname);
      return -1;
    };
  #else
    if (!newhandle) {
      fprintf(stderr, " dynamic_load of %s can't dlopen %s: %s ",
              sharedobjname, pathname, dlerror());
      return -1;
    };
  #endif

First off, the manual page for dlopen() on FreeBSD version 2.1.0
claims that dlopen returns a null pointer if it fails.  That manual page
also claims that dlerror() is supported.  I do seem to recall that previous
versions of FreeBSD had some undocumented dynamic loading support, so
perhaps this code is a hold-over from those old days.  Probably autoconf
should be figuring this out for you somehow...

Second off, this code generates a compile-time warning because of the
comparison between newhandle and -1.  Since this is the -only- warning I
got when installing scsh, you might want to achieve perfection by replacing
that "-1" with "(void *) -1"!

------- #2

In scsh-0.4.4/scsh/bsd/waitcodes.scm the line:

         (not (= #x7F))                                 ; Not suspended.

should probably read:

         (not (= #x7F termsig))                         ; Not suspended.

------- EOM

<Prev in Thread] Current Thread [Next in Thread>