Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
a8497048
Commit
a8497048
authored
Oct 16, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Support for glibc IDN
- Run-time check for IDN
parent
f9d4021d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
7 deletions
+25
-7
include/network.h
include/network.h
+0
-6
src/misc/getaddrinfo.c
src/misc/getaddrinfo.c
+25
-1
No files found.
include/network.h
View file @
a8497048
...
...
@@ -484,12 +484,6 @@ struct addrinfo
# define AI_NUMERICHOST 4
# endif
/* if !HAVE_STRUCT_ADDRINFO */
/*** libidn support ***/
# ifndef AI_IDN
# define AI_IDN 0
# define AI_CANONIDN 0
# endif
VLC_EXPORT
(
const
char
*
,
vlc_gai_strerror
,
(
int
)
);
VLC_EXPORT
(
int
,
vlc_getnameinfo
,
(
const
struct
sockaddr
*
,
int
,
char
*
,
int
,
int
*
,
int
)
);
VLC_EXPORT
(
int
,
vlc_getaddrinfo
,
(
vlc_object_t
*
,
const
char
*
,
int
,
const
struct
addrinfo
*
,
struct
addrinfo
**
)
);
...
...
src/misc/getaddrinfo.c
View file @
a8497048
...
...
@@ -638,7 +638,7 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
struct
addrinfo
**
);
HINSTANCE
wship6_module
;
GETADDRINFO
ws2_getaddrinfo
;
wship6_module
=
LoadLibrary
(
"wship6.dll"
);
if
(
wship6_module
!=
NULL
)
{
...
...
@@ -659,6 +659,30 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
}
#endif
#if defined( HAVE_GETADDRINFO ) || defined( UNDER_CE )
# ifdef AI_IDN
/* Run-time I18n Domain Names support */
{
static
int
i_idn
=
AI_IDN
;
/* beware of thread-safety */
if
(
i_idn
)
{
int
i_ret
;
hints
.
ai_flags
|=
i_idn
;
i_ret
=
getaddrinfo
(
psz_node
,
psz_service
,
&
hints
,
res
);
if
(
i_ret
!=
EAI_BADFLAGS
)
return
i_ret
;
/* libidn not available: disable and retry without it */
/* NOTE: Using i_idn here would not be thread-safe */
hints
.
ai_flags
&=
~
AI_IDN
;
i_idn
=
0
;
msg_Dbg
(
p_this
,
"I18n Domain Names not supported - disabled"
);
}
}
# endif
return
getaddrinfo
(
psz_node
,
psz_service
,
&
hints
,
res
);
#else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment