From: jy10033@ehsn11.cen.uiuc.edu (Joshua M Yelon) Subject: Re: function-->macro bugs. Date: 21 Nov 1992 02:47:01 GMT
I wrote this:
>>3. This is correct:
>>
>>/* My-super-efficient-malloc: */
>>static void *malloc(n)
>>int n;
>>{...
Lars replied:
>Nope, not if you include <stdlib.h>. You cannot have declarations /
>definitions for malloc that specify both external and internal
>linkage.
I'm not disagreeing with Lars, in fact I'm quite certain he's right,
but I'm curious: how _do_ you replace a library routine?
Is THIS correct?
#undef malloc
void *malloc(n)
int n;
{
...
Or is there simply no way to do it?
- Josh