diff -urN lynx2-8-6-dev3/WWW/Library/Implementation/HTNews.c lynx2-8-6-dev3-work/WWW/Library/Implementation/HTNews.c --- lynx2-8-6-dev3/WWW/Library/Implementation/HTNews.c Sun Sep 26 19:50:47 2004 +++ lynx2-8-6-dev3-work/WWW/Library/Implementation/HTNews.c Sun Sep 26 19:56:10 2004 @@ -2645,7 +2645,11 @@ !strncmp(url, "snewspost:", 10) || !strncmp(url, "snewsreply:", 11))) { Handle = HTGetSSLHandle(); + #ifndef __BEOS__ SSL_set_fd(Handle, s); + #else + SSL_set fd(Handle,__libsocket_gethandle(s)); + #endif HTSSLInitPRNG(); status = SSL_connect(Handle); @@ -3059,7 +3063,11 @@ s = channel_s = sock; Handle = HTGetSSLHandle(); +#ifndef __BEOS__ SSL_set_fd(Handle, s); +#else /* __BEOS__ */ + SSL_set_fd(Handle, __libsocket_gethandle(s)); +#endif HTSSLInitPRNG(); status = SSL_connect(Handle); diff -urN lynx2-8-6-dev3/WWW/Library/Implementation/HTTCP.c lynx2-8-6-dev3-work/WWW/Library/Implementation/HTTCP.c --- lynx2-8-6-dev3/WWW/Library/Implementation/HTTCP.c Sun Sep 26 19:50:47 2004 +++ lynx2-8-6-dev3-work/WWW/Library/Implementation/HTTCP.c Sun Sep 26 20:02:58 2004 @@ -15,7 +15,7 @@ * 17 Nov 94 Andy Harper Added support for SOCKETSHR transport * 16 Jul 95 S. Bjorndahl added kluge to deal with LIBCMU bug */ - +#include "/boot/home/config/include/libsocket.h" #include #include #include @@ -1607,6 +1607,15 @@ * Now, let's get a socket set up from the server for the data. */ #ifndef INET6 + #ifdef __BEOS__ + { + static int inited = 0; + if (!inited){ + __init_socket_handle(); + inited = 1; + } + } + #endif *s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (*s == -1) { HTAlert(gettext("socket failed.")); diff -urN lynx2-8-6-dev3/WWW/Library/Implementation/HTUtils.h lynx2-8-6-dev3-work/WWW/Library/Implementation/HTUtils.h --- lynx2-8-6-dev3/WWW/Library/Implementation/HTUtils.h Sun Sep 26 19:50:48 2004 +++ lynx2-8-6-dev3-work/WWW/Library/Implementation/HTUtils.h Sun Sep 26 19:56:10 2004 @@ -39,6 +39,7 @@ #endif #include +#include "/boot/home/config/include/libsocket.h" #include #else /* HAVE_CONFIG_H */ diff -urN lynx2-8-6-dev3/WWW/Library/Implementation/www_tcp.h lynx2-8-6-dev3-work/WWW/Library/Implementation/www_tcp.h --- lynx2-8-6-dev3/WWW/Library/Implementation/www_tcp.h Sun Sep 26 19:50:48 2004 +++ lynx2-8-6-dev3-work/WWW/Library/Implementation/www_tcp.h Sun Sep 26 19:56:10 2004 @@ -25,9 +25,18 @@ 15 Jul 95 S. Bjorndahl Gnu C for VMS Globaldef/ref support */ - +#include "/boot/home/config/include/libsocket.h" #ifndef TCP_H #define TCP_H + +/* +BeOS 5 +*/ + +#ifdef __BEOS__ +#include +extern int __libsocket_gethandle(int s); /* uwe */ +#endif /* __BEOS */ /* diff -urN lynx2-8-6-dev3/makefile.in lynx2-8-6-dev3-work/makefile.in --- lynx2-8-6-dev3/makefile.in Sun Sep 26 19:50:49 2004 +++ lynx2-8-6-dev3-work/makefile.in Sun Sep 26 19:56:10 2004 @@ -112,7 +112,7 @@ # If you apply patches which require linking to site-specific libraries, set # SITE_LIBS to those libraries. -SITE_LIBS= # Your libraries here +SITE_LIBS= -lsocket# Your libraries here # Set SITE_LYDEFS to one or more of the defines for the WWW Library: SITE_LYDEFS = # Your defines here diff -urN lynx2-8-6-dev3/src/LYUtils.c lynx2-8-6-dev3-work/src/LYUtils.c --- lynx2-8-6-dev3/src/LYUtils.c Sun Sep 26 19:51:01 2004 +++ lynx2-8-6-dev3-work/src/LYUtils.c Sun Sep 26 19:56:10 2004 @@ -1613,6 +1613,16 @@ socket_timeout.tv_usec = 0; FD_ZERO(&readfds); FD_SET(0, &readfds); +#if __BEOS_ + { + extern int __libsocket_select (int nfds, + fd_set *rfds, fd_set *wfds, fd_set *efds, + struct timeval *timeout); + + ret = __libsocket_select(FD_SETSIZE, (void *)&readfds, NULL, NULL, + &socket_timeout); + } +#else /* !__BEOS__ */ #ifdef SOCKS if (socks_flag) ret = Rselect(1, (void *) &readfds, NULL, NULL, @@ -1621,6 +1631,7 @@ #endif /* SOCKS */ ret = select(1, (void *) &readfds, NULL, NULL, &socket_timeout); +#endif /* !__BEOS__ */ /** Suspended? **/ if ((ret == -1) && (SOCKET_ERRNO == EINTR)) diff -urN lynx2-8-6-dev3/userdefs.h lynx2-8-6-dev3-work/userdefs.h --- lynx2-8-6-dev3/userdefs.h Sun Sep 26 19:51:02 2004 +++ lynx2-8-6-dev3-work/userdefs.h Sun Sep 26 19:56:10 2004 @@ -281,8 +281,10 @@ */ #ifndef HAVE_CONFIG_H #ifndef LYNX_CFG_FILE -#ifdef DOSPATH +#if defined(DOSPATH) #define LYNX_CFG_FILE "./lynx.cfg" +#elif __BEOS__ +#define LYNX_CFG_FILE "/boot/home/config/settings/lynx/lynx.cfg" #else #define LYNX_CFG_FILE "/usr/local/lib/lynx.cfg" #endif /* DOSPATH */ @@ -296,7 +298,12 @@ * Mappings in these global and personal files override any SUFFIX * definitions in lynx.cfg and built-in defaults from src/HTInit.c. */ +#if __BEOS__ +/* XXX: Should take advantage of BFS MIME info */ +#define GLOBAL_EXTENSION_MAP "/boot/home/config/settings/lynx/mime.types" +#else #define GLOBAL_EXTENSION_MAP "/usr/local/lib/mosaic/mime.types" +#endif #define PERSONAL_EXTENSION_MAP ".mime.types" /************************** @@ -306,9 +313,14 @@ * Mappings in these global and personal files override any VIEWER * definitions in lynx.cfg and built-in defaults from src/HTInit.c. */ +#if __BEOS__ +#define GLOBAL_MAILCAP "/boot/home/config/settings/lynx/mailcap" +#else #define GLOBAL_MAILCAP "/usr/local/lib/mosaic/mailcap" +#endif #define PERSONAL_MAILCAP ".mailcap" + /************************** * XLOADIMAGE_COMMAND will be used as a default in src/HTInit.c for * viewing image content types when the DISPLAY environment variable @@ -430,7 +442,11 @@ * -lss command line switch will override these definitions. */ #ifndef LYNX_LSS_FILE +#define LYNX_LSS_FILE "/boot/home/config/settings/lynx/lynx.lss" +#if __BEOS__ +#else #define LYNX_LSS_FILE "/usr/local/lib/lynx.lss" +#endif #endif /* LYNX_LSS_FILE */ #endif /* VMS OR UNIX */ @@ -591,7 +607,7 @@ * if your system does not have utmp capabilities. CHANGE THIS here * or in lynx.cfg. */ -#define LOCAL_DOMAIN "ukans.edu" +#define LOCAL_DOMAIN "your.domain.name" /******************************** * The DEFAULT_CACHE_SIZE specifies the number of WWW documents to be @@ -705,7 +721,11 @@ * RFC 1345 Mnemonic mnemonic * Transparent x-transparent */ +#if __BEOS__ +#define CHARACTER_SET "utf-8" +#else #define CHARACTER_SET "iso-8859-1" +#endif /***************************** * PREFERRED_LANGUAGE is the language in MIME notation (e.g., "en", @@ -965,10 +985,10 @@ #define BOXVERT 0 #define BOXHORI 0 #else -#define BOXVERT '|' -/* #define BOXVERT 0 */ -#define BOXHORI '-' -/* #define BOXHORI 0 */ +/* #define BOXVERT '|' */ +#define BOXVERT 0 +/* #define BOXHORI '-' */ +#define BOXHORI 0 #endif /* DOSPATH */ #endif /* !HAVE_CONFIG_H */