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.181 by root, Tue Feb 15 03:21:41 2011 UTC vs.
Revision 1.183 by root, Tue Jul 5 09:24:11 2011 UTC

121#define EIO_NO_WRAPPERS 1 121#define EIO_NO_WRAPPERS 1
122 122
123#include "libeio/config.h" 123#include "libeio/config.h"
124#include "libeio/eio.h" 124#include "libeio/eio.h"
125 125
126/* Linux/others */
127#ifndef O_ASYNC
128# define O_ASYNC 0
129#endif
130#ifndef O_DIRECT
131# define O_DIRECT 0
132#endif
133#ifndef O_NOATIME
134# define O_NOATIME 0
135#endif
136
137/* POSIX */
138#ifndef O_CLOEXEC
139# define O_CLOEXEC 0
140#endif
141#ifndef O_NOFOLLOW
142# define O_NOFOLLOW 0
143#endif
144#ifndef O_NOCTTY
145# define O_NOCTTY 0
146#endif
147#ifndef O_NONBLOCK
148# define O_NONBLOCK 0
149#endif
150#ifndef O_EXEC
151# define O_EXEC 0
152#endif
153#ifndef O_SEARCH
154# define O_SEARCH 0
155#endif
156#ifndef O_DIRECTORY
157# define O_DIRECTORY 0
158#endif
159#ifndef O_DSYNC
160# define O_DSYNC 0
161#endif
162#ifndef O_RSYNC
163# define O_RSYNC 0
164#endif
165#ifndef O_SYNC
166# define O_SYNC 0
167#endif
168#ifndef O_TTY_INIT
169# define O_TTY_INIT 0
170#endif
171
126#ifndef POSIX_FADV_NORMAL 172#ifndef POSIX_FADV_NORMAL
127# define POSIX_FADV_NORMAL 0 173# define POSIX_FADV_NORMAL 0
128#endif 174#endif
129#ifndef POSIX_FADV_SEQUENTIAL 175#ifndef POSIX_FADV_SEQUENTIAL
130# define POSIX_FADV_SEQUENTIAL 0 176# define POSIX_FADV_SEQUENTIAL 0
539 case EIO_NOP: 585 case EIO_NOP:
540 case EIO_BUSY: 586 case EIO_BUSY:
541 break; 587 break;
542 588
543 case EIO_READLINK: 589 case EIO_READLINK:
590 case EIO_REALPATH:
544 if (req->result > 0) 591 if (req->result > 0)
545 PUSHs (sv_2mortal (newSVpvn (req->ptr2, req->result))); 592 PUSHs (sv_2mortal (newSVpvn (req->ptr2, req->result)));
546 break; 593 break;
547 594
548 case EIO_STAT: 595 case EIO_STAT:
765 const_iv (O_CREAT) 812 const_iv (O_CREAT)
766 const_iv (O_TRUNC) 813 const_iv (O_TRUNC)
767 const_iv (O_EXCL) 814 const_iv (O_EXCL)
768 const_iv (O_APPEND) 815 const_iv (O_APPEND)
769 816
817 const_iv (O_ASYNC)
818 const_iv (O_DIRECT)
819 const_iv (O_NOATIME)
820
821 const_iv (O_CLOEXEC)
822 const_iv (O_NOCTTY)
823 const_iv (O_NOFOLLOW)
824 const_iv (O_NONBLOCK)
825 const_iv (O_EXEC)
826 const_iv (O_SEARCH)
827 const_iv (O_DIRECTORY)
828 const_iv (O_DSYNC)
829 const_iv (O_RSYNC)
830 const_iv (O_SYNC)
831 const_iv (O_TTY_INIT)
832
770 const_iv (S_IFIFO) 833 const_iv (S_IFIFO)
771 const_iv (S_IFCHR) 834 const_iv (S_IFCHR)
772 const_iv (S_IFBLK) 835 const_iv (S_IFBLK)
773 const_iv (S_IFLNK) 836 const_iv (S_IFLNK)
774 const_iv (S_IFREG) 837 const_iv (S_IFREG)
1039 } 1102 }
1040} 1103}
1041 1104
1042void 1105void
1043aio_readlink (SV8 *path, SV *callback=&PL_sv_undef) 1106aio_readlink (SV8 *path, SV *callback=&PL_sv_undef)
1107 ALIAS:
1108 aio_readlink = EIO_READLINK
1109 aio_realpath = EIO_REALPATH
1044 PPCODE: 1110 PPCODE:
1045{ 1111{
1046 SV *data; 1112 SV *data;
1047 dREQ; 1113 dREQ;
1048 1114
1049 req->type = EIO_READLINK; 1115 req->type = ix;
1050 req->sv1 = newSVsv (path); 1116 req->sv1 = newSVsv (path);
1051 req->ptr1 = SvPVbyte_nolen (req->sv1); 1117 req->ptr1 = SvPVbyte_nolen (req->sv1);
1052 1118
1053 REQ_SEND; 1119 REQ_SEND;
1054} 1120}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines