summaryrefslogtreecommitdiff
path: root/win32/perlhost.h
diff options
context:
space:
mode:
authorDaniel Dragan <bulk88@hotmail.com>2012-10-27 22:25:47 -0400
committerJan Dubois <jand@activestate.com>2012-11-08 16:54:55 -0800
commit073dd0357a846739ff3ae9a14379de2302d5e877 (patch)
treee98d00b9a5881f5381d9815828990a60737fe091 /win32/perlhost.h
parente566981e5a5b2c2716eea4363106c4ed7620e5bb (diff)
downloadperl-073dd0357a846739ff3ae9a14379de2302d5e877.tar.gz
"func not implemented" croaks optimizations in /win32/*
This commit removes a number of "* not implemented" strings from the image. A win32_croak_not_implemented wrapper is created to reduce machine code by not putting the format string on the C stack many times. embed.fnc was used to declare win32_croak_not_implemented for proper cross compiler support of noreturn (noreturn on GCC and VC ok). Tailcalling and noreturn optimizations of the C compiler are heavily used in this commit.
Diffstat (limited to 'win32/perlhost.h')
-rw-r--r--win32/perlhost.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/win32/perlhost.h b/win32/perlhost.h
index 3f18126f5d..7b3f0379c5 100644
--- a/win32/perlhost.h
+++ b/win32/perlhost.h
@@ -1278,8 +1278,7 @@ PerlSockGethostbyname(struct IPerlSock* piPerl, const char* name)
struct hostent*
PerlSockGethostent(struct IPerlSock* piPerl)
{
- dTHX;
- Perl_croak(aTHX_ "gethostent not implemented!\n");
+ win32_croak_not_implemented("gethostent");
return NULL;
}
@@ -1861,7 +1860,7 @@ PerlProcFork(struct IPerlProc* piPerl)
# endif
return -(int)id;
#else
- Perl_croak(aTHX_ "fork() not implemented!\n");
+ win32_croak_not_implemented("fork()");
return -1;
#endif /* USE_ITHREADS */
}