mirror of
https://git.freebsd.org/ports.git
synced 2025-06-06 21:30:31 -04:00
- Fix build with Tcl 8.6
Reported by: miwi (Tcl/Tk 86 exp-run)
This commit is contained in:
parent
dc6182f187
commit
09e60f3b73
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=318072
2 changed files with 60 additions and 2 deletions
|
@ -1,5 +1,4 @@
|
|||
# $FreeBSD$
|
||||
# $MCom: ports/devel/gcvs/Makefile,v 1.1 2006/10/07 17:10:25 ahze Exp $
|
||||
|
||||
PORTNAME= gcvs
|
||||
PORTVERSION= 1.0
|
||||
|
@ -26,7 +25,7 @@ CXXFLAGS:= ${CXXFLAGS:N-std=*:N:}
|
|||
CONFIGURE_ARGS= --with-tclinclude=${TCL_INCLUDEDIR} \
|
||||
--with-tcllib=${TCL_LIBDIR}
|
||||
MAKE_JOBS_SAFE= yes
|
||||
EXTRACT_AFTER_ARGS= --exclude cvsunix --exclude 'getline.[ch]' --exclude 'getopt*.[ch]'
|
||||
EXTRACT_AFTER_ARGS=--exclude cvsunix --exclude 'getline.[ch]' --exclude 'getopt*.[ch]'
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -E '/get(line|opt1?)\.[ch]/d' \
|
||||
|
|
59
devel/gcvs/files/patch-common_TclGlue.cpp
Normal file
59
devel/gcvs/files/patch-common_TclGlue.cpp
Normal file
|
@ -0,0 +1,59 @@
|
|||
--- common/TclGlue.cpp.bak 2002-12-20 15:38:25.000000000 +0100
|
||||
+++ common/TclGlue.cpp 2013-05-13 14:10:28.000000000 +0200
|
||||
@@ -452,7 +452,7 @@
|
||||
{
|
||||
EntnodeData* data = entry->GetData();
|
||||
CStr path, fname, value;
|
||||
- entry->GetNormalized(path, fname);
|
||||
+ entry->GetNormalized(path, fname);
|
||||
const char *res = Tcl_SetVar2(interp, argv[3], "name", fname, 0);
|
||||
if(res == 0L)
|
||||
goto err1;
|
||||
@@ -1161,17 +1161,18 @@
|
||||
if(bTclFileStarted)
|
||||
gCvsPrefs.SetTclFileRunning(false);
|
||||
|
||||
- size_t len = strlen(fInterp->result);
|
||||
+ const char *res = Tcl_GetStringResult(fInterp);
|
||||
+ size_t len = strlen(res);
|
||||
if(exitc == TCL_ERROR)
|
||||
{
|
||||
- cvs_errstr(fInterp->result, len);
|
||||
- if(len != 0 && fInterp->result[len - 1] != '\n')
|
||||
+ cvs_errstr(res, len);
|
||||
+ if(len != 0 && res[len - 1] != '\n')
|
||||
cvs_errstr("\n", 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
- cvs_outstr(fInterp->result, len);
|
||||
- if(len != 0 && fInterp->result[len - 1] != '\n')
|
||||
+ cvs_outstr(res, len);
|
||||
+ if(len != 0 && res[len - 1] != '\n')
|
||||
cvs_outstr("\n", 1);
|
||||
}
|
||||
|
||||
@@ -1207,17 +1208,18 @@
|
||||
return false;
|
||||
|
||||
int exitc = Tcl_EvalFile(fInterp, (char *)file);
|
||||
- size_t len = strlen(fInterp->result);
|
||||
+ const char *res = Tcl_GetStringResult(fInterp);
|
||||
+ size_t len = strlen(res);
|
||||
if(exitc == TCL_ERROR)
|
||||
{
|
||||
- cvs_errstr(fInterp->result, len);
|
||||
- if(len != 0 && fInterp->result[len - 1] != '\n')
|
||||
+ cvs_errstr(res, len);
|
||||
+ if(len != 0 && res[len - 1] != '\n')
|
||||
cvs_errstr("\n", 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
- cvs_outstr(fInterp->result, len);
|
||||
- if(len != 0 && fInterp->result[len - 1] != '\n')
|
||||
+ cvs_outstr(res, len);
|
||||
+ if(len != 0 && res[len - 1] != '\n')
|
||||
cvs_outstr("\n", 1);
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue