X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FIO%2FIO.xs;h=8bdc13312623b65da44a52c9961b424948508579;hb=f4db54055cd36d83622f77949fd6ab7c67198101;hp=4987b3d5552731f983614291e75d80c408ace71c;hpb=63a347c7a3ed87c3e11eda9e379b25371182e278;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/IO/IO.xs b/ext/IO/IO.xs index 4987b3d..8bdc133 100644 --- a/ext/IO/IO.xs +++ b/ext/IO/IO.xs @@ -420,20 +420,23 @@ sockatmark (sock) InputStream sock PROTOTYPE: $ PREINIT: - int fd,flag,result; + int fd; CODE: { fd = PerlIO_fileno(sock); #ifdef HAS_SOCKATMARK - flag = sockatmark(fd); + RETVAL = sockatmark(fd); #else + { + int flag = 0; # ifdef SIOCATMARK - if (ioctl(fd, SIOCATMARK, &flag) != 0) - XSRETURN_UNDEF; + if (ioctl(fd, SIOCATMARK, &flag) != 0) + XSRETURN_UNDEF; # else - not_here("IO::Socket::atmark"); -# endif - RETVAL = flag; + not_here("IO::Socket::atmark"); +# endif + RETVAL = flag; + } #endif } OUTPUT: