From owner-freebsd-ports@FreeBSD.ORG Tue Sep 25 17:32:45 2007 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 080D716A49C for ; Tue, 25 Sep 2007 17:32:45 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from cp65.agava.net (cp65.agava.net [89.108.66.215]) by mx1.freebsd.org (Postfix) with ESMTP id 924A513C47E for ; Tue, 25 Sep 2007 17:32:44 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from [213.148.20.85] (helo=nexii.panopticon) by cp65.agava.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.44 (FreeBSD)) id 1IaEH4-00066O-Rw; Tue, 25 Sep 2007 21:32:42 +0400 Received: from hades.panopticon (hades.panopticon [192.168.0.2]) by nexii.panopticon (Postfix) with ESMTP id E06501703D; Tue, 25 Sep 2007 21:31:46 +0400 (MSD) Received: by hades.panopticon (Postfix, from userid 1000) id 33561406F; Tue, 25 Sep 2007 21:34:05 +0400 (MSD) Date: Tue, 25 Sep 2007 21:34:04 +0400 From: Dmitry Marakasov To: Markus Hitter Message-ID: <20070925173404.GA18894@hades.panopticon> Mail-Followup-To: Markus Hitter , freebsd-ports@freebsd.org References: <20070921162208.GA83826@hades.panopticon> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cp65.agava.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [26 6] X-AntiAbuse: Sender Address Domain - amdmi3.ru X-Source: X-Source-Args: X-Source-Dir: Cc: freebsd-ports@freebsd.org Subject: Re: porting software using glibc's getline() X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2007 17:32:45 -0000 * Markus Hitter (mah@jump-ing.de) wrote: >> I have a problem porting a piece of software that use >> getline(char**, int*, FILE*). This function is only present in >> glibc so I wonder what do I do in this case? > Ideally, you'd replace getline()'s usage with something similar, like > fgets(3). > > If this isn't reasonable, get inspired by glibc's sources and write your > own. Another inspiration might come from here: I've found implementation of getline function in tar sources that come with FreeBSD. I guess the best thing would be to make simple port out of it, with single .h file with static functions, which can be included in any place where it is needed. Is it OK to place GPL sources into the ports tree? (it would be silly to make distfile for single 3kb .h file) -- Best regards, Dmitry Marakasov mailto:amdmi3@amdmi3.ru