From owner-freebsd-ports Wed Oct 2 17:50:14 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B42A337B404 for ; Wed, 2 Oct 2002 17:50:06 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E4B543E75 for ; Wed, 2 Oct 2002 17:50:05 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g930o5Co036985 for ; Wed, 2 Oct 2002 17:50:05 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g930o5lf036984; Wed, 2 Oct 2002 17:50:05 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 59D8337B401; Wed, 2 Oct 2002 17:48:12 -0700 (PDT) Received: from topaz.mdcc.cx (topaz.mdcc.cx [212.204.230.141]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA8F843E81; Wed, 2 Oct 2002 17:48:11 -0700 (PDT) (envelope-from edwin@mavetju.org) Received: from k7.mavetju (topaz.mdcc.cx [212.204.230.141]) by topaz.mdcc.cx (Postfix) with ESMTP id 0D6BC2B739; Thu, 3 Oct 2002 02:48:08 +0200 (CEST) Received: by k7.mavetju (Postfix, from userid 1001) id 63DA76A712E; Thu, 3 Oct 2002 10:48:05 +1000 (EST) Message-Id: <20021003004805.63DA76A712E@k7.mavetju> Date: Thu, 3 Oct 2002 10:48:05 +1000 (EST) From: Edwin Groothuis Reply-To: Edwin Groothuis To: FreeBSD-gnats-submit@FreeBSD.org Cc: des@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/43606: [patch] unbreak math/snns Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 43606 >Category: ports >Synopsis: [patch] unbreak math/snns >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Oct 02 17:50:04 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Edwin Groothuis >Release: FreeBSD 4.5-RELEASE i386 >Organization: - >Environment: System: FreeBSD k7.mavetju 4.5-RELEASE FreeBSD 4.5-RELEASE #4: Sat Sep 14 10:41:50 EST 2002 edwin@k7.mavetju:/usr/src/sys/compile/k7 i386 $FreeBSD: ports/math/snns/Makefile,v 1.9 2001/11/22 18:02:29 des Exp $ >Description: math/snns doesn't want to compile anymore due to changes in values.h/limits.h See also http://bento.freebsd.org/errorlogs/4-full/snns-4.2.log >How-To-Repeat: See http://bento.freebsd.org/errorlogs/4-full/snns-4.2.log >Fix: This is only a patch. This is not a fix. This patch should be brought back to the people who manage SNNS. That's a request for the maintainer. This is a patch for math/snns/files/patch-ab: --- old-patch-ab Thu Oct 3 10:15:54 2002 +++ patch-ab Thu Oct 3 10:16:08 2002 @@ -1,14 +1,5 @@ --- kernel/sources/Makefile.orig Thu Sep 3 06:38:00 1998 +++ kernel/sources/Makefile Sat Dec 4 12:52:06 1999 -@@ -27,7 +27,7 @@ - # Define final C-preprocessor options for the kernel - # Additional definitions like -I... and -D... go here - CPPFLAGS = -I../.. \ -- $(ENZOFLAGS) -+ $(ENZOFLAGS) -DHAVE_VALUES_H - - # Here you may change the default C-compiler flags as set in - # ../../Makefile.def (not recommended) @@ -100,7 +100,7 @@ all: $(LIBKERNEL) $(LIBFUNCS) This is a new file called math/snns/files/patch-kernel::sources::kr_mem.c --- kernel/sources/kr_mem.c.old Thu Oct 3 10:35:01 2002 +++ kernel/sources/kr_mem.c Thu Oct 3 10:35:51 2002 @@ -22,6 +22,7 @@ #include #include #include +#include #ifdef HAVE_VALUES_H #include #else @@ -1023,7 +1024,7 @@ if ( (n_ptr = krm_NTableSymbolSearch( symbol_name, symbol_type ) ) != NULL) { /* symbol is already in the name table */ - if ((n_ptr->ref_count) < ((unsigned short) MAXSHORT)) { + if ((n_ptr->ref_count) < ((unsigned short) SHRT_MAX)) { n_ptr->ref_count++; } return( n_ptr->Entry.symbol ); @@ -1052,7 +1053,7 @@ if (symbol_name == NULL) return; if ( (n_ptr = krm_NTableSymbolSearch( symbol_name, symbol_type ) ) != NULL) { /* symbol is in the name table */ - if ((n_ptr->ref_count) < ((unsigned short) MAXSHORT)) + if ((n_ptr->ref_count) < ((unsigned short) SHRT_MAX)) { /* No. of references to this symbol don't exceed the max. reference count. This means it is possible to delete the symbol if the reference count is zero. This is a new file called math/snns/files/patch-kernel::sources::learn_f.c --- kernel/sources/learn_f.c.old Thu Oct 3 10:37:10 2002 +++ kernel/sources/learn_f.c Thu Oct 3 10:37:50 2002 @@ -31,6 +31,7 @@ #include #include #include +#include #ifdef HAVE_VALUES_H #include #endif @@ -3896,8 +3897,8 @@ /* NULL before first unit */ topo_ptr = topo_ptr_array; - xmin_in = ymin_in = MAXINT; - xmax_in = ymax_in = -MAXINT; + xmin_in = ymin_in = INT_MAX; + xmax_in = ymax_in = -INT_MAX; while ( (input_unit_ptr = * ++topo_ptr ) != NULL) { @@ -3967,8 +3968,8 @@ /* topo_ptr points now to the NULL before first output unit */ - xmin_out = ymin_out = MAXINT; - xmax_out = ymax_out = -MAXINT; + xmin_out = ymin_out = INT_MAX; + xmax_out = ymax_out = -INT_MAX; while ( (output_unit_ptr = * ++topo_ptr ) != NULL) { >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message