From owner-freebsd-hackers Sat Aug 22 19:18:32 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA04908 for freebsd-hackers-outgoing; Sat, 22 Aug 1998 19:18:32 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from gatekeeper.tsc.tdk.com (gatekeeper.tsc.tdk.com [207.113.159.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA04903 for ; Sat, 22 Aug 1998 19:18:31 -0700 (PDT) (envelope-from gdonl@tsc.tdk.com) Received: from sunrise.gv.tsc.tdk.com (root@sunrise.gv.tsc.tdk.com [192.168.241.191]) by gatekeeper.tsc.tdk.com (8.8.8/8.8.8) with ESMTP id TAA12575; Sat, 22 Aug 1998 19:17:37 -0700 (PDT) (envelope-from gdonl@tsc.tdk.com) Received: from salsa.gv.tsc.tdk.com (salsa.gv.tsc.tdk.com [192.168.241.194]) by sunrise.gv.tsc.tdk.com (8.8.5/8.8.5) with ESMTP id TAA21859; Sat, 22 Aug 1998 19:17:36 -0700 (PDT) Received: (from gdonl@localhost) by salsa.gv.tsc.tdk.com (8.8.5/8.8.5) id TAA11783; Sat, 22 Aug 1998 19:17:35 -0700 (PDT) From: Don Lewis Message-Id: <199808230217.TAA11783@salsa.gv.tsc.tdk.com> Date: Sat, 22 Aug 1998 19:17:35 -0700 In-Reply-To: Joel Ray Holveck "Re: Realloc fix for review" (Aug 21, 5:58pm) X-Mailer: Mail User's Shell (7.2.6 alpha(3) 7/19/95) To: joelh@gnu.org, Don.Lewis@tsc.tdk.com Subject: Re: Realloc fix for review Cc: hackers@FreeBSD.ORG Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Aug 21, 5:58pm, Joel Ray Holveck wrote: } Subject: Re: Realloc fix for review } > } So rather than hack some really complicated a and na's, I write a new } > } function, added it to libc and then modified all of src/lib to use } > } this new function. I called it frealloc (freeing realloc). I added } > } it to the man page, etc. I know that this isn't in ANSI C nor in } > } POSIX, but after seeing how hard it was to get people to use strncpy } > } right, I thought it would be good to add this to libc. } > I'd worry about causing name space pollution. You might break someone } > else's code who has their own function called frealloc ... } } Isn't that what weak symbols in libc are for? There's also the question of where you put the function prototype. If you put it in a standard header file, you'll break any third party code that redefines this function. Putting it in a non-standard header file is ok, but you'll have to include this header in any code that uses this function. You could also put the prototype in a standard header file if you use the proper #ifdef trickery to protect it from been seen by code that doesn't want to see any non-ANSI/non-POSIX symbols. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message