<<< Date Index >>>     <<< Thread Index >>>

Re: 1.5.8 build failure on Solaris 8



On Fri, Mar 04, 2005 at 04:48:14PM +0000, Aaron Crane wrote:
> Oswald Buddenhagen writes:
> > On Fri, Mar 04, 2005 at 04:07:32PM +0000, Aaron Crane wrote:
> > > Oswald Buddenhagen writes:
> > > > #include <unistd.h>
> > > > #define posix_lseek(a,b,c) lseek(a,b,c)
> > > > #ifdef lseek
> > > > # undef lseek
> > > > #endif
> > > 
> > > Given the '#undef lseek', defining another name isn't necessary.
> > 
> > but you want to use lseek (or any of the other wrapped functions),
> > otherwise you wouldn't have included the header in the first place.
> 
> But, as long as you've done
> 
>   #include <unistd.h>
> 
> you've got a declaration in scope for lseek().  Implementations are
> given the latitude to define a macro that shadows the real function, but
> you're still guaranteed that the real function exists, and that it's
> been declared appropriately.
> 
but not that the right function will be called. what was the problem we
started from? sizeof(off_t) != sizeof(int) (e.g., #define
_FILE_OFFSET_BITS 64  on x86) by any chance? see, #define lseek is NOT
lseek() in this case.

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.