Mail Archives: djgpp-workers/2003/06/21/05:35:01
> Date: Sat, 21 Jun 2003 00:37:39 -0400
> From: CBFalconer <cbfalconer AT yahoo DOT com>
>
> I don't know the details of this, so I may be talking nonsense,
> but it reminds me of what I found in looking at the present
> memalign.c. That uses a herd of macros which do not appear in the
> source, nor in malloc.h.
If you mean BEFORE, ENDSZ, DATA, etc., then they are defined in
libc/malloc.h. Since stdlib.h and libc/malloc.h are the only headers
mentioned in memalign.c, I don't think looking up those macros is such
a formidable taks. But if searching two headers is too much, you
could always use Grep:
fgrep -e BEFORE -e ENDSZ -e DATA %DJDIR%/include/.../*.h
or, better yet, install the GNU ID-utils package, run `mkid' on both
the `src' and `include' directories, and then type commands like
lid ENDSZ
to get much faster (and more accurate) results than with Grep.
> So, while there may be prototypes for the source routines buried
> in this manner, there should not be references IMO.
I'm not sure I understand: are you saying that it is fundamentally
wrong to have macros defined in header files that are used by library
routines?
The reason those macros were put on a header is because several
librray modules use them" malloc.c, malldbg.c, and memalign.c. I
don't see any flaws in that decision.
- Raw text -