[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libcdio-devel] read.h needs unistd.h
From: |
R. Bernstein |
Subject: |
[Libcdio-devel] read.h needs unistd.h |
Date: |
Thu, 19 Jan 2006 16:52:51 -0500 |
I'd like to solicit comments on how to make sure off_t is defined in
cdio/read.h.
First, note that off_t comes from <sys/types> (not <unistd.h> per se).
Approach 1 (Compression library):
zlib.h uses z_offset_t and has which is defined in zconf.h as:
# include <sys/types.h> /* for off_t */
# include <unistd.h> /* for SEEK_* and off_t */
# ifdef VMS
# include <unixio.h> /* for off_t */
# endif
# define z_off_t off_t
In libcdio, similar would be putting into read.h (after making sure configure
defined
HAVE_SYS_TYPES_H):
#include "cdio_config.h"
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
Approach 2 (Samba client):
libsmbclient.h just has:
#include <sys/types.h>
Comments on which to use and/or why one or the other might be
preferred? Or any other better approaches?
Thanks.
Steven M. Schultz writes:
> This message is in MIME format. The first part should be readable text,
> while the remaining parts are likely unreadable without MIME-aware tools.
> Send mail to address@hidden for more info.
>
> --358146749-771914953-1137696825=:25414
> Content-Type: TEXT/PLAIN; charset=US-ASCII
>
> Hi
>
> Was building another project that uses libcdio (MPlayer in this case)
> and ran into a problem:
>
> gmake -C libmpdemux
> cc -c -I../libvo -I../../libvo -I/usr/X11R6/include -O4 -mcpu=970 -mtune=970
> -faltivec -D__APPLE_ALTIVEC__ -pipe -ffast-math -fomit-frame-pointer
> -mdynamic-no-pic -falign-loops=16 -DSYS_DARWIN -DCONFIG_DARWIN
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I.. -I../loader
> -I../libavutil -I../libavcodec -I../libavformat -o cdinfo.o cdinfo.c
> In file included from /usr/local/include/cdio/cdio.h:77,
> from /usr/local/include/cdio/cdda.h:32,
> from cdd.h:9,
> from cdinfo.c:16:
> /usr/local/include/cdio/read.h:54: error: parse error before "cdio_lseek"
> /usr/local/include/cdio/read.h:54: error: parse error before "off_t"
> In file included from cdd.h:10,
> from cdinfo.c:16:
> /usr/local/include/cdio/paranoia.h:104: error: parse error before "off_t"
>
> off_t isn't in scope. Trivial fix (patch attached) is to include
> <unistd.h> so that programs which include "read.h" are happy.
>
> Cheers,
> Steven Schultz
>
> --358146749-771914953-1137696825=:25414
> Content-Type: TEXT/PLAIN; charset=US-ASCII; name=p
> Content-Transfer-Encoding: BASE64
> Content-ID: <address@hidden>
> Content-Description:
> Content-Disposition: attachment; filename=p
>
> LS0tIHJlYWQuaC5kaXN0CTIwMDYtMDEtMTkgMTA6NDQ6MzcuMDAwMDAwMDAw
> IC0wODAwDQorKysgcmVhZC5oCTIwMDYtMDEtMTkgMTA6NTA6NTkuMDAwMDAw
> MDAwIC0wODAwDQpAQCAtMjcsNiArMjcsOCBAQA0KICNpZm5kZWYgX19DRElP
> X1JFQURfSF9fDQogI2RlZmluZSBfX0NESU9fUkVBRF9IX18NCiANCisjaW5j
> bHVkZSA8dW5pc3RkLmg+DQorDQogI2lmZGVmIF9fY3BsdXNwbHVzDQogZXh0
> ZXJuICJDIiB7DQogI2VuZGlmIC8qIF9fY3BsdXNwbHVzICovDQo=
> --358146749-771914953-1137696825=:25414
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
>
> _______________________________________________
> Libcdio-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/libcdio-devel
>
> --358146749-771914953-1137696825=:25414--
>
>