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.169 by root, Wed Aug 4 16:06:54 2010 UTC vs.
Revision 1.170 by root, Wed Aug 4 16:09:36 2010 UTC

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
146# define posix_fadvise(a,b,c,d) errno = ENOSYS /* also return ENOSYS */
147#endif
148
145#ifndef POSIX_MADV_NORMAL 149#ifndef POSIX_MADV_NORMAL
146# define POSIX_MADV_NORMAL 0 150# define POSIX_MADV_NORMAL 0
147# define NO_MADVISE 1 151# define NO_MADVISE 1
148#endif 152#endif
149#ifndef POSIX_MADV_SEQUENTIAL 153#ifndef POSIX_MADV_SEQUENTIAL
155#ifndef POSIX_MADV_WILLNEED 159#ifndef POSIX_MADV_WILLNEED
156# define POSIX_MADV_WILLNEED 0 160# define POSIX_MADV_WILLNEED 0
157#endif 161#endif
158#ifndef POSIX_MADV_DONTNEED 162#ifndef POSIX_MADV_DONTNEED
159# define POSIX_MADV_DONTNEED 0 163# define POSIX_MADV_DONTNEED 0
164#endif
165
166#if _XOPEN_SOURCE < 600 || NO_MADVISE
167# define posix_madvise(a,b,c) errno = ENOSYS /* also return ENOSYS */
160#endif 168#endif
161 169
162#ifndef ST_NODEV 170#ifndef ST_NODEV
163# define ST_NODEV 0 171# define ST_NODEV 0
164#endif 172#endif
1385 1393
1386int 1394int
1387fadvise (aio_rfd fh, off_t offset, off_t length, IV advice) 1395fadvise (aio_rfd fh, off_t offset, off_t length, IV advice)
1388 PROTOTYPE: $$$$ 1396 PROTOTYPE: $$$$
1389 CODE: 1397 CODE:
1390#if _XOPEN_SOURCE >= 600 && !NO_FADVISE
1391 RETVAL = posix_fadvise (fh, offset, length, advice); 1398 RETVAL = posix_fadvise (fh, offset, length, advice);
1392#else
1393 RETVAL = errno = ENOSYS; /* yes, this is actually correct */
1394#endif
1395 OUTPUT: 1399 OUTPUT:
1396 RETVAL 1400 RETVAL
1397 1401
1398ssize_t 1402ssize_t
1399sendfile (aio_wfd ofh, aio_rfd ifh, off_t offset, size_t count) 1403sendfile (aio_wfd ofh, aio_rfd ifh, off_t offset, size_t count)
1453 length = SvCUR (scalar) - offset; 1457 length = SvCUR (scalar) - offset;
1454 1458
1455 if (addr >= SvEND (scalar) || length <= 0) 1459 if (addr >= SvEND (scalar) || length <= 0)
1456 XSRETURN_EMPTY; 1460 XSRETURN_EMPTY;
1457 1461
1458 #if _XOPEN_SOURCE >= 600 && !NO_MADVISE
1459 RETVAL = posix_madvise (addr, length, advice); 1462 RETVAL = posix_madvise (addr, length, advice);
1460 #else
1461 RETVAL = errno = ENOSYS; /* yes, this is actually correct */
1462 #endif
1463} 1463}
1464 OUTPUT: 1464 OUTPUT:
1465 RETVAL 1465 RETVAL
1466 1466
1467int 1467int

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines