Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
383391b4
Commit
383391b4
authored
May 03, 2001
by
Kurt Zeilenga
Browse files
detect and use fcntl (for BSD/OS)
detect inet_ntop (for MacOSX)
parent
00c645b9
Changes
7
Hide whitespace changes
Inline
Side-by-side
clients/tools/ldapsearch.c
View file @
383391b4
...
...
@@ -1075,7 +1075,8 @@ print_entry(
continue
;
}
if
((
tmpfd
=
open
(
tmpfname
,
O_WRONLY
|
O_CREAT
|
O_EXCL
,
0600
))
==
-
1
)
{
tmpfd
=
open
(
tmpfname
,
O_WRONLY
|
O_CREAT
|
O_EXCL
,
0600
);
if
(
tmpfd
==
-
1
)
{
perror
(
tmpfname
);
continue
;
}
...
...
configure
View file @
383391b4
#! /bin/sh
# $OpenLDAP$
# from OpenLDAP: pkg/ldap/configure.in,v 1.35
1
2001/0
1/22 06:51:26
kurt Exp
# from OpenLDAP: pkg/ldap/configure.in,v 1.35
2
2001/0
5/02 23:13:51
kurt Exp
# Copyright 1998-2000 The OpenLDAP Foundation. All Rights Reserved.
#
...
...
@@ -5823,7 +5823,7 @@ if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
{
echo
"configure: error: DNSSRV requires res_query()"
1>&2
;
exit
1
;
}
fi
for
ac_func
in
getaddrinfo
for
ac_func
in
getaddrinfo
inet_ntop
do
echo
$ac_n
"checking for
$ac_func
""...
$ac_c
"
1>&6
echo
"configure:5830: checking for
$ac_func
"
>
&5
...
...
@@ -5881,9 +5881,9 @@ done
ol_link_ipv6
=
no
if
test
$ac_cv_func_getaddrinfo
=
no
;
then
if
test
$ac_cv_func_getaddrinfo
=
no
-o
$ac_cv_func_inet_ntop
=
no
;
then
if
test
$ol_enable_ipv6
=
yes
;
then
{
echo
"configure: error: IPv6 support requires getaddrinfo()"
1>&2
;
exit
1
;
}
{
echo
"configure: error: IPv6 support requires getaddrinfo()
and inet_ntop()
"
1>&2
;
exit
1
;
}
fi
else
for
ac_func
in
gai_strerror
...
...
@@ -16102,6 +16102,7 @@ for ac_func in \
chroot
\
endgrent
\
endpwent
\
fcntl
\
flock
\
getdtablesize
\
getgrgid
\
...
...
@@ -16149,12 +16150,12 @@ for ac_func in \
do
echo
$ac_n
"checking for
$ac_func
""...
$ac_c
"
1>&6
echo
"configure:1615
3
: checking for
$ac_func
"
>
&5
echo
"configure:1615
4
: checking for
$ac_func
"
>
&5
if
eval
"test
\"\$
{ac_cv_func_
$ac_func
+set}
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 1615
8
"configure"
#line 1615
9
"configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char
$ac_func
(); below. */
...
...
@@ -16178,7 +16179,7 @@ f = $ac_func;
; return 0; }
EOF
if
{
(
eval echo
configure:1618
2
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:1618
3
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
eval
"ac_cv_func_
$ac_func
=yes"
else
...
...
@@ -16206,12 +16207,12 @@ done
for
ac_func
in
getopt tempnam
do
echo
$ac_n
"checking for
$ac_func
""...
$ac_c
"
1>&6
echo
"configure:1621
0
: checking for
$ac_func
"
>
&5
echo
"configure:1621
1
: checking for
$ac_func
"
>
&5
if
eval
"test
\"\$
{ac_cv_func_
$ac_func
+set}
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 1621
5
"configure"
#line 1621
6
"configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char
$ac_func
(); below. */
...
...
@@ -16235,7 +16236,7 @@ f = $ac_func;
; return 0; }
EOF
if
{
(
eval echo
configure:162
39
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:162
40
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
eval
"ac_cv_func_
$ac_func
=yes"
else
...
...
@@ -16272,13 +16273,13 @@ fi
# Check Configuration
echo
$ac_n
"checking declaration of sys_errlist""...
$ac_c
"
1>&6
echo
"configure:1627
6
: checking declaration of sys_errlist"
>
&5
echo
"configure:1627
7
: checking declaration of sys_errlist"
>
&5
if
eval
"test
\"\$
{ol_cv_dcl_sys_errlist+set}
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 1628
2
"configure"
#line 1628
3
"configure"
#include "confdefs.h"
#include <stdio.h>
...
...
@@ -16291,7 +16292,7 @@ int main() {
char *c = (char *) *sys_errlist
; return 0; }
EOF
if
{
(
eval echo
configure:1629
5
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:1629
6
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ol_cv_dcl_sys_errlist
=
yes
ol_cv_have_sys_errlist
=
yes
...
...
@@ -16314,20 +16315,20 @@ EOF
echo
$ac_n
"checking existence of sys_errlist""...
$ac_c
"
1>&6
echo
"configure:1631
8
: checking existence of sys_errlist"
>
&5
echo
"configure:1631
9
: checking existence of sys_errlist"
>
&5
if
eval
"test
\"\$
{ol_cv_have_sys_errlist+set}
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 1632
4
"configure"
#line 1632
5
"configure"
#include "confdefs.h"
#include <errno.h>
int main() {
char *c = (char *) *sys_errlist
; return 0; }
EOF
if
{
(
eval echo
configure:1633
1
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:1633
2
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
ol_cv_have_sys_errlist
=
yes
else
...
...
configure.in
View file @
383391b4
...
...
@@ -823,12 +823,12 @@ fi
dnl ----------------------------------------------------------------
dnl PF_INET6 support requires getaddrinfo and INET6_ADDRSTRLEN
dnl PF_LOCAL may use getaddrinfo in available
AC_CHECK_FUNCS( getaddrinfo )
AC_CHECK_FUNCS( getaddrinfo
inet_ntop
)
ol_link_ipv6=no
if test $ac_cv_func_getaddrinfo = no ; then
if test $ac_cv_func_getaddrinfo = no
-o $ac_cv_func_inet_ntop = no
; then
if test $ol_enable_ipv6 = yes ; then
AC_MSG_ERROR([IPv6 support requires getaddrinfo()])
AC_MSG_ERROR([IPv6 support requires getaddrinfo()
and inet_ntop()
])
fi
else
AC_CHECK_FUNCS( gai_strerror )
...
...
@@ -2166,6 +2166,7 @@ AC_CHECK_FUNCS( \
chroot \
endgrent \
endpwent \
fcntl \
flock \
getdtablesize \
getgrgid \
...
...
include/portable.h.in
View file @
383391b4
...
...
@@ -141,6 +141,9 @@
/* Define if you have the endpwent function. */
#undef HAVE_ENDPWENT
/* Define if you have the fcntl function. */
#undef HAVE_FCNTL
/* Define if you have the flock function. */
#undef HAVE_FLOCK
...
...
@@ -186,6 +189,9 @@
/* Define if you have the gettimeofday function. */
#undef HAVE_GETTIMEOFDAY
/* Define if you have the inet_ntop function. */
#undef HAVE_INET_NTOP
/* Define if you have the initgroups function. */
#undef HAVE_INITGROUPS
...
...
libraries/liblber/sockbuf.c
View file @
383391b4
...
...
@@ -21,6 +21,10 @@
#include <io.h>
#endif
/* HAVE_IO_H */
#if defined( HAVE_FCNTL_H )
#include <fcntl.h>
#endif
#if defined( HAVE_SYS_FILIO_H )
#include <sys/filio.h>
#elif defined( HAVE_SYS_IOCTL_H )
...
...
servers/slapd/daemon.c
View file @
383391b4
...
...
@@ -743,7 +743,7 @@ static Listener * slap_open_listener(
case
AF_INET
:
{
char
*
s
;
#ifdef HAVE_GETADDRINFO
#if
def
ined(
HAVE_GETADDRINFO
) && defined( INET_NTOP )
char
addr
[
INET_ADDRSTRLEN
];
inet_ntop
(
AF_INET
,
&
((
struct
sockaddr_in
*
)
*
sal
)
->
sin_addr
,
addr
,
sizeof
(
addr
)
);
...
...
tests/data/slapd-repl-slave.conf
View file @
383391b4
# $OpenLDAP$
#
#
master
slapd config -- for testing of replication
#
slave
slapd config -- for testing of replication
#
ucdata
-
path
./
ucdata
include
./
schema
/
core
.
schema
...
...
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