home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.linux
- Path: sparky!uunet!think.com!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!ehsn11.cen.uiuc.edu!jy10033
- From: jy10033@ehsn11.cen.uiuc.edu (Joshua M Yelon)
- Subject: Re: function-->macro bugs.
- References: <By0ows.95I@news.cso.uiuc.edu> <1992Nov21.000241.9744@klaava.Helsinki.FI>
- Message-ID: <By1p2E.5L9@news.cso.uiuc.edu>
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Organization: University of Illinois at Urbana
- Date: Sat, 21 Nov 1992 02:47:01 GMT
- Lines: 29
-
- 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
-
-