Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
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
Christopher Ng
OpenLDAP
Commits
aab546e5
Commit
aab546e5
authored
25 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
Fix nargs tests for gethostby{name,addr}_r to handle no prototype case.
parent
ae302ec7
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
build/openldap.m4
+55
-21
55 additions, 21 deletions
build/openldap.m4
configure
+483
-449
483 additions, 449 deletions
configure
with
538 additions
and
470 deletions
build/openldap.m4
+
55
−
21
View file @
aab546e5
...
...
@@ -965,19 +965,36 @@ AC_DEFUN(OL_FUNC_GETHOSTBYNAME_R_NARGS,
int bufsize=BUFSIZE;int h_errno;
(void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
buffer, bufsize, &h_errno);],
ol_cv_func_gethostbyname_r_nargs=5,
[AC_TRY_COMPILE([#include <sys/types.h>
ol_cv_func_gethostbyname_r_nargs5=yes,
ol_cv_func_gethostbyname_r_nargs5=no)
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#define BUFSIZE (sizeof(struct hostent)+10)],
[struct hostent hent;struct hostent *rhent;
char buffer[BUFSIZE];
int bufsize=BUFSIZE;int h_errno;
(void)gethostbyname_r("localhost", &hent, buffer, bufsize,
&rhent, &h_errno);],
ol_cv_func_gethostbyname_r_nargs=6,
ol_cv_func_gethostbyname_r_nargs=0)])])
[struct hostent hent;struct hostent *rhent;
char buffer[BUFSIZE];
int bufsize=BUFSIZE;int h_errno;
(void)gethostbyname_r("localhost", &hent, buffer, bufsize,
&rhent, &h_errno);],
ol_cv_func_gethostbyname_r_nargs6=yes,
ol_cv_func_gethostbyname_r_nargs6=no)
if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
$ol_cv_func_gethostbyname_r_nargs6 = no ; then
ol_cv_func_gethostbyname_r_nargs=5
elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
$ol_cv_func_gethostbyname_r_nargs6 = yes ; then
ol_cv_func_gethostbyname_r_nargs=6
else
ol_cv_func_gethostbyname_r_nargs=0
fi
])
if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
AC_DEFINE_UNQUOTED(GETHOSTBYNAME_R_NARGS,
$ol_cv_func_gethostbyname_r_nargs,
...
...
@@ -1000,22 +1017,39 @@ AC_DEFUN(OL_FUNC_GETHOSTBYADDR_R_NARGS,
int bufsize=BUFSIZE;int h_errno;
(void)gethostbyaddr_r( (void *)&(add.s_addr),
alen, AF_INET, &hent, buffer, bufsize, &h_errno);],
ol_cv_func_gethostbyaddr_r_nargs=7,
[AC_TRY_COMPILE([#include <sys/types.h>
ol_cv_func_gethostbyaddr_r_nargs7=yes,
ol_cv_func_gethostbyaddr_r_nargs7=no)
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#define BUFSIZE (sizeof(struct hostent)+10)],
[struct hostent hent;
struct hostent *rhent; char buffer[BUFSIZE];
struct in_addr add;
size_t alen=sizeof(struct in_addr);
int bufsize=BUFSIZE;int h_errno;
(void)gethostbyaddr_r( (void *)&(add.s_addr),
alen, AF_INET, &hent, buffer, bufsize,
&rhent, &h_errno);],
ol_cv_func_gethostbyaddr_r_nargs=8,
ol_cv_func_gethostbyaddr_r_nargs=0)])])
[struct hostent hent;
struct hostent *rhent; char buffer[BUFSIZE];
struct in_addr add;
size_t alen=sizeof(struct in_addr);
int bufsize=BUFSIZE;int h_errno;
(void)gethostbyaddr_r( (void *)&(add.s_addr),
alen, AF_INET, &hent, buffer, bufsize,
&rhent, &h_errno);],
ol_cv_func_gethostbyaddr_r_nargs8=yes,
ol_cv_func_gethostbyaddr_r_nargs8=no)
if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
$ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
ol_cv_func_gethostbyname_r_nargs=7
elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
$ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
ol_cv_func_gethostbyaddr_r_nargs=8
else
ol_cv_func_gethostbyaddr_r_nargs=0
fi
])
if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
AC_DEFINE_UNQUOTED(GETHOSTBYADDR_R_NARGS,
$ol_cv_func_gethostbyaddr_r_nargs,
...
...
This diff is collapsed.
Click to expand it.
configure
+
483
−
449
View file @
aab546e5
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