ts-7000
[Top] [All Lists]

[ts-7000] Re: implicit declaration of function 'getpagesize'

To:
Subject: [ts-7000] Re: implicit declaration of function 'getpagesize'
From: "naturalwatt" <>
Date: Sun, 31 May 2009 18:04:48 -0000
--- In  "j.chitte" <> wrote:
>
> Hi,
> 
> I'm trying to recompile something based on Jim Jackson's adc_logger with an 
> upto date toolchain. I get:
> 
> implicit declaration of function 'getpagesize'
> 
> the offending line being:
> 
> #define IOMMAP(A)  (mmap(0,getpagesize(),PROT_READ|PROT_WRITE, MAP_SHARED, 
> iofd,A))
> ...
>   adc_io_cntl=(unsigned char *)IOMMAP(0x22400000);
>   if ( ! (*adc_io_cntl & 1) ) { return(ENXIO); }
> 
>   adc_io_cntl=(unsigned char *)IOMMAP(0x10c00000);
>   adc_io_stat=(unsigned short *)IOMMAP(0x10800000);
>   adc_io_read=(unsigned short *)IOMMAP(0x10c00000);
> 
> 
> This function seems to have disappeared and I'm not sure what to replace it 
> with since I was not sure why such a large value was used.
> 
> Can someone suggest a fix?
> 
> TIA.
>

I use code like that, and assume you need #include <sys/mman.h> in there, 
although the man page for getpagesize says it is in unistd.h.

Martin

ps - I'm still using a 2.4 environment.




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU