lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LYNX-DEV Patches for lynx2.7 for SunOS


From: Filip M Gieszczykiewicz
Subject: LYNX-DEV Patches for lynx2.7 for SunOS
Date: Sat, 15 Feb 1997 13:25:50 -0600 (CST)

Greetings. Me, again... if you're expecting a clean and elegant
patch, I have some land you might be interested in...
You will find a "diff" attached (included near the end)

This is what I needed to kludge to get Lynx to compile on:

hardware: sun4m_54
uname -a: SunOS unixs3.cis.pitt.edu 5.4 Generic_101945-43 sun4m sparc
GNU make: make sun4
GNU diff: diff -P -r -C 5 lynx2-7_orig lynx2-7

Note: this is an improvement over 2.6... where I gave up in disgust and
grabbed a pre-compiled binary...

Changes:

---------------------------------------------------------------------------------
File WWW/Library/Implementation/HTTCP.c was missing a definition for:

FIONBIO

fixed it with:

#include <sys/filio.h>          /* TLJKLUDGE */
-----------------

*TONS* of warning like these from just about every function in src/*

LYEdit.c:47: warning: assignment makes pointer from integer without a cast
LYEdit.c:58: warning: assignment makes pointer from integer without a cast
LYMail.c:59: warning: assignment makes pointer from integer without a cast
LYMail.c:75: warning: assignment makes pointer from integer without a cast
LYMail.c:99: warning: assignment makes pointer from integer without a cast
LYMail.c:133: warning: assignment makes pointer from integer without a cast
LYMail.c:135: warning: assignment makes pointer from integer without a cast
LYMail.c:211: warning: assignment makes pointer from integer without a cast
LYMail.c:237: warning: assignment makes pointer from integer without a cast
LYPrint.c:291: warning: assignment makes pointer from integer without a cast
LYPrint.c:299: warning: assignment makes pointer from integer without a cast
LYPrint.c:497: warning: assignment makes pointer from integer without a cast
LYPrint.c:656: warning: assignment makes pointer from integer without a cast
LYPrint.c:660: warning: comparison between pointer and integer
LYPrint.c:817: warning: assignment makes pointer from integer without a cast
LYDownload.c:187: warning: assignment makes pointer from integer without a cast
LYDownload.c:195: warning: assignment makes pointer from integer without a cast
LYDownload.c:423: warning: assignment makes pointer from integer without a cast
LYNews.c:159: warning: assignment makes pointer from integer without a cast

-----------------

LYUtils.c died:

LYUtils.c: In function `inlocaldomain':
LYUtils.c:1214: warning: assignment makes pointer from integer without a cast
LYUtils.c:1224: structure has no member named `ut_host'
LYUtils.c:1226: structure has no member named `ut_host'
LYUtils.c:1226: structure has no member named `ut_host'

struct utmp has:
              char  ut_user[8];          /* user login name */
              char  ut_id[4];            /* /sbin/inittab id (created by */
                                         /* process that puts entry in utmp) */
              char  ut_line[12];         /* device name (console, lnxx) */
              short ut_pid;              /* process id */
              short ut_type;             /* type of entry */
              struct exit_status {
                   short e_termination;  /* process termination status */
                   short e_exit;         /* process exit status */
              } ut_exit;                 /* exit status of a process
                                         /* marked as DEAD_PROCESS */
              time_t ut_time;            /* time entry was made */

#define NO_UTMP                 /* TLJKLUDGE */

fixes this one.. but:
-----------------

It seems that:

     #include <netdb.h>

has the stuff needed by  LYUtils.c in a different structure:

          struct    hostent {
               char *h_name;  /* official name of host */
               char **h_aliases;   /* alias list */
               int  h_addrtype;    /* host address type */
               int  h_length; /* length of address */
               char **h_addr_list; /* list of addresses from name server */
          };
          #define   h_addr  h_addr_list[0]   /* address, for backward 
compatibility */

-----------------

Resolv comes near and the end and bites me in the butt... You don't
need it.. forget what you heard about suns... but you DO need:

RESOLVLIB= -lsocket -lnsl
-----------------

Had to add:

/* TLJKLUDGE*/
#include <string.h>
#define index strchr
#define bcopy(s, d, n) memcpy((d), (s), (n))
#define rindex strrchr /* from utils/inews/conf.hutils */

to:
src/LYGlobalDefs.h
src/LYShowInfo.c

(There are some extra definitions (redundant) until I figured out that I needed
to add the damn thing to the include file... as I added it to sources, the
error would "move" to another file. I'm ignorant as to why. Example:

Undefined                       first referenced
 symbol                             in file
bcopy                               GridText.o
index                               LYEdit.o
rindex                              LYShowInfo.o
ld: fatal: Symbol referencing errors. No output written to lynx
*** Error code 1
make: Fatal error: Command failed for target `lynx'
Current working directory /var/tmp/tt/lynx2-7/src
*** Error code 1
make: Fatal error: Command failed for target `sun4'
---------------------------------------------------------------------------------

================================================================================
diff -P -r -C 5 lynx2-7_orig/Makefile lynx2-7/Makefile
*** lynx2-7_orig/Makefile       Sat Feb 15 05:50:28 1997
--- lynx2-7/Makefile    Sat Feb 15 13:23:16 1997
***************
*** 37,46 ****
--- 37,47 ----
  # point RESOLVLIB to that library.  You need this if you get the message
  # "Alert!:  Unable to connect to remote host" whenever you try to
  # access a host other than localhost and have made Lynx without it.
  # See the PROBLEMS file for more information.
  #RESOLVLIB= -lresolv
+ RESOLVLIB= -lsocket -lnsl
  
  # !!!!!!!!!!! Alternate socket functions for SOCKS !!!!!!!!!!!!!!!!!!
  # To make a SOCKSified lynx, include -DSOCKS in your SITE_LYDEFS and
  # SITE_DEFS, below, and point SOCKSLIB to your SOCKS library.  Note
  # that you may have problems accessing FTP servers.  Also, instead of
diff -P -r -C 5 lynx2-7_orig/WWW/Library/Implementation/HTTCP.c 
lynx2-7/WWW/Library/Implementation/HTTCP.c
*** lynx2-7_orig/WWW/Library/Implementation/HTTCP.c     Thu Jan  9 15:38:42 1997
--- lynx2-7/WWW/Library/Implementation/HTTCP.c  Sat Feb 15 13:14:08 1997
***************
*** 19,28 ****
--- 19,29 ----
  #include "HTUtils.h"
  #include "tcp.h"              /* Defines SHORT_NAMES if necessary */
  #include "HTAccess.h"
  #include "HTParse.h"
  #include "HTAlert.h"
+ #include <sys/filio.h>          /* TLJKLUDGE */
  
  #ifdef NSL_FORK
  #include <signal.h>
  #include <sys/wait.h>
  #endif /* NSL_FORK */
diff -P -r -C 5 lynx2-7_orig/src/GridText.c lynx2-7/src/GridText.c
*** lynx2-7_orig/src/GridText.c Sun Feb  9 04:36:52 1997
--- lynx2-7/src/GridText.c      Sat Feb 15 13:29:59 1997
***************
*** 54,63 ****
--- 54,68 ----
  */
  extern HTStyleSheet * styleSheet;     /* Default or overridden */
  
  extern int display_lines; /* number of lines in display */
  
+ /* TLJKLUDGE*/
+ #include <string.h>
+ #define index strchr
+ #define bcopy(s, d, n) memcpy((d), (s), (n))
+ 
  /*    Exports
  */ 
  PUBLIC HText * HTMainText = NULL;             /* Equivalent of main window */
  PUBLIC HTParentAnchor * HTMainAnchor = NULL;  /* Anchor for HTMainText */
  
diff -P -r -C 5 lynx2-7_orig/src/LYEdit.c lynx2-7/src/LYEdit.c
*** lynx2-7_orig/src/LYEdit.c   Thu Feb  6 16:32:50 1997
--- lynx2-7/src/LYEdit.c        Sat Feb 15 13:38:50 1997
***************
*** 15,24 ****
--- 15,29 ----
  #include "HTVMSUtils.h"
  #endif /* VMS */
  
  #include "LYLeaks.h"
  
+ /* TLJKLUDGE*/
+ #include <string.h>
+ #define index strchr
+ #define bcopy(s, d, n) memcpy((d), (s), (n))
+ 
  #define FREE(x) if (x) {free(x); x = NULL;}
  
  /*
   *  in edit mode invoke either emacs, vi, pico, jove, jed or the default
   *  editor to display and edit the current file
diff -P -r -C 5 lynx2-7_orig/src/LYGlobalDefs.h lynx2-7/src/LYGlobalDefs.h
*** lynx2-7_orig/src/LYGlobalDefs.h     Sun Feb  9 04:38:14 1997
--- lynx2-7/src/LYGlobalDefs.h  Sat Feb 15 13:38:32 1997
***************
*** 268,273 ****
--- 268,280 ----
  extern BOOLEAN LYMBMAdvanced;         /* MBM statusline for ADVANCED?  */
  extern int LYStatusLine;              /* Line for statusline() or -1   */
  extern BOOLEAN LYCollapseBRs;         /* Collapse serial BRs?          */
  extern BOOLEAN LYSetCookies;          /* Process Set-Cookie headers?   */
  extern char *XLoadImageCommand;               /* Default image viewer for X   
 */
+ 
+ /* TLJKLUDGE*/
+ #include <string.h>
+ #define index strchr
+ #define bcopy(s, d, n) memcpy((d), (s), (n))
+ #define rindex strrchr /* from utils/inews/conf.hutils */
+ 
  #endif /* LYGLOBALDEFS_H */
diff -P -r -C 5 lynx2-7_orig/src/LYMail.c lynx2-7/src/LYMail.c
*** lynx2-7_orig/src/LYMail.c   Fri Feb 14 13:14:52 1997
--- lynx2-7/src/LYMail.c        Sat Feb 15 13:38:50 1997
***************
*** 17,26 ****
--- 17,31 ----
  
  BOOLEAN term_letter;  /* Global variable for async i/o. */
  PRIVATE void terminate_letter  PARAMS((int sig));
  PRIVATE void remove_tildes PARAMS((char *string));
  
+ /* TLJKLUDGE*/
+ #include <string.h>
+ #define index strchr
+ #define bcopy(s, d, n) memcpy((d), (s), (n))
+ 
  /*
  **  mailform() sends form content to the mailto address(es). - FM
  */
  PUBLIC void mailform ARGS4(
        char *,         mailto_address,
diff -P -r -C 5 lynx2-7_orig/src/LYShowInfo.c lynx2-7/src/LYShowInfo.c
*** lynx2-7_orig/src/LYShowInfo.c       Sun Dec  8 13:18:04 1996
--- lynx2-7/src/LYShowInfo.c    Sat Feb 15 13:38:50 1997
***************
*** 11,30 ****
--- 11,42 ----
  #include "LYShowInfo.h"
  #include "LYSignal.h"
  #include "LYCharUtils.h"
  #include "GridText.h"
  
+ /* TLJKLUDGE*/
+ #include <string.h>
+ #define index strchr
+ #define bcopy(s, d, n) memcpy((d), (s), (n))
+ #define rindex strrchr
+ 
+ 
  #include "LYLeaks.h"
  
  #ifdef DIRED_SUPPORT
  #include <pwd.h>
  #include <grp.h>
  #include <time.h>
  #include "LYLocal.h"
  #endif /* DIRED_SUPPORT */
  
  #define FREE(x) if (x) {free(x); x = NULL;}
+ 
+ /* TLJKLUDGE*/
+ #include <string.h>
+ #define index strchr
+ #define bcopy(s, d, n) memcpy((d), (s), (n))
  
  /* 
   *  Showinfo prints a page of info about the current file and the link
   *  that the cursor is on.
   */
diff -P -r -C 5 lynx2-7_orig/src/LYUtils.c lynx2-7/src/LYUtils.c
*** lynx2-7_orig/src/LYUtils.c  Sun Feb  9 04:39:30 1997
--- lynx2-7/src/LYUtils.c       Sat Feb 15 13:38:50 1997
***************
*** 1,5 ****
--- 1,7 ----
+ #define NO_UTMP         /* TLJKLUDGE */
+ 
  #include "HTUtils.h"
  #include "tcp.h"
  #include "HTParse.h"
  #include "HTAccess.h"
  #include "HTCJK.h"
***************
*** 3448,3457 ****
--- 3450,3464 ----
  #endif /* !NULL */
  
  #if !__STDC__
  #define const
  #endif /* !__STDC__ */
+ 
+ /* TLJKLUDGE*/
+ #include <string.h>
+ #define index strchr
+ #define bcopy(s, d, n) memcpy((d), (s), (n))
  
  extern char **environ;
  
  /* Put STRING, which is of the form "NAME=VALUE", in  the environment.  */
  PUBLIC int putenv ARGS1(
================================================================================

Take care.
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]