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.



_______________________________________________
Libcdio-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/libcdio-devel

Reply via email to