From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Dec 8 01:10:13 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 75CDF16A407 for ; Fri, 8 Dec 2006 01:10:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 337F743CB6 for ; Fri, 8 Dec 2006 01:09:07 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kB81A2B9013272 for ; Fri, 8 Dec 2006 01:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kB81A2WG013271; Fri, 8 Dec 2006 01:10:02 GMT (envelope-from gnats) Resent-Date: Fri, 8 Dec 2006 01:10:02 GMT Resent-Message-Id: <200612080110.kB81A2WG013271@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Hyo.geol@FreeBSD.org, Lee Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4DABF16A403 for ; Fri, 8 Dec 2006 01:08:56 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34E9043CA6 for ; Fri, 8 Dec 2006 01:08:01 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id kB818tcg089219 for ; Fri, 8 Dec 2006 01:08:55 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id kB818tZs089218; Fri, 8 Dec 2006 01:08:55 GMT (envelope-from nobody) Message-Id: <200612080108.kB818tZs089218@www.freebsd.org> Date: Fri, 8 Dec 2006 01:08:55 GMT From: Hyo.geol@FreeBSD.org, Lee To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: ports/106464: Build broken lang/clisp 2.41 with fastcgi module X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2006 01:10:13 -0000 >Number: 106464 >Category: ports >Synopsis: Build broken lang/clisp 2.41 with fastcgi module >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 08 01:10:02 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Hyo geol, Lee >Release: -current 7.0 >Organization: Ajou university >Environment: FreeBSD localhost.localdomain 7.0-CURRENT FreeBSD 7.0-CURRENT #5: Thu Dec 7 06:27:17 KST 2006 root@localhost.localdomain:/usr/obj/usr/src/sys/EZ8KERNEL amd64 >Description: Clisp version 2.41 port(lang/clisp) bulid is broken when turn on fastcgi module.(WITH_FASTCGI=on) There are 2 reasons. First, clisp fastcgi module in version 2.41 has build error. This build error is already reported to clisp project site and closed. (https://sourceforge.net/tracker/?func=detail&atid=101355&aid=1595306&group_id=1355) So, first problem will be ok in next release. Second, clisp fastcgi module use strndup function and i got linking error because there is no strndup function in FreeBSD. >How-To-Repeat: Build lang/clisp with WITH_FASTCGI option. >Fix: First problem has fixed in clisp cvs, and will be find at next release. See https://sourceforge.net/tracker/?func=detail&atid=101355&aid=1595306&group_id=1355 Second problem in fastcgi_wrappers.c will be ok use another version strndup. I attached patch file. Patch attached with submission follows: --- ./modules/fastcgi/fastcgi.lisp.orig Fri Dec 8 08:42:55 2006 +++ ./modules/fastcgi/fastcgi.lisp Fri Dec 8 08:45:45 2006 @@ -146,7 +146,8 @@ ; -------------- "C" functions -;(c-lines "#include \"fastcgi.h\"~%"); completely wrapped +(eval-when (compile) + (setq ffi:*output-c-functions* t)) ; Our wrappers (def-call-out fcgi_getenv (:arguments (var c-string)) (:return-type c-string)) --- ./modules/fastcgi/fastcgi_wrappers.c.orig Fri Dec 8 09:28:45 2006 +++ ./modules/fastcgi/fastcgi_wrappers.c Fri Dec 8 09:35:23 2006 @@ -41,6 +41,25 @@ /* Crank this up as needed */ #define TEMPBUFSIZE 65536 +#ifdef __FreeBSD__ +char* t_strndup(const char* string, size_t n) +{ + char* copy_string = 0; + + if(0 == string || 0 == n) + return 0; + + copy_string = (char*) malloc(n + 1); + if(0 == copy_string) + return 0; + + memcpy(copy_string, string, n); + *(copy_string + n) = '\0'; + + return copy_string; +} +#endif + /* Local functions */ static char * read_stdio(FILE *); static int write_stdio(FILE *, char *, int); @@ -91,7 +110,11 @@ result[i+1] = NULL; } else { +#ifdef __FreeBSD__ + result[i] = t_strndup(*envp, equ - *envp); +#else result[i] = strndup(*envp, equ - *envp); +#endif result[i+1] = strdup(equ + 1); } } >Release-Note: >Audit-Trail: >Unformatted: