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.172 by root, Sun Sep 12 03:36:27 2010 UTC vs.
Revision 1.176 by root, Thu Dec 2 10:04:47 2010 UTC

118 STRLEN stroffset; \ 118 STRLEN stroffset; \
119 SV *self; 119 SV *self;
120 120
121#define EIO_NO_WRAPPERS 1 121#define EIO_NO_WRAPPERS 1
122 122
123#include "libeio/config.h"
123#include "libeio/eio.h" 124#include "libeio/eio.h"
124 125
125#ifndef POSIX_FADV_NORMAL 126#ifndef POSIX_FADV_NORMAL
126# define POSIX_FADV_NORMAL 0 127# define POSIX_FADV_NORMAL 0
127# define NO_FADVISE 1
128#endif 128#endif
129#ifndef POSIX_FADV_SEQUENTIAL 129#ifndef POSIX_FADV_SEQUENTIAL
130# define POSIX_FADV_SEQUENTIAL 0 130# define POSIX_FADV_SEQUENTIAL 0
131#endif 131#endif
132#ifndef POSIX_FADV_RANDOM 132#ifndef POSIX_FADV_RANDOM
140#endif 140#endif
141#ifndef POSIX_FADV_DONTNEED 141#ifndef POSIX_FADV_DONTNEED
142# define POSIX_FADV_DONTNEED 0 142# define POSIX_FADV_DONTNEED 0
143#endif 143#endif
144 144
145#if _XOPEN_SOURCE < 600 || NO_FADVISE 145#if !HAVE_POSIX_FADVISE
146# define posix_fadvise(a,b,c,d) errno = ENOSYS /* also return ENOSYS */ 146# define posix_fadvise(a,b,c,d) errno = ENOSYS /* also return ENOSYS */
147#endif 147#endif
148 148
149#ifndef POSIX_MADV_NORMAL 149#ifndef POSIX_MADV_NORMAL
150# define POSIX_MADV_NORMAL 0 150# define POSIX_MADV_NORMAL 0
151# define NO_MADVISE 1
152#endif 151#endif
153#ifndef POSIX_MADV_SEQUENTIAL 152#ifndef POSIX_MADV_SEQUENTIAL
154# define POSIX_MADV_SEQUENTIAL 0 153# define POSIX_MADV_SEQUENTIAL 0
155#endif 154#endif
156#ifndef POSIX_MADV_RANDOM 155#ifndef POSIX_MADV_RANDOM
161#endif 160#endif
162#ifndef POSIX_MADV_DONTNEED 161#ifndef POSIX_MADV_DONTNEED
163# define POSIX_MADV_DONTNEED 0 162# define POSIX_MADV_DONTNEED 0
164#endif 163#endif
165 164
166#if _XOPEN_SOURCE < 600 || NO_MADVISE 165#if !HAVE_POSIX_MADVISE
167# define posix_madvise(a,b,c) errno = ENOSYS /* also return ENOSYS */ 166# define posix_madvise(a,b,c) errno = ENOSYS /* also return ENOSYS */
168#endif 167#endif
169 168
170#ifndef PROT_NONE 169#ifndef PROT_NONE
171# define PROT_NONE 0 170# define PROT_NONE 0
638 637
639#if !_POSIX_MAPPED_FILES 638#if !_POSIX_MAPPED_FILES
640# define mmap(addr,length,prot,flags,fd,offs) (errno = ENOSYS, -1) 639# define mmap(addr,length,prot,flags,fd,offs) (errno = ENOSYS, -1)
641# define munmap(addr,length) (errno = ENOSYS, -1) 640# define munmap(addr,length) (errno = ENOSYS, -1)
642# define mprotect(addr,len,prot) (errno = ENOSYS, -1) 641# define mprotect(addr,len,prot) (errno = ENOSYS, -1)
642# define PROT_NONE 0
643# define PROT_WRITE 0
644# define MAP_PRIVATE 0
645# define MAP_SHARED 0
646# define MAP_FIXED 0
643#endif 647#endif
644 648
645#define MMAP_MAGIC PERL_MAGIC_ext 649#define MMAP_MAGIC PERL_MAGIC_ext
646 650
647static int 651static int
1257 1261
1258void 1262void
1259aio_mlock (SV8 *data, IV offset = 0, SV *length = &PL_sv_undef, SV *callback=&PL_sv_undef) 1263aio_mlock (SV8 *data, IV offset = 0, SV *length = &PL_sv_undef, SV *callback=&PL_sv_undef)
1260 PPCODE: 1264 PPCODE:
1261{ 1265{
1262
1263 STRLEN svlen; 1266 STRLEN svlen;
1264 char *svptr = SvPVbyte (data, svlen); 1267 char *svptr = SvPVbyte (data, svlen);
1265 UV len = SvUV (length); 1268 UV len = SvUV (length);
1266 1269
1267 if (offset < 0) 1270 if (offset < 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines