Mail Archives: djgpp-workers/2000/12/28/13:28:36
At 02:50 PM 12/27/00 -0500, DJ Delorie wrote:
>> Let me understand this correctly -- just include <libc/stubs.h> in
>> fcntl.c (where it is used) and the make process will automatically
>> add it to a newly created version of libc/stubs.h, is that
right? Or
>> is it llseek.c that needs the include for <libc/stubs.h>?
>
>You include stubs.h in any source that defines functions that end up
>stubbed, *and* in any sources that need to use stubbed functions.
>It's safe to include it when not needed.
>
>> I'm confused because *both* fcntl.c and llseek.c currently include
>> <libc/stubs.h>, and llseek has *not* been generated into stubs.h in
>> the many makes I have run.
>
>stubs.h has to be edited manually to add new entries. Once llseek()
>is added to the list, then fcntl.c uses stubs.h to call __llseek()
>instead of llseek(), and llseek.c uses it to redefine the function to
>be __llseek(). The src/libc/stubs makefile builds a llseek function
>that just jumps to __llseek.
OK, then I am guessing what is needed is to make llseek a stubbed
function. Currently llseek is *not* defined as __llseek, it is defined
directly as llseek. If I interpret your information correctly, the
more correct way to have defined llseek would have been to define it as
__llseek in llseek.c and to have put "#define llseek __llseek" into
libc/stubs.h, right?
Should I do this as a separate patch, prior to finishing my fcntl
changes? Or include it as one of the separate diffs that make up the
fcntl change set?
---------------------------------------------------------
Peter J. Farley III (pjfarley AT dorsai DOT org OR
pjfarley AT banet DOT net)
- Raw text -