Subject: Linux patches for Tcl 6.5
From: [email-masked] (Olaf Titz)
Date: 8 May 1993 12:08:30 +0300
Newsgroups: comp.os.linux.announce

Here are the patches I needed to make Tcl 6.5 run under Linux. Since
they are trivial but non-obvious, I post them here. Note that changes
in the Makefile are not included, do them to suit your needs (paths,
etc).

Tcl (Tool Command Language) is basically a library that provides a
script language that can be embedded into applications. See newsgroup
comp.lang.tcl for details. I've done this basically for porting of
mgetty (which I will post soon, hopefully).

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  tcldiffs
# Wrapped by root@bigred on Fri May  7 21:24:09 1993
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'tcldiffs' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'tcldiffs'\"
else
echo shar: Extracting \"'tcldiffs'\" \(1565 characters\)
sed "s/^X//" >'tcldiffs' <<'END_OF_FILE'
X*** ../tcl6.5orig/config	Thu Dec 17 22:25:08 1992
X--- config	Sun Apr 25 13:42:43 1993
X***************
X*** 29,35 ****
X  
X  # Archive file containing object code for standard C library:
X  
X! set libc="/lib/libc.a"
X  
X  # Makefile to modify:
X  
X--- 29,35 ----
X  
X  # Archive file containing object code for standard C library:
X  
X! set libc="/usr/lib/libc.a"
X  
X  # Makefile to modify:
X  
X*** ../tcl6.5orig/tclInt.h	Thu Dec 10 01:54:14 1992
X--- tclInt.h	Sun Apr 25 14:03:03 1993
X***************
X*** 56,61 ****
X--- 56,62 ----
X  #endif
X  
X  #include <ctype.h>
X+ #undef __USE_MISC
X  #include <stdlib.h>
X  #include <string.h>
X  #include <varargs.h>
X*** ../tcl6.5orig/tclUnix.h	Sat Aug 22 00:59:18 1992
X--- tclUnix.h	Sun Apr 25 13:46:44 1993
X***************
X*** 61,67 ****
X  #define TCL_SYS_ERRLIST 1
X  #define TCL_SYS_TIME_H 1
X  #define TCL_SYS_WAIT_H 1
X! #define TCL_UNION_WAIT 1
X  #define TCL_PID_T 1
X  #define TCL_UID_T 1
X  
X--- 61,67 ----
X  #define TCL_SYS_ERRLIST 1
X  #define TCL_SYS_TIME_H 1
X  #define TCL_SYS_WAIT_H 1
X! #define TCL_UNION_WAIT 0
X  #define TCL_PID_T 1
X  #define TCL_UID_T 1
X  
X***************
X*** 294,300 ****
X--- 294,302 ----
X  extern int	execvp	   _ANSI_ARGS_((CONST char *name, char **argv));
X  extern void	_exit 	   _ANSI_ARGS_((int status));
X  extern pid_t	fork	   _ANSI_ARGS_((void));
X+ #ifndef linux
X  extern long	fseek	   _ANSI_ARGS_((FILE *stream, long offset, int base));
X+ #endif
X  extern uid_t	geteuid	   _ANSI_ARGS_((void));
X  extern pid_t	getpid	   _ANSI_ARGS_((void));
X  extern char *	getcwd 	   _ANSI_ARGS_((char *buffer, int size));
END_OF_FILE
if test 1565 -ne `wc -c <'tcldiffs'`; then
    echo shar: \"'tcldiffs'\" unpacked with wrong size!
fi
# end of 'tcldiffs'
fi
echo shar: End of shell archive.
exit 0

-- 
        olaf titz     o       [email-masked]      voice@49-721-60439
  comp.sc.student    _>\ _         [email-masked]          praetorius@irc
karlsruhe germany   (_)<(_)      [email-masked]        happy linux user
what good is a photograph of you? everytime i look at it it makes me feel blue