mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 06:41:13 +02:00
* net_db.c (scm_resolv_error): Cast result from hstrerror.
This commit is contained in:
parent
e7a96050f2
commit
d9b6c17032
1 changed files with 5 additions and 6 deletions
|
@ -87,9 +87,8 @@ SCM_DEFINE (scm_inet_aton, "inet-aton", 1, 0, 0,
|
||||||
"Converts a string containing an Internet host address in the traditional\n"
|
"Converts a string containing an Internet host address in the traditional\n"
|
||||||
"dotted decimal notation into an integer.\n\n"
|
"dotted decimal notation into an integer.\n\n"
|
||||||
"@smalllisp\n"
|
"@smalllisp\n"
|
||||||
"(inet-aton "127.0.0.1") @result{} 2130706433
|
"(inet-aton \"127.0.0.1\") @result{} 2130706433\n\n"
|
||||||
|
"@end smalllisp")
|
||||||
@end smalllisp")
|
|
||||||
#define FUNC_NAME s_scm_inet_aton
|
#define FUNC_NAME s_scm_inet_aton
|
||||||
{
|
{
|
||||||
struct in_addr soka;
|
struct in_addr soka;
|
||||||
|
@ -109,8 +108,8 @@ SCM_DEFINE (scm_inet_ntoa, "inet-ntoa", 1, 0, 0,
|
||||||
"Converts an integer Internet host address into a string with the\n"
|
"Converts an integer Internet host address into a string with the\n"
|
||||||
"traditional dotted decimal representation.\n\n"
|
"traditional dotted decimal representation.\n\n"
|
||||||
"@smalllisp\n"
|
"@smalllisp\n"
|
||||||
"(inet-ntoa 2130706433) @result{} "127.0.0.1"
|
"(inet-ntoa 2130706433) @result{} \"127.0.0.1\""
|
||||||
@end smalllisp")
|
"@end smalllisp")
|
||||||
#define FUNC_NAME s_scm_inet_ntoa
|
#define FUNC_NAME s_scm_inet_ntoa
|
||||||
{
|
{
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
|
@ -224,7 +223,7 @@ static void scm_resolv_error (const char *subr, SCM bad_value)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_HSTRERROR
|
#ifdef HAVE_HSTRERROR
|
||||||
errmsg = hstrerror (h_errno);
|
errmsg = (const char *) hstrerror (h_errno);
|
||||||
#endif
|
#endif
|
||||||
scm_error (key, subr, errmsg, scm_cons (bad_value, SCM_EOL), SCM_EOL);
|
scm_error (key, subr, errmsg, scm_cons (bad_value, SCM_EOL), SCM_EOL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue