diff options
Diffstat (limited to 'win32')
-rw-r--r-- | win32/perlhost.h | 5 | ||||
-rw-r--r-- | win32/win32.c | 11 | ||||
-rw-r--r-- | win32/win32sck.c | 39 |
3 files changed, 24 insertions, 31 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 */ } diff --git a/win32/win32.c b/win32/win32.c index 5a932ca7f6..1686594a3c 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1676,6 +1676,14 @@ out_of_memory(void) exit(1); } +void +win32_croak_not_implemented(const char * fname) +{ + PERL_ARGS_ASSERT_WIN32_CROAK_NOT_IMPLEMENTED; + + Perl_croak_nocontext("%s not implemented!\n", fname); +} + /* Converts a wide character (UTF-16) string to the Windows ANSI code page, * potentially using the system's default replacement character for any * unrepresentable characters. The caller must free() the returned string. */ @@ -2901,8 +2909,7 @@ win32_pipe(int *pfd, unsigned int size, int mode) DllExport PerlIO* win32_popenlist(const char *mode, IV narg, SV **args) { - dTHX; - Perl_croak(aTHX_ "List form of pipe open not implemented"); + Perl_croak_nocontext("List form of pipe open not implemented"); return NULL; } diff --git a/win32/win32sck.c b/win32/win32sck.c index 9032a6d7f5..4285b29e27 100644 --- a/win32/win32sck.c +++ b/win32/win32sck.c @@ -596,101 +596,88 @@ win32_inet_addr(const char FAR *cp) void win32_endhostent() { - dTHX; - Perl_croak_nocontext("endhostent not implemented!\n"); + win32_croak_not_implemented("endhostent"); } void win32_endnetent() { - dTHX; - Perl_croak_nocontext("endnetent not implemented!\n"); + win32_croak_not_implemented("endnetent"); } void win32_endprotoent() { - dTHX; - Perl_croak_nocontext("endprotoent not implemented!\n"); + win32_croak_not_implemented("endprotoent"); } void win32_endservent() { - dTHX; - Perl_croak_nocontext("endservent not implemented!\n"); + win32_croak_not_implemented("endservent"); } struct netent * win32_getnetent(void) { - dTHX; - Perl_croak_nocontext("getnetent not implemented!\n"); + win32_croak_not_implemented("getnetent"); return (struct netent *) NULL; } struct netent * win32_getnetbyname(char *name) { - dTHX; - Perl_croak_nocontext("getnetbyname not implemented!\n"); + win32_croak_not_implemented("getnetbyname"); return (struct netent *)NULL; } struct netent * win32_getnetbyaddr(long net, int type) { - dTHX; - Perl_croak_nocontext("getnetbyaddr not implemented!\n"); + win32_croak_not_implemented("getnetbyaddr"); return (struct netent *)NULL; } struct protoent * win32_getprotoent(void) { - dTHX; - Perl_croak_nocontext("getprotoent not implemented!\n"); + win32_croak_not_implemented("getprotoent"); return (struct protoent *) NULL; } struct servent * win32_getservent(void) { - dTHX; - Perl_croak_nocontext("getservent not implemented!\n"); + win32_croak_not_implemented("getservent"); return (struct servent *) NULL; } void win32_sethostent(int stayopen) { - dTHX; - Perl_croak_nocontext("sethostent not implemented!\n"); + win32_croak_not_implemented("sethostent"); } void win32_setnetent(int stayopen) { - dTHX; - Perl_croak_nocontext("setnetent not implemented!\n"); + win32_croak_not_implemented("setnetent"); } void win32_setprotoent(int stayopen) { - dTHX; - Perl_croak_nocontext("setprotoent not implemented!\n"); + win32_croak_not_implemented("setprotoent"); } void win32_setservent(int stayopen) { - dTHX; - Perl_croak_nocontext("setservent not implemented!\n"); + win32_croak_not_implemented("setservent"); } static struct servent* |