Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
54e49d10
Commit
54e49d10
authored
16 years ago
by
Yang Tse
Browse files
Options
Downloads
Patches
Plain Diff
attempt to make work the gethostname function
check for winsock build target configurations
parent
ef758298
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ares/m4/cares-functions.m4
+39
-2
39 additions, 2 deletions
ares/m4/cares-functions.m4
m4/curl-functions.m4
+39
-2
39 additions, 2 deletions
m4/curl-functions.m4
with
78 additions
and
4 deletions
ares/m4/cares-functions.m4
+
39
−
2
View file @
54e49d10
...
...
@@ -16,7 +16,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
# serial
5
# serial
7
dnl CARES_INCLUDES_NETDB
...
...
@@ -106,6 +106,34 @@ cares_includes_unistd="\
])
dnl CARES_INCLUDES_WINSOCK2
dnl -------------------------------------------------
dnl Set up variable with list of headers that must be
dnl included when winsock(2).h is to be included.
AC_DEFUN([CARES_INCLUDES_WINSOCK2], [
cares_includes_winsock2="\
/* includes start */
#ifdef HAVE_WINDOWS_H
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h>
# ifdef HAVE_WINSOCK2_H
# include <winsock2.h>
# else
# ifdef HAVE_WINSOCK_H
# include <winsock.h>
# endif
# endif
#endif
/* includes end */"
CURL_CHECK_HEADER_WINDOWS
CURL_CHECK_HEADER_WINSOCK
CURL_CHECK_HEADER_WINSOCK2
])
dnl CARES_CHECK_FUNC_GETHOSTNAME
dnl -------------------------------------------------
dnl Verify if gethostname is available, prototyped, and
...
...
@@ -115,6 +143,7 @@ dnl shell variable cares_disallow_gethostname, then
dnl HAVE_GETHOSTNAME will be defined.
AC_DEFUN([CARES_CHECK_FUNC_GETHOSTNAME], [
AC_REQUIRE([CARES_INCLUDES_WINSOCK2])dnl
AC_REQUIRE([CARES_INCLUDES_UNISTD])dnl
#
tst_links_gethostname="unknown"
...
...
@@ -124,7 +153,13 @@ AC_DEFUN([CARES_CHECK_FUNC_GETHOSTNAME], [
#
AC_MSG_CHECKING([if gethostname can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([gethostname])
AC_LANG_PROGRAM([[
$cares_includes_winsock2
$cares_includes_unistd
]],[[
if(0 != gethostname(0, 0))
return 1;
]])
],[
AC_MSG_RESULT([yes])
tst_links_gethostname="yes"
...
...
@@ -136,6 +171,7 @@ AC_DEFUN([CARES_CHECK_FUNC_GETHOSTNAME], [
if test "$tst_links_gethostname" = "yes"; then
AC_MSG_CHECKING([if gethostname is prototyped])
AC_EGREP_CPP([gethostname],[
$cares_includes_winsock2
$cares_includes_unistd
],[
AC_MSG_RESULT([yes])
...
...
@@ -150,6 +186,7 @@ AC_DEFUN([CARES_CHECK_FUNC_GETHOSTNAME], [
AC_MSG_CHECKING([if gethostname is compilable])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
$cares_includes_winsock2
$cares_includes_unistd
]],[[
if(0 != gethostname(0, 0))
...
...
This diff is collapsed.
Click to expand it.
m4/curl-functions.m4
+
39
−
2
View file @
54e49d10
...
...
@@ -22,7 +22,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
# serial
13
# serial
20
dnl CURL_INCLUDES_NETDB
...
...
@@ -204,6 +204,34 @@ curl_includes_unistd="\
])
dnl CURL_INCLUDES_WINSOCK2
dnl -------------------------------------------------
dnl Set up variable with list of headers that must be
dnl included when winsock(2).h is to be included.
AC_DEFUN([CURL_INCLUDES_WINSOCK2], [
curl_includes_winsock2="\
/* includes start */
#ifdef HAVE_WINDOWS_H
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h>
# ifdef HAVE_WINSOCK2_H
# include <winsock2.h>
# else
# ifdef HAVE_WINSOCK_H
# include <winsock.h>
# endif
# endif
#endif
/* includes end */"
CURL_CHECK_HEADER_WINDOWS
CURL_CHECK_HEADER_WINSOCK
CURL_CHECK_HEADER_WINSOCK2
])
dnl CURL_CHECK_FUNC_ALARM
dnl -------------------------------------------------
dnl Verify if alarm is available, prototyped, and
...
...
@@ -752,6 +780,7 @@ dnl shell variable curl_disallow_gethostname, then
dnl HAVE_GETHOSTNAME will be defined.
AC_DEFUN([CURL_CHECK_FUNC_GETHOSTNAME], [
AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
AC_REQUIRE([CURL_INCLUDES_UNISTD])dnl
#
tst_links_gethostname="unknown"
...
...
@@ -761,7 +790,13 @@ AC_DEFUN([CURL_CHECK_FUNC_GETHOSTNAME], [
#
AC_MSG_CHECKING([if gethostname can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([gethostname])
AC_LANG_PROGRAM([[
$curl_includes_winsock2
$curl_includes_unistd
]],[[
if(0 != gethostname(0, 0))
return 1;
]])
],[
AC_MSG_RESULT([yes])
tst_links_gethostname="yes"
...
...
@@ -773,6 +808,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETHOSTNAME], [
if test "$tst_links_gethostname" = "yes"; then
AC_MSG_CHECKING([if gethostname is prototyped])
AC_EGREP_CPP([gethostname],[
$curl_includes_winsock2
$curl_includes_unistd
],[
AC_MSG_RESULT([yes])
...
...
@@ -787,6 +823,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETHOSTNAME], [
AC_MSG_CHECKING([if gethostname is compilable])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
$curl_includes_winsock2
$curl_includes_unistd
]],[[
if(0 != gethostname(0, 0))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment