ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/AIO.xs
(Generate patch)

Comparing IO-AIO/AIO.xs (file contents):
Revision 1.162 by root, Sun Jan 10 23:05:12 2010 UTC vs.
Revision 1.164 by root, Tue May 4 21:14:01 2010 UTC

18#include <fcntl.h> 18#include <fcntl.h>
19#include <sched.h> 19#include <sched.h>
20 20
21#if _POSIX_MEMLOCK || _POSIX_MAPPED_FILES 21#if _POSIX_MEMLOCK || _POSIX_MAPPED_FILES
22# include <sys/mman.h> 22# include <sys/mman.h>
23#endif
24
25#if !_POSIX_MAPPED_FILES
26# define mmap(addr,length,prot,flags,fd,offs) (errno = ENOSYS, -1)
27# define munmap(addr,length) (errno = ENOSYS, -1)
28#endif 23#endif
29 24
30/* perl namespace pollution */ 25/* perl namespace pollution */
31#undef VERSION 26#undef VERSION
32 27
589 create_respipe (); 584 create_respipe ();
590} 585}
591 586
592/*****************************************************************************/ 587/*****************************************************************************/
593 588
589#if !_POSIX_MAPPED_FILES
590# define mmap(addr,length,prot,flags,fd,offs) (errno = ENOSYS, -1)
591# define munmap(addr,length) (errno = ENOSYS, -1)
592#endif
593
594#define MMAP_MAGIC PERL_MAGIC_ext 594#define MMAP_MAGIC PERL_MAGIC_ext
595 595
596static int 596static int
597mmap_free (pTHX_ SV *sv, MAGIC *mg) 597mmap_free (pTHX_ SV *sv, MAGIC *mg)
598{ 598{
662# define const_eio(name) { # name, (IV) EIO_ ## name }, 662# define const_eio(name) { # name, (IV) EIO_ ## name },
663 const_iv (EXDEV) 663 const_iv (EXDEV)
664 const_iv (ENOSYS) 664 const_iv (ENOSYS)
665 const_iv (O_RDONLY) 665 const_iv (O_RDONLY)
666 const_iv (O_WRONLY) 666 const_iv (O_WRONLY)
667 const_iv (O_RDWR)
667 const_iv (O_CREAT) 668 const_iv (O_CREAT)
668 const_iv (O_TRUNC) 669 const_iv (O_TRUNC)
670 const_iv (O_EXCL)
671 const_iv (O_APPEND)
669#ifndef _WIN32 672#ifndef _WIN32
670 const_iv (S_IFIFO) 673 const_iv (S_IFIFO)
671#endif 674#endif
672 const_niv (FADV_NORMAL , POSIX_FADV_NORMAL) 675 const_niv (FADV_NORMAL , POSIX_FADV_NORMAL)
673 const_niv (FADV_SEQUENTIAL, POSIX_FADV_SEQUENTIAL) 676 const_niv (FADV_SEQUENTIAL, POSIX_FADV_SEQUENTIAL)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines