Date: Sat, 22 Aug 1998 19:17:35 -0700 From: Don Lewis <Don.Lewis@tsc.tdk.com> To: joelh@gnu.org, Don.Lewis@tsc.tdk.com Cc: hackers@FreeBSD.ORG Subject: Re: Realloc fix for review Message-ID: <199808230217.TAA11783@salsa.gv.tsc.tdk.com> In-Reply-To: Joel Ray Holveck <joelh@gnu.org> "Re: Realloc fix for review" (Aug 21, 5:58pm)
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808230217.TAA11783>