From: Kurt Zeilenga Date: Sat, 6 Mar 1999 07:52:33 +0000 (+0000) Subject: defined USE_NONBLOCK for now... need to implement configure detection. X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~459 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=94fea2a17e385b442325e623da8ee5adc81b17b6;p=openldap defined USE_NONBLOCK for now... need to implement configure detection. rewrote sockbuf_buf_init macro not to expand its argument multiple times. --- diff --git a/libraries/liblber/sockbuf.c b/libraries/liblber/sockbuf.c index 574c3f2c75..827367757c 100644 --- a/libraries/liblber/sockbuf.c +++ b/libraries/liblber/sockbuf.c @@ -564,6 +564,7 @@ int lber_pvt_sb_set_readahead( Sockbuf *sb, int rh ) return 0; } +#define USE_NONBLOCK #ifdef USE_NONBLOCK int lber_pvt_sb_set_nonblock( Sockbuf *sb, int nb ) { @@ -589,11 +590,13 @@ int lber_pvt_sb_set_nonblock( Sockbuf *sb, int nb ) } #endif -#define sockbuf_buf_init( bb ) \ -(bb)->buf_base=NULL;\ -(bb)->buf_ptr = 0;\ -(bb)->buf_end = 0;\ -(bb)->buf_size = 0; +#define sockbuf_buf_init( bb ) do { \ + Sockbuf_Buf *sbb = (bb); \ + sbb->buf_base = NULL; \ + sbb->buf_ptr = 0; \ + sbb->buf_end = 0; \ + sbb->buf_size = 0; \ + } while(0) static int sockbuf_buf_destroy( Sockbuf_Buf *buf )