Greetings,

        I've managed to get LSH to compile on an SGI running IRIX6 using the
sgi compiler.  Patches for 0.2.7 are attached.  You need to use a
configure line like the following:

env CPPFLAGS="-I/usr/local/include" CFLAGS="-D inline=__inline
-D__OPTIMIZE__ -I
/usr/local/include -I/usr/gnu/include" LDFLAGS="-L/usr/local/lib
-L/usr/gnu/lib"
 LIBS="-lmalloc" ./configure --with-zlib --with-tcp-forward

        Many thanks to K. Thurston for his help in getting this far.

        Unfortunatly, lsh aborts with the following message when trying to
connect.  It looks like the allocator is getting confused:

> src/lsh machine.name.com
        make_device_random: Failed to open '/dev/urandom' (errno = 2): No such
file or directory
Warning: Falling back to an insecure pseudorandom generator.
lsh_object_check_subtype: Type error!
Abort (core dumped)

        Anyone seen this behavior already?

        --> Gabe
        
-- 
 * J. Gabriel Foster  "We have advanced to new and surprising
 * Silicon Grail       levels of bafflement" - Lois McMaster Bujold
 * [EMAIL PROTECTED]
diff -c -r lsh-0.2.7/src/argp/argp-fmtstream.c lsh-0.2.7.new/src/argp/argp-fmtstream.c
*** lsh-0.2.7/src/argp/argp-fmtstream.c Wed Feb  2 15:59:53 2000
--- lsh-0.2.7.new/src/argp/argp-fmtstream.c     Fri Feb  4 07:38:04 2000
***************
*** 388,393 ****
--- 388,394 ----
  
  #endif /* !ARGP_FMTSTREAM_USE_LINEWRAP */
  
+ #if !defined( __sgi ) || defined( __GNUC__ )
  size_t
  __argp_fmtstream_write (argp_fmtstream_t __fs,
                        __const char *__str, size_t __len)
***************
*** 468,471 ****
      __argp_fmtstream_update (__fs);
    return __fs->point_col >= 0 ? __fs->point_col : 0;
  }
!   
--- 469,472 ----
      __argp_fmtstream_update (__fs);
    return __fs->point_col >= 0 ? __fs->point_col : 0;
  }
! #endif /* !defined( __sgi ) || defined( __GNUC__ ) */
diff -c -r lsh-0.2.7/src/argp/argp-fmtstream.h lsh-0.2.7.new/src/argp/argp-fmtstream.h
*** lsh-0.2.7/src/argp/argp-fmtstream.h Wed Nov  3 15:27:17 1999
--- lsh-0.2.7.new/src/argp/argp-fmtstream.h     Fri Feb  4 07:40:15 2000
***************
*** 212,218 ****
--- 212,222 ----
  #endif
  
  #ifndef ARGP_FS_EI
+ #if defined( __sgi ) && !defined( __GNUC__ )
+ #define ARGP_FS_EI __inline
+ #else
  #define ARGP_FS_EI extern inline
+ #endif
  #endif
  
  ARGP_FS_EI size_t
diff -c -r lsh-0.2.7/src/argp/argp-parse.c lsh-0.2.7.new/src/argp/argp-parse.c
*** lsh-0.2.7/src/argp/argp-parse.c     Wed Feb  2 15:59:54 2000
--- lsh-0.2.7.new/src/argp/argp-parse.c Thu Feb  3 10:28:22 2000
***************
*** 803,809 ****
         parser, because we pre-compute which parser is supposed to deal
         with each option.  */
      {
!       static const char bad_key_err[] =
        N_("(PROGRAM ERROR) Option should have been recognized!?");
        if (group_key == 0)
        __argp_error (&parser->state, "-%c: %s", opt,
--- 803,809 ----
         parser, because we pre-compute which parser is supposed to deal
         with each option.  */
      {
!       static const char *bad_key_err =
        N_("(PROGRAM ERROR) Option should have been recognized!?");
        if (group_key == 0)
        __argp_error (&parser->state, "-%c: %s", opt,
diff -c -r lsh-0.2.7/src/lsh_types.h lsh-0.2.7.new/src/lsh_types.h
*** lsh-0.2.7/src/lsh_types.h   Mon Jan 10 00:58:47 2000
--- lsh-0.2.7.new/src/lsh_types.h       Fri Feb  4 07:34:45 2000
***************
*** 97,103 ****
--- 97,107 ----
  #if HAVE_STRSIGNAL
  #define STRSIGNAL strsignal
  #else
+ #ifdef __sgi
+ #define STRSIGNAL(x) (_sys_siglist[x])
+ #else
  #define STRSIGNAL(x) (sys_siglist[x])
+ #endif
  #endif
  
  /* Some macros */

Reply via email to