From owner-freebsd-hackers Sat May 12 4:57:34 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from granger.mail.mindspring.net (granger.mail.mindspring.net [207.69.200.148]) by hub.freebsd.org (Postfix) with ESMTP id A54B437B423 for ; Sat, 12 May 2001 04:57:32 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from mindspring.com (pool0001.cvx21-bradley.dialup.earthlink.net [209.179.192.1]) by granger.mail.mindspring.net (8.9.3/8.8.5) with ESMTP id HAA22413; Sat, 12 May 2001 07:57:25 -0400 (EDT) Message-ID: <3AFD253B.60992A63@mindspring.com> Date: Sat, 12 May 2001 04:57:47 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: dan@BSDpro.com Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: adding a new function to libc References: <01051202104500.95296@blackhole.BSDpro.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Daniel Hemmerich wrote: > > Any comments, suggestions, swears concerning adding a new function, > strndup(), to libc? > > So that instead of permitting it to attempt to allocate a large > chunk of memory, it is possible to give it a max length. How about just knowing what you are passing to the function before you call it, so that it isn't a problem? FWIW, I didn't like some of the Linux libc and kernel function extensions of similar ilk which were brought into FreeBSD, either: sloppy programmers should learn to ask people "Would you like fries with that?", and stay away from computers. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message