Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Nov 2001 21:20:01 -0800 (PST)
From:      Edwin Groothuis <edwin@mavetju.org>
To:        freebsd-ports@FreeBSD.org
Subject:   Re: ports/18896: Tcl "info hostname" command returns chop-off hostname, when hostname length >= 32
Message-ID:  <200111080520.fA85K1i80148@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/18896; it has been noted by GNATS.

From: Edwin Groothuis <edwin@mavetju.org>
To: freebsd-gnats-submit@FreeBSD.org, yoshint@flab.fujitsu.co.jp
Cc:  
Subject: Re: ports/18896: Tcl "info hostname" command returns chop-off hostname, when hostname length >= 32
Date: Thu, 8 Nov 2001 16:13:14 +1100

 This is a hack to get it fixed for FreeBSD, but it should be solved
 by the team which develops TCL itself. I'll send them a bugreport
 too.
 
 Problem was that configure detects uname(3) and uses uname(3) in
 the hostname-function, while gethostname gives more (=longer)
 information.
 
 Oh euh.. there is no maintainer for the TCL-software. Who will
 apply this patch and close this PR then?
 
 Edwin
 
 --- lang/tcl83/Makefile.orig    Thu Nov  8 16:00:02 2001
 +++ lang/tcl83/Makefile Thu Nov  8 15:59:44 2001
 @@ -7,7 +7,7 @@
  
  PORTNAME=      tcl
  PORTVERSION=   8.3.4
 -PORTREVISION=  1
 +PORTREVISION=  2
  CATEGORIES=    lang tcl83
  MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE}
  MASTER_SITE_SUBDIR=    tcl
 --- lang/tcl82/Makefile.orig    Thu Nov  8 16:07:31 2001
 +++ lang/tcl82/Makefile Thu Nov  8 16:07:12 2001
 @@ -7,6 +7,7 @@
  
  PORTNAME=      tcl
  PORTVERSION=   8.2.3
 +PORTREVISION=  1
  CATEGORIES=    lang tcl82
  MASTER_SITES=  ftp://ftp.scriptics.com/pub/tcl/tcl8_2/
  DISTNAME=      tcl8.2.3
 --- lang/tcl82/files/patch-ab.orig	Wed Jan  5 18:11:52 2000
 +++ lang/tcl82/files/patch-ab	Thu Nov  8 16:07:53 2001
 @@ -1,6 +1,67 @@
 ---- configure.orig	Tue Dec 14 22:59:18 1999
 -+++ configure	Wed Jan  5 00:56:06 2000
 -@@ -4648,7 +4648,7 @@
 +--- configure.orig	Wed Dec 15 14:59:18 1999
 ++++ configure	Wed Nov  7 21:01:26 2001
 +@@ -1412,58 +1412,12 @@
 + 
 + fi
 + 
 +-echo $ac_n "checking for uname""... $ac_c" 1>&6
 +-echo "configure:1417: checking for uname" >&5
 +-if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then
 +-  echo $ac_n "(cached) $ac_c" 1>&6
 +-else
 +-  cat > conftest.$ac_ext <<EOF
 +-#line 1422 "configure"
 +-#include "confdefs.h"
 +-/* System header to define __stub macros and hopefully few prototypes,
 +-    which can conflict with char uname(); below.  */
 +-#include <assert.h>
 +-/* Override any gcc2 internal prototype to avoid an error.  */
 +-/* We use char because int might match the return type of a gcc2
 +-    builtin and then its argument prototype would still apply.  */
 +-char uname();
 +-
 +-int main() {
 +-
 +-/* The GNU C library defines this for functions which it implements
 +-    to always fail with ENOSYS.  Some functions are actually named
 +-    something starting with __ and the normal name is an alias.  */
 +-#if defined (__stub_uname) || defined (__stub___uname)
 +-choke me
 +-#else
 +-uname();
 +-#endif
 +-
 +-; return 0; }
 +-EOF
 +-if { (eval echo configure:1445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 +-  rm -rf conftest*
 +-  eval "ac_cv_func_uname=yes"
 +-else
 +-  echo "configure: failed program was:" >&5
 +-  cat conftest.$ac_ext >&5
 +-  rm -rf conftest*
 +-  eval "ac_cv_func_uname=no"
 +-fi
 +-rm -f conftest*
 +-fi
 +-
 +-if eval "test \"`echo '$ac_cv_func_'uname`\" = yes"; then
 +-  echo "$ac_t""yes" 1>&6
 +-  :
 +-else
 +-  echo "$ac_t""no" 1>&6
 ++echo "explicitly disabling uname" 1>&6
 ++echo "$ac_t""no" 1>&6
 + cat >> confdefs.h <<\EOF
 + #define NO_UNAME 1
 + EOF
 + 
 +-fi
 +-
 + echo $ac_n "checking for realpath""... $ac_c" 1>&6
 + echo "configure:1469: checking for realpath" >&5
 + if eval "test \"`echo '$''{'ac_cv_func_realpath'+set}'`\" = set"; then
 +@@ -4648,7 +4602,7 @@
       EXTRA_CFLAGS=""
       TCL_EXPORT_FILE_SUFFIX=""
       UNSHARED_LIB_SUFFIX=""
 @@ -9,7 +70,7 @@
       ECHO_VERSION='`echo ${VERSION}`'
       TCL_LIB_VERSIONS_OK=ok
       CFLAGS_DEBUG=-g
 -@@ -4892,7 +4892,7 @@
 +@@ -4892,7 +4846,7 @@
   	    LDFLAGS="-Wl,-Bexport"
   	    LD_SEARCH_FLAGS=""
   	    ;;
 @@ -18,7 +79,7 @@
   	    # Not available on all versions:  check for include file.
   	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
   echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
 -@@ -4922,16 +4922,20 @@
 +@@ -4922,16 +4876,20 @@
   fi
   if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
     echo "$ac_t""yes" 1>&6
 @@ -42,7 +103,7 @@
   	    
   else
     echo "$ac_t""no" 1>&6
 -@@ -4954,17 +4958,6 @@
 +@@ -4954,17 +4912,6 @@
   	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
   	    TCL_LIB_VERSIONS_OK=nodots
   	    ;;
 @@ -60,7 +121,7 @@
   	NEXTSTEP-*)
   	    SHLIB_CFLAGS=""
   	    SHLIB_LD="cc -nostdlib -r"
 -@@ -5371,7 +5364,7 @@
 +@@ -5371,7 +5318,7 @@
   	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
       fi
       if test "$UNSHARED_LIB_SUFFIX" = "" ; then
 @@ -69,7 +130,7 @@
       fi
   
       
 -@@ -5628,11 +5621,7 @@
 +@@ -5628,11 +5575,7 @@
   # up the Tcl library.
   
   if test "$SHARED_BUILD" = "0" -o $TCL_NEEDS_EXP_FILE = 0; then
 @@ -82,7 +143,7 @@
       TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}"
       TCL_LIB_SPEC="-L${exec_prefix}/lib ${TCL_LIB_FLAG}"
   else
 -@@ -5678,11 +5667,7 @@
 +@@ -5678,11 +5621,7 @@
   
   TCL_STUB_LIB_FILE=${STUB_LIB_FILE}
 --- lang/tcl83/files/patch-configure.orig	Sun Nov  4 16:52:59 2001
 +++ lang/tcl83/files/patch-configure	Thu Nov  8 15:55:11 2001
 @@ -1,5 +1,64 @@
  --- configure.orig	Sat Oct 20 02:24:15 2001
  +++ configure	Sat Oct 20 10:45:39 2001
 + 
 + fi
 + 
 +-echo $ac_n "checking for uname""... $ac_c" 1>&6
 +-echo "configure:1617: checking for uname" >&5
 +-if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then
 +-  echo $ac_n "(cached) $ac_c" 1>&6
 +-else
 +-  cat > conftest.$ac_ext <<EOF
 +-#line 1622 "configure"
 +-#include "confdefs.h"
 +-/* System header to define __stub macros and hopefully few prototypes,
 +-    which can conflict with char uname(); below.  */
 +-#include <assert.h>
 +-/* Override any gcc2 internal prototype to avoid an error.  */
 +-/* We use char because int might match the return type of a gcc2
 +-    builtin and then its argument prototype would still apply.  */
 +-char uname();
 +-
 +-int main() {
 +-
 +-/* The GNU C library defines this for functions which it implements
 +-    to always fail with ENOSYS.  Some functions are actually named
 +-    something starting with __ and the normal name is an alias.  */
 +-#if defined (__stub_uname) || defined (__stub___uname)
 +-choke me
 +-#else
 +-uname();
 +-#endif
 +-
 +-; return 0; }
 +-EOF
 +-if { (eval echo configure:1645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 +-  rm -rf conftest*
 +-  eval "ac_cv_func_uname=yes"
 +-else
 +-  echo "configure: failed program was:" >&5
 +-  cat conftest.$ac_ext >&5
 +-  rm -rf conftest*
 +-  eval "ac_cv_func_uname=no"
 +-fi
 +-rm -f conftest*
 +-fi
 +-
 +-if eval "test \"`echo '$ac_cv_func_'uname`\" = yes"; then
 +-  echo "$ac_t""yes" 1>&6
 +-  :
 +-else
 +-  echo "$ac_t""no" 1>&6
 ++echo "explicitly disabling uname""... $ac_c" 1>&6
 + cat >> confdefs.h <<\EOF
 + #define NO_UNAME 1
 + EOF
 + 
 +-fi
 +-
 + echo "checking for realpath""... $ac_c" 1>&6
 + echo "configure:1669: checking for realpath" >&5
 + if eval "test \"`echo '$''{'ac_cv_func_realpath'+set}'`\" = set"; then
  @@ -4648,7 +4648,7 @@
       EXTRA_CFLAGS=""
       TCL_EXPORT_FILE_SUFFIX=""
 
 -- 
 Edwin Groothuis   |              Personal website: http://www.MavEtJu.org
 edwin@mavetju.org |           Interested in MUDs? Visit Fatal Dimensions:
 ------------------+                       http://www.FatalDimensions.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111080520.fA85K1i80148>