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.259 by root, Sun Jul 22 20:39:19 2018 UTC vs.
Revision 1.260 by root, Tue Jul 24 04:58:59 2018 UTC

163# else 163# else
164# define MAP_ANONYMOUS MAP_FIXED /* and hope this fails */ 164# define MAP_ANONYMOUS MAP_FIXED /* and hope this fails */
165# endif 165# endif
166#endif 166#endif
167 167
168/* defines all sorts of constants to 0 unless they are already defined */
169/* also provides const_iv_ and const_niv_ macros for them */
170#include "def0.h"
171
172#ifndef makedev 168#ifndef makedev
173# define makedev(maj,min) (((maj) << 8) | (min)) 169# define makedev(maj,min) (((maj) << 8) | (min))
174#endif 170#endif
175#ifndef major 171#ifndef major
176# define major(dev) ((dev) >> 8) 172# define major(dev) ((dev) >> 8)
184#endif 180#endif
185 181
186/*****************************************************************************/ 182/*****************************************************************************/
187 183
188#if !_POSIX_MAPPED_FILES 184#if !_POSIX_MAPPED_FILES
189# define mmap(addr,length,prot,flags,fd,offs) EIO_ENOSYS () 185# define mmap(addr,length,prot,flags,fd,offs) (errno = ENOSYS, (void *)-1)
190# define munmap(addr,length) EIO_ENOSYS () 186# define munmap(addr,length) EIO_ENOSYS ()
191#endif 187#endif
192 188
193#if !_POSIX_MEMORY_PROTECTION 189#if !_POSIX_MEMORY_PROTECTION
194# define mprotect(addr,len,prot) EIO_ENOSYS () 190# define mprotect(addr,len,prot) EIO_ENOSYS ()
275{ 271{
276 /* todo: iterate over magic and only free ours, but of course */ 272 /* todo: iterate over magic and only free ours, but of course */
277 /* the perl5porters will call that (correct) behaviour buggy */ 273 /* the perl5porters will call that (correct) behaviour buggy */
278 sv_unmagic (sv, FOREIGN_MAGIC); 274 sv_unmagic (sv, FOREIGN_MAGIC);
279} 275}
276
277/*****************************************************************************/
278
279/* defines all sorts of constants to 0 unless they are already defined */
280/* also provides const_iv_ and const_niv_ macros for them */
281#include "def0.h"
280 282
281/*****************************************************************************/ 283/*****************************************************************************/
282 284
283static void 285static void
284fiemap (eio_req *req) 286fiemap (eio_req *req)
2071munmap (SV *scalar) 2073munmap (SV *scalar)
2072 CODE: 2074 CODE:
2073 sv_clear_foreign (scalar); 2075 sv_clear_foreign (scalar);
2074 2076
2075SV * 2077SV *
2076mremap (SV *scalar, STRLEN new_length, int flags = 0, IV new_address = 0) 2078mremap (SV *scalar, STRLEN new_length, int flags = MREMAP_MAYMOVE, IV new_address = 0)
2077 CODE: 2079 CODE:
2078{ 2080{
2079 MAGIC *mg = mg_findext (scalar, FOREIGN_MAGIC, &mmap_vtbl); 2081 MAGIC *mg = mg_findext (scalar, FOREIGN_MAGIC, &mmap_vtbl);
2080 void *new; 2082 void *new;
2081 2083

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines