From owner-cvs-all Sat Jan 22 6:51: 1 2000 Delivered-To: cvs-all@freebsd.org Received: from server.baldwin.cx (jobaldwi.campus.vt.edu [198.82.67.146]) by hub.freebsd.org (Postfix) with ESMTP id 40A6214D9A; Sat, 22 Jan 2000 06:50:57 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from john.baldwin.cx (john [10.0.0.2]) by server.baldwin.cx (8.9.3/8.9.3) with ESMTP id JAA09228; Sat, 22 Jan 2000 09:50:55 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-Id: <200001221450.JAA09228@server.baldwin.cx> X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200001221119.DAA81695@freefall.freebsd.org> Date: Sat, 22 Jan 2000 09:50:54 -0500 (EST) From: John Baldwin To: Yukihiro Nakai Subject: RE: cvs commit: ports/games/xsoldier/patches patch-aa patch-ac p Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk On 22-Jan-00 Yukihiro Nakai wrote: > nakai 2000/01/22 03:19:01 PST > > Modified files: > games/xsoldier/patches patch-aa patch-ac > games/xsoldier/pkg DESCR > Log: > Fix the ports. > There is not 'strlcpy' function here or in system. > So I replaced to strncpy. > > Submitted by: Tsuguru Kato That depends on the age of the machine: > uname -a FreeBSD john.baldwin.cx 3.4-STABLE FreeBSD 3.4-STABLE #7: Sun Jan 2 13:21:29 EST 2000 john@john.baldwin.cx:/usr/source/src/sys/compile/JOHN i386 > man -k strlcpy strlcpy(3), strlcat(3) - size-bounded string copying and concatenation From http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/string/strlcpy.c you can see that strlcpy(3) has been in the system since 3.3. The following test should identify when it is safe to use it: #include #if (__FreeBSD_version >= 330000 && __FreeBSD_version <= 400000) || __FreeBSD_version >= 400012 #else #endif -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message