#1 mmap fixes, added SunOS

closed
None
7
2003-04-29
2003-03-19
Piotr Klaban
No

Hi,

I have fixed some mmap section bugs:
- mmap returns -1 i.e. MMAP_FAILED on failure not NULL,
- mmap's offset need to aligned to pagesize, read by sysconf()
It is tested on both Solaris/sparc and Linux/i386 machines,
it was not tested on FreeBSD and Windows (does it have mmap?).

Another bug:
- ed2k_hash crashes when file has size equal to 9500*1024
(because filesize%blocksize=len=0)

I have also added defined(sun)&&defined(__svr4__) to ifdefs directives in order to compile unix code in.

Best regards,
--
Piotr Klaban
makler+sourceforge@man.torun.pl

Discussion

  • Piotr Klaban
    Piotr Klaban
    2003-03-19

    • priority: 5 --> 7
     
  • Logged In: YES
    user_id=583691

    Thanks for the patch :-)

    sorry it took so long for me to reply - I'm currently moving and I'm
    still waiting for broadband at my new place.

    I'll apply the patches as soon as I can.

    Many thanks
    -Tim

     
    • assigned_to: nobody --> uberdork
     
  • Logged In: YES
    user_id=583691

    sorry for the long delay.

    It's all in CVS now.

    Many thanks :-)

    Cheers
    -Tim

     
    • status: open --> closed