libcdio-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libcdio-devel] read.h needs unistd.h


From: R. Bernstein
Subject: Re: [Libcdio-devel] read.h needs unistd.h
Date: Thu, 19 Jan 2006 19:16:40 -0500

Steven M. Schultz writes:
 > 
 >      Hmmm, it seems that unistd.h also includes <sys/types.h>  .  If that
 > 
 >      But lseek() is in <unistd.h> so it's probably a good idea to include
 >      both <sys/types.h> and <unistd.h>.

I think there's a confusion here. libcdio's driver implementation does
the seeking, (actually it's fseek not lseek) and that takes care to
include whatever it needs.

If one has code that needs lseek or fseek, the #include should be
written in the source code. Although I didn't mention it before,
another solution would have been to add an #include in cdd.h or
cdinfo.c. And given that that was *not* done, means that it has no
need of the off_t type other than that header. (In fact that's true as
I looked at the code).

I didn't suggest addressing this outside of libcdio because I suppose
this is a libcdio misfeature: if a libcdio header uses off_t, it has a
responsibility for making sure that's okay. But not for precognition
of what an application might be doing and including other headers on
its behalf.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]