Module: wine Branch: master Commit: f93e53c94b0c36a277fed93740af463c5e3a8dec URL: https://gitlab.winehq.org/wine/wine/-/commit/f93e53c94b0c36a277fed93740af463...
Author: Alexandre Julliard julliard@winehq.org Date: Sat Mar 11 18:30:53 2023 +0100
ldap: Import upstream release 2.5.14.
---
libs/ldap/include/ac/socket.h | 24 +++++++++++------------- libs/ldap/include/ldap_pvt_thread.h | 3 ++- libs/ldap/liblber/bprint.c | 6 +++--- libs/ldap/libldap/filter.c | 2 ++ libs/ldap/libldap/request.c | 10 +++++----- 5 files changed, 23 insertions(+), 22 deletions(-)
diff --git a/libs/ldap/include/ac/socket.h b/libs/ldap/include/ac/socket.h index e2d32afb3a8..e457d4ba754 100644 --- a/libs/ldap/include/ac/socket.h +++ b/libs/ldap/include/ac/socket.h @@ -63,7 +63,7 @@ #ifdef HAVE_WINSOCK2 #include <winsock2.h> #include <ws2tcpip.h> -#elif HAVE_WINSOCK +#elif defined(HAVE_WINSOCK) #include <winsock.h> #endif
@@ -114,22 +114,20 @@
LBER_F( char * ) ber_pvt_wsa_err2string LDAP_P((int));
-#elif MACOS +#elif defined(MACOS) # define tcp_close( s ) tcpclose( s ) # define tcp_read( s, buf, len ) tcpread( s, buf, len ) # define tcp_write( s, buf, len ) tcpwrite( s, buf, len )
-#elif DOS -# ifdef PCNFS -# define tcp_close( s ) close( s ) -# define tcp_read( s, buf, len ) recv( s, buf, len, 0 ) -# define tcp_write( s, buf, len ) send( s, buf, len, 0 ) -# endif /* PCNFS */ -# ifdef NCSA -# define tcp_close( s ) do { netclose( s ); netshut() } while(0) -# define tcp_read( s, buf, len ) nread( s, buf, len ) -# define tcp_write( s, buf, len ) netwrite( s, buf, len ) -# endif /* NCSA */ +#elif defined(HAVE_PCNFS) +# define tcp_close( s ) close( s ) +# define tcp_read( s, buf, len ) recv( s, buf, len, 0 ) +# define tcp_write( s, buf, len ) send( s, buf, len, 0 ) + +#elif defined(HAVE_NCSA) +# define tcp_close( s ) do { netclose( s ); netshut() } while(0) +# define tcp_read( s, buf, len ) nread( s, buf, len ) +# define tcp_write( s, buf, len ) netwrite( s, buf, len )
#elif defined(HAVE_CLOSESOCKET) # define tcp_close( s ) closesocket( s ) diff --git a/libs/ldap/include/ldap_pvt_thread.h b/libs/ldap/include/ldap_pvt_thread.h index 18462ab57b5..5a9bd27a9c8 100644 --- a/libs/ldap/include/ldap_pvt_thread.h +++ b/libs/ldap/include/ldap_pvt_thread.h @@ -253,7 +253,8 @@ typedef enum { LDAP_PVT_THREAD_POOL_PARAM_ACTIVE_MAX, LDAP_PVT_THREAD_POOL_PARAM_PENDING_MAX, LDAP_PVT_THREAD_POOL_PARAM_BACKLOAD_MAX, - LDAP_PVT_THREAD_POOL_PARAM_STATE + LDAP_PVT_THREAD_POOL_PARAM_STATE, + LDAP_PVT_THREAD_POOL_PARAM_PAUSED } ldap_pvt_thread_pool_param_t; #endif /* !LDAP_PVT_THREAD_H_DONE */
diff --git a/libs/ldap/liblber/bprint.c b/libs/ldap/liblber/bprint.c index 50f0af2d3fe..da5003a82f9 100644 --- a/libs/ldap/liblber/bprint.c +++ b/libs/ldap/liblber/bprint.c @@ -266,9 +266,9 @@ ber_dump( }
sprintf( buf, "ber_dump: buf=%p ptr=%p end=%p len=%ld\n", - ber->ber_buf, - ber->ber_ptr, - ber->ber_end, + (void *) ber->ber_buf, + (void *) ber->ber_ptr, + (void *) ber->ber_end, (long) len );
(void) (*ber_pvt_log_print)( buf ); diff --git a/libs/ldap/libldap/filter.c b/libs/ldap/libldap/filter.c index 5eb54583b58..2331171fb80 100644 --- a/libs/ldap/libldap/filter.c +++ b/libs/ldap/libldap/filter.c @@ -555,6 +555,8 @@ put_simple_filter( Debug1( LDAP_DEBUG_TRACE, "put_simple_filter: "%s"\n", str );
+ if ( str[0] == '=' ) return -1; + str = LDAP_STRDUP( str ); if( str == NULL ) return -1;
diff --git a/libs/ldap/libldap/request.c b/libs/ldap/libldap/request.c index ad5872e41aa..4709768379d 100644 --- a/libs/ldap/libldap/request.c +++ b/libs/ldap/libldap/request.c @@ -961,7 +961,7 @@ ldap_do_free_request( void *arg )
Debug3( LDAP_DEBUG_TRACE, "ldap_do_free_request: " "asked to free lr %p msgid %d refcnt %d\n", - lr, lr->lr_msgid, lr->lr_refcnt ); + (void *) lr, lr->lr_msgid, lr->lr_refcnt ); /* if lr_refcnt > 0, the request has been looked up * by ldap_find_request_by_msgid(); if in the meanwhile * the request is free()'d by someone else, just decrease @@ -1008,7 +1008,7 @@ ldap_free_request_int( LDAP *ld, LDAPRequest *lr ) assert( !removed || removed == lr ); Debug3( LDAP_DEBUG_TRACE, "ldap_free_request_int: " "lr %p msgid %d%s removed\n", - lr, lr->lr_msgid, removed ? "" : " not" ); + (void *) lr, lr->lr_msgid, removed ? "" : " not" );
ldap_do_free_request( lr ); } @@ -1673,12 +1673,12 @@ ldap_find_request_by_msgid( LDAP *ld, ber_int_t msgid ) lr->lr_refcnt++; Debug3( LDAP_DEBUG_TRACE, "ldap_find_request_by_msgid: " "msgid %d, lr %p lr->lr_refcnt = %d\n", - msgid, lr, lr->lr_refcnt ); + msgid, (void *) lr, lr->lr_refcnt ); return lr; }
Debug2( LDAP_DEBUG_TRACE, "ldap_find_request_by_msgid: " - "msgid %d, lr %p\n", msgid, lr ); + "msgid %d, lr %p\n", msgid, (void *) lr ); return NULL; }
@@ -1690,7 +1690,7 @@ ldap_return_request( LDAP *ld, LDAPRequest *lrx, int freeit )
lr = ldap_tavl_find( ld->ld_requests, lrx, ldap_req_cmp ); Debug2( LDAP_DEBUG_TRACE, "ldap_return_request: " - "lrx %p, lr %p\n", lrx, lr ); + "lrx %p, lr %p\n", (void *) lrx, (void *) lr ); if ( lr ) { assert( lr == lrx ); if ( lr->lr_refcnt > 0 ) {