delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/12/28/13:28:36

Message-Id: <5.0.2.1.0.20001228132208.025c98f0@pop5.banet.net>
X-Sender: usbanet DOT farley3 AT pop5 DOT banet DOT net
X-Mailer: QUALCOMM Windows Eudora Version 5.0.2
Date: Thu, 28 Dec 2000 13:29:40 -0500
To: djgpp-workers AT delorie DOT com
From: "Peter J. Farley III" <pjfarley AT banet DOT net>
Subject: Re: llseek is not in stubs.h (was: Re: Locking fcntl changes
#2)
Cc: DJ Delorie <dj AT delorie DOT com>, eliz AT is DOT elta DOT co DOT il
In-Reply-To: <200012271950.OAA04054@envy.delorie.com>
References: <5 DOT 0 DOT 2 DOT 1 DOT 0 DOT 20001227141202 DOT 025ac6b0 AT pop5 DOT banet DOT net>
<5 DOT 0 DOT 2 DOT 1 DOT 0 DOT 20001227015917 DOT 00a83050 AT pop5 DOT banet DOT net>
<5 DOT 0 DOT 2 DOT 1 DOT 0 DOT 20001227141202 DOT 025ac6b0 AT pop5 DOT banet DOT net>
Mime-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019