Problema e ca nu vede tipurile off64_t definit in /usr/include/unistd.h,
unde apare si lseek64.
Despre cele 3 functii am gasit in doc. info de la libc in :
Low-Level Input/Output
Opening and Closing Files
--- [EMAIL PROTECTED] wrote:
> On Fri, 15 Oct 2004, dbs2 wrote:
>
> >
> > Buna.
> >
> > Daca am urmator cod in C, prin care incerc sa deschid un fisier mai mare de 4 GB
> > folosind tipul off64_t, open64, lseek64
> >
> > #define __USE_FILE_OFFSET64
> > #define __USE_LARGEFILE64
> >
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <unistd.h>
> > #include <sys/types.h>
> > #include <sys/stat.h>
> > #include <fcntl.h>
> >
> >
> > int
> > main (int argc, char **argv)
> > {
> >
lipsete off64_t offset=5;
> > long fd;
> > fd=open64("fisier.dat",O_RDWR);
> > lseek64(fd,offset,SEEK_SET);
> > return 0;
> > }
> >
> > la compilare de gcc -Wall a.c da
> >
> >
> > a.c: In function `main':
Nu-l recunoaste :
> > a.c:17: error: `off64_t' undeclared (first use in this function)
> > a.c:17: error: (Each undeclared identifier is reported only once
> > a.c:17: error: for each function it appears in.)
> > a.c:17: error: syntax error before "offset"
> > a.c:18: warning: implicit declaration of function `open64'
> > a.c:19: warning: implicit declaration of function `lseek64'
> > a.c:19: error: `offset' undeclared (first use in this function)
> > a.c:21:2: warning: no newline at end of file
> >
> >
> > ce-i il lipseste ?
> >
>
> pai cind folosesti variabile tre sa le definesti inainte de a le folosi
> ;-)
>
> la mine pe sistem nu exista man page pentru open64 deci poate nu exista
> nici functia.(n-am chef de grep la ora asta)
> Oricum manulalul lui open zice sa folosesti O_LARGEFILE daca vrei sa
> lucrezi cu fisiere mari
>
>
> --
> "A mouse is a device used to point at
> the xterm you want to type in".
> Kim Alm on a.s.r.
>
> ---
> Detalii despre listele noastre de mail: http://www.lug.ro/
>
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---
Detalii despre listele noastre de mail: http://www.lug.ro/