head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.54 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.3.0.52 pkgsrc-2012Q4-base:1.3 pkgsrc-2011Q4:1.3.0.50 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q2:1.3.0.48 pkgsrc-2011Q2-base:1.3 pkgsrc-2009Q4:1.3.0.46 pkgsrc-2009Q4-base:1.3 pkgsrc-2008Q4:1.3.0.44 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.42 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.40 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.38 pkgsrc-2008Q2-base:1.3 pkgsrc-2008Q1:1.3.0.36 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.34 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.32 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.30 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.28 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.26 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.24 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.22 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.20 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.18 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.16 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.3.0.14 pkgsrc-2005Q2-base:1.3 pkgsrc-2005Q1:1.3.0.12 pkgsrc-2005Q1-base:1.3 pkgsrc-2004Q4:1.3.0.10 pkgsrc-2004Q4-base:1.3 pkgsrc-2004Q3:1.3.0.8 pkgsrc-2004Q3-base:1.3 pkgsrc-2004Q2:1.3.0.6 pkgsrc-2004Q2-base:1.3 pkgsrc-2004Q1:1.3.0.4 pkgsrc-2004Q1-base:1.3 pkgsrc-2003Q4:1.3.0.2 pkgsrc-2003Q4-base:1.3 buildlink2-base:1.3 netbsd-1-5-RELEASE:1.2 netbsd-1-4-PATCH003:1.2 netbsd-1-4-PATCH002:1.2 comdex-fall-1999:1.1; locks; strict; comment @# @; 1.3 date 2000.12.15.00.41.05; author wiz; state dead; branches; next 1.2; 1.2 date 99.11.26.22.12.38; author hubertf; state Exp; branches; next 1.1; 1.1 date 99.09.29.00.41.26; author christos; state Exp; branches; next ; desc @@ 1.3 log @Move packages from 'net' into new 'chat' category. Add chat to main Makefile. @ text @$NetBSD: patch-ak,v 1.2 1999/11/26 22:12:38 hubertf Exp $ diff -x *.orig -urN ./icb/unix.c /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/unix.c --- ./icb/unix.c Fri Feb 24 22:20:31 1995 +++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/unix.c Fri Nov 26 22:56:29 1999 @@@@ -4,6 +4,8 @@@@ /* This file contains routines that are unix dependent. */ /* Eventually, most unixisms should be moved here. */ +#include +#include #include #include "icb.h" #include "externs.h" @@@@ -13,6 +15,14 @@@@ #undef stty #undef gtty +#if defined(__linux__) +#include +#include +#define TTYSTRUCT termios +#define stty(fd,buf) tcgetattr((fd), (buf)) +#define gtty(fd,buf) tcsetattr((fd), TCSANOW, (buf)) +#define SYSV +#else #ifndef SYSV #ifdef linux @@@@ -30,6 +40,7 @@@@ #define stty(fd,buf) ioctl((fd),TCSETA,(buf)) #define gtty(fd,buf) ioctl((fd),TCGETA,(buf)) #endif /* SYSV */ +#endif /* __linux__ */ char *getlogin(); @@@@ -49,8 +60,10 @@@@ if (((loginid = getlogin()) == NULL) || *loginid == '\0') if ((pw = getpwuid(getuid())) == NULL) loginid = NULL; - else - loginid = pw->pw_name; + else { + loginid = malloc(strlen(pw->pw_name) + 1); + strcpy(loginid, pw->pw_name); + } return(loginid); } @@@@ -181,7 +194,7 @@@@ getwinsize() { -#ifndef NOWINSIZE +#ifdef TIOCGWINSZ struct winsize win; /* get tty settings */ @ 1.2 log @Split patches and add code to print time in front of each line. Needs to be switched on from .icbrc: oset printtime true. Bump version to 5.0.9pl1 for that. @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @make this work under linux: - 1. we really need to kill the ancient copy of readline and tcl in here. - 2. we don't use termios on 4.4BSD now, we should. - 3. linux does not turn on ISIG, so signals are not handled @ text @d2 10 a11 3 --- tcl/strerror.c.orig Fri Feb 24 16:19:50 1995 +++ tcl/strerror.c Tue Sep 28 18:36:37 1999 @@@@ -20,6 +20,7 @@@@ d13 24 a36 1 #include d38 11 a48 7 +#if !defined(BSD4_4) && !defined(__linux__) /* * List of known errors: */ @@@@ -138,3 +139,4 @@@@ (void) sprintf(defaultMsg, "unknown error (%d)", error); return defaultMsg; d50 10 a59 32 +#endif --- tcl/tclGlob.c.orig Tue Sep 28 18:37:08 1999 +++ tcl/tclGlob.c Tue Sep 28 18:39:13 1999 @@@@ -28,6 +28,12 @@@@ #include #include +#ifdef __linux__ +#define DIRNAMLEN(d) strlen((d)->d_name) +#else +#define DIRNAMLEN(d) ((d)->d_namlen) +#endif + /* * The structure below is used to keep track of a globbing result * being built up (i.e. a partial list of file names). The list @@@@ -298,12 +304,12 @@@@ if (Tcl_StringMatch(entryPtr->d_name, pattern)) { if (*p == 0) { AppendResult(dir, entryPtr->d_name, - (int) entryPtr->d_namlen, resPtr); + (int) DIRNAMLEN(entryPtr), resPtr); } else { - if ((l1+entryPtr->d_namlen+2) <= STATIC_SIZE) { + if ((l1+DIRNAMLEN(entryPtr)+2) <= STATIC_SIZE) { newDir = static1; } else { - newDir = malloc((unsigned) (l1+entryPtr->d_namlen+2)); + newDir = malloc((unsigned) (l1+DIRNAMLEN(entryPtr)+2)); } sprintf(newDir, "%s%s/", dir, entryPtr->d_name); result = DoGlob(interp, newDir, p+1, resPtr); @