[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] lseek64 og hvad er _GNU_SOURCE for noget?



On Fri, 25 Jul 2003 14:55:32 +0200 (CEST)
Hans Schou <sslug@sslug> wrote:

> 
> Hej
> 
> Jeg har kun kunnet få lseek64() til at virke ved at bruge:
>   gcc -D_GNU_SOURCE foo.c
> 

Mangler du ikke _FILE_OFFSET_BITS? Ellers er der ingen måde
lib-funktioner kan finde ud af hvor data er i en stat-buffer,
eller linkeren at finde den rigtige eller hvordan de nu gør.

Jeg har ikke brugt lseek64, men skal bare ha' størrelsen og
læse filerne igennem - jeg finder i min 2 år gamle kode:

#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#endif

Det er altså kun size, jeg har brugt,
struct stat *pstatb;

... pstatb->st_size;

kan behandles som en 64 bit int og jeg kan liste filstørrelser>2GB.

http://www.d-axel.dk/pub/mytools/ydir.c

Håber det hjælper.


-- 
sslug@sslug -- Linux works for me.  http://d-axel.dk/


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *