mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
detect write() and use HAVE_WRITE instead of
!defined( DOS ) && !defined( MACOS ) Add detection for read & recv/send for later use.
This commit is contained in:
parent
dcf9209ae3
commit
5f28509311
4 changed files with 33 additions and 13 deletions
28
configure
vendored
28
configure
vendored
|
|
@ -11684,6 +11684,7 @@ for ac_func in \
|
||||||
memcpy \
|
memcpy \
|
||||||
memmove \
|
memmove \
|
||||||
mkstemp \
|
mkstemp \
|
||||||
|
read \
|
||||||
recv \
|
recv \
|
||||||
recvfrom \
|
recvfrom \
|
||||||
setpwfile \
|
setpwfile \
|
||||||
|
|
@ -11707,15 +11708,18 @@ for ac_func in \
|
||||||
sysconf \
|
sysconf \
|
||||||
waitpid \
|
waitpid \
|
||||||
wait4 \
|
wait4 \
|
||||||
|
write \
|
||||||
|
send \
|
||||||
|
sendto \
|
||||||
|
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:11714: checking for $ac_func" >&5
|
echo "configure:11718: checking for $ac_func" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 11719 "configure"
|
#line 11723 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char $ac_func(); below. */
|
which can conflict with char $ac_func(); below. */
|
||||||
|
|
@ -11738,7 +11742,7 @@ $ac_func();
|
||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:11742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:11746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_$ac_func=yes"
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
else
|
else
|
||||||
|
|
@ -11766,12 +11770,12 @@ done
|
||||||
for ac_func in getopt tempnam
|
for ac_func in getopt tempnam
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:11770: checking for $ac_func" >&5
|
echo "configure:11774: checking for $ac_func" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 11775 "configure"
|
#line 11779 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char $ac_func(); below. */
|
which can conflict with char $ac_func(); below. */
|
||||||
|
|
@ -11794,7 +11798,7 @@ $ac_func();
|
||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:11798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:11802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_$ac_func=yes"
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
else
|
else
|
||||||
|
|
@ -11824,13 +11828,13 @@ done
|
||||||
# Check Configuration
|
# Check Configuration
|
||||||
|
|
||||||
echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
|
echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
|
||||||
echo "configure:11828: checking declaration of sys_errlist" >&5
|
echo "configure:11832: checking declaration of sys_errlist" >&5
|
||||||
if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 11834 "configure"
|
#line 11838 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
@ -11840,7 +11844,7 @@ int main() {
|
||||||
char *c = (char *) *sys_errlist
|
char *c = (char *) *sys_errlist
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:11844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:11848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
ol_cv_dcl_sys_errlist=yes
|
ol_cv_dcl_sys_errlist=yes
|
||||||
else
|
else
|
||||||
|
|
@ -11860,20 +11864,20 @@ if test $ol_cv_dcl_sys_errlist = no ; then
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
|
echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
|
||||||
echo "configure:11864: checking existence of sys_errlist" >&5
|
echo "configure:11868: checking existence of sys_errlist" >&5
|
||||||
if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 11870 "configure"
|
#line 11874 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
int main() {
|
int main() {
|
||||||
char *c = (char *) *sys_errlist
|
char *c = (char *) *sys_errlist
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:11877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:11881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
ol_cv_have_sys_errlist=yes
|
ol_cv_have_sys_errlist=yes
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -1748,6 +1748,7 @@ AC_CHECK_FUNCS( \
|
||||||
memcpy \
|
memcpy \
|
||||||
memmove \
|
memmove \
|
||||||
mkstemp \
|
mkstemp \
|
||||||
|
read \
|
||||||
recv \
|
recv \
|
||||||
recvfrom \
|
recvfrom \
|
||||||
setpwfile \
|
setpwfile \
|
||||||
|
|
@ -1771,6 +1772,9 @@ AC_CHECK_FUNCS( \
|
||||||
sysconf \
|
sysconf \
|
||||||
waitpid \
|
waitpid \
|
||||||
wait4 \
|
wait4 \
|
||||||
|
write \
|
||||||
|
send \
|
||||||
|
sendto \
|
||||||
)
|
)
|
||||||
|
|
||||||
dnl We actually may need to replace more than this.
|
dnl We actually may need to replace more than this.
|
||||||
|
|
|
||||||
|
|
@ -332,6 +332,9 @@
|
||||||
/* Define if you have the pthread_yield function. */
|
/* Define if you have the pthread_yield function. */
|
||||||
#undef HAVE_PTHREAD_YIELD
|
#undef HAVE_PTHREAD_YIELD
|
||||||
|
|
||||||
|
/* Define if you have the read function. */
|
||||||
|
#undef HAVE_READ
|
||||||
|
|
||||||
/* Define if you have the recv function. */
|
/* Define if you have the recv function. */
|
||||||
#undef HAVE_RECV
|
#undef HAVE_RECV
|
||||||
|
|
||||||
|
|
@ -344,6 +347,12 @@
|
||||||
/* Define if you have the sched_yield function. */
|
/* Define if you have the sched_yield function. */
|
||||||
#undef HAVE_SCHED_YIELD
|
#undef HAVE_SCHED_YIELD
|
||||||
|
|
||||||
|
/* Define if you have the send function. */
|
||||||
|
#undef HAVE_SEND
|
||||||
|
|
||||||
|
/* Define if you have the sendto function. */
|
||||||
|
#undef HAVE_SENDTO
|
||||||
|
|
||||||
/* Define if you have the setegid function. */
|
/* Define if you have the setegid function. */
|
||||||
#undef HAVE_SETEGID
|
#undef HAVE_SETEGID
|
||||||
|
|
||||||
|
|
@ -425,6 +434,9 @@
|
||||||
/* Define if you have the waitpid function. */
|
/* Define if you have the waitpid function. */
|
||||||
#undef HAVE_WAITPID
|
#undef HAVE_WAITPID
|
||||||
|
|
||||||
|
/* Define if you have the write function. */
|
||||||
|
#undef HAVE_WRITE
|
||||||
|
|
||||||
/* Define if you have the <arpa/inet.h> header file. */
|
/* Define if you have the <arpa/inet.h> header file. */
|
||||||
#undef HAVE_ARPA_INET_H
|
#undef HAVE_ARPA_INET_H
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -236,7 +236,7 @@ ber_flush( Sockbuf *sb, BerElement *ber, int freeit )
|
||||||
ber->ber_rwptr, towrite );
|
ber->ber_rwptr, towrite );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_WRITE || (!defined(MACOS) && !(defined(DOS) && !defined(_WIN32)))
|
#if HAVE_WRITE
|
||||||
if ( sb->sb_options & (LBER_TO_FILE | LBER_TO_FILE_ONLY) ) {
|
if ( sb->sb_options & (LBER_TO_FILE | LBER_TO_FILE_ONLY) ) {
|
||||||
rc = write( sb->sb_fd, ber->ber_rwptr, towrite );
|
rc = write( sb->sb_fd, ber->ber_rwptr, towrite );
|
||||||
if ( sb->sb_options & LBER_TO_FILE_ONLY ) {
|
if ( sb->sb_options & LBER_TO_FILE_ONLY ) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue