InputStream sock
PROTOTYPE: $
PREINIT:
- int fd;
+ int fd = PerlIO_fileno(sock);
CODE:
{
#ifdef HAS_SOCKATMARK
- int fd = PerlIO_fileno(sock);
if (fd < 0) {
errno = EBADF;
RETVAL = -1;
}
#else
{
+ if (fd < 0) {
+ errno = EBADF;
+ RETVAL = -1;
+ }
+ else {
int flag = 0;
# ifdef SIOCATMARK
# if defined(NETWARE) || defined(WIN32)
# endif
RETVAL = flag;
}
+ }
#endif
}
OUTPUT:
PERL_SET_CONTEXT(aTHX);
if (!thread) {
MUTEX_UNLOCK(&MY_POOL.create_destruct_mutex);
- int fd = PerlIO_fileno(Perl_error_log);
- if (fd >= 0) {
- /* If there's no error_log, we cannot scream about it missing. */
- PERL_UNUSED_RESULT(PerlLIO_write(fd, PL_no_mem, strlen(PL_no_mem)));
+ {
+ int fd = PerlIO_fileno(Perl_error_log);
+ if (fd >= 0) {
+ /* If there's no error_log, we cannot scream about it missing. */
+ PERL_UNUSED_RESULT(PerlLIO_write(fd, PL_no_mem, strlen(PL_no_mem)));
+ }
}
my_exit(1);
}