Bug 1643561 - Apply M-C clang-format rules to ldap c-sdk. rs=mkmelin
authorBen Campbell <benc@thunderbird.net>
Tue, 23 Jun 2020 13:24:50 +1200
changeset 39482 70337d494218bb7e45d42747d6af462410106a94
parent 39481 9c08c80ec341936cd58f8a8fbdf01a59bec5fd17
child 39483 8b49969122046ae2fbe0644e2993ec754fa0de6f
push id402
push userclokep@gmail.com
push dateMon, 29 Jun 2020 20:48:04 +0000
reviewersmkmelin
bugs1643561
Bug 1643561 - Apply M-C clang-format rules to ldap c-sdk. rs=mkmelin
ldap/c-sdk/include/disptmpl.h
ldap/c-sdk/include/iutil.h
ldap/c-sdk/include/lber.h
ldap/c-sdk/include/lcache.h
ldap/c-sdk/include/ldap-deprecated.h
ldap/c-sdk/include/ldap-extension.h
ldap/c-sdk/include/ldap-standard.h
ldap/c-sdk/include/ldap-to-be-deprecated.h
ldap/c-sdk/include/ldap_ssl.h
ldap/c-sdk/include/ldaplog.h
ldap/c-sdk/include/ldappr.h
ldap/c-sdk/include/ldif.h
ldap/c-sdk/include/portable.h
ldap/c-sdk/include/proto-ntutil.h
ldap/c-sdk/include/regex.h
ldap/c-sdk/include/srchpref.h
ldap/c-sdk/libraries/liblber/bprint.c
ldap/c-sdk/libraries/liblber/decode.c
ldap/c-sdk/libraries/liblber/dtest.c
ldap/c-sdk/libraries/liblber/encode.c
ldap/c-sdk/libraries/liblber/etest.c
ldap/c-sdk/libraries/liblber/idtest.c
ldap/c-sdk/libraries/liblber/io.c
ldap/c-sdk/libraries/liblber/lber-int.h
ldap/c-sdk/libraries/libldap/abandon.c
ldap/c-sdk/libraries/libldap/add.c
ldap/c-sdk/libraries/libldap/authzidctrl.c
ldap/c-sdk/libraries/libldap/bind.c
ldap/c-sdk/libraries/libldap/cache.c
ldap/c-sdk/libraries/libldap/charray.c
ldap/c-sdk/libraries/libldap/charset.c
ldap/c-sdk/libraries/libldap/cldap.c
ldap/c-sdk/libraries/libldap/compare.c
ldap/c-sdk/libraries/libldap/compat.c
ldap/c-sdk/libraries/libldap/control.c
ldap/c-sdk/libraries/libldap/countvalues.c
ldap/c-sdk/libraries/libldap/delete.c
ldap/c-sdk/libraries/libldap/disptmpl.c
ldap/c-sdk/libraries/libldap/dsparse.c
ldap/c-sdk/libraries/libldap/error.c
ldap/c-sdk/libraries/libldap/extendop.c
ldap/c-sdk/libraries/libldap/free.c
ldap/c-sdk/libraries/libldap/freevalues.c
ldap/c-sdk/libraries/libldap/friendly.c
ldap/c-sdk/libraries/libldap/getattr.c
ldap/c-sdk/libraries/libldap/getdn.c
ldap/c-sdk/libraries/libldap/getdxbyname.c
ldap/c-sdk/libraries/libldap/geteffectiverightsctrl.c
ldap/c-sdk/libraries/libldap/getentry.c
ldap/c-sdk/libraries/libldap/getfilter.c
ldap/c-sdk/libraries/libldap/getoption.c
ldap/c-sdk/libraries/libldap/getvalues.c
ldap/c-sdk/libraries/libldap/ldap-int.h
ldap/c-sdk/libraries/libldap/memcache.c
ldap/c-sdk/libraries/libldap/message.c
ldap/c-sdk/libraries/libldap/modify.c
ldap/c-sdk/libraries/libldap/mozock.c
ldap/c-sdk/libraries/libldap/nsprthreadtest.c
ldap/c-sdk/libraries/libldap/open.c
ldap/c-sdk/libraries/libldap/os-ip.c
ldap/c-sdk/libraries/libldap/proxyauthctrl.c
ldap/c-sdk/libraries/libldap/psearch.c
ldap/c-sdk/libraries/libldap/pthreadtest.c
ldap/c-sdk/libraries/libldap/pwmodext.c
ldap/c-sdk/libraries/libldap/pwpctrl.c
ldap/c-sdk/libraries/libldap/referral.c
ldap/c-sdk/libraries/libldap/regex.c
ldap/c-sdk/libraries/libldap/rename.c
ldap/c-sdk/libraries/libldap/request.c
ldap/c-sdk/libraries/libldap/reslist.c
ldap/c-sdk/libraries/libldap/result.c
ldap/c-sdk/libraries/libldap/saslbind.c
ldap/c-sdk/libraries/libldap/saslio.c
ldap/c-sdk/libraries/libldap/sbind.c
ldap/c-sdk/libraries/libldap/search.c
ldap/c-sdk/libraries/libldap/setoption.c
ldap/c-sdk/libraries/libldap/sort.c
ldap/c-sdk/libraries/libldap/sortctrl.c
ldap/c-sdk/libraries/libldap/srchpref.c
ldap/c-sdk/libraries/libldap/test.c
ldap/c-sdk/libraries/libldap/tmplout.c
ldap/c-sdk/libraries/libldap/tmpltest.c
ldap/c-sdk/libraries/libldap/ufn.c
ldap/c-sdk/libraries/libldap/unbind.c
ldap/c-sdk/libraries/libldap/unescape.c
ldap/c-sdk/libraries/libldap/url.c
ldap/c-sdk/libraries/libldap/userstatusctrl.c
ldap/c-sdk/libraries/libldap/vlistctrl.c
ldap/c-sdk/libraries/libldap/whoami.c
ldap/c-sdk/libraries/libldif/line64.c
ldap/c-sdk/libraries/libprldap/ldappr-dns.c
ldap/c-sdk/libraries/libprldap/ldappr-int.h
ldap/c-sdk/libraries/libprldap/ldappr-io.c
ldap/c-sdk/libraries/libprldap/ldappr-public.c
ldap/c-sdk/libraries/libprldap/ldappr-threads.c
--- a/ldap/c-sdk/include/disptmpl.h
+++ b/ldap/c-sdk/include/disptmpl.h
@@ -157,56 +157,56 @@ extern "C" {
 #define LDAP_DITEM_OPT_HIDEIFFALSE 0x00000020L /* booleans only */
 
 /*
  * display template item structure
  */
 struct ldap_tmplitem {
   unsigned long ti_syntaxid;
   unsigned long ti_options;
-  char *ti_attrname;
-  char *ti_label;
-  char **ti_args;
-  struct ldap_tmplitem *ti_next_in_row;
-  struct ldap_tmplitem *ti_next_in_col;
-  void *ti_appdata;
+  char* ti_attrname;
+  char* ti_label;
+  char** ti_args;
+  struct ldap_tmplitem* ti_next_in_row;
+  struct ldap_tmplitem* ti_next_in_col;
+  void* ti_appdata;
 };
 
-#define NULLTMPLITEM ((struct ldap_tmplitem *)0)
+#define NULLTMPLITEM ((struct ldap_tmplitem*)0)
 
-#define LDAP_SET_TMPLITEM_APPDATA(ti, datap) (ti)->ti_appdata = (void *)(datap)
+#define LDAP_SET_TMPLITEM_APPDATA(ti, datap) (ti)->ti_appdata = (void*)(datap)
 
 #define LDAP_GET_TMPLITEM_APPDATA(ti, type) (type)((ti)->ti_appdata)
 
 #define LDAP_IS_TMPLITEM_OPTION_SET(ti, option) \
   (((ti)->ti_options & option) != 0)
 
 /*
  * object class array structure
  */
 struct ldap_oclist {
-  char **oc_objclasses;
-  struct ldap_oclist *oc_next;
+  char** oc_objclasses;
+  struct ldap_oclist* oc_next;
 };
 
-#define NULLOCLIST ((struct ldap_oclist *)0)
+#define NULLOCLIST ((struct ldap_oclist*)0)
 
 /*
  * add defaults list
  */
 struct ldap_adddeflist {
   int ad_source;
 #define LDAP_ADSRC_CONSTANTVALUE 1
 #define LDAP_ADSRC_ADDERSDN 2
-  char *ad_attrname;
-  char *ad_value;
-  struct ldap_adddeflist *ad_next;
+  char* ad_attrname;
+  char* ad_value;
+  struct ldap_adddeflist* ad_next;
 };
 
-#define NULLADLIST ((struct ldap_adddeflist *)0)
+#define NULLADLIST ((struct ldap_adddeflist*)0)
 
 /*
  * display template global options
  * if this bit is set in dt_options, it applies.
  */
 /*
  * users should be allowed to try to add objects of these entries
  */
@@ -221,143 +221,143 @@ struct ldap_adddeflist {
  * this template is an alternate view, not a primary view
  */
 #define LDAP_DTMPL_OPT_ALTVIEW 0x00000004L
 
 /*
  * display template structure
  */
 struct ldap_disptmpl {
-  char *dt_name;
-  char *dt_pluralname;
-  char *dt_iconname;
+  char* dt_name;
+  char* dt_pluralname;
+  char* dt_iconname;
   unsigned long dt_options;
-  char *dt_authattrname;
-  char *dt_defrdnattrname;
-  char *dt_defaddlocation;
-  struct ldap_oclist *dt_oclist;
-  struct ldap_adddeflist *dt_adddeflist;
-  struct ldap_tmplitem *dt_items;
-  void *dt_appdata;
-  struct ldap_disptmpl *dt_next;
+  char* dt_authattrname;
+  char* dt_defrdnattrname;
+  char* dt_defaddlocation;
+  struct ldap_oclist* dt_oclist;
+  struct ldap_adddeflist* dt_adddeflist;
+  struct ldap_tmplitem* dt_items;
+  void* dt_appdata;
+  struct ldap_disptmpl* dt_next;
 };
 
-#define NULLDISPTMPL ((struct ldap_disptmpl *)0)
+#define NULLDISPTMPL ((struct ldap_disptmpl*)0)
 
-#define LDAP_SET_DISPTMPL_APPDATA(dt, datap) (dt)->dt_appdata = (void *)(datap)
+#define LDAP_SET_DISPTMPL_APPDATA(dt, datap) (dt)->dt_appdata = (void*)(datap)
 
 #define LDAP_GET_DISPTMPL_APPDATA(dt, type) (type)((dt)->dt_appdata)
 
 #define LDAP_IS_DISPTMPL_OPTION_SET(dt, option) \
   (((dt)->dt_options & option) != 0)
 
 #define LDAP_TMPL_ERR_VERSION 1
 #define LDAP_TMPL_ERR_MEM 2
 #define LDAP_TMPL_ERR_SYNTAX 3
 #define LDAP_TMPL_ERR_FILE 4
 
 /*
  * buffer size needed for entry2text and vals2text
  */
 #define LDAP_DTMPL_BUFSIZ 8192
 
-typedef int (*writeptype)(void *writeparm, char *p, int len);
+typedef int (*writeptype)(void* writeparm, char* p, int len);
 
 LDAP_API(int)
 LDAP_CALL
-ldap_init_templates(char *file, struct ldap_disptmpl **tmpllistp);
+ldap_init_templates(char* file, struct ldap_disptmpl** tmpllistp);
 
 LDAP_API(int)
 LDAP_CALL
-ldap_init_templates_buf(char *buf, long buflen,
-                        struct ldap_disptmpl **tmpllistp);
+ldap_init_templates_buf(char* buf, long buflen,
+                        struct ldap_disptmpl** tmpllistp);
 
 LDAP_API(void)
 LDAP_CALL
-ldap_free_templates(struct ldap_disptmpl *tmpllist);
+ldap_free_templates(struct ldap_disptmpl* tmpllist);
 
-LDAP_API(struct ldap_disptmpl *)
+LDAP_API(struct ldap_disptmpl*)
 LDAP_CALL
-ldap_first_disptmpl(struct ldap_disptmpl *tmpllist);
+ldap_first_disptmpl(struct ldap_disptmpl* tmpllist);
 
-LDAP_API(struct ldap_disptmpl *)
+LDAP_API(struct ldap_disptmpl*)
 LDAP_CALL
-ldap_next_disptmpl(struct ldap_disptmpl *tmpllist, struct ldap_disptmpl *tmpl);
+ldap_next_disptmpl(struct ldap_disptmpl* tmpllist, struct ldap_disptmpl* tmpl);
 
-LDAP_API(struct ldap_disptmpl *)
+LDAP_API(struct ldap_disptmpl*)
 LDAP_CALL
-ldap_name2template(char *name, struct ldap_disptmpl *tmpllist);
+ldap_name2template(char* name, struct ldap_disptmpl* tmpllist);
 
-LDAP_API(struct ldap_disptmpl *)
+LDAP_API(struct ldap_disptmpl*)
 LDAP_CALL
-ldap_oc2template(char **oclist, struct ldap_disptmpl *tmpllist);
+ldap_oc2template(char** oclist, struct ldap_disptmpl* tmpllist);
 
-LDAP_API(char **)
+LDAP_API(char**)
 LDAP_CALL
-ldap_tmplattrs(struct ldap_disptmpl *tmpl, char **includeattrs, int exclude,
+ldap_tmplattrs(struct ldap_disptmpl* tmpl, char** includeattrs, int exclude,
                unsigned long syntaxmask);
 
-LDAP_API(struct ldap_tmplitem *)
+LDAP_API(struct ldap_tmplitem*)
 LDAP_CALL
-ldap_first_tmplrow(struct ldap_disptmpl *tmpl);
+ldap_first_tmplrow(struct ldap_disptmpl* tmpl);
 
-LDAP_API(struct ldap_tmplitem *)
+LDAP_API(struct ldap_tmplitem*)
 LDAP_CALL
-ldap_next_tmplrow(struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row);
+ldap_next_tmplrow(struct ldap_disptmpl* tmpl, struct ldap_tmplitem* row);
 
-LDAP_API(struct ldap_tmplitem *)
+LDAP_API(struct ldap_tmplitem*)
 LDAP_CALL
-ldap_first_tmplcol(struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row);
+ldap_first_tmplcol(struct ldap_disptmpl* tmpl, struct ldap_tmplitem* row);
 
-LDAP_API(struct ldap_tmplitem *)
+LDAP_API(struct ldap_tmplitem*)
 LDAP_CALL
-ldap_next_tmplcol(struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row,
-                  struct ldap_tmplitem *col);
+ldap_next_tmplcol(struct ldap_disptmpl* tmpl, struct ldap_tmplitem* row,
+                  struct ldap_tmplitem* col);
 
 LDAP_API(int)
 LDAP_CALL
-ldap_entry2text(LDAP *ld, char *buf, LDAPMessage *entry,
-                struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals,
-                writeptype writeproc, void *writeparm, char *eol, int rdncount,
+ldap_entry2text(LDAP* ld, char* buf, LDAPMessage* entry,
+                struct ldap_disptmpl* tmpl, char** defattrs, char*** defvals,
+                writeptype writeproc, void* writeparm, char* eol, int rdncount,
                 unsigned long opts);
 
 LDAP_API(int)
 LDAP_CALL
-ldap_vals2text(LDAP *ld, char *buf, char **vals, char *label, int labelwidth,
-               unsigned long syntaxid, writeptype writeproc, void *writeparm,
-               char *eol, int rdncount);
+ldap_vals2text(LDAP* ld, char* buf, char** vals, char* label, int labelwidth,
+               unsigned long syntaxid, writeptype writeproc, void* writeparm,
+               char* eol, int rdncount);
 
 LDAP_API(int)
 LDAP_CALL
-ldap_entry2text_search(LDAP *ld, char *dn, char *base, LDAPMessage *entry,
-                       struct ldap_disptmpl *tmpllist, char **defattrs,
-                       char ***defvals, writeptype writeproc, void *writeparm,
-                       char *eol, int rdncount, unsigned long opts);
+ldap_entry2text_search(LDAP* ld, char* dn, char* base, LDAPMessage* entry,
+                       struct ldap_disptmpl* tmpllist, char** defattrs,
+                       char*** defvals, writeptype writeproc, void* writeparm,
+                       char* eol, int rdncount, unsigned long opts);
 
 LDAP_API(int)
 LDAP_CALL
-ldap_entry2html(LDAP *ld, char *buf, LDAPMessage *entry,
-                struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals,
-                writeptype writeproc, void *writeparm, char *eol, int rdncount,
-                unsigned long opts, char *urlprefix, char *base);
+ldap_entry2html(LDAP* ld, char* buf, LDAPMessage* entry,
+                struct ldap_disptmpl* tmpl, char** defattrs, char*** defvals,
+                writeptype writeproc, void* writeparm, char* eol, int rdncount,
+                unsigned long opts, char* urlprefix, char* base);
 
 LDAP_API(int)
 LDAP_CALL
-ldap_vals2html(LDAP *ld, char *buf, char **vals, char *label, int labelwidth,
-               unsigned long syntaxid, writeptype writeproc, void *writeparm,
-               char *eol, int rdncount, char *urlprefix);
+ldap_vals2html(LDAP* ld, char* buf, char** vals, char* label, int labelwidth,
+               unsigned long syntaxid, writeptype writeproc, void* writeparm,
+               char* eol, int rdncount, char* urlprefix);
 
 LDAP_API(int)
 LDAP_CALL
-ldap_entry2html_search(LDAP *ld, char *dn, char *base, LDAPMessage *entry,
-                       struct ldap_disptmpl *tmpllist, char **defattrs,
-                       char ***defvals, writeptype writeproc, void *writeparm,
-                       char *eol, int rdncount, unsigned long opts,
-                       char *urlprefix);
+ldap_entry2html_search(LDAP* ld, char* dn, char* base, LDAPMessage* entry,
+                       struct ldap_disptmpl* tmpllist, char** defattrs,
+                       char*** defvals, writeptype writeproc, void* writeparm,
+                       char* eol, int rdncount, unsigned long opts,
+                       char* urlprefix);
 
-LDAP_API(char *)
+LDAP_API(char*)
 LDAP_CALL
 ldap_tmplerr2string(int err);
 
 #ifdef __cplusplus
 }
 #endif
 #endif /* _DISPTMPL_H */
--- a/ldap/c-sdk/include/iutil.h
+++ b/ldap/c-sdk/include/iutil.h
@@ -47,26 +47,26 @@
 extern "C" {
 #endif /* __cplusplus */
 
 /* from iutil-lock.c */
 
 #ifdef _WINDOWS
 #  define LDAP_MUTEX_T HANDLE
 
-extern char *ldap_strdup();
-extern unsigned char *ldap_utf8_nextchar();
-extern char **ldap_explode_ava();
+extern char* ldap_strdup();
+extern unsigned char* ldap_utf8_nextchar();
+extern char** ldap_explode_ava();
 extern int ldap_utf8_toupper();
 
-int pthread_mutex_init(LDAP_MUTEX_T *mp, void *attr);
-static void *pthread_mutex_alloc(void);
-int pthread_mutex_destroy(LDAP_MUTEX_T *mp);
-static void pthread_mutex_free(void *mutexp);
-int pthread_mutex_lock(LDAP_MUTEX_T *mp);
-int pthread_mutex_unlock(LDAP_MUTEX_T *mp);
+int pthread_mutex_init(LDAP_MUTEX_T* mp, void* attr);
+static void* pthread_mutex_alloc(void);
+int pthread_mutex_destroy(LDAP_MUTEX_T* mp);
+static void pthread_mutex_free(void* mutexp);
+int pthread_mutex_lock(LDAP_MUTEX_T* mp);
+int pthread_mutex_unlock(LDAP_MUTEX_T* mp);
 
 #endif /* _WINDOWS */
 
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
 #endif /* _IUTIL_H */
--- a/ldap/c-sdk/include/lber.h
+++ b/ldap/c-sdk/include/lber.h
@@ -107,43 +107,43 @@ extern "C" {
 #define LBER_SOCKBUF_OPT_DESC 0x010
 #define LBER_SOCKBUF_OPT_COPYDESC 0x020
 #define LBER_SOCKBUF_OPT_READ_FN 0x040
 #define LBER_SOCKBUF_OPT_WRITE_FN 0x080
 #define LBER_SOCKBUF_OPT_EXT_IO_FNS 0x100
 #define LBER_SOCKBUF_OPT_VALID_TAG 0x200
 #define LBER_SOCKBUF_OPT_SOCK_ARG 0x400
 
-#define LBER_OPT_ON ((void *)1)
-#define LBER_OPT_OFF ((void *)0)
+#define LBER_OPT_ON ((void*)1)
+#define LBER_OPT_OFF ((void*)0)
 
 typedef unsigned int ber_len_t;  /* for BER len */
 typedef unsigned int ber_tag_t;  /* for BER tags */
 typedef int ber_int_t;           /* for BER ints, enums, and Booleans */
 typedef unsigned int ber_uint_t; /* unsigned equivalent of ber_int_t */
 typedef int ber_slen_t;          /* signed equivalent of ber_len_t */
 
 typedef struct berval {
   ber_len_t bv_len;
-  char *bv_val;
+  char* bv_val;
 } BerValue;
 
 typedef struct berelement BerElement;
 typedef struct sockbuf Sockbuf;
-typedef int (*BERTranslateProc)(char **bufp, ber_uint_t *buflenp,
+typedef int (*BERTranslateProc)(char** bufp, ber_uint_t* buflenp,
                                 int free_input);
 #ifndef macintosh
 #  if defined(_WINDOWS) || defined(_WIN32) || defined(_CONSOLE)
 #    include <winsock.h> /* for SOCKET */
 typedef SOCKET LBER_SOCKET;
 #  else
 typedef long LBER_SOCKET;
 #  endif /* _WINDOWS */
 #else    /* macintosh */
-typedef void *LBER_SOCKET;
+typedef void* LBER_SOCKET;
 #endif   /* macintosh */
 
 /* calling conventions used by library */
 #ifndef LDAP_CALL
 #  if defined(_WINDOWS) || defined(_WIN32)
 #    define LDAP_C __cdecl
 #    ifndef _WIN32
 #      define __stdcall _far _pascal
@@ -176,165 +176,165 @@ typedef void *LBER_SOCKET;
 struct lextiof_socket_private;  /* Defined by the extended I/O */
                                 /* callback functions */
 struct lextiof_session_private; /* Defined by the extended I/O */
                                 /* callback functions */
 
 /* This is modeled after the PRIOVec that is passed to the NSPR
    writev function! The void* is a char* in that struct */
 typedef struct ldap_x_iovec {
-  char *ldapiov_base;
+  char* ldapiov_base;
   int ldapiov_len;
 } ldap_x_iovec;
 
 /*
  * libldap read and write I/O function callbacks.  The rest of the I/O callback
  * types are defined in ldap.h
  */
 typedef int(LDAP_C LDAP_CALLBACK LDAP_IOF_READ_CALLBACK)(LBER_SOCKET s,
-                                                         void *buf,
+                                                         void* buf,
                                                          int bufsize);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_IOF_WRITE_CALLBACK)(LBER_SOCKET s,
-                                                          const void *buf,
+                                                          const void* buf,
                                                           int len);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_X_EXTIOF_READ_CALLBACK)(
-    int s, void *buf, int bufsize, struct lextiof_socket_private *socketarg);
+    int s, void* buf, int bufsize, struct lextiof_socket_private* socketarg);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_X_EXTIOF_WRITE_CALLBACK)(
-    int s, const void *buf, int len, struct lextiof_socket_private *socketarg);
+    int s, const void* buf, int len, struct lextiof_socket_private* socketarg);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_X_EXTIOF_WRITEV_CALLBACK)(
     int s, const ldap_x_iovec iov[], int iovcnt,
-    struct lextiof_socket_private *socketarg);
+    struct lextiof_socket_private* socketarg);
 
 /*
  * Structure for use with LBER_SOCKBUF_OPT_EXT_IO_FNS:
  */
 struct lber_x_ext_io_fns {
   /* lbextiofn_size should always be set to LBER_X_EXTIO_FNS_SIZE */
   int lbextiofn_size;
-  LDAP_X_EXTIOF_READ_CALLBACK *lbextiofn_read;
-  LDAP_X_EXTIOF_WRITE_CALLBACK *lbextiofn_write;
-  struct lextiof_socket_private *lbextiofn_socket_arg;
-  LDAP_X_EXTIOF_WRITEV_CALLBACK *lbextiofn_writev;
+  LDAP_X_EXTIOF_READ_CALLBACK* lbextiofn_read;
+  LDAP_X_EXTIOF_WRITE_CALLBACK* lbextiofn_write;
+  struct lextiof_socket_private* lbextiofn_socket_arg;
+  LDAP_X_EXTIOF_WRITEV_CALLBACK* lbextiofn_writev;
 };
 #define LBER_X_EXTIO_FNS_SIZE sizeof(struct lber_x_ext_io_fns)
 
 /*
  * liblber memory allocation callback functions.  These are global to all
  *  Sockbufs and BerElements.  Install your own functions by using a call
  *  like this: ber_set_option( NULL, LBER_OPT_MEMALLOC_FN_PTRS, &memalloc_fns );
  */
-typedef void *(LDAP_C LDAP_CALLBACK LDAP_MALLOC_CALLBACK)(size_t size);
-typedef void *(LDAP_C LDAP_CALLBACK LDAP_CALLOC_CALLBACK)(size_t nelem,
-                                                          size_t elsize);
-typedef void *(LDAP_C LDAP_CALLBACK LDAP_REALLOC_CALLBACK)(void *ptr,
-                                                           size_t size);
-typedef void(LDAP_C LDAP_CALLBACK LDAP_FREE_CALLBACK)(void *ptr);
+typedef void*(LDAP_C LDAP_CALLBACK LDAP_MALLOC_CALLBACK)(size_t size);
+typedef void*(LDAP_C LDAP_CALLBACK LDAP_CALLOC_CALLBACK)(size_t nelem,
+                                                         size_t elsize);
+typedef void*(LDAP_C LDAP_CALLBACK LDAP_REALLOC_CALLBACK)(void* ptr,
+                                                          size_t size);
+typedef void(LDAP_C LDAP_CALLBACK LDAP_FREE_CALLBACK)(void* ptr);
 
 struct lber_memalloc_fns {
-  LDAP_MALLOC_CALLBACK *lbermem_malloc;
-  LDAP_CALLOC_CALLBACK *lbermem_calloc;
-  LDAP_REALLOC_CALLBACK *lbermem_realloc;
-  LDAP_FREE_CALLBACK *lbermem_free;
+  LDAP_MALLOC_CALLBACK* lbermem_malloc;
+  LDAP_CALLOC_CALLBACK* lbermem_calloc;
+  LDAP_REALLOC_CALLBACK* lbermem_realloc;
+  LDAP_FREE_CALLBACK* lbermem_free;
 };
 
 /*
  * decode routines
  */
-LDAP_API(ber_tag_t) LDAP_CALL ber_get_tag(BerElement *ber);
-LDAP_API(ber_tag_t) LDAP_CALL ber_skip_tag(BerElement *ber, ber_len_t *len);
-LDAP_API(ber_tag_t) LDAP_CALL ber_peek_tag(BerElement *ber, ber_len_t *len);
-LDAP_API(ber_tag_t) LDAP_CALL ber_get_int(BerElement *ber, ber_int_t *num);
+LDAP_API(ber_tag_t) LDAP_CALL ber_get_tag(BerElement* ber);
+LDAP_API(ber_tag_t) LDAP_CALL ber_skip_tag(BerElement* ber, ber_len_t* len);
+LDAP_API(ber_tag_t) LDAP_CALL ber_peek_tag(BerElement* ber, ber_len_t* len);
+LDAP_API(ber_tag_t) LDAP_CALL ber_get_int(BerElement* ber, ber_int_t* num);
 LDAP_API(ber_tag_t)
-LDAP_CALL ber_get_stringb(BerElement *ber, char *buf, ber_len_t *len);
-LDAP_API(ber_tag_t) LDAP_CALL ber_get_stringa(BerElement *ber, char **buf);
+LDAP_CALL ber_get_stringb(BerElement* ber, char* buf, ber_len_t* len);
+LDAP_API(ber_tag_t) LDAP_CALL ber_get_stringa(BerElement* ber, char** buf);
 LDAP_API(ber_tag_t)
-LDAP_CALL ber_get_stringal(BerElement *ber, struct berval **bv);
+LDAP_CALL ber_get_stringal(BerElement* ber, struct berval** bv);
 LDAP_API(ber_tag_t)
-LDAP_CALL ber_get_bitstringa(BerElement *ber, char **buf, ber_len_t *len);
-LDAP_API(ber_tag_t) LDAP_CALL ber_get_null(BerElement *ber);
+LDAP_CALL ber_get_bitstringa(BerElement* ber, char** buf, ber_len_t* len);
+LDAP_API(ber_tag_t) LDAP_CALL ber_get_null(BerElement* ber);
 LDAP_API(ber_tag_t)
-LDAP_CALL ber_get_boolean(BerElement *ber, ber_int_t *boolval);
+LDAP_CALL ber_get_boolean(BerElement* ber, ber_int_t* boolval);
 LDAP_API(ber_tag_t)
-LDAP_CALL ber_first_element(BerElement *ber, ber_len_t *len, char **last);
+LDAP_CALL ber_first_element(BerElement* ber, ber_len_t* len, char** last);
 LDAP_API(ber_tag_t)
-LDAP_CALL ber_next_element(BerElement *ber, ber_len_t *len, char *last);
-LDAP_API(ber_tag_t) LDAP_C ber_scanf(BerElement *ber, const char *fmt, ...);
-LDAP_API(void) LDAP_CALL ber_bvfree(struct berval *bv);
-LDAP_API(void) LDAP_CALL ber_bvecfree(struct berval **bv);
-LDAP_API(void) LDAP_CALL ber_svecfree(char **vals);
-LDAP_API(struct berval *) LDAP_CALL ber_bvdup(const struct berval *bv);
+LDAP_CALL ber_next_element(BerElement* ber, ber_len_t* len, char* last);
+LDAP_API(ber_tag_t) LDAP_C ber_scanf(BerElement* ber, const char* fmt, ...);
+LDAP_API(void) LDAP_CALL ber_bvfree(struct berval* bv);
+LDAP_API(void) LDAP_CALL ber_bvecfree(struct berval** bv);
+LDAP_API(void) LDAP_CALL ber_svecfree(char** vals);
+LDAP_API(struct berval*) LDAP_CALL ber_bvdup(const struct berval* bv);
 LDAP_API(void)
 LDAP_CALL
-ber_set_string_translators(BerElement *ber, BERTranslateProc encode_proc,
+ber_set_string_translators(BerElement* ber, BERTranslateProc encode_proc,
                            BERTranslateProc decode_proc);
-LDAP_API(BerElement *) LDAP_CALL ber_init(const struct berval *bv);
+LDAP_API(BerElement*) LDAP_CALL ber_init(const struct berval* bv);
 
 /*
  * encoding routines
  */
 LDAP_API(int)
-LDAP_CALL ber_put_enum(BerElement *ber, ber_int_t num, ber_tag_t tag);
+LDAP_CALL ber_put_enum(BerElement* ber, ber_int_t num, ber_tag_t tag);
 LDAP_API(int)
-LDAP_CALL ber_put_int(BerElement *ber, ber_int_t num, ber_tag_t tag);
+LDAP_CALL ber_put_int(BerElement* ber, ber_int_t num, ber_tag_t tag);
 LDAP_API(int)
 LDAP_CALL
-ber_put_ostring(BerElement *ber, char *str, ber_len_t len, ber_tag_t tag);
+ber_put_ostring(BerElement* ber, char* str, ber_len_t len, ber_tag_t tag);
 LDAP_API(int)
-LDAP_CALL ber_put_string(BerElement *ber, char *str, ber_tag_t tag);
+LDAP_CALL ber_put_string(BerElement* ber, char* str, ber_tag_t tag);
 LDAP_API(int)
-LDAP_CALL ber_put_bitstring(BerElement *ber, char *str, ber_len_t bitlen,
+LDAP_CALL ber_put_bitstring(BerElement* ber, char* str, ber_len_t bitlen,
                             ber_tag_t tag);
-LDAP_API(int) LDAP_CALL ber_put_null(BerElement *ber, ber_tag_t tag);
+LDAP_API(int) LDAP_CALL ber_put_null(BerElement* ber, ber_tag_t tag);
 LDAP_API(int)
-LDAP_CALL ber_put_boolean(BerElement *ber, ber_int_t boolval, ber_tag_t tag);
-LDAP_API(int) LDAP_CALL ber_start_seq(BerElement *ber, ber_tag_t tag);
-LDAP_API(int) LDAP_CALL ber_start_set(BerElement *ber, ber_tag_t tag);
-LDAP_API(int) LDAP_CALL ber_put_seq(BerElement *ber);
-LDAP_API(int) LDAP_CALL ber_put_set(BerElement *ber);
-LDAP_API(int) LDAP_C ber_printf(BerElement *ber, const char *fmt, ...);
-LDAP_API(int) LDAP_CALL ber_flatten(BerElement *ber, struct berval **bvPtr);
+LDAP_CALL ber_put_boolean(BerElement* ber, ber_int_t boolval, ber_tag_t tag);
+LDAP_API(int) LDAP_CALL ber_start_seq(BerElement* ber, ber_tag_t tag);
+LDAP_API(int) LDAP_CALL ber_start_set(BerElement* ber, ber_tag_t tag);
+LDAP_API(int) LDAP_CALL ber_put_seq(BerElement* ber);
+LDAP_API(int) LDAP_CALL ber_put_set(BerElement* ber);
+LDAP_API(int) LDAP_C ber_printf(BerElement* ber, const char* fmt, ...);
+LDAP_API(int) LDAP_CALL ber_flatten(BerElement* ber, struct berval** bvPtr);
 
 /*
  * miscellaneous routines
  */
-LDAP_API(void) LDAP_CALL ber_free(BerElement *ber, int freebuf);
-LDAP_API(void) LDAP_CALL ber_special_free(void *buf, BerElement *ber);
-LDAP_API(int) LDAP_CALL ber_flush(Sockbuf *sb, BerElement *ber, int freeit);
-LDAP_API(BerElement *) LDAP_CALL ber_alloc(void);
-LDAP_API(BerElement *) LDAP_CALL der_alloc(void);
-LDAP_API(BerElement *) LDAP_CALL ber_alloc_t(int options);
-LDAP_API(void *) LDAP_CALL ber_special_alloc(size_t size, BerElement **ppBer);
-LDAP_API(BerElement *) LDAP_CALL ber_dup(BerElement *ber);
+LDAP_API(void) LDAP_CALL ber_free(BerElement* ber, int freebuf);
+LDAP_API(void) LDAP_CALL ber_special_free(void* buf, BerElement* ber);
+LDAP_API(int) LDAP_CALL ber_flush(Sockbuf* sb, BerElement* ber, int freeit);
+LDAP_API(BerElement*) LDAP_CALL ber_alloc(void);
+LDAP_API(BerElement*) LDAP_CALL der_alloc(void);
+LDAP_API(BerElement*) LDAP_CALL ber_alloc_t(int options);
+LDAP_API(void*) LDAP_CALL ber_special_alloc(size_t size, BerElement** ppBer);
+LDAP_API(BerElement*) LDAP_CALL ber_dup(BerElement* ber);
 LDAP_API(ber_tag_t)
-LDAP_CALL ber_get_next(Sockbuf *sb, ber_len_t *len, BerElement *ber);
+LDAP_CALL ber_get_next(Sockbuf* sb, ber_len_t* len, BerElement* ber);
 LDAP_API(ber_tag_t)
-LDAP_CALL ber_get_next_buffer(void *buffer, size_t buffer_size, ber_len_t *len,
-                              BerElement *ber, ber_len_t *Bytes_Scanned);
+LDAP_CALL ber_get_next_buffer(void* buffer, size_t buffer_size, ber_len_t* len,
+                              BerElement* ber, ber_len_t* Bytes_Scanned);
 LDAP_API(ber_tag_t)
-LDAP_CALL ber_get_next_buffer_ext(void *buffer, size_t buffer_size,
-                                  ber_len_t *len, BerElement *ber,
-                                  ber_len_t *Bytes_Scanned, Sockbuf *sb);
+LDAP_CALL ber_get_next_buffer_ext(void* buffer, size_t buffer_size,
+                                  ber_len_t* len, BerElement* ber,
+                                  ber_len_t* Bytes_Scanned, Sockbuf* sb);
 LDAP_API(ber_int_t)
-LDAP_CALL ber_read(BerElement *ber, char *buf, ber_len_t len);
+LDAP_CALL ber_read(BerElement* ber, char* buf, ber_len_t len);
 LDAP_API(ber_int_t)
-LDAP_CALL ber_write(BerElement *ber, char *buf, ber_len_t len, int nosos);
-LDAP_API(void) LDAP_CALL ber_init_w_nullchar(BerElement *ber, int options);
-LDAP_API(void) LDAP_CALL ber_reset(BerElement *ber, int was_writing);
-LDAP_API(size_t) LDAP_CALL ber_get_buf_datalen(BerElement *ber);
+LDAP_CALL ber_write(BerElement* ber, char* buf, ber_len_t len, int nosos);
+LDAP_API(void) LDAP_CALL ber_init_w_nullchar(BerElement* ber, int options);
+LDAP_API(void) LDAP_CALL ber_reset(BerElement* ber, int was_writing);
+LDAP_API(size_t) LDAP_CALL ber_get_buf_datalen(BerElement* ber);
 LDAP_API(int)
-LDAP_CALL ber_stack_init(BerElement *ber, int options, char *buf, size_t size);
-LDAP_API(char *) LDAP_CALL ber_get_buf_databegin(BerElement *ber);
-LDAP_API(void) LDAP_CALL ber_sockbuf_free_data(Sockbuf *p);
+LDAP_CALL ber_stack_init(BerElement* ber, int options, char* buf, size_t size);
+LDAP_API(char*) LDAP_CALL ber_get_buf_databegin(BerElement* ber);
+LDAP_API(void) LDAP_CALL ber_sockbuf_free_data(Sockbuf* p);
 LDAP_API(int)
-LDAP_CALL ber_set_option(BerElement *ber, int option, void *value);
+LDAP_CALL ber_set_option(BerElement* ber, int option, void* value);
 LDAP_API(int)
-LDAP_CALL ber_get_option(BerElement *ber, int option, void *value);
-LDAP_API(Sockbuf *) LDAP_CALL ber_sockbuf_alloc(void);
-LDAP_API(void) LDAP_CALL ber_sockbuf_free(Sockbuf *p);
+LDAP_CALL ber_get_option(BerElement* ber, int option, void* value);
+LDAP_API(Sockbuf*) LDAP_CALL ber_sockbuf_alloc(void);
+LDAP_API(void) LDAP_CALL ber_sockbuf_free(Sockbuf* p);
 LDAP_API(int)
-LDAP_CALL ber_sockbuf_set_option(Sockbuf *sb, int option, void *value);
+LDAP_CALL ber_sockbuf_set_option(Sockbuf* sb, int option, void* value);
 LDAP_API(int)
-LDAP_CALL ber_sockbuf_get_option(Sockbuf *sb, int option, void *value);
+LDAP_CALL ber_sockbuf_get_option(Sockbuf* sb, int option, void* value);
 
 #ifdef __cplusplus
 }
 #endif
 #endif /* _LBER_H */
--- a/ldap/c-sdk/include/lcache.h
+++ b/ldap/c-sdk/include/lcache.h
@@ -58,45 +58,45 @@ extern "C" {
 #  else /* _WINDOWS */
 #    define LDAP_C
 #    define LDAP_CALLBACK
 #    define LDAP_PASCAL
 #    define LDAP_CALL
 #  endif /* _WINDOWS */
 #endif   /* LDAP_CALL */
 
-LDAP_API(int) LDAP_C lcache_init(LDAP *ld, void *arg);
+LDAP_API(int) LDAP_C lcache_init(LDAP* ld, void* arg);
 LDAP_API(int)
-LDAP_C lcache_bind(LDAP *ld, int msgid, unsigned long tag, const char *dn,
-                   struct berval *cred, int method);
-LDAP_API(int) LDAP_C lcache_unbind(LDAP *ld, int msgid, unsigned long tag);
+LDAP_C lcache_bind(LDAP* ld, int msgid, unsigned long tag, const char* dn,
+                   struct berval* cred, int method);
+LDAP_API(int) LDAP_C lcache_unbind(LDAP* ld, int msgid, unsigned long tag);
 LDAP_API(int)
 LDAP_C
-lcache_search(LDAP *ld, int msgid, unsigned long tag, const char *dn, int scope,
-              const char *filter, char **attrs, int attrsonly);
+lcache_search(LDAP* ld, int msgid, unsigned long tag, const char* dn, int scope,
+              const char* filter, char** attrs, int attrsonly);
 LDAP_API(int)
-LDAP_C lcache_compare(LDAP *ld, int msgid, unsigned long tag, const char *dn,
-                      const char *attr, struct berval *val);
+LDAP_C lcache_compare(LDAP* ld, int msgid, unsigned long tag, const char* dn,
+                      const char* attr, struct berval* val);
 LDAP_API(int)
-LDAP_C lcache_add(LDAP *ld, int msgid, unsigned long tag, const char *dn,
-                  LDAPMod **entry);
+LDAP_C lcache_add(LDAP* ld, int msgid, unsigned long tag, const char* dn,
+                  LDAPMod** entry);
 LDAP_API(int)
-LDAP_C lcache_delete(LDAP *ld, int msgid, unsigned long tag, const char *dn);
+LDAP_C lcache_delete(LDAP* ld, int msgid, unsigned long tag, const char* dn);
 LDAP_API(int)
 LDAP_C
-lcache_rename(LDAP *ld, int msgid, unsigned long tag, const char *dn,
-              const char *newrdn, const char *newparent, int deleteoldrdn);
+lcache_rename(LDAP* ld, int msgid, unsigned long tag, const char* dn,
+              const char* newrdn, const char* newparent, int deleteoldrdn);
 LDAP_API(int)
-LDAP_C lcache_modify(LDAP *ld, int msgid, unsigned long tag, const char *dn,
-                     LDAPMod **mods);
+LDAP_C lcache_modify(LDAP* ld, int msgid, unsigned long tag, const char* dn,
+                     LDAPMod** mods);
 LDAP_API(int)
-LDAP_C lcache_modrdn(LDAP *ld, int msgid, unsigned long tag, const char *dn,
-                     const char *newrdn, int deleteoldrdn);
+LDAP_C lcache_modrdn(LDAP* ld, int msgid, unsigned long tag, const char* dn,
+                     const char* newrdn, int deleteoldrdn);
 LDAP_API(int)
-LDAP_C lcache_result(LDAP *ld, int msgid, int all, struct timeval *timeout,
-                     LDAPMessage **result);
-LDAP_API(int) LDAP_C lcache_flush(LDAP *ld, char *dn, char *filter);
+LDAP_C lcache_result(LDAP* ld, int msgid, int all, struct timeval* timeout,
+                     LDAPMessage** result);
+LDAP_API(int) LDAP_C lcache_flush(LDAP* ld, char* dn, char* filter);
 
 #ifdef __cplusplus
 }
 #endif
 
 #endif /* _LCACHE_H */
--- a/ldap/c-sdk/include/ldap-deprecated.h
+++ b/ldap/c-sdk/include/ldap-deprecated.h
@@ -55,58 +55,58 @@
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /*
  * establish an ldap session
  */
-LDAP_API(LDAP *) LDAP_CALL ldap_open(const char *host, int port);
+LDAP_API(LDAP*) LDAP_CALL ldap_open(const char* host, int port);
 
 /*
  * Authentication methods:
  */
 #define LDAP_AUTH_NONE 0x00L
 #define LDAP_AUTH_SIMPLE 0x80L
 #define LDAP_AUTH_SASL 0xa3L
 LDAP_API(int)
 LDAP_CALL
-ldap_bind(LDAP *ld, const char *who, const char *passwd, int authmethod);
+ldap_bind(LDAP* ld, const char* who, const char* passwd, int authmethod);
 LDAP_API(int)
-LDAP_CALL ldap_bind_s(LDAP *ld, const char *who, const char *cred, int method);
+LDAP_CALL ldap_bind_s(LDAP* ld, const char* who, const char* cred, int method);
 
 LDAP_API(int)
-LDAP_CALL ldap_modrdn(LDAP *ld, const char *dn, const char *newrdn);
+LDAP_CALL ldap_modrdn(LDAP* ld, const char* dn, const char* newrdn);
 LDAP_API(int)
-LDAP_CALL ldap_modrdn_s(LDAP *ld, const char *dn, const char *newrdn);
+LDAP_CALL ldap_modrdn_s(LDAP* ld, const char* dn, const char* newrdn);
 LDAP_API(int)
-LDAP_CALL ldap_modrdn2(LDAP *ld, const char *dn, const char *newrdn,
+LDAP_CALL ldap_modrdn2(LDAP* ld, const char* dn, const char* newrdn,
                        int deleteoldrdn);
 LDAP_API(int)
-LDAP_CALL ldap_modrdn2_s(LDAP *ld, const char *dn, const char *newrdn,
+LDAP_CALL ldap_modrdn2_s(LDAP* ld, const char* dn, const char* newrdn,
                          int deleteoldrdn);
 
-LDAP_API(void) LDAP_CALL ldap_perror(LDAP *ld, const char *s);
-LDAP_API(int) LDAP_CALL ldap_result2error(LDAP *ld, LDAPMessage *r, int freeit);
+LDAP_API(void) LDAP_CALL ldap_perror(LDAP* ld, const char* s);
+LDAP_API(int) LDAP_CALL ldap_result2error(LDAP* ld, LDAPMessage* r, int freeit);
 
 /*
  * Preferred language and get_lang_values (an API extension --
  * LDAP_API_FEATURE_X_GETLANGVALUES)
  *
  * The following two APIs are deprecated
  */
 
 #define LDAP_OPT_PREFERRED_LANGUAGE 0x14 /* 20 - API extension */
-LDAP_API(char **)
-LDAP_CALL ldap_get_lang_values(LDAP *ld, LDAPMessage *entry, const char *target,
-                               char **type);
-LDAP_API(struct berval **)
-LDAP_CALL ldap_get_lang_values_len(LDAP *ld, LDAPMessage *entry,
-                                   const char *target, char **type);
+LDAP_API(char**)
+LDAP_CALL ldap_get_lang_values(LDAP* ld, LDAPMessage* entry, const char* target,
+                               char** type);
+LDAP_API(struct berval**)
+LDAP_CALL ldap_get_lang_values_len(LDAP* ld, LDAPMessage* entry,
+                                   const char* target, char** type);
 
 /*
  * Asynchronous I/O (an API extension).
  */
 /*
  * This option enables completely asynchronous IO.  It works by using ioctl()
  * on the fd, (or tlook())
  */
@@ -122,26 +122,26 @@ LDAP_CALL ldap_get_lang_values_len(LDAP 
 typedef struct _LDAPVersion {
   int sdk_version;      /* Version of the SDK, * 100 */
   int protocol_version; /* Highest protocol version supported, * 100 */
   int SSL_version;      /* SSL version if this SDK supports it, * 100 */
   int security_level;   /* highest level available */
   int reserved[4];
 } LDAPVersion;
 #define LDAP_SECURITY_NONE 0
-LDAP_API(int) LDAP_CALL ldap_version(LDAPVersion *ver);
+LDAP_API(int) LDAP_CALL ldap_version(LDAPVersion* ver);
 
 /* use ldap_create_filter() instead of ldap_build_filter() */
 LDAP_API(void)
-LDAP_CALL ldap_build_filter(char *buf, unsigned long buflen, char *pattern,
-                            char *prefix, char *suffix, char *attr, char *value,
-                            char **valwords);
+LDAP_CALL ldap_build_filter(char* buf, unsigned long buflen, char* pattern,
+                            char* prefix, char* suffix, char* attr, char* value,
+                            char** valwords);
 /* use ldap_set_filter_additions() instead of ldap_setfilteraffixes() */
 LDAP_API(void)
-LDAP_CALL ldap_setfilteraffixes(LDAPFiltDesc *lfdp, char *prefix, char *suffix);
+LDAP_CALL ldap_setfilteraffixes(LDAPFiltDesc* lfdp, char* prefix, char* suffix);
 
 /* older result types a server can return -- use LDAP_RES_MODDN instead */
 #define LDAP_RES_MODRDN LDAP_RES_MODDN
 #define LDAP_RES_RENAME LDAP_RES_MODDN
 
 /* older error messages */
 #define LDAP_AUTH_METHOD_NOT_SUPPORTED LDAP_STRONG_AUTH_NOT_SUPPORTED
 
@@ -153,62 +153,62 @@ LDAP_CALL ldap_setfilteraffixes(LDAPFilt
 #define LDAP_OPT_CACHE_ENABLE 0x0F   /* 15 - API extension */
 
 /* cache strategies */
 #define LDAP_CACHE_CHECK 0
 #define LDAP_CACHE_POPULATE 1
 #define LDAP_CACHE_LOCALDB 2
 
 typedef int(LDAP_C LDAP_CALLBACK LDAP_CF_BIND_CALLBACK)(
-    LDAP *ld, int msgid, unsigned long tag, const char *dn,
-    const struct berval *creds, int method);
+    LDAP* ld, int msgid, unsigned long tag, const char* dn,
+    const struct berval* creds, int method);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_CF_UNBIND_CALLBACK)(
-    LDAP *ld, int unused0, unsigned long unused1);
+    LDAP* ld, int unused0, unsigned long unused1);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_CF_SEARCH_CALLBACK)(
-    LDAP *ld, int msgid, unsigned long tag, const char *base, int scope,
-    const char LDAP_CALLBACK *filter, char **attrs, int attrsonly);
+    LDAP* ld, int msgid, unsigned long tag, const char* base, int scope,
+    const char LDAP_CALLBACK* filter, char** attrs, int attrsonly);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_CF_COMPARE_CALLBACK)(
-    LDAP *ld, int msgid, unsigned long tag, const char *dn, const char *attr,
-    const struct berval *value);
-typedef int(LDAP_C LDAP_CALLBACK LDAP_CF_ADD_CALLBACK)(LDAP *ld, int msgid,
+    LDAP* ld, int msgid, unsigned long tag, const char* dn, const char* attr,
+    const struct berval* value);
+typedef int(LDAP_C LDAP_CALLBACK LDAP_CF_ADD_CALLBACK)(LDAP* ld, int msgid,
                                                        unsigned long tag,
-                                                       const char *dn,
-                                                       LDAPMod **attrs);
-typedef int(LDAP_C LDAP_CALLBACK LDAP_CF_DELETE_CALLBACK)(LDAP *ld, int msgid,
+                                                       const char* dn,
+                                                       LDAPMod** attrs);
+typedef int(LDAP_C LDAP_CALLBACK LDAP_CF_DELETE_CALLBACK)(LDAP* ld, int msgid,
                                                           unsigned long tag,
-                                                          const char *dn);
-typedef int(LDAP_C LDAP_CALLBACK LDAP_CF_MODIFY_CALLBACK)(LDAP *ld, int msgid,
+                                                          const char* dn);
+typedef int(LDAP_C LDAP_CALLBACK LDAP_CF_MODIFY_CALLBACK)(LDAP* ld, int msgid,
                                                           unsigned long tag,
-                                                          const char *dn,
-                                                          LDAPMod **mods);
-typedef int(LDAP_C LDAP_CALLBACK LDAP_CF_MODRDN_CALLBACK)(LDAP *ld, int msgid,
+                                                          const char* dn,
+                                                          LDAPMod** mods);
+typedef int(LDAP_C LDAP_CALLBACK LDAP_CF_MODRDN_CALLBACK)(LDAP* ld, int msgid,
                                                           unsigned long tag,
-                                                          const char *dn,
-                                                          const char *newrdn,
+                                                          const char* dn,
+                                                          const char* newrdn,
                                                           int deleteoldrdn);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_CF_RESULT_CALLBACK)(
-    LDAP *ld, int msgid, int all, struct timeval *timeout,
-    LDAPMessage **result);
-typedef int(LDAP_C LDAP_CALLBACK LDAP_CF_FLUSH_CALLBACK)(LDAP *ld,
-                                                         const char *dn,
-                                                         const char *filter);
+    LDAP* ld, int msgid, int all, struct timeval* timeout,
+    LDAPMessage** result);
+typedef int(LDAP_C LDAP_CALLBACK LDAP_CF_FLUSH_CALLBACK)(LDAP* ld,
+                                                         const char* dn,
+                                                         const char* filter);
 
 struct ldap_cache_fns {
-  void *lcf_private;
-  LDAP_CF_BIND_CALLBACK *lcf_bind;
-  LDAP_CF_UNBIND_CALLBACK *lcf_unbind;
-  LDAP_CF_SEARCH_CALLBACK *lcf_search;
-  LDAP_CF_COMPARE_CALLBACK *lcf_compare;
-  LDAP_CF_ADD_CALLBACK *lcf_add;
-  LDAP_CF_DELETE_CALLBACK *lcf_delete;
-  LDAP_CF_MODIFY_CALLBACK *lcf_modify;
-  LDAP_CF_MODRDN_CALLBACK *lcf_modrdn;
-  LDAP_CF_RESULT_CALLBACK *lcf_result;
-  LDAP_CF_FLUSH_CALLBACK *lcf_flush;
+  void* lcf_private;
+  LDAP_CF_BIND_CALLBACK* lcf_bind;
+  LDAP_CF_UNBIND_CALLBACK* lcf_unbind;
+  LDAP_CF_SEARCH_CALLBACK* lcf_search;
+  LDAP_CF_COMPARE_CALLBACK* lcf_compare;
+  LDAP_CF_ADD_CALLBACK* lcf_add;
+  LDAP_CF_DELETE_CALLBACK* lcf_delete;
+  LDAP_CF_MODIFY_CALLBACK* lcf_modify;
+  LDAP_CF_MODRDN_CALLBACK* lcf_modrdn;
+  LDAP_CF_RESULT_CALLBACK* lcf_result;
+  LDAP_CF_FLUSH_CALLBACK* lcf_flush;
 };
 
 LDAP_API(int)
-LDAP_CALL ldap_cache_flush(LDAP *ld, const char *dn, const char *filter);
+LDAP_CALL ldap_cache_flush(LDAP* ld, const char* dn, const char* filter);
 
 #ifdef __cplusplus
 }
 #endif
 #endif /* _LDAP_DEPRECATED_H */
--- a/ldap/c-sdk/include/ldap-extension.h
+++ b/ldap/c-sdk/include/ldap-extension.h
@@ -72,17 +72,17 @@ extern "C" {
 #define LDAP_API_FEATURE_X_CLIENT_SIDE_SORT 1
 #define LDAP_API_FEATURE_X_URL_FUNCTIONS 1
 #define LDAP_API_FEATURE_X_FILTER_FUNCTIONS 1
 
 #define LDAP_ROOT_DSE "" /* API extension */
 
 #define LDAP_OPT_DESC 0x01 /*  1 */
 
-#define NULLMSG ((LDAPMessage *)0)
+#define NULLMSG ((LDAPMessage*)0)
 
 /*built-in SASL methods */
 #define LDAP_SASL_EXTERNAL "EXTERNAL" /* TLS/SSL extension */
 
 /* possible error codes we can be returned */
 #define LDAP_PARTIAL_RESULTS 0x09 /* 9 (UMich LDAPv2 extn) */
 #define NAME_ERROR(n) ((n & 0xf0) == 0x20)
 
@@ -140,28 +140,28 @@ extern "C" {
 #define LDAP_CONTROL_GETEFFECTIVERIGHTS_REQUEST "1.3.6.1.4.1.42.2.27.9.5.2"
 
 /* Password Policy Control to get account availability */
 #define LDAP_CONTROL_ACCOUNT_USABLE "1.3.6.1.4.1.42.2.27.9.5.8"
 
 /* "Who am I?" Extended Operation */
 #define LDAP_EXOP_WHO_AM_I "1.3.6.1.4.1.4203.1.11.3"
 
-LDAP_API(void) LDAP_CALL ldap_ber_free(BerElement *ber, int freebuf);
+LDAP_API(void) LDAP_CALL ldap_ber_free(BerElement* ber, int freebuf);
 
-LDAP_API(LDAPControl *)
-LDAP_CALL ldap_find_control(const char *oid, LDAPControl **ctrls);
+LDAP_API(LDAPControl*)
+LDAP_CALL ldap_find_control(const char* oid, LDAPControl** ctrls);
 
 /*
  * Server side sorting of search results (an LDAPv3 extension --
  * LDAP_API_FEATURE_SERVER_SIDE_SORT)
  */
 typedef struct LDAPsortkey { /* structure for a sort-key */
-  char *sk_attrtype;
-  char *sk_matchruleoid;
+  char* sk_attrtype;
+  char* sk_matchruleoid;
   int sk_reverseorder;
 } LDAPsortkey;
 
 /* where LDAP_CONTROL_ACCOUNT_USABLE control parse results */
 typedef struct LDAPuserstatus { /* user account availability   */
   unsigned int us_available;    /* availability status         */
 #define LDAP_US_ACCOUNT_USABLE 1
 #define LDAP_US_ACCOUNT_NOT_USABLE 0
@@ -190,205 +190,205 @@ typedef enum passpolicyerror_enum {
   PP_passwordTooShort = 6,
   PP_passwordTooYoung = 7,
   PP_passwordInHistory = 8,
   PP_noError = 65535
 } LDAPPasswordPolicyError;
 
 LDAP_API(int)
 LDAP_CALL
-ldap_create_sort_control(LDAP *ld, LDAPsortkey **sortKeyList,
-                         const char ctl_iscritical, LDAPControl **ctrlp);
+ldap_create_sort_control(LDAP* ld, LDAPsortkey** sortKeyList,
+                         const char ctl_iscritical, LDAPControl** ctrlp);
 LDAP_API(int)
-LDAP_CALL ldap_parse_sort_control(LDAP *ld, LDAPControl **ctrls,
-                                  ber_int_t *result, char **attribute);
+LDAP_CALL ldap_parse_sort_control(LDAP* ld, LDAPControl** ctrls,
+                                  ber_int_t* result, char** attribute);
 
-LDAP_API(void) LDAP_CALL ldap_free_sort_keylist(LDAPsortkey **sortKeyList);
+LDAP_API(void) LDAP_CALL ldap_free_sort_keylist(LDAPsortkey** sortKeyList);
 LDAP_API(int)
-LDAP_CALL ldap_create_sort_keylist(LDAPsortkey ***sortKeyList,
-                                   const char *string_rep);
+LDAP_CALL ldap_create_sort_keylist(LDAPsortkey*** sortKeyList,
+                                   const char* string_rep);
 
 LDAP_API(int)
-LDAP_CALL ldap_create_userstatus_control(LDAP *ld, const char ctl_iscritical,
-                                         LDAPControl **ctrlp);
+LDAP_CALL ldap_create_userstatus_control(LDAP* ld, const char ctl_iscritical,
+                                         LDAPControl** ctrlp);
 LDAP_API(int)
-LDAP_CALL ldap_parse_userstatus_control(LDAP *ld, LDAPControl **ctrlp,
-                                        LDAPuserstatus *us);
+LDAP_CALL ldap_parse_userstatus_control(LDAP* ld, LDAPControl** ctrlp,
+                                        LDAPuserstatus* us);
 
 LDAP_API(int)
-LDAP_CALL ldap_create_passwordpolicy_control(LDAP *ld, LDAPControl **ctrlp);
+LDAP_CALL ldap_create_passwordpolicy_control(LDAP* ld, LDAPControl** ctrlp);
 LDAP_API(int)
 LDAP_CALL
-ldap_create_passwordpolicy_control_ext(LDAP *ld, const char ctl_iscritical,
-                                       LDAPControl **ctrlp);
+ldap_create_passwordpolicy_control_ext(LDAP* ld, const char ctl_iscritical,
+                                       LDAPControl** ctrlp);
 LDAP_API(int)
 LDAP_CALL
-ldap_parse_passwordpolicy_control(LDAP *ld, LDAPControl *ctrlp,
-                                  ber_int_t *expirep, ber_int_t *gracep,
-                                  LDAPPasswordPolicyError *errorp);
+ldap_parse_passwordpolicy_control(LDAP* ld, LDAPControl* ctrlp,
+                                  ber_int_t* expirep, ber_int_t* gracep,
+                                  LDAPPasswordPolicyError* errorp);
 LDAP_API(int)
 LDAP_CALL
-ldap_parse_passwordpolicy_control_ext(LDAP *ld, LDAPControl **ctrlp,
-                                      ber_int_t *expirep, ber_int_t *gracep,
-                                      LDAPPasswordPolicyError *errorp);
-LDAP_API(const char *)
+ldap_parse_passwordpolicy_control_ext(LDAP* ld, LDAPControl** ctrlp,
+                                      ber_int_t* expirep, ber_int_t* gracep,
+                                      LDAPPasswordPolicyError* errorp);
+LDAP_API(const char*)
 LDAP_CALL ldap_passwordpolicy_err2txt(LDAPPasswordPolicyError err);
 
 LDAP_API(int)
-LDAP_CALL ldap_create_authzid_control(LDAP *ld, const char ctl_iscritical,
-                                      LDAPControl **ctrlp);
+LDAP_CALL ldap_create_authzid_control(LDAP* ld, const char ctl_iscritical,
+                                      LDAPControl** ctrlp);
 LDAP_API(int)
 LDAP_CALL
-ldap_parse_authzid_control(LDAP *ld, LDAPControl **ctrlp, char **authzid);
+ldap_parse_authzid_control(LDAP* ld, LDAPControl** ctrlp, char** authzid);
 
 LDAP_API(int)
-LDAP_CALL ldap_whoami(LDAP *ld, LDAPControl **serverctrls,
-                      LDAPControl **clientctrls, int *msgidp);
+LDAP_CALL ldap_whoami(LDAP* ld, LDAPControl** serverctrls,
+                      LDAPControl** clientctrls, int* msgidp);
 LDAP_API(int)
-LDAP_CALL ldap_whoami_s(LDAP *ld, struct berval **authzid,
-                        LDAPControl **serverctrls, LDAPControl **clientctrls);
+LDAP_CALL ldap_whoami_s(LDAP* ld, struct berval** authzid,
+                        LDAPControl** serverctrls, LDAPControl** clientctrls);
 LDAP_API(int)
 LDAP_CALL
-ldap_parse_whoami(LDAP *ld, LDAPMessage *result, struct berval **authzid);
+ldap_parse_whoami(LDAP* ld, LDAPMessage* result, struct berval** authzid);
 
 LDAP_API(int)
-LDAP_CALL ldap_create_geteffectiveRights_control(LDAP *ld, const char *authzid,
-                                                 const char **attrlist,
+LDAP_CALL ldap_create_geteffectiveRights_control(LDAP* ld, const char* authzid,
+                                                 const char** attrlist,
                                                  const char ctl_iscritical,
-                                                 LDAPControl **ctrlp);
+                                                 LDAPControl** ctrlp);
 
 /*
  * Virtual list view (an LDAPv3 extension -- LDAP_API_FEATURE_VIRTUAL_LIST_VIEW)
  */
 /*
  * structure that describes a VirtualListViewRequest control.
  * note that ldvlist_index and ldvlist_size are only relevant to
  * ldap_create_virtuallist_control() if ldvlist_attrvalue is NULL.
  */
 typedef struct ldapvirtuallist {
   ber_int_t ldvlist_before_count; /* # entries before target */
   ber_int_t ldvlist_after_count;  /* # entries after target */
-  char *ldvlist_attrvalue;        /* jump to this value */
+  char* ldvlist_attrvalue;        /* jump to this value */
   ber_int_t ldvlist_index;        /* list offset */
   ber_int_t ldvlist_size;         /* number of items in vlist */
-  void *ldvlist_extradata;        /* for use by application */
+  void* ldvlist_extradata;        /* for use by application */
 } LDAPVirtualList;
 
 /*
  * VLV functions:
  */
 LDAP_API(int)
-LDAP_CALL ldap_create_virtuallist_control(LDAP *ld, LDAPVirtualList *ldvlistp,
-                                          LDAPControl **ctrlp);
+LDAP_CALL ldap_create_virtuallist_control(LDAP* ld, LDAPVirtualList* ldvlistp,
+                                          LDAPControl** ctrlp);
 
 LDAP_API(int)
-LDAP_CALL ldap_parse_virtuallist_control(LDAP *ld, LDAPControl **ctrls,
-                                         ber_int_t *target_posp,
-                                         ber_int_t *list_sizep, int *errcodep);
+LDAP_CALL ldap_parse_virtuallist_control(LDAP* ld, LDAPControl** ctrls,
+                                         ber_int_t* target_posp,
+                                         ber_int_t* list_sizep, int* errcodep);
 
 /*
  * Routines for creating persistent search controls and for handling
  * "entry changed notification" controls (an LDAPv3 extension --
  * LDAP_API_FEATURE_PERSISTENT_SEARCH)
  */
 #define LDAP_CHANGETYPE_ADD 1
 #define LDAP_CHANGETYPE_DELETE 2
 #define LDAP_CHANGETYPE_MODIFY 4
 #define LDAP_CHANGETYPE_MODDN 8
 #define LDAP_CHANGETYPE_ANY (1 | 2 | 4 | 8)
 LDAP_API(int)
 LDAP_CALL
-ldap_create_persistentsearch_control(LDAP *ld, int changetypes, int changesonly,
+ldap_create_persistentsearch_control(LDAP* ld, int changetypes, int changesonly,
                                      int return_echg_ctls, char ctl_iscritical,
-                                     LDAPControl **ctrlp);
+                                     LDAPControl** ctrlp);
 LDAP_API(int)
 LDAP_CALL
-ldap_parse_entrychange_control(LDAP *ld, LDAPControl **ctrls,
-                               ber_int_t *chgtypep, char **prevdnp,
-                               int *chgnumpresentp, ber_int_t *chgnump);
+ldap_parse_entrychange_control(LDAP* ld, LDAPControl** ctrls,
+                               ber_int_t* chgtypep, char** prevdnp,
+                               int* chgnumpresentp, ber_int_t* chgnump);
 
 /*
  * Routines for creating Proxied Authorization controls (an LDAPv3
  * extension -- LDAP_API_FEATURE_PROXY_AUTHORIZATION)
  * ldap_create_proxyauth_control() is for the old (version 1) control.
  * ldap_create_proxiedauth_control() is for the newer (version 2) control.
  */
 LDAP_API(int)
-LDAP_CALL ldap_create_proxyauth_control(LDAP *ld, const char *dn,
+LDAP_CALL ldap_create_proxyauth_control(LDAP* ld, const char* dn,
                                         const char ctl_iscritical,
-                                        LDAPControl **ctrlp);
+                                        LDAPControl** ctrlp);
 LDAP_API(int)
-LDAP_CALL ldap_create_proxiedauth_control(LDAP *ld, const char *authzid,
-                                          LDAPControl **ctrlp);
+LDAP_CALL ldap_create_proxiedauth_control(LDAP* ld, const char* authzid,
+                                          LDAPControl** ctrlp);
 
 /*
  * Functions to get and set LDAP error information (API extension --
  * LDAP_API_FEATURE_X_LDERRNO )
  *
  * By using LDAP_OPT_THREAD_FN_PTRS, you can arrange for the error info. to
  * be thread-specific.
  */
-LDAP_API(int) LDAP_CALL ldap_get_lderrno(LDAP *ld, char **m, char **s);
-LDAP_API(int) LDAP_CALL ldap_set_lderrno(LDAP *ld, int e, char *m, char *s);
+LDAP_API(int) LDAP_CALL ldap_get_lderrno(LDAP* ld, char** m, char** s);
+LDAP_API(int) LDAP_CALL ldap_set_lderrno(LDAP* ld, int e, char* m, char* s);
 
 /*
  * LDAP URL functions and definitions (an API extension --
  * LDAP_API_FEATURE_X_URL_FUNCTIONS)
  */
 /*
  * types for ldap URL handling
  */
 typedef struct ldap_url_desc {
-  char *lud_host;
+  char* lud_host;
   int lud_port;
-  char *lud_dn;
-  char **lud_attrs;
+  char* lud_dn;
+  char** lud_attrs;
   int lud_scope;
-  char *lud_filter;
+  char* lud_filter;
   unsigned long lud_options;
 #define LDAP_URL_OPT_SECURE 0x01
-  char *lud_string; /* for internal use only */
+  char* lud_string; /* for internal use only */
 } LDAPURLDesc;
 
-#define NULLLDAPURLDESC ((LDAPURLDesc *)NULL)
+#define NULLLDAPURLDESC ((LDAPURLDesc*)NULL)
 
 /*
  * possible errors returned by ldap_url_parse()
  */
 #define LDAP_URL_ERR_NOTLDAP 1  /* URL doesn't begin with "ldap://" */
 #define LDAP_URL_ERR_NODN 2     /* URL has no DN (required) */
 #define LDAP_URL_ERR_BADSCOPE 3 /* URL scope string is invalid */
 #define LDAP_URL_ERR_MEM 4      /* can't allocate memory space */
 #define LDAP_URL_ERR_PARAM 5    /* bad parameter to an URL function */
 #define LDAP_URL_UNRECOGNIZED_CRITICAL_EXTENSION 6
 
 /*
  * URL functions:
  */
-LDAP_API(int) LDAP_CALL ldap_is_ldap_url(const char *url);
-LDAP_API(int) LDAP_CALL ldap_url_parse(const char *url, LDAPURLDesc **ludpp);
+LDAP_API(int) LDAP_CALL ldap_is_ldap_url(const char* url);
+LDAP_API(int) LDAP_CALL ldap_url_parse(const char* url, LDAPURLDesc** ludpp);
 LDAP_API(int)
-LDAP_CALL ldap_url_parse_no_defaults(const char *url, LDAPURLDesc **ludpp,
+LDAP_CALL ldap_url_parse_no_defaults(const char* url, LDAPURLDesc** ludpp,
                                      int dn_required);
-LDAP_API(void) LDAP_CALL ldap_free_urldesc(LDAPURLDesc *ludp);
+LDAP_API(void) LDAP_CALL ldap_free_urldesc(LDAPURLDesc* ludp);
 LDAP_API(int)
-LDAP_CALL ldap_url_search(LDAP *ld, const char *url, int attrsonly);
+LDAP_CALL ldap_url_search(LDAP* ld, const char* url, int attrsonly);
 LDAP_API(int)
-LDAP_CALL ldap_url_search_s(LDAP *ld, const char *url, int attrsonly,
-                            LDAPMessage **res);
+LDAP_CALL ldap_url_search_s(LDAP* ld, const char* url, int attrsonly,
+                            LDAPMessage** res);
 LDAP_API(int)
-LDAP_CALL ldap_url_search_st(LDAP *ld, const char *url, int attrsonly,
-                             struct timeval *timeout, LDAPMessage **res);
+LDAP_CALL ldap_url_search_st(LDAP* ld, const char* url, int attrsonly,
+                             struct timeval* timeout, LDAPMessage** res);
 
 /*
  * Function to dispose of an array of LDAPMod structures (an API extension).
  * Warning: don't use this unless the mods array was allocated using the
  * same memory allocator as is being used by libldap.
  */
-LDAP_API(void) LDAP_CALL ldap_mods_free(LDAPMod **mods, int freemods);
+LDAP_API(void) LDAP_CALL ldap_mods_free(LDAPMod** mods, int freemods);
 
 /*
  * SSL option (an API extension):
  */
 #define LDAP_OPT_SSL 0x0A /* 10 - API extension */
 
 /*
  * Referral hop limit (an API extension):
@@ -396,58 +396,58 @@ LDAP_API(void) LDAP_CALL ldap_mods_free(
 #define LDAP_OPT_REFERRAL_HOP_LIMIT 0x10 /* 16 - API extension */
 
 /*
  * Rebind callback function (an API extension)
  */
 #define LDAP_OPT_REBIND_FN 0x06  /* 6 - API extension */
 #define LDAP_OPT_REBIND_ARG 0x07 /* 7 - API extension */
 typedef int(LDAP_CALL LDAP_CALLBACK LDAP_REBINDPROC_CALLBACK)(
-    LDAP *ld, char **dnp, char **passwdp, int *authmethodp, int freeit,
-    void *arg);
+    LDAP* ld, char** dnp, char** passwdp, int* authmethodp, int freeit,
+    void* arg);
 LDAP_API(void)
-LDAP_CALL ldap_set_rebind_proc(LDAP *ld, LDAP_REBINDPROC_CALLBACK *rebindproc,
-                               void *arg);
+LDAP_CALL ldap_set_rebind_proc(LDAP* ld, LDAP_REBINDPROC_CALLBACK* rebindproc,
+                               void* arg);
 
 /*
  * Thread function callbacks (an API extension --
  * LDAP_API_FEATURE_X_THREAD_FUNCTIONS).
  */
 #define LDAP_OPT_THREAD_FN_PTRS 0x05 /* 5 - API extension */
 
 /*
  * Thread callback functions:
  */
-typedef void *(LDAP_C LDAP_CALLBACK LDAP_TF_MUTEX_ALLOC_CALLBACK)(void);
-typedef void(LDAP_C LDAP_CALLBACK LDAP_TF_MUTEX_FREE_CALLBACK)(void *m);
-typedef int(LDAP_C LDAP_CALLBACK LDAP_TF_MUTEX_LOCK_CALLBACK)(void *m);
-typedef int(LDAP_C LDAP_CALLBACK LDAP_TF_MUTEX_UNLOCK_CALLBACK)(void *m);
+typedef void*(LDAP_C LDAP_CALLBACK LDAP_TF_MUTEX_ALLOC_CALLBACK)(void);
+typedef void(LDAP_C LDAP_CALLBACK LDAP_TF_MUTEX_FREE_CALLBACK)(void* m);
+typedef int(LDAP_C LDAP_CALLBACK LDAP_TF_MUTEX_LOCK_CALLBACK)(void* m);
+typedef int(LDAP_C LDAP_CALLBACK LDAP_TF_MUTEX_UNLOCK_CALLBACK)(void* m);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_TF_GET_ERRNO_CALLBACK)(void);
 typedef void(LDAP_C LDAP_CALLBACK LDAP_TF_SET_ERRNO_CALLBACK)(int e);
-typedef int(LDAP_C LDAP_CALLBACK LDAP_TF_GET_LDERRNO_CALLBACK)(char **matchedp,
-                                                               char **errmsgp,
-                                                               void *arg);
+typedef int(LDAP_C LDAP_CALLBACK LDAP_TF_GET_LDERRNO_CALLBACK)(char** matchedp,
+                                                               char** errmsgp,
+                                                               void* arg);
 typedef void(LDAP_C LDAP_CALLBACK LDAP_TF_SET_LDERRNO_CALLBACK)(int err,
-                                                                char *matched,
-                                                                char *errmsg,
-                                                                void *arg);
+                                                                char* matched,
+                                                                char* errmsg,
+                                                                void* arg);
 
 /*
  * Structure to hold thread function pointers:
  */
 struct ldap_thread_fns {
-  LDAP_TF_MUTEX_ALLOC_CALLBACK *ltf_mutex_alloc;
-  LDAP_TF_MUTEX_FREE_CALLBACK *ltf_mutex_free;
-  LDAP_TF_MUTEX_LOCK_CALLBACK *ltf_mutex_lock;
-  LDAP_TF_MUTEX_UNLOCK_CALLBACK *ltf_mutex_unlock;
-  LDAP_TF_GET_ERRNO_CALLBACK *ltf_get_errno;
-  LDAP_TF_SET_ERRNO_CALLBACK *ltf_set_errno;
-  LDAP_TF_GET_LDERRNO_CALLBACK *ltf_get_lderrno;
-  LDAP_TF_SET_LDERRNO_CALLBACK *ltf_set_lderrno;
-  void *ltf_lderrno_arg;
+  LDAP_TF_MUTEX_ALLOC_CALLBACK* ltf_mutex_alloc;
+  LDAP_TF_MUTEX_FREE_CALLBACK* ltf_mutex_free;
+  LDAP_TF_MUTEX_LOCK_CALLBACK* ltf_mutex_lock;
+  LDAP_TF_MUTEX_UNLOCK_CALLBACK* ltf_mutex_unlock;
+  LDAP_TF_GET_ERRNO_CALLBACK* ltf_get_errno;
+  LDAP_TF_SET_ERRNO_CALLBACK* ltf_set_errno;
+  LDAP_TF_GET_LDERRNO_CALLBACK* ltf_get_lderrno;
+  LDAP_TF_SET_LDERRNO_CALLBACK* ltf_set_lderrno;
+  void* ltf_lderrno_arg;
 };
 
 /*
  * Extended I/O function callbacks option (an API extension --
  * LDAP_API_FEATURE_X_EXTIO_FUNCTIONS).
  */
 #define LDAP_X_OPT_EXTIO_FN_PTRS (LDAP_OPT_PRIVATE_EXTENSION_BASE + 0x0F00)
 /* 0x4000 + 0x0F00 = 0x4F00 = 20224 - API extension */
@@ -502,17 +502,17 @@ struct ldap_thread_fns {
  */
 #define LDAP_X_IO_TIMEOUT_NO_WAIT 0       /* return immediately */
 #define LDAP_X_IO_TIMEOUT_NO_TIMEOUT (-1) /* block indefinitely */
 
 /* LDAP poll()-like descriptor:
  */
 typedef struct ldap_x_pollfd { /* used by LDAP_X_EXTIOF_POLL_CALLBACK */
   int lpoll_fd;                /* integer file descriptor / socket */
-  struct lextiof_socket_private *lpoll_socketarg;
+  struct lextiof_socket_private* lpoll_socketarg;
   /* pointer socket and for use by */
   /* application */
   short lpoll_events;  /* requested event */
   short lpoll_revents; /* returned event */
 } LDAP_X_PollFD;
 
 /* Event flags for lpoll_events and lpoll_revents:
  */
@@ -526,167 +526,167 @@ typedef struct ldap_x_pollfd { /* used b
 /* Options passed to LDAP_X_EXTIOF_CONNECT_CALLBACK to modify socket behavior:
  */
 #define LDAP_X_EXTIOF_OPT_NONBLOCKING 0x01 /* turn on non-blocking mode */
 #define LDAP_X_EXTIOF_OPT_SECURE 0x02      /* turn on 'secure' mode */
 
 /* extended I/O callback function prototypes:
  */
 typedef int(LDAP_C LDAP_CALLBACK LDAP_X_EXTIOF_CONNECT_CALLBACK)(
-    const char *hostlist, int port, /* host byte order */
+    const char* hostlist, int port, /* host byte order */
     int timeout /* milliseconds */,
     unsigned long options, /* bitmapped options */
-    struct lextiof_session_private *sessionarg,
-    struct lextiof_socket_private **socketargp);
+    struct lextiof_session_private* sessionarg,
+    struct lextiof_socket_private** socketargp);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_X_EXTIOF_CLOSE_CALLBACK)(
-    int s, struct lextiof_socket_private *socketarg);
+    int s, struct lextiof_socket_private* socketarg);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_X_EXTIOF_POLL_CALLBACK)(
     LDAP_X_PollFD fds[], int nfds, int timeout /* milliseconds */,
-    struct lextiof_session_private *sessionarg);
+    struct lextiof_session_private* sessionarg);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_X_EXTIOF_NEWHANDLE_CALLBACK)(
-    LDAP *ld, struct lextiof_session_private *sessionarg);
+    LDAP* ld, struct lextiof_session_private* sessionarg);
 typedef void(LDAP_C LDAP_CALLBACK LDAP_X_EXTIOF_DISPOSEHANDLE_CALLBACK)(
-    LDAP *ld, struct lextiof_session_private *sessionarg);
+    LDAP* ld, struct lextiof_session_private* sessionarg);
 
 /* Structure to hold extended I/O function pointers:
  */
 struct ldap_x_ext_io_fns {
   /* lextiof_size should always be set to LDAP_X_EXTIO_FNS_SIZE */
   int lextiof_size;
-  LDAP_X_EXTIOF_CONNECT_CALLBACK *lextiof_connect;
-  LDAP_X_EXTIOF_CLOSE_CALLBACK *lextiof_close;
-  LDAP_X_EXTIOF_READ_CALLBACK *lextiof_read;
-  LDAP_X_EXTIOF_WRITE_CALLBACK *lextiof_write;
-  LDAP_X_EXTIOF_POLL_CALLBACK *lextiof_poll;
-  LDAP_X_EXTIOF_NEWHANDLE_CALLBACK *lextiof_newhandle;
-  LDAP_X_EXTIOF_DISPOSEHANDLE_CALLBACK *lextiof_disposehandle;
-  void *lextiof_session_arg;
-  LDAP_X_EXTIOF_WRITEV_CALLBACK *lextiof_writev;
+  LDAP_X_EXTIOF_CONNECT_CALLBACK* lextiof_connect;
+  LDAP_X_EXTIOF_CLOSE_CALLBACK* lextiof_close;
+  LDAP_X_EXTIOF_READ_CALLBACK* lextiof_read;
+  LDAP_X_EXTIOF_WRITE_CALLBACK* lextiof_write;
+  LDAP_X_EXTIOF_POLL_CALLBACK* lextiof_poll;
+  LDAP_X_EXTIOF_NEWHANDLE_CALLBACK* lextiof_newhandle;
+  LDAP_X_EXTIOF_DISPOSEHANDLE_CALLBACK* lextiof_disposehandle;
+  void* lextiof_session_arg;
+  LDAP_X_EXTIOF_WRITEV_CALLBACK* lextiof_writev;
 };
 #define LDAP_X_EXTIO_FNS_SIZE sizeof(struct ldap_x_ext_io_fns)
 
 /*
  * Utility functions for parsing space-separated host lists (useful for
  * implementing an extended I/O CONNECT callback function).
  */
 struct ldap_x_hostlist_status;
 LDAP_API(int)
-LDAP_CALL ldap_x_hostlist_first(const char *hostlist, int defport, char **hostp,
-                                int *portp /* host byte order */,
-                                struct ldap_x_hostlist_status **statusp);
+LDAP_CALL ldap_x_hostlist_first(const char* hostlist, int defport, char** hostp,
+                                int* portp /* host byte order */,
+                                struct ldap_x_hostlist_status** statusp);
 LDAP_API(int)
-LDAP_CALL ldap_x_hostlist_next(char **hostp, int *portp /* host byte order */,
-                               struct ldap_x_hostlist_status *status);
+LDAP_CALL ldap_x_hostlist_next(char** hostp, int* portp /* host byte order */,
+                               struct ldap_x_hostlist_status* status);
 LDAP_API(void)
-LDAP_CALL ldap_x_hostlist_statusfree(struct ldap_x_hostlist_status *status);
+LDAP_CALL ldap_x_hostlist_statusfree(struct ldap_x_hostlist_status* status);
 
 /*
  * Client side sorting of entries (an API extension --
  * LDAP_API_FEATURE_X_CLIENT_SIDE_SORT)
  */
 /*
  * Client side sorting callback functions:
  */
-typedef const struct berval *(LDAP_C LDAP_CALLBACK LDAP_KEYGEN_CALLBACK)(
-    void *arg, LDAP *ld, LDAPMessage *entry);
-typedef int(LDAP_C LDAP_CALLBACK LDAP_KEYCMP_CALLBACK)(void *arg,
-                                                       const struct berval *,
-                                                       const struct berval *);
-typedef void(LDAP_C LDAP_CALLBACK LDAP_KEYFREE_CALLBACK)(void *arg,
-                                                         const struct berval *);
-typedef int(LDAP_C LDAP_CALLBACK LDAP_CMP_CALLBACK)(const char *val1,
-                                                    const char *val2);
-typedef int(LDAP_C LDAP_CALLBACK LDAP_VALCMP_CALLBACK)(const char **val1p,
-                                                       const char **val2p);
+typedef const struct berval*(LDAP_C LDAP_CALLBACK LDAP_KEYGEN_CALLBACK)(
+    void* arg, LDAP* ld, LDAPMessage* entry);
+typedef int(LDAP_C LDAP_CALLBACK LDAP_KEYCMP_CALLBACK)(void* arg,
+                                                       const struct berval*,
+                                                       const struct berval*);
+typedef void(LDAP_C LDAP_CALLBACK LDAP_KEYFREE_CALLBACK)(void* arg,
+                                                         const struct berval*);
+typedef int(LDAP_C LDAP_CALLBACK LDAP_CMP_CALLBACK)(const char* val1,
+                                                    const char* val2);
+typedef int(LDAP_C LDAP_CALLBACK LDAP_VALCMP_CALLBACK)(const char** val1p,
+                                                       const char** val2p);
 
 /*
  * Client side sorting functions:
  */
 LDAP_API(int)
 LDAP_CALL
-ldap_keysort_entries(LDAP *ld, LDAPMessage **chain, void *arg,
-                     LDAP_KEYGEN_CALLBACK *gen, LDAP_KEYCMP_CALLBACK *cmp,
-                     LDAP_KEYFREE_CALLBACK *fre);
+ldap_keysort_entries(LDAP* ld, LDAPMessage** chain, void* arg,
+                     LDAP_KEYGEN_CALLBACK* gen, LDAP_KEYCMP_CALLBACK* cmp,
+                     LDAP_KEYFREE_CALLBACK* fre);
 LDAP_API(int)
-LDAP_CALL ldap_multisort_entries(LDAP *ld, LDAPMessage **chain, char **attr,
-                                 LDAP_CMP_CALLBACK *cmp);
+LDAP_CALL ldap_multisort_entries(LDAP* ld, LDAPMessage** chain, char** attr,
+                                 LDAP_CMP_CALLBACK* cmp);
 LDAP_API(int)
-LDAP_CALL ldap_sort_entries(LDAP *ld, LDAPMessage **chain, char *attr,
-                            LDAP_CMP_CALLBACK *cmp);
+LDAP_CALL ldap_sort_entries(LDAP* ld, LDAPMessage** chain, char* attr,
+                            LDAP_CMP_CALLBACK* cmp);
 LDAP_API(int)
-LDAP_CALL ldap_sort_values(LDAP *ld, char **vals, LDAP_VALCMP_CALLBACK *cmp);
+LDAP_CALL ldap_sort_values(LDAP* ld, char** vals, LDAP_VALCMP_CALLBACK* cmp);
 LDAP_API(int)
-LDAP_C LDAP_CALLBACK ldap_sort_strcasecmp(const char **a, const char **b);
+LDAP_C LDAP_CALLBACK ldap_sort_strcasecmp(const char** a, const char** b);
 
 /*
  * Filter functions and definitions (an API extension --
  * LDAP_API_FEATURE_X_FILTER_FUNCTIONS)
  */
 /*
  * Structures, constants, and types for filter utility routines:
  */
 typedef struct ldap_filt_info {
-  char *lfi_filter;
-  char *lfi_desc;
+  char* lfi_filter;
+  char* lfi_desc;
   int lfi_scope;   /* LDAP_SCOPE_BASE, etc */
   int lfi_isexact; /* exact match filter? */
-  struct ldap_filt_info *lfi_next;
+  struct ldap_filt_info* lfi_next;
 } LDAPFiltInfo;
 
 #define LDAP_FILT_MAXSIZ 1024
 
 typedef struct ldap_filt_list LDAPFiltList; /* opaque filter list handle */
 typedef struct ldap_filt_desc LDAPFiltDesc; /* opaque filter desc handle */
 
 /*
  * Filter utility functions:
  */
-LDAP_API(LDAPFiltDesc *) LDAP_CALL ldap_init_getfilter(char *fname);
-LDAP_API(LDAPFiltDesc *)
-LDAP_CALL ldap_init_getfilter_buf(char *buf, long buflen);
-LDAP_API(LDAPFiltInfo *)
-LDAP_CALL ldap_getfirstfilter(LDAPFiltDesc *lfdp, char *tagpat, char *value);
-LDAP_API(LDAPFiltInfo *) LDAP_CALL ldap_getnextfilter(LDAPFiltDesc *lfdp);
+LDAP_API(LDAPFiltDesc*) LDAP_CALL ldap_init_getfilter(char* fname);
+LDAP_API(LDAPFiltDesc*)
+LDAP_CALL ldap_init_getfilter_buf(char* buf, long buflen);
+LDAP_API(LDAPFiltInfo*)
+LDAP_CALL ldap_getfirstfilter(LDAPFiltDesc* lfdp, char* tagpat, char* value);
+LDAP_API(LDAPFiltInfo*) LDAP_CALL ldap_getnextfilter(LDAPFiltDesc* lfdp);
 LDAP_API(int)
 LDAP_CALL
-ldap_set_filter_additions(LDAPFiltDesc *lfdp, char *prefix, char *suffix);
+ldap_set_filter_additions(LDAPFiltDesc* lfdp, char* prefix, char* suffix);
 LDAP_API(int)
-LDAP_CALL ldap_create_filter(char *buf, unsigned long buflen, char *pattern,
-                             char *prefix, char *suffix, char *attr,
-                             char *value, char **valwords);
-LDAP_API(void) LDAP_CALL ldap_getfilter_free(LDAPFiltDesc *lfdp);
+LDAP_CALL ldap_create_filter(char* buf, unsigned long buflen, char* pattern,
+                             char* prefix, char* suffix, char* attr,
+                             char* value, char** valwords);
+LDAP_API(void) LDAP_CALL ldap_getfilter_free(LDAPFiltDesc* lfdp);
 
 /*
  * Friendly mapping structure and routines (an API extension)
  */
 typedef struct friendly {
-  char *f_unfriendly;
-  char *f_friendly;
+  char* f_unfriendly;
+  char* f_friendly;
 } * FriendlyMap;
-LDAP_API(char *)
-LDAP_CALL ldap_friendly_name(char *filename, char *name, FriendlyMap *map);
-LDAP_API(void) LDAP_CALL ldap_free_friendlymap(FriendlyMap *map);
+LDAP_API(char*)
+LDAP_CALL ldap_friendly_name(char* filename, char* name, FriendlyMap* map);
+LDAP_API(void) LDAP_CALL ldap_free_friendlymap(FriendlyMap* map);
 
 /*
  * In Memory Cache (an API extension -- LDAP_API_FEATURE_X_MEMCACHE)
  */
 typedef struct ldapmemcache LDAPMemCache; /* opaque in-memory cache handle */
 
 LDAP_API(int)
 LDAP_CALL ldap_memcache_init(unsigned long ttl, unsigned long size,
-                             char **baseDNs, struct ldap_thread_fns *thread_fns,
-                             LDAPMemCache **cachep);
-LDAP_API(int) LDAP_CALL ldap_memcache_set(LDAP *ld, LDAPMemCache *cache);
-LDAP_API(int) LDAP_CALL ldap_memcache_get(LDAP *ld, LDAPMemCache **cachep);
+                             char** baseDNs, struct ldap_thread_fns* thread_fns,
+                             LDAPMemCache** cachep);
+LDAP_API(int) LDAP_CALL ldap_memcache_set(LDAP* ld, LDAPMemCache* cache);
+LDAP_API(int) LDAP_CALL ldap_memcache_get(LDAP* ld, LDAPMemCache** cachep);
 LDAP_API(void)
-LDAP_CALL ldap_memcache_flush(LDAPMemCache *cache, char *dn, int scope);
+LDAP_CALL ldap_memcache_flush(LDAPMemCache* cache, char* dn, int scope);
 LDAP_API(void)
-LDAP_CALL ldap_memcache_flush_results(LDAPMemCache *cache, char *dn, int scope);
-LDAP_API(void) LDAP_CALL ldap_memcache_destroy(LDAPMemCache *cache);
-LDAP_API(void) LDAP_CALL ldap_memcache_update(LDAPMemCache *cache);
+LDAP_CALL ldap_memcache_flush_results(LDAPMemCache* cache, char* dn, int scope);
+LDAP_API(void) LDAP_CALL ldap_memcache_destroy(LDAPMemCache* cache);
+LDAP_API(void) LDAP_CALL ldap_memcache_update(LDAPMemCache* cache);
 
 /*
  * Timeout value for nonblocking connect call
  */
 #define LDAP_X_OPT_CONNECT_TIMEOUT (LDAP_OPT_PRIVATE_EXTENSION_BASE + 0x0F01)
 /* 0x4000 + 0x0F01 = 0x4F01 = 20225 - API extension */
 
 /*
@@ -702,29 +702,29 @@ LDAP_API(void) LDAP_CALL ldap_memcache_u
  * functions by making a call like this:
  *    ldap_set_option( NULL, LDAP_OPT_MEMALLOC_FN_PTRS, &memalloc_fns );
  *
  * look in lber.h for the function typedefs themselves.
  */
 #define LDAP_OPT_MEMALLOC_FN_PTRS 0x61 /* 97 - API extension */
 
 struct ldap_memalloc_fns {
-  LDAP_MALLOC_CALLBACK *ldapmem_malloc;
-  LDAP_CALLOC_CALLBACK *ldapmem_calloc;
-  LDAP_REALLOC_CALLBACK *ldapmem_realloc;
-  LDAP_FREE_CALLBACK *ldapmem_free;
+  LDAP_MALLOC_CALLBACK* ldapmem_malloc;
+  LDAP_CALLOC_CALLBACK* ldapmem_calloc;
+  LDAP_REALLOC_CALLBACK* ldapmem_realloc;
+  LDAP_FREE_CALLBACK* ldapmem_free;
 };
 
 /*
  * Memory allocation functions (an API extension)
  */
-void *ldap_x_malloc(size_t size);
-void *ldap_x_calloc(size_t nelem, size_t elsize);
-void *ldap_x_realloc(void *ptr, size_t size);
-void ldap_x_free(void *ptr);
+void* ldap_x_malloc(size_t size);
+void* ldap_x_calloc(size_t nelem, size_t elsize);
+void* ldap_x_realloc(void* ptr, size_t size);
+void ldap_x_free(void* ptr);
 
 /*
  * Server reconnect (an API extension).
  */
 #define LDAP_OPT_RECONNECT 0x62 /* 98 - API extension */
 
 /*
  * Extra thread callback functions (an API extension --
@@ -732,93 +732,93 @@ void ldap_x_free(void *ptr);
  */
 #define LDAP_OPT_EXTRA_THREAD_FN_PTRS 0x65 /* 101 - API extension */
 
 /*
  * When bind is called, don't bind if there's a connection open with the same DN
  */
 #define LDAP_OPT_NOREBIND 0x66 /* 102 - API extension */
 
-typedef int(LDAP_C LDAP_CALLBACK LDAP_TF_MUTEX_TRYLOCK_CALLBACK)(void *m);
-typedef void *(LDAP_C LDAP_CALLBACK LDAP_TF_SEMA_ALLOC_CALLBACK)(void);
-typedef void(LDAP_C LDAP_CALLBACK LDAP_TF_SEMA_FREE_CALLBACK)(void *s);
-typedef int(LDAP_C LDAP_CALLBACK LDAP_TF_SEMA_WAIT_CALLBACK)(void *s);
-typedef int(LDAP_C LDAP_CALLBACK LDAP_TF_SEMA_POST_CALLBACK)(void *s);
-typedef void *(LDAP_C LDAP_CALLBACK LDAP_TF_THREADID_CALLBACK)(void);
+typedef int(LDAP_C LDAP_CALLBACK LDAP_TF_MUTEX_TRYLOCK_CALLBACK)(void* m);
+typedef void*(LDAP_C LDAP_CALLBACK LDAP_TF_SEMA_ALLOC_CALLBACK)(void);
+typedef void(LDAP_C LDAP_CALLBACK LDAP_TF_SEMA_FREE_CALLBACK)(void* s);
+typedef int(LDAP_C LDAP_CALLBACK LDAP_TF_SEMA_WAIT_CALLBACK)(void* s);
+typedef int(LDAP_C LDAP_CALLBACK LDAP_TF_SEMA_POST_CALLBACK)(void* s);
+typedef void*(LDAP_C LDAP_CALLBACK LDAP_TF_THREADID_CALLBACK)(void);
 
 struct ldap_extra_thread_fns {
-  LDAP_TF_MUTEX_TRYLOCK_CALLBACK *ltf_mutex_trylock;
-  LDAP_TF_SEMA_ALLOC_CALLBACK *ltf_sema_alloc;
-  LDAP_TF_SEMA_FREE_CALLBACK *ltf_sema_free;
-  LDAP_TF_SEMA_WAIT_CALLBACK *ltf_sema_wait;
-  LDAP_TF_SEMA_POST_CALLBACK *ltf_sema_post;
-  LDAP_TF_THREADID_CALLBACK *ltf_threadid_fn;
+  LDAP_TF_MUTEX_TRYLOCK_CALLBACK* ltf_mutex_trylock;
+  LDAP_TF_SEMA_ALLOC_CALLBACK* ltf_sema_alloc;
+  LDAP_TF_SEMA_FREE_CALLBACK* ltf_sema_free;
+  LDAP_TF_SEMA_WAIT_CALLBACK* ltf_sema_wait;
+  LDAP_TF_SEMA_POST_CALLBACK* ltf_sema_post;
+  LDAP_TF_THREADID_CALLBACK* ltf_threadid_fn;
 };
 
 /*
  * Debugging level (an API extension)
  */
 #define LDAP_OPT_DEBUG_LEVEL 0x6E /* 110 - API extension */
 /* On UNIX, there's only one copy of ldap_debug */
 /* On NT, each dll keeps its own module_ldap_debug, which */
 /* points to the process' ldap_debug and needs initializing after load */
 #ifdef _WIN32
-extern int *module_ldap_debug;
-typedef void (*set_debug_level_fn_t)(int *);
+extern int* module_ldap_debug;
+typedef void (*set_debug_level_fn_t)(int*);
 #endif
 
 #ifdef LDAP_DNS
 #  define LDAP_OPT_DNS 0x0C /* 12 - API extension */
 #endif
 
 /*
  * UTF-8 routines (should these move into libnls?)
  */
 /* number of bytes in character */
-LDAP_API(int) LDAP_CALL ldap_utf8len(const char *);
+LDAP_API(int) LDAP_CALL ldap_utf8len(const char*);
 /* find next character */
-LDAP_API(char *) LDAP_CALL ldap_utf8next(char *);
+LDAP_API(char*) LDAP_CALL ldap_utf8next(char*);
 /* find previous character */
-LDAP_API(char *) LDAP_CALL ldap_utf8prev(char *);
+LDAP_API(char*) LDAP_CALL ldap_utf8prev(char*);
 /* copy one character */
-LDAP_API(int) LDAP_CALL ldap_utf8copy(char *dst, const char *src);
+LDAP_API(int) LDAP_CALL ldap_utf8copy(char* dst, const char* src);
 /* total number of characters */
-LDAP_API(size_t) LDAP_CALL ldap_utf8characters(const char *);
+LDAP_API(size_t) LDAP_CALL ldap_utf8characters(const char*);
 /* get one UCS-4 character, and move *src to the next character */
-LDAP_API(unsigned long) LDAP_CALL ldap_utf8getcc(const char **src);
+LDAP_API(unsigned long) LDAP_CALL ldap_utf8getcc(const char** src);
 /* UTF-8 aware strtok_r() */
-LDAP_API(char *)
-LDAP_CALL ldap_utf8strtok_r(char *src, const char *brk, char **next);
+LDAP_API(char*)
+LDAP_CALL ldap_utf8strtok_r(char* src, const char* brk, char** next);
 
 /* like isalnum(*s) in the C locale */
-LDAP_API(int) LDAP_CALL ldap_utf8isalnum(char *s);
+LDAP_API(int) LDAP_CALL ldap_utf8isalnum(char* s);
 /* like isalpha(*s) in the C locale */
-LDAP_API(int) LDAP_CALL ldap_utf8isalpha(char *s);
+LDAP_API(int) LDAP_CALL ldap_utf8isalpha(char* s);
 /* like isdigit(*s) in the C locale */
-LDAP_API(int) LDAP_CALL ldap_utf8isdigit(char *s);
+LDAP_API(int) LDAP_CALL ldap_utf8isdigit(char* s);
 /* like isxdigit(*s) in the C locale */
-LDAP_API(int) LDAP_CALL ldap_utf8isxdigit(char *s);
+LDAP_API(int) LDAP_CALL ldap_utf8isxdigit(char* s);
 /* like isspace(*s) in the C locale */
-LDAP_API(int) LDAP_CALL ldap_utf8isspace(char *s);
+LDAP_API(int) LDAP_CALL ldap_utf8isspace(char* s);
 
-#define LDAP_UTF8LEN(s) ((0x80 & *(unsigned char *)(s)) ? ldap_utf8len(s) : 1)
+#define LDAP_UTF8LEN(s) ((0x80 & *(unsigned char*)(s)) ? ldap_utf8len(s) : 1)
 #define LDAP_UTF8NEXT(s) \
-  ((0x80 & *(unsigned char *)(s)) ? ldap_utf8next(s) : (s) + 1)
+  ((0x80 & *(unsigned char*)(s)) ? ldap_utf8next(s) : (s) + 1)
 #define LDAP_UTF8INC(s) \
-  ((0x80 & *(unsigned char *)(s)) ? s = ldap_utf8next(s) : ++s)
+  ((0x80 & *(unsigned char*)(s)) ? s = ldap_utf8next(s) : ++s)
 
 #define LDAP_UTF8PREV(s) ldap_utf8prev(s)
 #define LDAP_UTF8DEC(s) (s = ldap_utf8prev(s))
 
 #define LDAP_UTF8COPY(d, s) \
-  ((0x80 & *(unsigned char *)(s)) ? ldap_utf8copy(d, s) : ((*(d) = *(s)), 1))
+  ((0x80 & *(unsigned char*)(s)) ? ldap_utf8copy(d, s) : ((*(d) = *(s)), 1))
 #define LDAP_UTF8GETCC(s) \
-  ((0x80 & *(unsigned char *)(s)) ? ldap_utf8getcc(&s) : *s++)
+  ((0x80 & *(unsigned char*)(s)) ? ldap_utf8getcc(&s) : *s++)
 #define LDAP_UTF8GETC(s) \
-  ((0x80 & *(unsigned char *)(s)) ? ldap_utf8getcc((const char **)&s) : *s++)
+  ((0x80 & *(unsigned char*)(s)) ? ldap_utf8getcc((const char**)&s) : *s++)
 
 /* SASL options */
 #define LDAP_OPT_X_SASL_MECH 0x6100
 #define LDAP_OPT_X_SASL_REALM 0x6101
 #define LDAP_OPT_X_SASL_AUTHCID 0x6102
 #define LDAP_OPT_X_SASL_AUTHZID 0x6103
 #define LDAP_OPT_X_SASL_SSF 0x6104          /* read-only */
 #define LDAP_OPT_X_SASL_SSF_EXTERNAL 0x6105 /* write-only */
@@ -837,62 +837,62 @@ LDAP_API(int) LDAP_CALL ldap_utf8isspace
 #define LDAP_SASL_QUIET \
   2U /* no prompts - only use defaults (e.g. for non-interactive apps) */
 
 /*
  * V3 SASL Interaction Function Callback Prototype
  *      when using Cyrus SASL, interact is pointer to sasl_interact_t
  *  should likely passed in a control (and provided controls)
  */
-typedef int(LDAP_SASL_INTERACT_PROC)(LDAP *ld, unsigned flags, void *defaults,
-                                     void *interact);
+typedef int(LDAP_SASL_INTERACT_PROC)(LDAP* ld, unsigned flags, void* defaults,
+                                     void* interact);
 
 LDAP_API(int)
 LDAP_CALL
-ldap_sasl_interactive_bind_s(LDAP *ld, const char *dn, /* usually NULL */
-                             const char *saslMechanism,
-                             LDAPControl **serverControls,
-                             LDAPControl **clientControls,
+ldap_sasl_interactive_bind_s(LDAP* ld, const char* dn, /* usually NULL */
+                             const char* saslMechanism,
+                             LDAPControl** serverControls,
+                             LDAPControl** clientControls,
 
                              /* should be client controls */
-                             unsigned flags, LDAP_SASL_INTERACT_PROC *proc,
-                             void *defaults);
+                             unsigned flags, LDAP_SASL_INTERACT_PROC* proc,
+                             void* defaults);
 
 LDAP_API(int)
 LDAP_CALL ldap_sasl_interactive_bind_ext_s(
-    LDAP *ld, const char *dn, /* usually NULL */
-    const char *saslMechanism, LDAPControl **serverControls,
-    LDAPControl **clientControls,
+    LDAP* ld, const char* dn, /* usually NULL */
+    const char* saslMechanism, LDAPControl** serverControls,
+    LDAPControl** clientControls,
 
     /* should be client controls */
-    unsigned flags, LDAP_SASL_INTERACT_PROC *proc, void *defaults,
-    LDAPControl ***responseControls);
+    unsigned flags, LDAP_SASL_INTERACT_PROC* proc, void* defaults,
+    LDAPControl*** responseControls);
 
 /*
  * Password modify functions
  */
 LDAP_API(int)
-LDAP_CALL ldap_passwd(LDAP *ld, struct berval *userid, struct berval *oldpasswd,
-                      struct berval *newpasswd, LDAPControl **serverctrls,
-                      LDAPControl **clientctrls, int *msgidp);
+LDAP_CALL ldap_passwd(LDAP* ld, struct berval* userid, struct berval* oldpasswd,
+                      struct berval* newpasswd, LDAPControl** serverctrls,
+                      LDAPControl** clientctrls, int* msgidp);
 
 LDAP_API(int)
 LDAP_CALL
-ldap_passwd_s(LDAP *ld, struct berval *userid, struct berval *oldpasswd,
-              struct berval *newpasswd, struct berval *genpasswd,
-              LDAPControl **serverctrls, LDAPControl **clientctrls);
+ldap_passwd_s(LDAP* ld, struct berval* userid, struct berval* oldpasswd,
+              struct berval* newpasswd, struct berval* genpasswd,
+              LDAPControl** serverctrls, LDAPControl** clientctrls);
 
 LDAP_API(int)
 LDAP_CALL
-ldap_parse_passwd(LDAP *ld, LDAPMessage *result, struct berval *genpasswd);
+ldap_parse_passwd(LDAP* ld, LDAPMessage* result, struct berval* genpasswd);
 
 /*
  * in reslist.c
  */
-LDAP_API(LDAPMessage *)
-LDAP_CALL ldap_delete_result_entry(LDAPMessage **list, LDAPMessage *e);
+LDAP_API(LDAPMessage*)
+LDAP_CALL ldap_delete_result_entry(LDAPMessage** list, LDAPMessage* e);
 LDAP_API(void)
-LDAP_CALL ldap_add_result_entry(LDAPMessage **list, LDAPMessage *e);
+LDAP_CALL ldap_add_result_entry(LDAPMessage** list, LDAPMessage* e);
 
 #ifdef __cplusplus
 }
 #endif
 #endif /* _LDAP_EXTENSION_H */
--- a/ldap/c-sdk/include/ldap-standard.h
+++ b/ldap/c-sdk/include/ldap-standard.h
@@ -92,76 +92,76 @@ extern "C" {
 
 /*
  * Well-behaved private and experimental extensions will use option values
  * between 0x4000 (16384) and 0x7FFF (32767) inclusive.
  */
 #define LDAP_OPT_PRIVATE_EXTENSION_BASE 0x4000 /* to 0x7FFF inclusive */
 
 /* for on/off options */
-#define LDAP_OPT_ON ((void *)1)
-#define LDAP_OPT_OFF ((void *)0)
+#define LDAP_OPT_ON ((void*)1)
+#define LDAP_OPT_OFF ((void*)0)
 
 typedef struct ldap LDAP;           /* opaque connection handle */
 typedef struct ldapmsg LDAPMessage; /* opaque result/entry handle */
 
 /* structure representing an LDAP modification */
 typedef struct ldapmod {
   int mod_op; /* kind of mod + form of values*/
 #define LDAP_MOD_ADD 0x00
 #define LDAP_MOD_DELETE 0x01
 #define LDAP_MOD_REPLACE 0x02
 #define LDAP_MOD_BVALUES 0x80
-  char *mod_type; /* attribute name to modify */
+  char* mod_type; /* attribute name to modify */
   union mod_vals_u {
-    char **modv_strvals;
-    struct berval **modv_bvals;
+    char** modv_strvals;
+    struct berval** modv_bvals;
   } mod_vals; /* values to add/delete/replace */
 #define mod_values mod_vals.modv_strvals
 #define mod_bvalues mod_vals.modv_bvals
 } LDAPMod;
 
 /*
  * structure for holding ldapv3 controls
  */
 typedef struct ldapcontrol {
-  char *ldctl_oid;
+  char* ldctl_oid;
   struct berval ldctl_value;
   char ldctl_iscritical;
 } LDAPControl;
 
 /*
  * LDAP API information.  Can be retrieved by using a sequence like:
  *
  *    LDAPAPIInfo ldai;
  *    ldai.ldapai_info_version = LDAP_API_INFO_VERSION;
  *    if ( ldap_get_option( NULL, LDAP_OPT_API_INFO, &ldia ) == 0 ) ...
  */
 #define LDAP_API_INFO_VERSION 1
 typedef struct ldapapiinfo {
   int ldapai_info_version;     /* version of this struct (1) */
   int ldapai_api_version;      /* revision of API supported */
   int ldapai_protocol_version; /* highest LDAP version supported */
-  char **ldapai_extensions;    /* names of API extensions */
-  char *ldapai_vendor_name;    /* name of supplier */
+  char** ldapai_extensions;    /* names of API extensions */
+  char* ldapai_vendor_name;    /* name of supplier */
   int ldapai_vendor_version;   /* supplier-specific version times 100 */
 } LDAPAPIInfo;
 
 /*
  * LDAP API extended features info.  Can be retrieved by using a sequence like:
  *
  *    LDAPAPIFeatureInfo ldfi;
  *    ldfi.ldapaif_info_version = LDAP_FEATURE_INFO_VERSION;
  *    ldfi.ldapaif_name = "VIRTUAL_LIST_VIEW";
  *    if ( ldap_get_option( NULL, LDAP_OPT_API_FEATURE_INFO, &ldfi ) == 0 ) ...
  */
 #define LDAP_FEATURE_INFO_VERSION 1
 typedef struct ldap_apifeature_info {
   int ldapaif_info_version; /* version of this struct (1) */
-  char *ldapaif_name;       /* name of supported feature */
+  char* ldapaif_name;       /* name of supported feature */
   int ldapaif_version;      /* revision of supported feature */
 } LDAPAPIFeatureInfo;
 
 /* possible result types a server can return */
 #define LDAP_RES_BIND 0x61L             /* 97 */
 #define LDAP_RES_SEARCH_ENTRY 0x64L     /* 100 */
 #define LDAP_RES_SEARCH_RESULT 0x65L    /* 101 */
 #define LDAP_RES_MODIFY 0x67L           /* 103 */
@@ -276,210 +276,210 @@ typedef struct ldap_apifeature_info {
 /*
  * Initializing an ldap session, set session handle options, and
  * closing an ldap session functions
  *
  * NOTE: If you want to use IPv6, you must use prldap creating a LDAP handle
  * with prldap_init instead of ldap_init. Or install the NSPR functions
  * by calling prldap_install_routines. (See the nspr samples in examples)
  */
-LDAP_API(LDAP *) LDAP_CALL ldap_init(const char *defhost, int defport);
+LDAP_API(LDAP*) LDAP_CALL ldap_init(const char* defhost, int defport);
 LDAP_API(int)
-LDAP_CALL ldap_set_option(LDAP *ld, int option, const void *optdata);
-LDAP_API(int) LDAP_CALL ldap_get_option(LDAP *ld, int option, void *optdata);
-LDAP_API(int) LDAP_CALL ldap_unbind(LDAP *ld);
-LDAP_API(int) LDAP_CALL ldap_unbind_s(LDAP *ld);
+LDAP_CALL ldap_set_option(LDAP* ld, int option, const void* optdata);
+LDAP_API(int) LDAP_CALL ldap_get_option(LDAP* ld, int option, void* optdata);
+LDAP_API(int) LDAP_CALL ldap_unbind(LDAP* ld);
+LDAP_API(int) LDAP_CALL ldap_unbind_s(LDAP* ld);
 
 /*
  * perform ldap operations
  */
-LDAP_API(int) LDAP_CALL ldap_abandon(LDAP *ld, int msgid);
-LDAP_API(int) LDAP_CALL ldap_add(LDAP *ld, const char *dn, LDAPMod **attrs);
-LDAP_API(int) LDAP_CALL ldap_add_s(LDAP *ld, const char *dn, LDAPMod **attrs);
+LDAP_API(int) LDAP_CALL ldap_abandon(LDAP* ld, int msgid);
+LDAP_API(int) LDAP_CALL ldap_add(LDAP* ld, const char* dn, LDAPMod** attrs);
+LDAP_API(int) LDAP_CALL ldap_add_s(LDAP* ld, const char* dn, LDAPMod** attrs);
 LDAP_API(int)
-LDAP_CALL ldap_simple_bind(LDAP *ld, const char *who, const char *passwd);
+LDAP_CALL ldap_simple_bind(LDAP* ld, const char* who, const char* passwd);
 LDAP_API(int)
-LDAP_CALL ldap_simple_bind_s(LDAP *ld, const char *who, const char *passwd);
-LDAP_API(int) LDAP_CALL ldap_modify(LDAP *ld, const char *dn, LDAPMod **mods);
-LDAP_API(int) LDAP_CALL ldap_modify_s(LDAP *ld, const char *dn, LDAPMod **mods);
+LDAP_CALL ldap_simple_bind_s(LDAP* ld, const char* who, const char* passwd);
+LDAP_API(int) LDAP_CALL ldap_modify(LDAP* ld, const char* dn, LDAPMod** mods);
+LDAP_API(int) LDAP_CALL ldap_modify_s(LDAP* ld, const char* dn, LDAPMod** mods);
 LDAP_API(int)
 LDAP_CALL
-ldap_compare(LDAP *ld, const char *dn, const char *attr, const char *value);
+ldap_compare(LDAP* ld, const char* dn, const char* attr, const char* value);
 LDAP_API(int)
-LDAP_CALL ldap_compare_s(LDAP *ld, const char *dn, const char *attr,
-                         const char *value);
-LDAP_API(int) LDAP_CALL ldap_delete(LDAP *ld, const char *dn);
-LDAP_API(int) LDAP_CALL ldap_delete_s(LDAP *ld, const char *dn);
+LDAP_CALL ldap_compare_s(LDAP* ld, const char* dn, const char* attr,
+                         const char* value);
+LDAP_API(int) LDAP_CALL ldap_delete(LDAP* ld, const char* dn);
+LDAP_API(int) LDAP_CALL ldap_delete_s(LDAP* ld, const char* dn);
 LDAP_API(int)
-LDAP_CALL ldap_search(LDAP *ld, const char *base, int scope, const char *filter,
-                      char **attrs, int attrsonly);
+LDAP_CALL ldap_search(LDAP* ld, const char* base, int scope, const char* filter,
+                      char** attrs, int attrsonly);
 LDAP_API(int)
 LDAP_CALL
-ldap_search_s(LDAP *ld, const char *base, int scope, const char *filter,
-              char **attrs, int attrsonly, LDAPMessage **res);
+ldap_search_s(LDAP* ld, const char* base, int scope, const char* filter,
+              char** attrs, int attrsonly, LDAPMessage** res);
 LDAP_API(int)
-LDAP_CALL ldap_search_st(LDAP *ld, const char *base, int scope,
-                         const char *filter, char **attrs, int attrsonly,
-                         struct timeval *timeout, LDAPMessage **res);
+LDAP_CALL ldap_search_st(LDAP* ld, const char* base, int scope,
+                         const char* filter, char** attrs, int attrsonly,
+                         struct timeval* timeout, LDAPMessage** res);
 
 /*
  * obtain result from ldap operation
  */
 LDAP_API(int)
-LDAP_CALL ldap_result(LDAP *ld, int msgid, int all, struct timeval *timeout,
-                      LDAPMessage **result);
+LDAP_CALL ldap_result(LDAP* ld, int msgid, int all, struct timeval* timeout,
+                      LDAPMessage** result);
 
 /*
  * peeking inside LDAP Messages and deallocating LDAP Messages
  */
-LDAP_API(int) LDAP_CALL ldap_msgfree(LDAPMessage *lm);
-LDAP_API(int) LDAP_CALL ldap_msgid(LDAPMessage *lm);
-LDAP_API(int) LDAP_CALL ldap_msgtype(LDAPMessage *lm);
+LDAP_API(int) LDAP_CALL ldap_msgfree(LDAPMessage* lm);
+LDAP_API(int) LDAP_CALL ldap_msgid(LDAPMessage* lm);
+LDAP_API(int) LDAP_CALL ldap_msgtype(LDAPMessage* lm);
 
 /*
  * Routines to parse/deal with results and errors returned
  */
-LDAP_API(char *) LDAP_CALL ldap_err2string(int err);
-LDAP_API(LDAPMessage *)
-LDAP_CALL ldap_first_entry(LDAP *ld, LDAPMessage *chain);
-LDAP_API(LDAPMessage *) LDAP_CALL ldap_next_entry(LDAP *ld, LDAPMessage *entry);
-LDAP_API(int) LDAP_CALL ldap_count_entries(LDAP *ld, LDAPMessage *chain);
-LDAP_API(char *) LDAP_CALL ldap_get_dn(LDAP *ld, LDAPMessage *entry);
-LDAP_API(char *) LDAP_CALL ldap_dn2ufn(const char *dn);
-LDAP_API(char **) LDAP_CALL ldap_explode_dn(const char *dn, const int notypes);
-LDAP_API(char **)
-LDAP_CALL ldap_explode_rdn(const char *rdn, const int notypes);
-LDAP_API(char *)
-LDAP_CALL ldap_first_attribute(LDAP *ld, LDAPMessage *entry, BerElement **ber);
-LDAP_API(char *)
-LDAP_CALL ldap_next_attribute(LDAP *ld, LDAPMessage *entry, BerElement *ber);
-LDAP_API(char **)
-LDAP_CALL ldap_get_values(LDAP *ld, LDAPMessage *entry, const char *target);
-LDAP_API(struct berval **)
-LDAP_CALL ldap_get_values_len(LDAP *ld, LDAPMessage *entry, const char *target);
-LDAP_API(int) LDAP_CALL ldap_count_values(char **vals);
-LDAP_API(int) LDAP_CALL ldap_count_values_len(struct berval **vals);
-LDAP_API(void) LDAP_CALL ldap_value_free(char **vals);
-LDAP_API(void) LDAP_CALL ldap_value_free_len(struct berval **vals);
-LDAP_API(void) LDAP_CALL ldap_memfree(void *p);
+LDAP_API(char*) LDAP_CALL ldap_err2string(int err);
+LDAP_API(LDAPMessage*)
+LDAP_CALL ldap_first_entry(LDAP* ld, LDAPMessage* chain);
+LDAP_API(LDAPMessage*) LDAP_CALL ldap_next_entry(LDAP* ld, LDAPMessage* entry);
+LDAP_API(int) LDAP_CALL ldap_count_entries(LDAP* ld, LDAPMessage* chain);
+LDAP_API(char*) LDAP_CALL ldap_get_dn(LDAP* ld, LDAPMessage* entry);
+LDAP_API(char*) LDAP_CALL ldap_dn2ufn(const char* dn);
+LDAP_API(char**) LDAP_CALL ldap_explode_dn(const char* dn, const int notypes);
+LDAP_API(char**)
+LDAP_CALL ldap_explode_rdn(const char* rdn, const int notypes);
+LDAP_API(char*)
+LDAP_CALL ldap_first_attribute(LDAP* ld, LDAPMessage* entry, BerElement** ber);
+LDAP_API(char*)
+LDAP_CALL ldap_next_attribute(LDAP* ld, LDAPMessage* entry, BerElement* ber);
+LDAP_API(char**)
+LDAP_CALL ldap_get_values(LDAP* ld, LDAPMessage* entry, const char* target);
+LDAP_API(struct berval**)
+LDAP_CALL ldap_get_values_len(LDAP* ld, LDAPMessage* entry, const char* target);
+LDAP_API(int) LDAP_CALL ldap_count_values(char** vals);
+LDAP_API(int) LDAP_CALL ldap_count_values_len(struct berval** vals);
+LDAP_API(void) LDAP_CALL ldap_value_free(char** vals);
+LDAP_API(void) LDAP_CALL ldap_value_free_len(struct berval** vals);
+LDAP_API(void) LDAP_CALL ldap_memfree(void* p);
 
 /*
  * LDAPv3 extended operation calls
  */
 /*
  * Note: all of the new asynchronous calls return an LDAP error code,
  * not a message id.  A message id is returned via the int *msgidp
  * parameter (usually the last parameter) if appropriate.
  */
 LDAP_API(int)
-LDAP_CALL ldap_abandon_ext(LDAP *ld, int msgid, LDAPControl **serverctrls,
-                           LDAPControl **clientctrls);
+LDAP_CALL ldap_abandon_ext(LDAP* ld, int msgid, LDAPControl** serverctrls,
+                           LDAPControl** clientctrls);
 LDAP_API(int)
-LDAP_CALL ldap_add_ext(LDAP *ld, const char *dn, LDAPMod **attrs,
-                       LDAPControl **serverctrls, LDAPControl **clientctrls,
-                       int *msgidp);
+LDAP_CALL ldap_add_ext(LDAP* ld, const char* dn, LDAPMod** attrs,
+                       LDAPControl** serverctrls, LDAPControl** clientctrls,
+                       int* msgidp);
 LDAP_API(int)
-LDAP_CALL ldap_add_ext_s(LDAP *ld, const char *dn, LDAPMod **attrs,
-                         LDAPControl **serverctrls, LDAPControl **clientctrls);
+LDAP_CALL ldap_add_ext_s(LDAP* ld, const char* dn, LDAPMod** attrs,
+                         LDAPControl** serverctrls, LDAPControl** clientctrls);
 LDAP_API(int)
-LDAP_CALL ldap_sasl_bind(LDAP *ld, const char *dn, const char *mechanism,
-                         const struct berval *cred, LDAPControl **serverctrls,
-                         LDAPControl **clientctrls, int *msgidp);
+LDAP_CALL ldap_sasl_bind(LDAP* ld, const char* dn, const char* mechanism,
+                         const struct berval* cred, LDAPControl** serverctrls,
+                         LDAPControl** clientctrls, int* msgidp);
 LDAP_API(int)
 LDAP_CALL
-ldap_sasl_bind_s(LDAP *ld, const char *dn, const char *mechanism,
-                 const struct berval *cred, LDAPControl **serverctrls,
-                 LDAPControl **clientctrls, struct berval **servercredp);
+ldap_sasl_bind_s(LDAP* ld, const char* dn, const char* mechanism,
+                 const struct berval* cred, LDAPControl** serverctrls,
+                 LDAPControl** clientctrls, struct berval** servercredp);
 LDAP_API(int)
-LDAP_CALL ldap_modify_ext(LDAP *ld, const char *dn, LDAPMod **mods,
-                          LDAPControl **serverctrls, LDAPControl **clientctrls,
-                          int *msgidp);
+LDAP_CALL ldap_modify_ext(LDAP* ld, const char* dn, LDAPMod** mods,
+                          LDAPControl** serverctrls, LDAPControl** clientctrls,
+                          int* msgidp);
 LDAP_API(int)
 LDAP_CALL
-ldap_modify_ext_s(LDAP *ld, const char *dn, LDAPMod **mods,
-                  LDAPControl **serverctrls, LDAPControl **clientctrls);
+ldap_modify_ext_s(LDAP* ld, const char* dn, LDAPMod** mods,
+                  LDAPControl** serverctrls, LDAPControl** clientctrls);
 LDAP_API(int)
-LDAP_CALL ldap_rename(LDAP *ld, const char *dn, const char *newrdn,
-                      const char *newparent, int deleteoldrdn,
-                      LDAPControl **serverctrls, LDAPControl **clientctrls,
-                      int *msgidp);
+LDAP_CALL ldap_rename(LDAP* ld, const char* dn, const char* newrdn,
+                      const char* newparent, int deleteoldrdn,
+                      LDAPControl** serverctrls, LDAPControl** clientctrls,
+                      int* msgidp);
 LDAP_API(int)
-LDAP_CALL ldap_rename_s(LDAP *ld, const char *dn, const char *newrdn,
-                        const char *newparent, int deleteoldrdn,
-                        LDAPControl **serverctrls, LDAPControl **clientctrls);
+LDAP_CALL ldap_rename_s(LDAP* ld, const char* dn, const char* newrdn,
+                        const char* newparent, int deleteoldrdn,
+                        LDAPControl** serverctrls, LDAPControl** clientctrls);
 LDAP_API(int)
 LDAP_CALL
-ldap_compare_ext(LDAP *ld, const char *dn, const char *attr,
-                 const struct berval *bvalue, LDAPControl **serverctrls,
-                 LDAPControl **clientctrls, int *msgidp);
+ldap_compare_ext(LDAP* ld, const char* dn, const char* attr,
+                 const struct berval* bvalue, LDAPControl** serverctrls,
+                 LDAPControl** clientctrls, int* msgidp);
 LDAP_API(int)
 LDAP_CALL
-ldap_compare_ext_s(LDAP *ld, const char *dn, const char *attr,
-                   const struct berval *bvalue, LDAPControl **serverctrls,
-                   LDAPControl **clientctrls);
+ldap_compare_ext_s(LDAP* ld, const char* dn, const char* attr,
+                   const struct berval* bvalue, LDAPControl** serverctrls,
+                   LDAPControl** clientctrls);
 LDAP_API(int)
-LDAP_CALL ldap_delete_ext(LDAP *ld, const char *dn, LDAPControl **serverctrls,
-                          LDAPControl **clientctrls, int *msgidp);
+LDAP_CALL ldap_delete_ext(LDAP* ld, const char* dn, LDAPControl** serverctrls,
+                          LDAPControl** clientctrls, int* msgidp);
 LDAP_API(int)
-LDAP_CALL ldap_delete_ext_s(LDAP *ld, const char *dn, LDAPControl **serverctrls,
-                            LDAPControl **clientctrls);
+LDAP_CALL ldap_delete_ext_s(LDAP* ld, const char* dn, LDAPControl** serverctrls,
+                            LDAPControl** clientctrls);
 LDAP_API(int)
-LDAP_CALL ldap_search_ext(LDAP *ld, const char *base, int scope,
-                          const char *filter, char **attrs, int attrsonly,
-                          LDAPControl **serverctrls, LDAPControl **clientctrls,
-                          struct timeval *timeoutp, int sizelimit, int *msgidp);
+LDAP_CALL ldap_search_ext(LDAP* ld, const char* base, int scope,
+                          const char* filter, char** attrs, int attrsonly,
+                          LDAPControl** serverctrls, LDAPControl** clientctrls,
+                          struct timeval* timeoutp, int sizelimit, int* msgidp);
 LDAP_API(int)
 LDAP_CALL
-ldap_search_ext_s(LDAP *ld, const char *base, int scope, const char *filter,
-                  char **attrs, int attrsonly, LDAPControl **serverctrls,
-                  LDAPControl **clientctrls, struct timeval *timeoutp,
-                  int sizelimit, LDAPMessage **res);
+ldap_search_ext_s(LDAP* ld, const char* base, int scope, const char* filter,
+                  char** attrs, int attrsonly, LDAPControl** serverctrls,
+                  LDAPControl** clientctrls, struct timeval* timeoutp,
+                  int sizelimit, LDAPMessage** res);
 LDAP_API(int)
-LDAP_CALL ldap_extended_operation(LDAP *ld, const char *requestoid,
-                                  const struct berval *requestdata,
-                                  LDAPControl **serverctrls,
-                                  LDAPControl **clientctrls, int *msgidp);
+LDAP_CALL ldap_extended_operation(LDAP* ld, const char* requestoid,
+                                  const struct berval* requestdata,
+                                  LDAPControl** serverctrls,
+                                  LDAPControl** clientctrls, int* msgidp);
 LDAP_API(int)
-LDAP_CALL ldap_extended_operation_s(LDAP *ld, const char *requestoid,
-                                    const struct berval *requestdata,
-                                    LDAPControl **serverctrls,
-                                    LDAPControl **clientctrls, char **retoidp,
-                                    struct berval **retdatap);
+LDAP_CALL ldap_extended_operation_s(LDAP* ld, const char* requestoid,
+                                    const struct berval* requestdata,
+                                    LDAPControl** serverctrls,
+                                    LDAPControl** clientctrls, char** retoidp,
+                                    struct berval** retdatap);
 LDAP_API(int)
-LDAP_CALL ldap_unbind_ext(LDAP *ld, LDAPControl **serverctrls,
-                          LDAPControl **clientctrls);
+LDAP_CALL ldap_unbind_ext(LDAP* ld, LDAPControl** serverctrls,
+                          LDAPControl** clientctrls);
 
 /*
  * LDAPv3 extended parsing / result handling calls
  */
 LDAP_API(int)
-LDAP_CALL ldap_parse_sasl_bind_result(LDAP *ld, LDAPMessage *res,
-                                      struct berval **servercredp, int freeit);
+LDAP_CALL ldap_parse_sasl_bind_result(LDAP* ld, LDAPMessage* res,
+                                      struct berval** servercredp, int freeit);
 LDAP_API(int)
 LDAP_CALL
-ldap_parse_result(LDAP *ld, LDAPMessage *res, int *errcodep, char **matcheddnp,
-                  char **errmsgp, char ***referralsp,
-                  LDAPControl ***serverctrlsp, int freeit);
+ldap_parse_result(LDAP* ld, LDAPMessage* res, int* errcodep, char** matcheddnp,
+                  char** errmsgp, char*** referralsp,
+                  LDAPControl*** serverctrlsp, int freeit);
 LDAP_API(int)
-LDAP_CALL ldap_parse_extended_result(LDAP *ld, LDAPMessage *res, char **retoidp,
-                                     struct berval **retdatap, int freeit);
-LDAP_API(LDAPMessage *)
-LDAP_CALL ldap_first_message(LDAP *ld, LDAPMessage *res);
-LDAP_API(LDAPMessage *) LDAP_CALL ldap_next_message(LDAP *ld, LDAPMessage *msg);
-LDAP_API(int) LDAP_CALL ldap_count_messages(LDAP *ld, LDAPMessage *res);
-LDAP_API(LDAPMessage *)
-LDAP_CALL ldap_first_reference(LDAP *ld, LDAPMessage *res);
-LDAP_API(LDAPMessage *)
-LDAP_CALL ldap_next_reference(LDAP *ld, LDAPMessage *ref);
-LDAP_API(int) LDAP_CALL ldap_count_references(LDAP *ld, LDAPMessage *res);
+LDAP_CALL ldap_parse_extended_result(LDAP* ld, LDAPMessage* res, char** retoidp,
+                                     struct berval** retdatap, int freeit);
+LDAP_API(LDAPMessage*)
+LDAP_CALL ldap_first_message(LDAP* ld, LDAPMessage* res);
+LDAP_API(LDAPMessage*) LDAP_CALL ldap_next_message(LDAP* ld, LDAPMessage* msg);
+LDAP_API(int) LDAP_CALL ldap_count_messages(LDAP* ld, LDAPMessage* res);
+LDAP_API(LDAPMessage*)
+LDAP_CALL ldap_first_reference(LDAP* ld, LDAPMessage* res);
+LDAP_API(LDAPMessage*)
+LDAP_CALL ldap_next_reference(LDAP* ld, LDAPMessage* ref);
+LDAP_API(int) LDAP_CALL ldap_count_references(LDAP* ld, LDAPMessage* res);
 LDAP_API(int)
-LDAP_CALL ldap_parse_reference(LDAP *ld, LDAPMessage *ref, char ***referralsp,
-                               LDAPControl ***serverctrlsp, int freeit);
+LDAP_CALL ldap_parse_reference(LDAP* ld, LDAPMessage* ref, char*** referralsp,
+                               LDAPControl*** serverctrlsp, int freeit);
 LDAP_API(int)
-LDAP_CALL ldap_get_entry_controls(LDAP *ld, LDAPMessage *entry,
-                                  LDAPControl ***serverctrlsp);
-LDAP_API(void) LDAP_CALL ldap_control_free(LDAPControl *ctrl);
-LDAP_API(void) LDAP_CALL ldap_controls_free(LDAPControl **ctrls);
+LDAP_CALL ldap_get_entry_controls(LDAP* ld, LDAPMessage* entry,
+                                  LDAPControl*** serverctrlsp);
+LDAP_API(void) LDAP_CALL ldap_control_free(LDAPControl* ctrl);
+LDAP_API(void) LDAP_CALL ldap_controls_free(LDAPControl** ctrls);
 
 #ifdef __cplusplus
 }
 #endif
 #endif /* _LDAP_STANDARD_H */
--- a/ldap/c-sdk/include/ldap-to-be-deprecated.h
+++ b/ldap/c-sdk/include/ldap-to-be-deprecated.h
@@ -64,137 +64,137 @@ extern "C" {
  */
 #define LDAP_OPT_IO_FN_PTRS 0x0B /* 11 - API extension */
 
 /*
  * I/O callback functions (note that types for the read and write callbacks
  * are actually in lber.h):
  */
 typedef int(LDAP_C LDAP_CALLBACK LDAP_IOF_SELECT_CALLBACK)(
-    int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds,
-    struct timeval *timeout);
+    int nfds, fd_set* readfds, fd_set* writefds, fd_set* errorfds,
+    struct timeval* timeout);
 typedef LBER_SOCKET(LDAP_C LDAP_CALLBACK LDAP_IOF_SOCKET_CALLBACK)(
     int domain, int type, int protocol);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_IOF_IOCTL_CALLBACK)(LBER_SOCKET s,
                                                           int option, ...);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_IOF_CONNECT_CALLBACK)(
-    LBER_SOCKET s, struct sockaddr *name, int namelen);
+    LBER_SOCKET s, struct sockaddr* name, int namelen);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_IOF_CLOSE_CALLBACK)(LBER_SOCKET s);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_IOF_SSL_ENABLE_CALLBACK)(LBER_SOCKET s);
 
 /*
  * Structure to hold I/O function pointers:
  */
 struct ldap_io_fns {
-  LDAP_IOF_READ_CALLBACK *liof_read;
-  LDAP_IOF_WRITE_CALLBACK *liof_write;
-  LDAP_IOF_SELECT_CALLBACK *liof_select;
-  LDAP_IOF_SOCKET_CALLBACK *liof_socket;
-  LDAP_IOF_IOCTL_CALLBACK *liof_ioctl;
-  LDAP_IOF_CONNECT_CALLBACK *liof_connect;
-  LDAP_IOF_CLOSE_CALLBACK *liof_close;
-  LDAP_IOF_SSL_ENABLE_CALLBACK *liof_ssl_enable;
+  LDAP_IOF_READ_CALLBACK* liof_read;
+  LDAP_IOF_WRITE_CALLBACK* liof_write;
+  LDAP_IOF_SELECT_CALLBACK* liof_select;
+  LDAP_IOF_SOCKET_CALLBACK* liof_socket;
+  LDAP_IOF_IOCTL_CALLBACK* liof_ioctl;
+  LDAP_IOF_CONNECT_CALLBACK* liof_connect;
+  LDAP_IOF_CLOSE_CALLBACK* liof_close;
+  LDAP_IOF_SSL_ENABLE_CALLBACK* liof_ssl_enable;
 };
 
 /*
  * DNS resolver callbacks (an API extension --LDAP_API_FEATURE_X_DNS_FUNCTIONS).
  * Note that gethostbyaddr() is not currently used.
  */
 #define LDAP_OPT_DNS_FN_PTRS 0x60 /* 96 - API extension */
 
 typedef struct LDAPHostEnt {
-  char *ldaphe_name;       /* official name of host */
-  char **ldaphe_aliases;   /* alias list */
+  char* ldaphe_name;       /* official name of host */
+  char** ldaphe_aliases;   /* alias list */
   int ldaphe_addrtype;     /* host address type */
   int ldaphe_length;       /* length of address */
-  char **ldaphe_addr_list; /* list of addresses from name server */
+  char** ldaphe_addr_list; /* list of addresses from name server */
 } LDAPHostEnt;
 
-typedef LDAPHostEnt *(LDAP_C LDAP_CALLBACK LDAP_DNSFN_GETHOSTBYNAME)(
-    const char *name, LDAPHostEnt *result, char *buffer, int buflen,
-    int *statusp, void *extradata);
-typedef LDAPHostEnt *(LDAP_C LDAP_CALLBACK LDAP_DNSFN_GETHOSTBYADDR)(
-    const char *addr, int length, int type, LDAPHostEnt *result, char *buffer,
-    int buflen, int *statusp, void *extradata);
+typedef LDAPHostEnt*(LDAP_C LDAP_CALLBACK LDAP_DNSFN_GETHOSTBYNAME)(
+    const char* name, LDAPHostEnt* result, char* buffer, int buflen,
+    int* statusp, void* extradata);
+typedef LDAPHostEnt*(LDAP_C LDAP_CALLBACK LDAP_DNSFN_GETHOSTBYADDR)(
+    const char* addr, int length, int type, LDAPHostEnt* result, char* buffer,
+    int buflen, int* statusp, void* extradata);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_DNSFN_GETPEERNAME)(
-    LDAP *ld, struct sockaddr *netaddr, char *buffer, int buflen);
+    LDAP* ld, struct sockaddr* netaddr, char* buffer, int buflen);
 
 struct ldap_dns_fns {
-  void *lddnsfn_extradata;
+  void* lddnsfn_extradata;
   int lddnsfn_bufsize;
-  LDAP_DNSFN_GETHOSTBYNAME *lddnsfn_gethostbyname;
-  LDAP_DNSFN_GETHOSTBYADDR *lddnsfn_gethostbyaddr;
-  LDAP_DNSFN_GETPEERNAME *lddnsfn_getpeername;
+  LDAP_DNSFN_GETHOSTBYNAME* lddnsfn_gethostbyname;
+  LDAP_DNSFN_GETHOSTBYADDR* lddnsfn_gethostbyaddr;
+  LDAP_DNSFN_GETPEERNAME* lddnsfn_getpeername;
 };
 
 /*
  * experimental DN format support
  */
-LDAP_API(char **) LDAP_CALL ldap_explode_dns(const char *dn);
-LDAP_API(int) LDAP_CALL ldap_is_dns_dn(const char *dn);
+LDAP_API(char**) LDAP_CALL ldap_explode_dns(const char* dn);
+LDAP_API(int) LDAP_CALL ldap_is_dns_dn(const char* dn);
 
 /*
  * user friendly naming/searching routines
  */
-typedef int(LDAP_C LDAP_CALLBACK LDAP_CANCELPROC_CALLBACK)(void *cl);
+typedef int(LDAP_C LDAP_CALLBACK LDAP_CANCELPROC_CALLBACK)(void* cl);
 LDAP_API(int)
 LDAP_CALL
-ldap_ufn_search_c(LDAP *ld, char *ufn, char **attrs, int attrsonly,
-                  LDAPMessage **res, LDAP_CANCELPROC_CALLBACK *cancelproc,
-                  void *cancelparm);
+ldap_ufn_search_c(LDAP* ld, char* ufn, char** attrs, int attrsonly,
+                  LDAPMessage** res, LDAP_CANCELPROC_CALLBACK* cancelproc,
+                  void* cancelparm);
 LDAP_API(int)
 LDAP_CALL
-ldap_ufn_search_ct(LDAP *ld, char *ufn, char **attrs, int attrsonly,
-                   LDAPMessage **res, LDAP_CANCELPROC_CALLBACK *cancelproc,
-                   void *cancelparm, char *tag1, char *tag2, char *tag3);
+ldap_ufn_search_ct(LDAP* ld, char* ufn, char** attrs, int attrsonly,
+                   LDAPMessage** res, LDAP_CANCELPROC_CALLBACK* cancelproc,
+                   void* cancelparm, char* tag1, char* tag2, char* tag3);
 LDAP_API(int)
-LDAP_CALL ldap_ufn_search_s(LDAP *ld, char *ufn, char **attrs, int attrsonly,
-                            LDAPMessage **res);
-LDAP_API(LDAPFiltDesc *) LDAP_CALL ldap_ufn_setfilter(LDAP *ld, char *fname);
-LDAP_API(void) LDAP_CALL ldap_ufn_setprefix(LDAP *ld, char *prefix);
-LDAP_API(int) LDAP_C ldap_ufn_timeout(void *tvparam);
+LDAP_CALL ldap_ufn_search_s(LDAP* ld, char* ufn, char** attrs, int attrsonly,
+                            LDAPMessage** res);
+LDAP_API(LDAPFiltDesc*) LDAP_CALL ldap_ufn_setfilter(LDAP* ld, char* fname);
+LDAP_API(void) LDAP_CALL ldap_ufn_setprefix(LDAP* ld, char* prefix);
+LDAP_API(int) LDAP_C ldap_ufn_timeout(void* tvparam);
 
 /*
  * utility routines
  */
-LDAP_API(int) LDAP_CALL ldap_charray_add(char ***a, char *s);
-LDAP_API(int) LDAP_CALL ldap_charray_merge(char ***a, char **s);
-LDAP_API(void) LDAP_CALL ldap_charray_free(char **array);
-LDAP_API(int) LDAP_CALL ldap_charray_inlist(char **a, char *s);
-LDAP_API(char **) LDAP_CALL ldap_charray_dup(char **a);
-LDAP_API(char **) LDAP_CALL ldap_str2charray(char *str, char *brkstr);
-LDAP_API(int) LDAP_CALL ldap_charray_position(char **a, char *s);
+LDAP_API(int) LDAP_CALL ldap_charray_add(char*** a, char* s);
+LDAP_API(int) LDAP_CALL ldap_charray_merge(char*** a, char** s);
+LDAP_API(void) LDAP_CALL ldap_charray_free(char** array);
+LDAP_API(int) LDAP_CALL ldap_charray_inlist(char** a, char* s);
+LDAP_API(char**) LDAP_CALL ldap_charray_dup(char** a);
+LDAP_API(char**) LDAP_CALL ldap_str2charray(char* str, char* brkstr);
+LDAP_API(int) LDAP_CALL ldap_charray_position(char** a, char* s);
 
 /* from ldap_ssl.h - the pkcs function and declaration */
 typedef int(LDAP_C LDAP_CALLBACK LDAP_PKCS_GET_TOKEN_CALLBACK)(
-    void *context, char **tokenname);
+    void* context, char** tokenname);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_PKCS_GET_PIN_CALLBACK)(
-    void *context, const char *tokenname, char **tokenpin);
+    void* context, const char* tokenname, char** tokenpin);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_PKCS_GET_CERTPATH_CALLBACK)(
-    void *context, char **certpath);
+    void* context, char** certpath);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_PKCS_GET_KEYPATH_CALLBACK)(
-    void *context, char **keypath);
+    void* context, char** keypath);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_PKCS_GET_MODPATH_CALLBACK)(
-    void *context, char **modulepath);
+    void* context, char** modulepath);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_PKCS_GET_CERTNAME_CALLBACK)(
-    void *context, char **certname);
+    void* context, char** certname);
 typedef int(LDAP_C LDAP_CALLBACK LDAP_PKCS_GET_DONGLEFILENAME_CALLBACK)(
-    void *context, char **filename);
+    void* context, char** filename);
 
 #define PKCS_STRUCTURE_ID 1
 struct ldapssl_pkcs_fns {
   int local_structure_id;
-  void *local_data;
-  LDAP_PKCS_GET_CERTPATH_CALLBACK *pkcs_getcertpath;
-  LDAP_PKCS_GET_CERTNAME_CALLBACK *pkcs_getcertname;
-  LDAP_PKCS_GET_KEYPATH_CALLBACK *pkcs_getkeypath;
-  LDAP_PKCS_GET_MODPATH_CALLBACK *pkcs_getmodpath;
-  LDAP_PKCS_GET_PIN_CALLBACK *pkcs_getpin;
-  LDAP_PKCS_GET_TOKEN_CALLBACK *pkcs_gettokenname;
-  LDAP_PKCS_GET_DONGLEFILENAME_CALLBACK *pkcs_getdonglefilename;
+  void* local_data;
+  LDAP_PKCS_GET_CERTPATH_CALLBACK* pkcs_getcertpath;
+  LDAP_PKCS_GET_CERTNAME_CALLBACK* pkcs_getcertname;
+  LDAP_PKCS_GET_KEYPATH_CALLBACK* pkcs_getkeypath;
+  LDAP_PKCS_GET_MODPATH_CALLBACK* pkcs_getmodpath;
+  LDAP_PKCS_GET_PIN_CALLBACK* pkcs_getpin;
+  LDAP_PKCS_GET_TOKEN_CALLBACK* pkcs_gettokenname;
+  LDAP_PKCS_GET_DONGLEFILENAME_CALLBACK* pkcs_getdonglefilename;
 };
 
-LDAP_API(int) LDAP_CALL ldapssl_pkcs_init(const struct ldapssl_pkcs_fns *pfns);
+LDAP_API(int) LDAP_CALL ldapssl_pkcs_init(const struct ldapssl_pkcs_fns* pfns);
 
 #ifdef __cplusplus
 }
 #endif
 #endif /* _LDAP_TOBE_DEPRECATED_H */
--- a/ldap/c-sdk/include/ldap_ssl.h
+++ b/ldap/c-sdk/include/ldap_ssl.h
@@ -57,37 +57,37 @@ extern "C" {
  * an ExtendedRequest [LDAPv3] specifying the OID for the
  * Start TLS operation: RFC 2830
  */
 #  define LDAP_EXOP_START_TLS "1.3.6.1.4.1.1466.20037"
 
 /*
  * Initialize LDAP library for SSL
  */
-LDAP *LDAP_CALL ldapssl_init(const char *defhost, int defport, int defsecure);
+LDAP* LDAP_CALL ldapssl_init(const char* defhost, int defport, int defsecure);
 
 /*
  * Shutdown LDAP library for SSL :
  * Perform necessary cleanup and attempt to shutdown NSS. All existing
  * ld session handles should be ldap_unbind(ld) prior to calling this.
  */
 int LDAP_CALL ldapssl_shutdown();
 
 /* Initialize LDAP library for TLS(SSL) and sends StartTLS extended
  * operation to the Directory Server.
  * Returns LDAP_SUCCESS if all goes well.
  */
-int LDAP_CALL ldap_start_tls_s(LDAP *ld, LDAPControl **serverctrls,
-                               LDAPControl **clientctrls);
+int LDAP_CALL ldap_start_tls_s(LDAP* ld, LDAPControl** serverctrls,
+                               LDAPControl** clientctrls);
 /*
  * Install I/O routines to make SSL over LDAP possible.
  * Use this after ldap_init() or just use ldapssl_init() instead.
  * Returns 0 if all goes well.
  */
-int LDAP_CALL ldapssl_install_routines(LDAP *ld);
+int LDAP_CALL ldapssl_install_routines(LDAP* ld);
 
 /* The next four functions initialize the security code for SSL
  * The first one ldapssl_client_init() does initialization for SSL only
  * The next one supports server authentication using clientauth_init()
  * and allows the caller to specify the ssl strength to use in order to
  * verify the servers's certificate.
  * The next one supports ldapssl_clientauth_init() initializes security
  * for SSL for client authentication.  The third function initializes
@@ -115,17 +115,17 @@ int LDAP_CALL ldapssl_install_routines(L
  */
 
 /*
  * Initialize the secure parts (Security and SSL) of the runtime for use
  * by a client application.  This is only called once.
  * Returns 0 if all goes well.
  */
 
-int LDAP_CALL ldapssl_client_init(const char *certdbpath, void *certdbhandle);
+int LDAP_CALL ldapssl_client_init(const char* certdbpath, void* certdbhandle);
 
 /*
  * Initialize the secure parts (Security and SSL) of the runtime for use
  * by a client application using server authentication.  This is only
  * called once.
  *
  * ldapssl_serverauth_init() is a server-authentication only version of
  * ldapssl_clientauth_init().  This function allows the sslstrength
@@ -149,98 +149,98 @@ int LDAP_CALL ldapssl_client_init(const 
  *                         one hostname and not a list of hosts.
  *                         Furthermore, the port number must be passed
  *                         via the "defport" parameter, and cannot
  *                         be passed via a host:port option.
  *
  * Returns 0 if all goes well.
  */
 
-int LDAP_CALL ldapssl_serverauth_init(const char *certdbpath,
-                                      void *certdbhandle,
+int LDAP_CALL ldapssl_serverauth_init(const char* certdbpath,
+                                      void* certdbhandle,
                                       const int sslstrength);
 
 /*
  * Initialize the secure parts (Security and SSL) of the runtime for use
  * by a client application that may want to do SSL client authentication.
  * Returns 0 if all goes well.
  */
 
-int LDAP_CALL ldapssl_clientauth_init(const char *certdbpath,
-                                      void *certdbhandle, const int needkeydb,
-                                      const char *keydbpath, void *keydbhandle);
+int LDAP_CALL ldapssl_clientauth_init(const char* certdbpath,
+                                      void* certdbhandle, const int needkeydb,
+                                      const char* keydbpath, void* keydbhandle);
 
 /*
  * Initialize the secure parts (Security and SSL) of the runtime for use
  * by a client application that may want to do SSL client authentication.
  *
  * Please see the description of the sslstrength value in the
  * ldapssl_serverauth_init() function above and note the potential
  * problems which can be caused by passing in wrong host & portname
  * values.  The same warning applies to the ldapssl_advclientauth_init()
  * function.
  *
  * Returns 0 if all goes well.
  */
 
 int LDAP_CALL ldapssl_advclientauth_init(
-    const char *certdbpath, void *certdbhandle, const int needkeydb,
-    const char *keydbpath, void *keydbhandle, const int needsecmoddb,
-    const char *secmoddbpath, const int sslstrength);
+    const char* certdbpath, void* certdbhandle, const int needkeydb,
+    const char* keydbpath, void* keydbhandle, const int needsecmoddb,
+    const char* secmoddbpath, const int sslstrength);
 
 /*
  * get a meaningful error string back from the security library
  * this function should be called, if ldap_err2string doesn't
  * identify the error code.
  */
-const char *LDAP_CALL ldapssl_err2string(const int prerrno);
+const char* LDAP_CALL ldapssl_err2string(const int prerrno);
 
 /*
  * Enable SSL client authentication on the given ld.
  * Returns 0 if all goes well.
  */
-int LDAP_CALL ldapssl_enable_clientauth(LDAP *ld, char *keynickname,
-                                        char *keypasswd, char *certnickname);
+int LDAP_CALL ldapssl_enable_clientauth(LDAP* ld, char* keynickname,
+                                        char* keypasswd, char* certnickname);
 
 /*
  * Set the SSL strength for an existing SSL-enabled LDAP session handle.
  *
  * See the description of ldapssl_serverauth_init() above for valid
  * sslstrength values. If ld is NULL, the default for new LDAP session
  * handles is set.
  *
  * Returns 0 if all goes well.
  */
-int LDAP_CALL ldapssl_set_strength(LDAP *ld, int sslstrength);
+int LDAP_CALL ldapssl_set_strength(LDAP* ld, int sslstrength);
 
 /*
  * Set or get SSL options for an existing SSL-enabled LDAP session handle.
  * If ld is NULL, the default options used for all future LDAP SSL sessions
  * are the ones affected. The option values are specific to the underlying
  * SSL provider; see ssl.h within the Network Security Services (NSS)
  * distribution for the options supported by NSS (the default SSL provider).
  *
  * The ldapssl_set_option() function should be called before any LDAP
  * connections are created.
  *
  * Both functions return 0 if all goes well.
  */
-int LDAP_CALL ldapssl_set_option(LDAP *ld, int option, int on);
-int LDAP_CALL ldapssl_get_option(LDAP *ld, int option, int *onp);
+int LDAP_CALL ldapssl_set_option(LDAP* ld, int option, int on);
+int LDAP_CALL ldapssl_get_option(LDAP* ld, int option, int* onp);
 
 /*
  * Import the file descriptor corresponding to the socket of an already
  * open LDAP connection into SSL, and update the socket and session
  * information accordingly. Returns 0 if all goes well.
  */
-int LDAP_CALL ldapssl_import_fd(LDAP *ld, int secure);
+int LDAP_CALL ldapssl_import_fd(LDAP* ld, int secure);
 
 /*
  * Reset an LDAP session from SSL to a non-secure status. Basically,
  * this function undoes the work done by ldapssl_install_routines.
  * Returns 0 if all goes well.
  */
-int LDAP_CALL ldapssl_reset_to_nonsecure(LDAP *ld);
+int LDAP_CALL ldapssl_reset_to_nonsecure(LDAP* ld);
 
 #  ifdef __cplusplus
 }
 #  endif
 #endif /* !defined(LDAP_SSL_H) */
--- a/ldap/c-sdk/include/ldaplog.h
+++ b/ldap/c-sdk/include/ldaplog.h
@@ -65,17 +65,17 @@ extern "C" {
 #define LDAPDebug(level, fmt, arg1, arg2, arg3)
 
 #ifdef LDAP_DEBUG
 #  undef LDAPDebug
 
 /* SLAPD_LOGGING should not be on for WINSOCK (16-bit Windows) */
 #  if defined(SLAPD_LOGGING)
 #    ifdef _WIN32
-extern int *module_ldap_debug;
+extern int* module_ldap_debug;
 #      define LDAPDebug(level, fmt, arg1, arg2, arg3)          \
         {                                                      \
           if (*module_ldap_debug & level) {                    \
             slapd_log_error_proc(NULL, fmt, arg1, arg2, arg3); \
           }                                                    \
         }
 #    else /* _WIN32 */
 extern int ldap_debug;
--- a/ldap/c-sdk/include/ldappr.h
+++ b/ldap/c-sdk/include/ldappr.h
@@ -59,62 +59,62 @@ extern "C" {
  * this LDAP * handle from more than one thread.
  *
  * Returns an LDAP session handle (or NULL if an error occurs).
  *
  * NOTE: If you want to use IPv6, you must use prldap creating a LDAP handle
  * with this function prldap_init.  Prldap_init installs the appropriate
  * set of NSPR functions and prevents calling deprecated functions accidentally.
  */
-LDAP *LDAP_CALL prldap_init(const char *defhost, int defport, int shared);
+LDAP* LDAP_CALL prldap_init(const char* defhost, int defport, int shared);
 
 /*
  * Function: prldap_install_routines().
  *
  * Install NSPR I/O, threading, and DNS functions so they will be used by
  * 'ld'.
  *
  * If 'ld' is NULL, the functions are installed as the default functions
  * for all new LDAP * handles).
  *
  * Pass a non-zero value for the 'shared' parameter if you plan to use
  * this LDAP * handle from more than one thread.
  *
  * Returns an LDAP API error code (LDAP_SUCCESS if all goes well).
  */
-int LDAP_CALL prldap_install_routines(LDAP *ld, int shared);
+int LDAP_CALL prldap_install_routines(LDAP* ld, int shared);
 
 /*
  * Function: prldap_set_session_option().
  *
  * Given an LDAP session handle or a session argument such is passed to
  * CONNECT, POLL, NEWHANDLE, or DISPOSEHANDLE extended I/O callbacks, set
  * an option that affects the prldap layer.
  *
  * If 'ld' and 'session" are both NULL, the option is set as the default
  * for all new prldap sessions.
  *
  * Returns an LDAP API error code (LDAP_SUCCESS if all goes well).
  */
-int LDAP_CALL prldap_set_session_option(LDAP *ld, void *sessionarg, int option,
+int LDAP_CALL prldap_set_session_option(LDAP* ld, void* sessionarg, int option,
                                         ...);
 
 /*
  * Function: prldap_get_session_option().
  *
  * Given an LDAP session handle or a session argument such is passed to
  * CONNECT, POLL, NEWHANDLE, or DISPOSEHANDLE extended I/O callbacks, retrieve
  * the setting for an option that affects the prldap layer.
  *
  * If 'ld' and 'session" are both NULL, the default option value for all new
  * new prldap sessions is retrieved.
  *
  * Returns an LDAP API error code (LDAP_SUCCESS if all goes well).
  */
-int LDAP_CALL prldap_get_session_option(LDAP *ld, void *sessionarg, int option,
+int LDAP_CALL prldap_get_session_option(LDAP* ld, void* sessionarg, int option,
                                         ...);
 
 /*
  * Available options.
  */
 /*
  * PRLDAP_OPT_IO_MAX_TIMEOUT: the maximum time in milliseconds to
  * block waiting for a network I/O operation to complete.
@@ -149,116 +149,116 @@ int LDAP_CALL prldap_get_session_option(
 /*
  * Data structure for session information.
  * seinfo_size should be set to PRLDAP_SESSIONINFO_SIZE before use.
  */
 struct prldap_session_private;
 
 typedef struct prldap_session_info {
   int seinfo_size;
-  struct prldap_session_private *seinfo_appdata;
+  struct prldap_session_private* seinfo_appdata;
 } PRLDAPSessionInfo;
 #define PRLDAP_SESSIONINFO_SIZE sizeof(PRLDAPSessionInfo)
 
 /*
  * Function: prldap_set_session_info().
  *
  * Given an LDAP session handle or a session argument such is passed to
  * CONNECT, POLL, NEWHANDLE, or DISPOSEHANDLE extended I/O callbacks,
  * set some application-specific data.  If ld is NULL, arg is used.  If
  * both ld and arg are NULL, LDAP_PARAM_ERROR is returned.
  *
  * Returns an LDAP API error code (LDAP_SUCCESS if all goes well).
  */
-int LDAP_CALL prldap_set_session_info(LDAP *ld, void *sessionarg,
-                                      PRLDAPSessionInfo *seip);
+int LDAP_CALL prldap_set_session_info(LDAP* ld, void* sessionarg,
+                                      PRLDAPSessionInfo* seip);
 
 /*
  * Function: prldap_get_session_info().
  *
  * Given an LDAP session handle or a session argument such is passed to
  * CONNECT, POLL, NEWHANDLE, or DISPOSEHANDLE extended I/O callbacks,
  * retrieve some application-specific data.  If ld is NULL, arg is used.  If
  * both ld and arg are NULL, LDAP_PARAM_ERROR is returned.
  *
  * Returns an LDAP API error code (LDAP_SUCCESS if all goes well, in
  * which case the fields in the structure that seip points to are filled in).
  */
-int LDAP_CALL prldap_get_session_info(LDAP *ld, void *sessionarg,
-                                      PRLDAPSessionInfo *seip);
+int LDAP_CALL prldap_get_session_info(LDAP* ld, void* sessionarg,
+                                      PRLDAPSessionInfo* seip);
 
 /*
  * Data structure for socket specific information.
  * Note: soinfo_size should be set to PRLDAP_SOCKETINFO_SIZE before use.
  */
 struct prldap_socket_private;
 typedef struct prldap_socket_info {
   int soinfo_size;
-  PRFileDesc *soinfo_prfd;
-  struct prldap_socket_private *soinfo_appdata;
+  PRFileDesc* soinfo_prfd;
+  struct prldap_socket_private* soinfo_appdata;
 } PRLDAPSocketInfo;
 #define PRLDAP_SOCKETINFO_SIZE sizeof(PRLDAPSocketInfo)
 
 /*
  * Function: prldap_set_socket_info().
  *
  * Given an integer fd and a socket argument such as those passed to the
  * extended I/O callback functions, set socket specific information.
  *
  * Returns an LDAP API error code (LDAP_SUCCESS if all goes well).
  *
  * Note: it is only safe to change soinfo_prfd from within the CONNECT
  * extended I/O callback function.
  */
-int LDAP_CALL prldap_set_socket_info(int fd, void *socketarg,
-                                     PRLDAPSocketInfo *soip);
+int LDAP_CALL prldap_set_socket_info(int fd, void* socketarg,
+                                     PRLDAPSocketInfo* soip);
 
 /*
  * Function: prldap_get_socket_info().
  *
  * Given an integer fd and a socket argument such as those passed to the
  * extended I/O callback functions, retrieve socket specific information.
  *
  * Returns an LDAP API error code (LDAP_SUCCESS if all goes well, in
  * which case the fields in the structure that soip points to are filled in).
  */
-int LDAP_CALL prldap_get_socket_info(int fd, void *socketarg,
-                                     PRLDAPSocketInfo *soip);
+int LDAP_CALL prldap_get_socket_info(int fd, void* socketarg,
+                                     PRLDAPSocketInfo* soip);
 
 /*
  * Function: prldap_get_default_socket_info().
  *
  * Given an LDAP session handle, retrieve socket specific information.
  * If ld is NULL, LDAP_PARAM_ERROR is returned.
  *
  * Returns an LDAP API error code (LDAP_SUCCESS if all goes well, in
  * which case the fields in the structure that soip points to are filled in).
  */
-int LDAP_CALL prldap_get_default_socket_info(LDAP *ld, PRLDAPSocketInfo *soip);
+int LDAP_CALL prldap_get_default_socket_info(LDAP* ld, PRLDAPSocketInfo* soip);
 
 /*
  * Function: prldap_set_default_socket_info().
  *
  * Given an LDAP session handle, set socket specific information.
  * If ld is NULL, LDAP_PARAM_ERROR is returned.
  *
  * Returns an LDAP API error code (LDAP_SUCCESS if all goes well, in
  * which case the fields in the structure that soip points to are filled in).
  */
-int LDAP_CALL prldap_set_default_socket_info(LDAP *ld, PRLDAPSocketInfo *soip);
+int LDAP_CALL prldap_set_default_socket_info(LDAP* ld, PRLDAPSocketInfo* soip);
 
 /* Function: prldap_is_installed()
  * Check if NSPR routine is installed
  */
-PRBool prldap_is_installed(LDAP *ld);
+PRBool prldap_is_installed(LDAP* ld);
 
 /* Function: prldap_import_connection().
  * Given a ldap handle with connection already done with ldap_init()
  * installs NSPR routines and imports the original connection info.
  *
  * Returns an LDAP API error code (LDAP_SUCCESS if all goes well).
  */
-int LDAP_CALL prldap_import_connection(LDAP *ld);
+int LDAP_CALL prldap_import_connection(LDAP* ld);
 
 #ifdef __cplusplus
 }
 #endif
 #endif /* !defined(LDAP_PR_H) */
--- a/ldap/c-sdk/include/ldif.h
+++ b/ldap/c-sdk/include/ldif.h
@@ -85,29 +85,29 @@ extern "C" {
 /*
  * Options for ldif_put_type_and_value_with_options() and
  * ldif_type_and_value_with_options().
  */
 #define LDIF_OPT_NOWRAP 0x01UL
 #define LDIF_OPT_VALUE_IS_URL 0x02UL
 #define LDIF_OPT_MINIMAL_ENCODING 0x04UL
 
-int ldif_parse_line(char *line, char **type, char **value, int *vlen);
-char *ldif_getline(char **next);
-void ldif_put_type_and_value(char **out, char *t, char *val, int vlen);
-void ldif_put_type_and_value_nowrap(char **out, char *t, char *val, int vlen);
-void ldif_put_type_and_value_with_options(char **out, char *t, char *val,
+int ldif_parse_line(char* line, char** type, char** value, int* vlen);
+char* ldif_getline(char** next);
+void ldif_put_type_and_value(char** out, char* t, char* val, int vlen);
+void ldif_put_type_and_value_nowrap(char** out, char* t, char* val, int vlen);
+void ldif_put_type_and_value_with_options(char** out, char* t, char* val,
                                           int vlen, unsigned long options);
-char *ldif_type_and_value(char *type, char *val, int vlen);
-char *ldif_type_and_value_nowrap(char *type, char *val, int vlen);
-char *ldif_type_and_value_with_options(char *type, char *val, int vlen,
+char* ldif_type_and_value(char* type, char* val, int vlen);
+char* ldif_type_and_value_nowrap(char* type, char* val, int vlen);
+char* ldif_type_and_value_with_options(char* type, char* val, int vlen,
                                        unsigned long options);
-int ldif_base64_decode(char *src, unsigned char *dst);
-int ldif_base64_encode(unsigned char *src, char *dst, int srclen, int lenused);
-int ldif_base64_encode_nowrap(unsigned char *src, char *dst, int srclen,
+int ldif_base64_decode(char* src, unsigned char* dst);
+int ldif_base64_encode(unsigned char* src, char* dst, int srclen, int lenused);
+int ldif_base64_encode_nowrap(unsigned char* src, char* dst, int srclen,
                               int lenused);
-char *ldif_get_entry(FILE *fp, int *lineno);
+char* ldif_get_entry(FILE* fp, int* lineno);
 
 #ifdef __cplusplus
 }
 #endif
 
 #endif /* _LDIF_H */
--- a/ldap/c-sdk/include/portable.h
+++ b/ldap/c-sdk/include/portable.h
@@ -178,17 +178,17 @@
 #    define NFDBITS 32
 #    define FD_SETSIZE 32
 #    define FD_SET(n, p) \
       ((p)->fds_bits[(n) / NFDBITS] |= (1 << ((n) % NFDBITS)))
 #    define FD_CLR(n, p) \
       ((p)->fds_bits[(n) / NFDBITS] &= ~(1 << ((n) % NFDBITS)))
 #    define FD_ISSET(n, p) \
       ((p)->fds_bits[(n) / NFDBITS] & (1 << ((n) % NFDBITS)))
-#    define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))
+#    define FD_ZERO(p) bzero((char*)(p), sizeof(*(p)))
 #  endif /* !FD_SET */
 #endif   /* !WINSOCK && !_WINDOWS && !macintosh */
 
 /*
  * for connect() -- must we block signals when calling connect()?  This
  * is necessary on some buggy UNIXes.
  */
 #if !defined(NSLDAPI_CONNECT_MUST_NOT_BE_INTERRUPTED) &&                  \
@@ -239,22 +239,22 @@
 #endif
 
 #if (!defined(HPUX9)) && (!defined(sunos4)) && (!defined(SNI)) && \
     (!defined(HAVE_TIME_R))
 #  define HAVE_TIME_R
 #endif
 
 #if defined(SNI) || defined(LINUX1_2)
-int strcasecmp(const char *, const char *);
+int strcasecmp(const char*, const char*);
 #  ifdef SNI
-int strncasecmp(const char *, const char *, int);
+int strncasecmp(const char*, const char*, int);
 #  endif /* SNI */
 #  ifdef LINUX1_2
-int strncasecmp(const char *, const char *, size_t);
+int strncasecmp(const char*, const char*, size_t);
 #  endif /* LINUX1_2 */
 #endif   /* SNI || LINUX1_2 */
 
 #if defined(_WINDOWS) || defined(macintosh) || defined(XP_OS2) || \
     defined(DARWIN)
 #  define GETHOSTBYNAME(n, r, b, l, e) gethostbyname(n)
 #  define NSLDAPI_CTIME(c, b, l) ctime(c)
 #  define STRTOK(s1, s2, l) strtok(s1, s2)
@@ -286,17 +286,17 @@ int strncasecmp(const char *, const char
 */
 typedef char GETHOSTBYNAME_buf_t[NSLDAPI_NETDB_BUF_SIZE];
 #    define GETHOSTBYNAME_BUF_T GETHOSTBYNAME_buf_t
 #    define GETHOSTBYNAME(n, r, b, l, e) \
       (memset(&b, 0, l), gethostbyname_r(n, r, &b) ? NULL : r)
 #  elif defined(HPUX10)
 #    define GETHOSTBYNAME_BUF_T struct hostent_data
 #    define GETHOSTBYNAME(n, r, b, l, e) \
-      nsldapi_compat_gethostbyname_r(n, r, (char *)&b, l, e)
+      nsldapi_compat_gethostbyname_r(n, r, (char*)&b, l, e)
 #  elif defined(LINUX) || defined(DRAGONFLY)
 typedef char GETHOSTBYNAME_buf_t[NSLDAPI_NETDB_BUF_SIZE];
 #    define GETHOSTBYNAME_BUF_T GETHOSTBYNAME_buf_t
 #    define GETHOSTBYNAME(n, r, b, l, rp, e) gethostbyname_r(n, r, b, l, rp, e)
 #    define GETHOSTBYNAME_R_RETURNS_INT
 #  else
 typedef char GETHOSTBYNAME_buf_t[NSLDAPI_NETDB_BUF_SIZE];
 #    define GETHOSTBYNAME_BUF_T GETHOSTBYNAME_buf_t
@@ -324,24 +324,24 @@ typedef char GETHOSTBYNAME_buf_t[NSLDAPI
 #  if defined(hpux9) || defined(SUNOS4) || defined(SNI) || defined(SCOOS) || \
       defined(BSDI) || defined(NCR) || defined(VMS) || defined(NEC) ||       \
       (defined(LINUX) && __GNU_LIBRARY__ != 6) ||                            \
       (defined(AIX) && !defined(USE_REENTRANT_LIBC))
 #    define STRTOK(s1, s2, l) strtok(s1, s2)
 #  else
 #    define HAVE_STRTOK_R
 #    ifndef strtok_r
-char *strtok_r(char *, const char *, char **);
+char* strtok_r(char*, const char*, char**);
 #    endif
-#    define STRTOK(s1, s2, l) (char *)strtok_r(s1, s2, l)
+#    define STRTOK(s1, s2, l) (char*)strtok_r(s1, s2, l)
 #  endif /* STRTOK */
 #endif   /* UNIX */
 
 #if defined(ultrix) || defined(nextstep)
-extern char *strdup();
+extern char* strdup();
 #endif /* ultrix || nextstep */
 
 #if defined(sunos4) || defined(OSF1)
 #  define BSD_TIME 1 /* for servers/slapd/log.h */
 #endif               /* sunos4 || osf */
 
 #if defined(XP_OS2)
 #  include <machine/endian.h> /* for htonl, et.al. */
@@ -371,41 +371,41 @@ typedef unsigned long nsldapi_uint_32;
 #if defined(_IN_ADDR_T) || defined(aix) || defined(HPUX11) || defined(OSF1)
 typedef in_addr_t nsldapi_in_addr_t;
 #else
 typedef nsldapi_uint_32 nsldapi_in_addr_t;
 #endif
 
 #ifdef SUNOS4
 #  include <pcfs/pc_dir.h> /* for toupper() */
-int fprintf(FILE *, char *, ...);
-int fseek(FILE *, long, int);
-int fread(char *, int, int, FILE *);
-int fclose(FILE *);
-int fflush(FILE *);
-int rewind(FILE *);
-void *memmove(void *, const void *, size_t);
-int strcasecmp(char *, char *);
-int strncasecmp(char *, char *, int);
-time_t time(time_t *);
-void perror(char *);
-int fputc(char, FILE *);
-int fputs(char *, FILE *);
-int re_exec(char *);
+int fprintf(FILE*, char*, ...);
+int fseek(FILE*, long, int);
+int fread(char*, int, int, FILE*);
+int fclose(FILE*);
+int fflush(FILE*);
+int rewind(FILE*);
+void* memmove(void*, const void*, size_t);
+int strcasecmp(char*, char*);
+int strncasecmp(char*, char*, int);
+time_t time(time_t*);
+void perror(char*);
+int fputc(char, FILE*);
+int fputs(char*, FILE*);
+int re_exec(char*);
 int socket(int, int, int);
-void bzero(char *, int);
-unsigned long inet_addr(char *);
-char *inet_ntoa(struct in_addr);
+void bzero(char*, int);
+unsigned long inet_addr(char*);
+char* inet_ntoa(struct in_addr);
 int getdtablesize();
-int connect(int, struct sockaddr *, int);
+int connect(int, struct sockaddr*, int);
 #endif /* SUNOS4 */
 
 /* #if defined(SUNOS4) || defined(SNI) */
 #if defined(SUNOS4)
-int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
+int select(int, fd_set*, fd_set*, fd_set*, struct timeval*);
 #endif /* SUNOS4 || SNI */
 
 /*
  * SAFEMEMCPY is an overlap-safe copy from s to d of n bytes
  */
 #ifdef macintosh
 #  define SAFEMEMCPY(d, s, n) BlockMoveData((Ptr)s, (Ptr)d, n)
 #else /* macintosh */
@@ -446,15 +446,15 @@ int select(int, fd_set *, fd_set *, fd_s
 /* Define a macro to support large files */
 #ifdef _LARGEFILE64_SOURCE
 #  define NSLDAPI_FOPEN(filename, mode) fopen64(filename, mode)
 #else
 #  define NSLDAPI_FOPEN(filename, mode) fopen(filename, mode)
 #endif
 
 #if defined(LINUX) || defined(AIX) || defined(HPUX) || defined(_WINDOWS)
-size_t nsldapi_compat_strlcpy(char *dst, const char *src, size_t len);
+size_t nsldapi_compat_strlcpy(char* dst, const char* src, size_t len);
 #  define STRLCPY nsldapi_compat_strlcpy
 #else
 #  define STRLCPY strlcpy
 #endif
 
 #endif /* _PORTABLE_H */
--- a/ldap/c-sdk/include/proto-ntutil.h
+++ b/ldap/c-sdk/include/proto-ntutil.h
@@ -54,46 +54,46 @@
 extern int SlapdGetRegSZ(LPTSTR lpszRegKey, LPSTR lpszValueName,
                          LPTSTR lpszValue);
 
 /*
  *
  * getopt.c
  *
  */
-extern int getopt(int argc, char *const *argv, const char *optstring);
+extern int getopt(int argc, char* const* argv, const char* optstring);
 
 /*
  *
  * ntevent.c
  *
  */
 extern BOOL MultipleInstances();
 extern BOOL SlapdIsAService();
 extern void InitializeSlapdLogging(LPTSTR lpszRegLocation,
                                    LPTSTR lpszEventLogName,
                                    LPTSTR lpszMessageFile);
 extern void ReportSlapdEvent(WORD wEventType, DWORD dwIdEvent,
-                             WORD wNumInsertStrings, char *pszStrings);
-extern BOOL ReportSlapdStatusToSCMgr(SERVICE_STATUS *serviceStatus,
+                             WORD wNumInsertStrings, char* pszStrings);
+extern BOOL ReportSlapdStatusToSCMgr(SERVICE_STATUS* serviceStatus,
                                      SERVICE_STATUS_HANDLE serviceStatusHandle,
                                      HANDLE Event, DWORD dwCurrentState,
                                      DWORD dwWin32ExitCode, DWORD dwCheckPoint,
                                      DWORD dwWaitHint);
 extern void WINAPI SlapdServiceCtrlHandler(DWORD dwOpcode);
-extern BOOL SlapdGetServerNameFromCmdline(char *szServerName, char *szCmdLine);
+extern BOOL SlapdGetServerNameFromCmdline(char* szServerName, char* szCmdLine);
 
 /*
  *
  * ntgetpassword.c
  *
  */
 #    ifdef NET_SSL
-extern char *Slapd_GetPassword();
+extern char* Slapd_GetPassword();
 #      ifdef FORTEZZA
-extern char *Slapd_GetFortezzaPIN();
+extern char* Slapd_GetFortezzaPIN();
 #      endif
 extern void CenterDialog(HWND hwndParent, HWND hwndDialog);
 #    endif /* NET_SSL */
 
 #  endif /* _PROTO_NTUTIL */
 
 #endif /* _WINDOWS */
--- a/ldap/c-sdk/include/regex.h
+++ b/ldap/c-sdk/include/regex.h
@@ -69,20 +69,20 @@ extern "C" {
 #      define LDAP_CALL
 #    endif
 #  endif
 
 #  ifdef NEEDPROTOS
 int re_init(void);
 void re_lock(void);
 int re_unlock(void);
-char *LDAP_CALL re_comp(const char *pat);
-int LDAP_CALL re_exec(const char *lp);
-void LDAP_CALL re_modw(char *s);
-int LDAP_CALL re_subs(char *src, char *dst);
+char* LDAP_CALL re_comp(const char* pat);
+int LDAP_CALL re_exec(const char* lp);
+void LDAP_CALL re_modw(char* s);
+int LDAP_CALL re_subs(char* src, char* dst);
 #  else  /* NEEDPROTOS */
 int re_init();
 void re_lock();
 int re_unlock();
 char* LDAP_CALL re_comp();
 int LDAP_CALL re_exec();
 void LDAP_CALL re_modw();
 int LDAP_CALL re_subs();
--- a/ldap/c-sdk/include/srchpref.h
+++ b/ldap/c-sdk/include/srchpref.h
@@ -72,46 +72,46 @@ extern "C" {
 #    define LDAP_C
 #    define LDAP_CALLBACK
 #    define LDAP_PASCAL
 #    define LDAP_CALL
 #  endif /* _WINDOWS */
 #endif   /* LDAP_CALL */
 
 struct ldap_searchattr {
-  char *sa_attrlabel;
-  char *sa_attr;
+  char* sa_attrlabel;
+  char* sa_attr;
   /* max 32 matchtypes for now */
   unsigned long sa_matchtypebitmap;
-  char *sa_selectattr;
-  char *sa_selecttext;
-  struct ldap_searchattr *sa_next;
+  char* sa_selectattr;
+  char* sa_selecttext;
+  struct ldap_searchattr* sa_next;
 };
 
 struct ldap_searchmatch {
-  char *sm_matchprompt;
-  char *sm_filter;
-  struct ldap_searchmatch *sm_next;
+  char* sm_matchprompt;
+  char* sm_filter;
+  struct ldap_searchmatch* sm_next;
 };
 
 struct ldap_searchobj {
-  char *so_objtypeprompt;
+  char* so_objtypeprompt;
   unsigned long so_options;
-  char *so_prompt;
+  char* so_prompt;
   short so_defaultscope;
-  char *so_filterprefix;
-  char *so_filtertag;
-  char *so_defaultselectattr;
-  char *so_defaultselecttext;
-  struct ldap_searchattr *so_salist;
-  struct ldap_searchmatch *so_smlist;
-  struct ldap_searchobj *so_next;
+  char* so_filterprefix;
+  char* so_filtertag;
+  char* so_defaultselectattr;
+  char* so_defaultselecttext;
+  struct ldap_searchattr* so_salist;
+  struct ldap_searchmatch* so_smlist;
+  struct ldap_searchobj* so_next;
 };
 
-#define NULLSEARCHOBJ ((struct ldap_searchobj *)0)
+#define NULLSEARCHOBJ ((struct ldap_searchobj*)0)
 
 /*
  * global search object options
  */
 #define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001
 
 #define LDAP_IS_SEARCHOBJ_OPTION_SET(so, option) \
   (((so)->so_options & option) != 0)
@@ -121,31 +121,31 @@ struct ldap_searchobj {
 
 #define LDAP_SEARCHPREF_ERR_VERSION 1
 #define LDAP_SEARCHPREF_ERR_MEM 2
 #define LDAP_SEARCHPREF_ERR_SYNTAX 3
 #define LDAP_SEARCHPREF_ERR_FILE 4
 
 LDAP_API(int)
 LDAP_CALL
-ldap_init_searchprefs(char *file, struct ldap_searchobj **solistp);
+ldap_init_searchprefs(char* file, struct ldap_searchobj** solistp);
 
 LDAP_API(int)
 LDAP_CALL
-ldap_init_searchprefs_buf(char *buf, long buflen,
-                          struct ldap_searchobj **solistp);
+ldap_init_searchprefs_buf(char* buf, long buflen,
+                          struct ldap_searchobj** solistp);
 
 LDAP_API(void)
 LDAP_CALL
-ldap_free_searchprefs(struct ldap_searchobj *solist);
+ldap_free_searchprefs(struct ldap_searchobj* solist);
 
-LDAP_API(struct ldap_searchobj *)
+LDAP_API(struct ldap_searchobj*)
 LDAP_CALL
-ldap_first_searchobj(struct ldap_searchobj *solist);
+ldap_first_searchobj(struct ldap_searchobj* solist);
 
-LDAP_API(struct ldap_searchobj *)
+LDAP_API(struct ldap_searchobj*)
 LDAP_CALL
-ldap_next_searchobj(struct ldap_searchobj *sollist, struct ldap_searchobj *so);
+ldap_next_searchobj(struct ldap_searchobj* sollist, struct ldap_searchobj* so);
 
 #ifdef __cplusplus
 }
 #endif
 #endif /* _SRCHPREF_H */
--- a/ldap/c-sdk/libraries/liblber/bprint.c
+++ b/ldap/c-sdk/libraries/liblber/bprint.c
@@ -41,17 +41,17 @@
 
 #ifdef LDAP_DEBUG
 /*
  * Print arbitrary stuff, for debugging.
  */
 
 #  define BPLEN 48
 
-void lber_bprint(char *data, int len) {
+void lber_bprint(char* data, int len) {
   static char hexdig[] = "0123456789abcdef";
   char out[BPLEN];
   int i = 0;
 
   memset(out, 0, BPLEN);
   for (;;) {
     if (len < 1) {
       char msg[BPLEN + 80];
@@ -84,16 +84,16 @@ void lber_bprint(char *data, int len) {
       continue;
     }
     out[i++] = ' ';
   }
 }
 
 #endif
 
-void ber_err_print(char *data) {
+void ber_err_print(char* data) {
 #ifdef USE_DEBUG_WIN
   OutputDebugString(data);
 #else
   fputs(data, stderr);
   fflush(stderr);
 #endif
 }
--- a/ldap/c-sdk/libraries/liblber/decode.c
+++ b/ldap/c-sdk/libraries/liblber/decode.c
@@ -52,31 +52,31 @@
 #include "lber-int.h"
 
 /*
  * Note: ber_get_tag() only uses the ber_end and ber_ptr elements of ber.
  * If that changes, the ber_peek_tag() and/or ber_skip_tag() implementations
  * will need to be changed.
  */
 /* return the tag - LBER_DEFAULT returned means trouble */
-ber_tag_t LDAP_CALL ber_get_tag(BerElement *ber) {
+ber_tag_t LDAP_CALL ber_get_tag(BerElement* ber) {
   unsigned char xbyte;
   ber_tag_t tag;
-  char *tagp;
+  char* tagp;
   int i;
 
-  if (ber_read(ber, (char *)&xbyte, 1) != 1) return (LBER_DEFAULT);
+  if (ber_read(ber, (char*)&xbyte, 1) != 1) return (LBER_DEFAULT);
 
   if ((xbyte & LBER_BIG_TAG_MASK) != LBER_BIG_TAG_MASK)
     return ((ber_uint_t)xbyte);
 
-  tagp = (char *)&tag;
+  tagp = (char*)&tag;
   tagp[0] = xbyte;
   for (i = 1; i < sizeof(ber_int_t); i++) {
-    if (ber_read(ber, (char *)&xbyte, 1) != 1) return (LBER_DEFAULT);
+    if (ber_read(ber, (char*)&xbyte, 1) != 1) return (LBER_DEFAULT);
 
     tagp[i] = xbyte;
 
     if (!(xbyte & LBER_MORE_TAG_MASK)) break;
   }
 
   /* tag too big! */
   if (i == sizeof(ber_int_t)) return (LBER_DEFAULT);
@@ -85,17 +85,17 @@ ber_tag_t LDAP_CALL ber_get_tag(BerEleme
   return (tag >> (sizeof(ber_int_t) - i - 1));
 }
 
 /*
  * Note: ber_skip_tag() only uses the ber_end and ber_ptr elements of ber.
  * If that changes, the implementation of ber_peek_tag() will need to
  * be changed.
  */
-ber_tag_t LDAP_CALL ber_skip_tag(BerElement *ber, ber_len_t *len) {
+ber_tag_t LDAP_CALL ber_skip_tag(BerElement* ber, ber_len_t* len) {
   ber_tag_t tag;
   unsigned char lc;
   int noctets, diff;
   ber_len_t netlen;
 
   /*
    * Any ber element looks like this: tag length contents.
    * Assuming everything's ok, we return the tag byte (we
@@ -115,97 +115,97 @@ ber_tag_t LDAP_CALL ber_skip_tag(BerElem
   /*
    * Next, read the length.  The first byte contains the length of
    * the length.  If bit 8 is set, the length is the long form,
    * otherwise it's the short form.  We don't allow a length that's
    * greater than what we can hold in an unsigned long.
    */
 
   *len = netlen = 0;
-  if (ber_read(ber, (char *)&lc, 1) != 1) return (LBER_DEFAULT);
+  if (ber_read(ber, (char*)&lc, 1) != 1) return (LBER_DEFAULT);
   if (lc & 0x80) {
     noctets = (lc & 0x7f);
     if (noctets > sizeof(ber_uint_t)) return (LBER_DEFAULT);
     diff = sizeof(ber_int_t) - noctets;
-    if (ber_read(ber, (char *)&netlen + diff, noctets) != noctets)
+    if (ber_read(ber, (char*)&netlen + diff, noctets) != noctets)
       return (LBER_DEFAULT);
     *len = LBER_NTOHL(netlen);
   } else {
     *len = lc;
   }
 
   return (tag);
 }
 
 /*
  * Note: Previously, we passed the "ber" parameter directly to ber_skip_tag(),
  * saving and restoring the ber_ptr element only.  We now take advantage
  * of the fact that the only ber structure elements touched by ber_skip_tag()
  * are ber_end and ber_ptr.  If that changes, this code must change too.
  */
-ber_tag_t LDAP_CALL ber_peek_tag(BerElement *ber, ber_len_t *len) {
+ber_tag_t LDAP_CALL ber_peek_tag(BerElement* ber, ber_len_t* len) {
   BerElement bercopy;
 
   bercopy.ber_end = ber->ber_end;
   bercopy.ber_ptr = ber->ber_ptr;
   return (ber_skip_tag(&bercopy, len));
 }
 
-static int ber_getnint(BerElement *ber, ber_int_t *num, ber_slen_t len) {
+static int ber_getnint(BerElement* ber, ber_int_t* num, ber_slen_t len) {
   int i;
   ber_int_t value;
   unsigned char buffer[sizeof(ber_int_t)];
   /*
    * The tag and length have already been stripped off.  We should
    * be sitting right before len bytes of 2's complement integer,
    * ready to be read straight into an int.  We may have to sign
    * extend after we read it in.
    */
 
   if (len > sizeof(ber_slen_t)) return (-1);
 
   /* read into the low-order bytes of netnum */
-  if (ber_read(ber, (char *)buffer, len) != len) return (-1);
+  if (ber_read(ber, (char*)buffer, len) != len) return (-1);
 
   /* This sets the required sign extension */
   if (len != 0) {
     value = 0x80 & buffer[0] ? (-1) : 0;
   } else {
     value = 0;
   }
 
   for (i = 0; i < len; i++) value = (value << 8) | buffer[i];
 
   *num = value;
 
   return (len);
 }
 
-ber_tag_t LDAP_CALL ber_get_int(BerElement *ber, ber_int_t *num) {
+ber_tag_t LDAP_CALL ber_get_int(BerElement* ber, ber_int_t* num) {
   ber_tag_t tag;
   ber_len_t len;
 
   if ((tag = ber_skip_tag(ber, &len)) == LBER_DEFAULT) return (LBER_DEFAULT);
 
   /*
    * len is being demoted to a long here --  possible conversion error
    */
 
   if (ber_getnint(ber, num, (int)len) != (ber_slen_t)len)
     return (LBER_DEFAULT);
   else
     return (tag);
 }
 
-ber_tag_t LDAP_CALL ber_get_stringb(BerElement *ber, char *buf,
-                                    ber_len_t *len) {
+ber_tag_t LDAP_CALL ber_get_stringb(BerElement* ber, char* buf,
+                                    ber_len_t* len) {
   ber_len_t datalen;
   ber_tag_t tag;
 #ifdef STR_TRANSLATION
-  char *transbuf;
+  char* transbuf;
 #endif /* STR_TRANSLATION */
 
   if ((tag = ber_skip_tag(ber, &datalen)) == LBER_DEFAULT)
     return (LBER_DEFAULT);
   if (datalen > (*len - 1)) return (LBER_DEFAULT);
 
   /*
    * datalen is being demoted to a long here --  possible conversion error
@@ -232,26 +232,26 @@ ber_tag_t LDAP_CALL ber_get_stringb(BerE
     --datalen;
   }
 #endif /* STR_TRANSLATION */
 
   *len = datalen;
   return (tag);
 }
 
-ber_tag_t LDAP_CALL ber_get_stringa(BerElement *ber, char **buf) {
+ber_tag_t LDAP_CALL ber_get_stringa(BerElement* ber, char** buf) {
   ber_len_t datalen, ndatalen;
   ber_tag_t tag;
 
   if ((tag = ber_skip_tag(ber, &datalen)) == LBER_DEFAULT)
     return (LBER_DEFAULT);
 
   if (((ndatalen = (size_t)datalen + 1) < (size_t)datalen) ||
       (datalen > (ber->ber_end - ber->ber_ptr)) ||
-      ((*buf = (char *)NSLBERI_MALLOC((size_t)ndatalen)) == NULL))
+      ((*buf = (char*)NSLBERI_MALLOC((size_t)ndatalen)) == NULL))
     return (LBER_DEFAULT);
 
   /*
    * datalen is being demoted to a long here --  possible conversion error
    */
   if (ber_read(ber, *buf, datalen) != (ber_slen_t)datalen) {
     NSLBERI_FREE(*buf);
     *buf = NULL;
@@ -270,36 +270,36 @@ ber_tag_t LDAP_CALL ber_get_stringa(BerE
       return (LBER_DEFAULT);
     }
   }
 #endif /* STR_TRANSLATION */
 
   return (tag);
 }
 
-ber_tag_t LDAP_CALL ber_get_stringal(BerElement *ber, struct berval **bv) {
+ber_tag_t LDAP_CALL ber_get_stringal(BerElement* ber, struct berval** bv) {
   ber_len_t len, nlen;
   ber_tag_t tag;
 
-  if ((*bv = (struct berval *)NSLBERI_MALLOC(sizeof(struct berval))) == NULL) {
+  if ((*bv = (struct berval*)NSLBERI_MALLOC(sizeof(struct berval))) == NULL) {
     return (LBER_DEFAULT);
   }
 
   (*bv)->bv_val = NULL;
   (*bv)->bv_len = 0;
 
   if ((tag = ber_skip_tag(ber, &len)) == LBER_DEFAULT) {
     NSLBERI_FREE(*bv);
     *bv = NULL;
     return (LBER_DEFAULT);
   }
 
   if (((nlen = (size_t)len + 1) < (size_t)len) ||
       (len > (ber->ber_end - ber->ber_ptr)) ||
-      (((*bv)->bv_val = (char *)NSLBERI_MALLOC((size_t)nlen)) == NULL)) {
+      (((*bv)->bv_val = (char*)NSLBERI_MALLOC((size_t)nlen)) == NULL)) {
     NSLBERI_FREE(*bv);
     *bv = NULL;
     return (LBER_DEFAULT);
   }
 
   /*
    * len is being demoted to a long here --  possible conversion error
    */
@@ -327,31 +327,31 @@ ber_tag_t LDAP_CALL ber_get_stringal(Ber
     }
     (*bv)->bv_len = len - 1;
   }
 #endif /* STR_TRANSLATION */
 
   return (tag);
 }
 
-ber_tag_t LDAP_CALL ber_get_bitstringa(BerElement *ber, char **buf,
-                                       ber_len_t *blen) {
+ber_tag_t LDAP_CALL ber_get_bitstringa(BerElement* ber, char** buf,
+                                       ber_len_t* blen) {
   ber_len_t datalen;
   ber_tag_t tag;
   unsigned char unusedbits;
 
   if ((tag = ber_skip_tag(ber, &datalen)) == LBER_DEFAULT)
     return (LBER_DEFAULT);
   --datalen;
 
   if ((datalen > (ber->ber_end - ber->ber_ptr)) ||
-      ((*buf = (char *)NSLBERI_MALLOC((size_t)datalen)) == NULL))
+      ((*buf = (char*)NSLBERI_MALLOC((size_t)datalen)) == NULL))
     return (LBER_DEFAULT);
 
-  if (ber_read(ber, (char *)&unusedbits, 1) != 1) {
+  if (ber_read(ber, (char*)&unusedbits, 1) != 1) {
     NSLBERI_FREE(*buf);
     *buf = NULL;
     return (LBER_DEFAULT);
   }
 
   /*
    * datalen is being demoted to a long here --  possible conversion error
    */
@@ -360,165 +360,165 @@ ber_tag_t LDAP_CALL ber_get_bitstringa(B
     *buf = NULL;
     return (LBER_DEFAULT);
   }
 
   *blen = datalen * 8 - unusedbits;
   return (tag);
 }
 
-ber_tag_t LDAP_CALL ber_get_null(BerElement *ber) {
+ber_tag_t LDAP_CALL ber_get_null(BerElement* ber) {
   ber_len_t len;
   ber_tag_t tag;
 
   if ((tag = ber_skip_tag(ber, &len)) == LBER_DEFAULT) return (LBER_DEFAULT);
 
   if (len != 0) return (LBER_DEFAULT);
 
   return (tag);
 }
 
-ber_tag_t LDAP_CALL ber_get_boolean(BerElement *ber, ber_int_t *boolval) {
+ber_tag_t LDAP_CALL ber_get_boolean(BerElement* ber, ber_int_t* boolval) {
   int rc;
 
   rc = ber_get_int(ber, boolval);
 
   return (rc);
 }
 
-ber_tag_t LDAP_CALL ber_first_element(BerElement *ber, ber_len_t *len,
-                                      char **last) {
+ber_tag_t LDAP_CALL ber_first_element(BerElement* ber, ber_len_t* len,
+                                      char** last) {
   /* skip the sequence header, use the len to mark where to stop */
   if (ber_skip_tag(ber, len) == LBER_DEFAULT) {
     return (LBER_ERROR);
   }
 
   *last = ber->ber_ptr + *len;
 
   if (*last == ber->ber_ptr) {
     return (LBER_END_OF_SEQORSET);
   }
 
   return (ber_peek_tag(ber, len));
 }
 
-ber_tag_t LDAP_CALL ber_next_element(BerElement *ber, ber_len_t *len,
-                                     char *last) {
+ber_tag_t LDAP_CALL ber_next_element(BerElement* ber, ber_len_t* len,
+                                     char* last) {
   if (ber->ber_ptr == last) {
     return (LBER_END_OF_SEQORSET);
   }
 
   return (ber_peek_tag(ber, len));
 }
 
 /* VARARGS */
-ber_tag_t LDAP_C ber_scanf(BerElement *ber, const char *fmt, ...) {
+ber_tag_t LDAP_C ber_scanf(BerElement* ber, const char* fmt, ...) {
   va_list ap;
   char *last, *p;
   char *s, **ss, ***sss;
   struct berval ***bv, **bvp, *bval;
   int *i, j;
   ber_int_t *l, rc, tag;
-  ber_tag_t *t;
+  ber_tag_t* t;
   ber_len_t len;
   size_t array_size;
 
   va_start(ap, fmt);
 
 #ifdef LDAP_DEBUG
   if (lber_debug & 64) {
     char msg[80];
     sprintf(msg, "ber_scanf fmt (%s) ber:\n", fmt);
     ber_err_print(msg);
     ber_dump(ber, 1);
   }
 #endif
-  for (rc = 0, p = (char *)fmt; *p && rc != LBER_DEFAULT; p++) {
+  for (rc = 0, p = (char*)fmt; *p && rc != LBER_DEFAULT; p++) {
     switch (*p) {
       case 'a': /* octet string - allocate storage as needed */
-        ss = va_arg(ap, char **);
+        ss = va_arg(ap, char**);
         rc = ber_get_stringa(ber, ss);
         break;
 
       case 'b': /* boolean */
-        i = va_arg(ap, int *);
+        i = va_arg(ap, int*);
         rc = ber_get_boolean(ber, i);
         break;
 
       case 'e': /* enumerated */
       case 'i': /* int */
-        l = va_arg(ap, ber_slen_t *);
+        l = va_arg(ap, ber_slen_t*);
         rc = ber_get_int(ber, l);
         break;
 
       case 'l': /* length of next item */
-        l = va_arg(ap, ber_slen_t *);
-        rc = ber_peek_tag(ber, (ber_len_t *)l);
+        l = va_arg(ap, ber_slen_t*);
+        rc = ber_peek_tag(ber, (ber_len_t*)l);
         break;
 
       case 'n': /* null */
         rc = ber_get_null(ber);
         break;
 
       case 's': /* octet string - in a buffer */
-        s = va_arg(ap, char *);
-        l = va_arg(ap, ber_slen_t *);
-        rc = ber_get_stringb(ber, s, (ber_len_t *)l);
+        s = va_arg(ap, char*);
+        l = va_arg(ap, ber_slen_t*);
+        rc = ber_get_stringb(ber, s, (ber_len_t*)l);
         break;
 
       case 'o': /* octet string in a supplied berval */
-        bval = va_arg(ap, struct berval *);
+        bval = va_arg(ap, struct berval*);
         ber_peek_tag(ber, &bval->bv_len);
         rc = ber_get_stringa(ber, &bval->bv_val);
         break;
 
       case 'O': /* octet string - allocate & include length */
-        bvp = va_arg(ap, struct berval **);
+        bvp = va_arg(ap, struct berval**);
         rc = ber_get_stringal(ber, bvp);
         break;
 
       case 'B': /* bit string - allocate storage as needed */
-        ss = va_arg(ap, char **);
-        l = va_arg(ap, ber_slen_t *); /* for length, in bits */
-        rc = ber_get_bitstringa(ber, ss, (ber_len_t *)l);
+        ss = va_arg(ap, char**);
+        l = va_arg(ap, ber_slen_t*); /* for length, in bits */
+        rc = ber_get_bitstringa(ber, ss, (ber_len_t*)l);
         break;
 
       case 't': /* tag of next item */
-        t = va_arg(ap, ber_tag_t *);
+        t = va_arg(ap, ber_tag_t*);
         *t = rc = ber_peek_tag(ber, &len);
         break;
 
       case 'T': /* skip tag of next item */
-        t = va_arg(ap, ber_tag_t *);
+        t = va_arg(ap, ber_tag_t*);
         *t = rc = ber_skip_tag(ber, &len);
         break;
 
       case 'v': /* sequence of strings */
-        sss = va_arg(ap, char ***);
+        sss = va_arg(ap, char***);
         *sss = NULL;
         j = 0;
         array_size = 0;
         for (tag = ber_first_element(ber, &len, &last);
              tag != LBER_DEFAULT && tag != LBER_END_OF_SEQORSET &&
              rc != LBER_DEFAULT;
              tag = ber_next_element(ber, &len, last)) {
           if (*sss == NULL) {
             /* Make room for at least 15 strings */
-            *sss = (char **)NSLBERI_MALLOC(16 * sizeof(char *));
+            *sss = (char**)NSLBERI_MALLOC(16 * sizeof(char*));
             if (!*sss) {
               rc = LBER_DEFAULT;
               break; /* out of memory - cannot continue */
             }
             array_size = 16;
           } else {
-            char **save_sss = *sss;
+            char** save_sss = *sss;
             if ((size_t)(j + 2) > array_size) {
               /* We'v overflowed our buffer */
-              *sss = (char **)NSLBERI_REALLOC(
-                  *sss, (array_size * 2) * sizeof(char *));
+              *sss = (char**)NSLBERI_REALLOC(*sss,
+                                             (array_size * 2) * sizeof(char*));
               array_size = array_size * 2;
             }
             if (!*sss) {
               rc = LBER_DEFAULT;
               ber_svecfree(save_sss);
               break; /* out of memory - cannot continue */
             }
           }
@@ -530,33 +530,33 @@ ber_tag_t LDAP_C ber_scanf(BerElement *b
           rc = LBER_DEFAULT;
         }
         if (*sss && (j > 0)) {
           (*sss)[j] = NULL;
         }
         break;
 
       case 'V': /* sequence of strings + lengths */
-        bv = va_arg(ap, struct berval ***);
+        bv = va_arg(ap, struct berval***);
         *bv = NULL;
         j = 0;
         for (tag = ber_first_element(ber, &len, &last);
              tag != LBER_DEFAULT && tag != LBER_END_OF_SEQORSET &&
              rc != LBER_DEFAULT;
              tag = ber_next_element(ber, &len, last)) {
           if (*bv == NULL) {
-            *bv = (struct berval **)NSLBERI_MALLOC(2 * sizeof(struct berval *));
+            *bv = (struct berval**)NSLBERI_MALLOC(2 * sizeof(struct berval*));
             if (!*bv) {
               rc = LBER_DEFAULT;
               break; /* out of memory - cannot continue */
             }
           } else {
-            struct berval **save_bv = *bv;
-            *bv = (struct berval **)NSLBERI_REALLOC(
-                *bv, (j + 2) * sizeof(struct berval *));
+            struct berval** save_bv = *bv;
+            *bv = (struct berval**)NSLBERI_REALLOC(
+                *bv, (j + 2) * sizeof(struct berval*));
             if (!*bv) {
               rc = LBER_DEFAULT;
               ber_bvecfree(save_bv);
               break; /* out of memory - cannot continue */
             }
           }
           rc = ber_get_stringal(ber, &((*bv)[j]));
           j++;
@@ -595,77 +595,77 @@ ber_tag_t LDAP_C ber_scanf(BerElement *b
 
   va_end(ap);
 
   if (rc == LBER_DEFAULT) {
     va_start(ap, fmt);
     for (p--; fmt < p && *fmt; fmt++) {
       switch (*fmt) {
         case 'a': /* octet string - allocate storage as needed */
-          ss = va_arg(ap, char **);
+          ss = va_arg(ap, char**);
           NSLBERI_FREE(*ss);
           *ss = NULL;
           break;
 
         case 'b': /* boolean */
-          i = va_arg(ap, int *);
+          i = va_arg(ap, int*);
           break;
 
         case 'e': /* enumerated */
         case 'i': /* int */
-          l = va_arg(ap, ber_slen_t *);
+          l = va_arg(ap, ber_slen_t*);
           break;
 
         case 'l': /* length of next item */
-          l = va_arg(ap, ber_slen_t *);
+          l = va_arg(ap, ber_slen_t*);
           break;
 
         case 'n': /* null */
           break;
 
         case 's': /* octet string - in a buffer */
-          s = va_arg(ap, char *);
-          l = va_arg(ap, ber_slen_t *);
+          s = va_arg(ap, char*);
+          l = va_arg(ap, ber_slen_t*);
           break;
 
         case 'o': /* octet string in a supplied berval */
-          bval = va_arg(ap, struct berval *);
+          bval = va_arg(ap, struct berval*);
           if (bval->bv_val) NSLBERI_FREE(bval->bv_val);
           memset(bval, 0, sizeof(struct berval));
           break;
 
         case 'O': /* octet string - allocate & include length */
-          bvp = va_arg(ap, struct berval **);
+          bvp = va_arg(ap, struct berval**);
           ber_bvfree(*bvp);
           bvp = NULL;
           break;
 
         case 'B': /* bit string - allocate storage as needed */
-          ss = va_arg(ap, char **);
-          l = va_arg(ap, ber_slen_t *); /* for length, in bits */
+          ss = va_arg(ap, char**);
+          l = va_arg(ap, ber_slen_t*); /* for length, in bits */
           if (*ss) NSLBERI_FREE(*ss);
           *ss = NULL;
           break;
 
         case 't': /* tag of next item */
-          t = va_arg(ap, ber_tag_t *);
+          t = va_arg(ap, ber_tag_t*);
           break;
 
         case 'T': /* skip tag of next item */
-          t = va_arg(ap, ber_tag_t *);
+          t = va_arg(ap, ber_tag_t*);
           break;
 
         case 'v': /* sequence of strings */
-          sss = va_arg(ap, char ***);
+          sss = va_arg(ap, char***);
           ber_svecfree(*sss);
           *sss = NULL;
           break;
 
         case 'V': /* sequence of strings + lengths */
-          bv = va_arg(ap, struct berval ***);
+          bv = va_arg(ap, struct berval***);
           ber_bvecfree(*bv);
           *bv = NULL;
           break;
 
         case 'x': /* skip the next element - whatever it is */
           break;
 
         case '{': /* begin sequence */
@@ -681,67 +681,67 @@ ber_tag_t LDAP_C ber_scanf(BerElement *b
       }
     } /* for */
     va_end(ap);
   } /* if */
 
   return (rc);
 }
 
-void LDAP_CALL ber_bvfree(struct berval *bv) {
+void LDAP_CALL ber_bvfree(struct berval* bv) {
   if (bv != NULL) {
     if (bv->bv_val != NULL) {
       NSLBERI_FREE(bv->bv_val);
     }
-    NSLBERI_FREE((char *)bv);
+    NSLBERI_FREE((char*)bv);
   }
 }
 
-void LDAP_CALL ber_bvecfree(struct berval **bv) {
+void LDAP_CALL ber_bvecfree(struct berval** bv) {
   int i;
 
   if (bv != NULL) {
     for (i = 0; bv[i] != NULL; i++) {
       ber_bvfree(bv[i]);
     }
-    NSLBERI_FREE((char *)bv);
+    NSLBERI_FREE((char*)bv);
   }
 }
 
-struct berval *LDAP_CALL ber_bvdup(const struct berval *bv) {
-  struct berval *new;
+struct berval* LDAP_CALL ber_bvdup(const struct berval* bv) {
+  struct berval* new;
 
-  if ((new = (struct berval *)NSLBERI_MALLOC(sizeof(struct berval))) == NULL) {
+  if ((new = (struct berval*)NSLBERI_MALLOC(sizeof(struct berval))) == NULL) {
     return (NULL);
   }
   if (bv->bv_val == NULL) {
     new->bv_val = NULL;
     new->bv_len = 0;
   } else {
-    if ((new->bv_val = (char *)NSLBERI_MALLOC(bv->bv_len + 1)) == NULL) {
+    if ((new->bv_val = (char*)NSLBERI_MALLOC(bv->bv_len + 1)) == NULL) {
       NSLBERI_FREE(new);
       new = NULL;
       return (NULL);
     }
     SAFEMEMCPY(new->bv_val, bv->bv_val, (size_t)bv->bv_len);
     new->bv_val[bv->bv_len] = '\0';
     new->bv_len = bv->bv_len;
   }
 
   return (new);
 }
 
-void LDAP_CALL ber_svecfree(char **vals) {
+void LDAP_CALL ber_svecfree(char** vals) {
   int i;
 
   if (vals == NULL) return;
   for (i = 0; vals[i] != NULL; i++) NSLBERI_FREE(vals[i]);
-  NSLBERI_FREE((char *)vals);
+  NSLBERI_FREE((char*)vals);
 }
 
 #ifdef STR_TRANSLATION
-void LDAP_CALL ber_set_string_translators(BerElement *ber,
+void LDAP_CALL ber_set_string_translators(BerElement* ber,
                                           BERTranslateProc encode_proc,
                                           BERTranslateProc decode_proc) {
   ber->ber_encode_translate_proc = encode_proc;
   ber->ber_decode_translate_proc = decode_proc;
 }
 #endif /* STR_TRANSLATION */
--- a/ldap/c-sdk/libraries/liblber/dtest.c
+++ b/ldap/c-sdk/libraries/liblber/dtest.c
@@ -58,30 +58,30 @@
 #    include <windows.h>
 #  else
 #    include <sys/types.h>
 #    include <sys/socket.h>
 #  endif /* _WIN32 */
 #endif   /* MACOS */
 #include "lber.h"
 
-int SSL_Recv(int s, char *b, unsigned l, int dummy) { return (read(s, b, l)); }
+int SSL_Recv(int s, char* b, unsigned l, int dummy) { return (read(s, b, l)); }
 
-SSL_Send(int s, char *b, unsigned l, int dummy) { return (write(s, b, l)); }
+SSL_Send(int s, char* b, unsigned l, int dummy) { return (write(s, b, l)); }
 
-static void usage(char *name) {
+static void usage(char* name) {
   fprintf(stderr, "usage: %s < berfile\n", name);
 }
 
-main(int argc, char **argv) {
+main(int argc, char** argv) {
   long i, fd;
   ber_len_t len;
   ber_tag_t tag;
-  BerElement *ber;
-  Sockbuf *sb;
+  BerElement* ber;
+  Sockbuf* sb;
   extern int lber_debug;
 
   lber_debug = 255;
   if (argc > 1) {
     usage(argv[0]);
     exit(1);
   }
 
--- a/ldap/c-sdk/libraries/liblber/encode.c
+++ b/ldap/c-sdk/libraries/liblber/encode.c
@@ -60,25 +60,25 @@ static int ber_calc_taglen(ber_tag_t tag
     mask = (0xff << (i * 8));
     /* not all zero */
     if (tag & mask) break;
   }
 
   return (i + 1);
 }
 
-static int ber_put_tag(BerElement *ber, ber_tag_t tag, int nosos) {
+static int ber_put_tag(BerElement* ber, ber_tag_t tag, int nosos) {
   int taglen;
   ber_tag_t ntag;
 
   taglen = ber_calc_taglen(tag);
 
   ntag = LBER_HTONL(tag);
 
-  return (ber_write(ber, ((char *)&ntag) + sizeof(ber_int_t) - taglen, taglen,
+  return (ber_write(ber, ((char*)&ntag) + sizeof(ber_int_t) - taglen, taglen,
                     nosos));
 }
 
 static int ber_calc_lenlen(ber_len_t len) {
   /*
    * short len if it's less than 128 - one byte giving the len,
    * with bit 8 0.
    */
@@ -92,30 +92,30 @@ static int ber_calc_lenlen(ber_len_t len
 
   if (len <= 0xFF) return (2);
   if (len <= 0xFFFF) return (3);
   if (len <= 0xFFFFFF) return (4);
 
   return (5);
 }
 
-static int ber_put_len(BerElement *ber, ber_len_t len, int nosos) {
+static int ber_put_len(BerElement* ber, ber_len_t len, int nosos) {
   int i;
   char lenlen;
   ber_int_t mask;
   ber_len_t netlen;
 
   /*
    * short len if it's less than 128 - one byte giving the len,
    * with bit 8 0.
    */
 
   if (len <= 127) {
     netlen = LBER_HTONL(len);
-    return (ber_write(ber, (char *)&netlen + sizeof(ber_int_t) - 1, 1, nosos));
+    return (ber_write(ber, (char*)&netlen + sizeof(ber_int_t) - 1, 1, nosos));
   }
 
   /*
    * long len otherwise - one byte with bit 8 set, giving the
    * length of the length, followed by the length itself.
    */
 
   /* find the first non-all-zero byte */
@@ -128,23 +128,23 @@ static int ber_put_len(BerElement *ber, 
   if (lenlen > 4) return (-1);
   lenlen |= 0x80;
 
   /* write the length of the length */
   if (ber_write(ber, &lenlen, 1, nosos) != 1) return (-1);
 
   /* write the length itself */
   netlen = LBER_HTONL(len);
-  if (ber_write(ber, (char *)&netlen + (sizeof(ber_int_t) - i), i, nosos) != i)
+  if (ber_write(ber, (char*)&netlen + (sizeof(ber_int_t) - i), i, nosos) != i)
     return (-1);
 
   return (i + 1);
 }
 
-static int ber_put_int_or_enum(BerElement *ber, ber_int_t num, ber_tag_t tag) {
+static int ber_put_int_or_enum(BerElement* ber, ber_int_t num, ber_tag_t tag) {
   int i, sign, taglen;
   int len, lenlen;
   ber_int_t netnum, mask;
 
   sign = (num < 0);
 
   /*
    * high bit is set - look for first non-all-one byte
@@ -171,36 +171,36 @@ static int ber_put_int_or_enum(BerElemen
 
   len = i + 1;
 
   if ((taglen = ber_put_tag(ber, tag, 0)) == -1) return (-1);
 
   if ((lenlen = ber_put_len(ber, len, 0)) == -1) return (-1);
   i++;
   netnum = LBER_HTONL(num);
-  if (ber_write(ber, (char *)&netnum + (sizeof(ber_int_t) - i), i, 0) == i)
+  if (ber_write(ber, (char*)&netnum + (sizeof(ber_int_t) - i), i, 0) == i)
     /* length of tag + length + contents */
     return (taglen + lenlen + i);
 
   return (-1);
 }
 
-int LDAP_CALL ber_put_enum(BerElement *ber, ber_int_t num, ber_tag_t tag) {
+int LDAP_CALL ber_put_enum(BerElement* ber, ber_int_t num, ber_tag_t tag) {
   if (tag == LBER_DEFAULT) tag = LBER_ENUMERATED;
 
   return (ber_put_int_or_enum(ber, num, tag));
 }
 
-int LDAP_CALL ber_put_int(BerElement *ber, ber_int_t num, ber_tag_t tag) {
+int LDAP_CALL ber_put_int(BerElement* ber, ber_int_t num, ber_tag_t tag) {
   if (tag == LBER_DEFAULT) tag = LBER_INTEGER;
 
   return (ber_put_int_or_enum(ber, num, tag));
 }
 
-int LDAP_CALL ber_put_ostring(BerElement *ber, char *str, ber_len_t len,
+int LDAP_CALL ber_put_ostring(BerElement* ber, char* str, ber_len_t len,
                               ber_tag_t tag) {
   int taglen, lenlen, rc;
 #ifdef STR_TRANSLATION
   int free_str;
 #endif /* STR_TRANSLATION */
 
   if (tag == LBER_DEFAULT) tag = LBER_OCTETSTRING;
 
@@ -235,91 +235,91 @@ int LDAP_CALL ber_put_ostring(BerElement
   if (free_str) {
     NSLBERI_FREE(str);
   }
 #endif /* STR_TRANSLATION */
 
   return (rc);
 }
 
-int LDAP_CALL ber_put_string(BerElement *ber, char *str, ber_tag_t tag) {
+int LDAP_CALL ber_put_string(BerElement* ber, char* str, ber_tag_t tag) {
   return (ber_put_ostring(ber, str, (ber_len_t)strlen(str), tag));
 }
 
-int LDAP_CALL ber_put_bitstring(BerElement *ber, char *str,
+int LDAP_CALL ber_put_bitstring(BerElement* ber, char* str,
                                 ber_len_t blen /* in bits */, ber_tag_t tag) {
   int taglen, lenlen, len;
   unsigned char unusedbits;
 
   if (tag == LBER_DEFAULT) tag = LBER_BITSTRING;
 
   if ((taglen = ber_put_tag(ber, tag, 0)) == -1) return (-1);
 
   len = (blen + 7) / 8;
   unusedbits = (unsigned char)(len * 8 - blen);
   if ((lenlen = ber_put_len(ber, len + 1, 0)) == -1) return (-1);
 
-  if (ber_write(ber, (char *)&unusedbits, 1, 0) != 1) return (-1);
+  if (ber_write(ber, (char*)&unusedbits, 1, 0) != 1) return (-1);
 
   if (ber_write(ber, str, len, 0) != len) return (-1);
 
   /* return length of tag + length + unused bit count + contents */
   return (taglen + 1 + lenlen + len);
 }
 
-int LDAP_CALL ber_put_null(BerElement *ber, ber_tag_t tag) {
+int LDAP_CALL ber_put_null(BerElement* ber, ber_tag_t tag) {
   int taglen;
 
   if (tag == LBER_DEFAULT) tag = LBER_NULL;
 
   if ((taglen = ber_put_tag(ber, tag, 0)) == -1) return (-1);
 
   if (ber_put_len(ber, 0, 0) != 1) return (-1);
 
   return (taglen + 1);
 }
 
-int LDAP_CALL ber_put_boolean(BerElement *ber, ber_int_t boolval,
+int LDAP_CALL ber_put_boolean(BerElement* ber, ber_int_t boolval,
                               ber_tag_t tag) {
   int taglen;
   unsigned char trueval = 0xff;
   unsigned char falseval = 0x00;
 
   if (tag == LBER_DEFAULT) tag = LBER_BOOLEAN;
 
   if ((taglen = ber_put_tag(ber, tag, 0)) == -1) return (-1);
 
   if (ber_put_len(ber, 1, 0) != 1) return (-1);
 
-  if (ber_write(ber, (char *)(boolval ? &trueval : &falseval), 1, 0) != 1)
+  if (ber_write(ber, (char*)(boolval ? &trueval : &falseval), 1, 0) != 1)
     return (-1);
 
   return (taglen + 2);
 }
 
 #define FOUR_BYTE_LEN 5
 
 /* the idea here is roughly this: we maintain a stack of these Seqorset
  * structures. This is pushed when we see the beginning of a new set or
  * sequence. It is popped when we see the end of a set or sequence.
  * Since we don't want to malloc and free these structures all the time,
  * we pre-allocate a small set of them within the ber element structure.
  * thus we need to spot when we've overflowed this stack and fall back to
  * malloc'ing instead.
  */
-static int ber_start_seqorset(BerElement *ber, ber_tag_t tag) {
-  Seqorset *new_sos;
+static int ber_start_seqorset(BerElement* ber, ber_tag_t tag) {
+  Seqorset* new_sos;
 
   /* can we fit into the local stack ? */
   if (ber->ber_sos_stack_posn < SOS_STACK_SIZE) {
     /* yes */
     new_sos = &ber->ber_sos_stack[ber->ber_sos_stack_posn];
   } else {
     /* no */
-    if ((new_sos = (Seqorset *)NSLBERI_MALLOC(sizeof(Seqorset))) ==
+    if ((new_sos = (Seqorset*)NSLBERI_MALLOC(sizeof(Seqorset))) ==
         NULLSEQORSET) {
       return (-1);
     }
   }
   ber->ber_sos_stack_posn++;
 
   if (ber->ber_sos == NULLSEQORSET)
     new_sos->sos_first = ber->ber_ptr;
@@ -335,34 +335,34 @@ static int ber_start_seqorset(BerElement
 
   ber->ber_sos = new_sos;
   if (ber->ber_sos->sos_ptr > ber->ber_end) {
     nslberi_ber_realloc(ber, ber->ber_sos->sos_ptr - ber->ber_end);
   }
   return (0);
 }
 
-int LDAP_CALL ber_start_seq(BerElement *ber, ber_tag_t tag) {
+int LDAP_CALL ber_start_seq(BerElement* ber, ber_tag_t tag) {
   if (tag == LBER_DEFAULT) tag = LBER_SEQUENCE;
 
   return (ber_start_seqorset(ber, tag));
 }
 
-int LDAP_CALL ber_start_set(BerElement *ber, ber_tag_t tag) {
+int LDAP_CALL ber_start_set(BerElement* ber, ber_tag_t tag) {
   if (tag == LBER_DEFAULT) tag = LBER_SET;
 
   return (ber_start_seqorset(ber, tag));
 }
 
-static int ber_put_seqorset(BerElement *ber) {
+static int ber_put_seqorset(BerElement* ber) {
   ber_len_t len, netlen;
   int taglen, lenlen;
   unsigned char ltag = 0x80 + FOUR_BYTE_LEN - 1;
-  Seqorset *next;
-  Seqorset **sos = &ber->ber_sos;
+  Seqorset* next;
+  Seqorset** sos = &ber->ber_sos;
 
   if (*sos == NULL) {
     /* No sequence or set to put... fatal error. */
     return (-1);
   }
 
   /*
    * If this is the toplevel sequence or set, we need to actually
@@ -397,90 +397,90 @@ static int ber_put_seqorset(BerElement *
          * we don't actually need that much
          */
         SAFEMEMCPY((*sos)->sos_first + taglen + lenlen,
                    (*sos)->sos_first + taglen + FOUR_BYTE_LEN, len);
       }
     } else {
       /* Fill FOUR_BYTE_LEN bytes for length field */
       /* one byte of length length */
-      if (ber_write(ber, (char *)&ltag, 1, 1) != 1) return (-1);
+      if (ber_write(ber, (char*)&ltag, 1, 1) != 1) return (-1);
 
       /* the length itself */
       if (ber_write(ber,
-                    (char *)&netlen + sizeof(ber_int_t) - (FOUR_BYTE_LEN - 1),
+                    (char*)&netlen + sizeof(ber_int_t) - (FOUR_BYTE_LEN - 1),
                     FOUR_BYTE_LEN - 1, 1) != FOUR_BYTE_LEN - 1)
         return (-1);
     }
     /* The ber_ptr is at the set/seq start - move it to the end */
     ber->ber_ptr += len;
   } else {
     ber_tag_t ntag;
 
     /* the tag */
     taglen = ber_calc_taglen((*sos)->sos_tag);
     ntag = LBER_HTONL((*sos)->sos_tag);
-    SAFEMEMCPY((*sos)->sos_first, (char *)&ntag + sizeof(ber_int_t) - taglen,
+    SAFEMEMCPY((*sos)->sos_first, (char*)&ntag + sizeof(ber_int_t) - taglen,
                taglen);
 
     if (ber->ber_options & LBER_OPT_USE_DER) {
       ltag = (lenlen == 1) ? (unsigned char)len
                            : (unsigned char)(0x80 + (lenlen - 1));
     }
 
     /* one byte of length length */
     SAFEMEMCPY((*sos)->sos_first + 1, &ltag, 1);
 
     if (ber->ber_options & LBER_OPT_USE_DER) {
       if (lenlen > 1) {
         /* Write the length itself */
         SAFEMEMCPY((*sos)->sos_first + 2,
-                   (char *)&netlen + sizeof(ber_uint_t) - (lenlen - 1),
+                   (char*)&netlen + sizeof(ber_uint_t) - (lenlen - 1),
                    lenlen - 1);
       }
       if (lenlen != FOUR_BYTE_LEN) {
         /*
          * We set aside FOUR_BYTE_LEN bytes for
          * the length field.  Move the data if
          * we don't actually need that much
          */
         SAFEMEMCPY((*sos)->sos_first + taglen + lenlen,
                    (*sos)->sos_first + taglen + FOUR_BYTE_LEN, len);
       }
     } else {
       /* the length itself */
       SAFEMEMCPY((*sos)->sos_first + taglen + 1,
-                 (char *)&netlen + sizeof(ber_int_t) - (FOUR_BYTE_LEN - 1),
+                 (char*)&netlen + sizeof(ber_int_t) - (FOUR_BYTE_LEN - 1),
                  FOUR_BYTE_LEN - 1);
     }
 
     next->sos_clen += (taglen + lenlen + len);
     next->sos_ptr += (taglen + lenlen + len);
   }
 
   /* we're done with this seqorset, so free it up */
   /* was this one from the local stack ? */
   if (ber->ber_sos_stack_posn <= SOS_STACK_SIZE) {
     /* yes */
   } else {
     /* no */
-    NSLBERI_FREE((char *)(*sos));
+    NSLBERI_FREE((char*)(*sos));
   }
   ber->ber_sos_stack_posn--;
   *sos = next;
 
   return (taglen + lenlen + len);
 }
 
-int LDAP_CALL ber_put_seq(BerElement *ber) { return (ber_put_seqorset(ber)); }
+int LDAP_CALL ber_put_seq(BerElement* ber) { return (ber_put_seqorset(ber)); }
 
-int LDAP_CALL ber_put_set(BerElement *ber) { return (ber_put_seqorset(ber)); }
+int LDAP_CALL ber_put_set(BerElement* ber) { return (ber_put_seqorset(ber)); }
 
 /* VARARGS */
-int LDAP_C ber_printf(BerElement *ber, const char *fmt, ...) {
+int LDAP_C ber_printf(BerElement* ber, const char* fmt, ...) {
   va_list ap;
   char *s, **ss;
   struct berval *bval, **bv;
   int rc, i;
   ber_len_t len;
 
   va_start(ap, fmt);
 
@@ -509,55 +509,55 @@ int LDAP_C ber_printf(BerElement *ber, c
         rc = ber_put_enum(ber, (ber_int_t)i, ber->ber_tag);
         break;
 
       case 'n': /* null */
         rc = ber_put_null(ber, ber->ber_tag);
         break;
 
       case 'o': /* octet string (non-null terminated) */
-        s = va_arg(ap, char *);
+        s = va_arg(ap, char*);
         len = va_arg(ap, int);
         rc = ber_put_ostring(ber, s, len, ber->ber_tag);
         break;
 
       case 'O': /* berval octet string */
-        if ((bval = va_arg(ap, struct berval *)) == NULL) break;
+        if ((bval = va_arg(ap, struct berval*)) == NULL) break;
         if (bval->bv_len == 0) {
           rc = ber_put_ostring(ber, "", 0, ber->ber_tag);
         } else {
           rc = ber_put_ostring(ber, bval->bv_val, bval->bv_len, ber->ber_tag);
         }
         break;
 
       case 's': /* string */
-        s = va_arg(ap, char *);
+        s = va_arg(ap, char*);
         rc = ber_put_string(ber, s, ber->ber_tag);
         break;
 
       case 'B': /* bit string */
-        s = va_arg(ap, char *);
+        s = va_arg(ap, char*);
         len = va_arg(ap, int); /* in bits */
         rc = ber_put_bitstring(ber, s, len, ber->ber_tag);
         break;
 
       case 't': /* tag for the next element */
         ber->ber_tag = va_arg(ap, ber_tag_t);
         ber->ber_usertag = 1;
         break;
 
       case 'v': /* vector of strings */
-        if ((ss = va_arg(ap, char **)) == NULL) break;
+        if ((ss = va_arg(ap, char**)) == NULL) break;
         for (i = 0; ss[i] != NULL; i++) {
           if ((rc = ber_put_string(ber, ss[i], ber->ber_tag)) == -1) break;
         }
         break;
 
       case 'V': /* sequences of strings + lengths */
-        if ((bv = va_arg(ap, struct berval **)) == NULL) break;
+        if ((bv = va_arg(ap, struct berval**)) == NULL) break;
         for (i = 0; bv[i] != NULL; i++) {
           if ((rc = ber_put_ostring(ber, bv[i]->bv_val, bv[i]->bv_len,
                                     ber->ber_tag)) == -1)
             break;
         }
         break;
 
       case '{': /* begin sequence */
--- a/ldap/c-sdk/libraries/liblber/etest.c
+++ b/ldap/c-sdk/libraries/liblber/etest.c
@@ -60,48 +60,48 @@
 #  ifdef _WIN32
 #    include <windows.h>
 #  else
 #    include <sys/socket.h>
 #  endif /* _WIN32 */
 #endif   /* MACOS */
 #include "lber.h"
 
-int SSL_Recv(int s, char *b, unsigned l, int dummy) { return (read(s, b, l)); }
+int SSL_Recv(int s, char* b, unsigned l, int dummy) { return (read(s, b, l)); }
 
-SSL_Send(int s, char *b, unsigned l, int dummy) { return (write(s, b, l)); }
+SSL_Send(int s, char* b, unsigned l, int dummy) { return (write(s, b, l)); }
 
-int getline(char *prompt, char c, char *buf, int bsize) {
-  char *p;
+int getline(char* prompt, char c, char* buf, int bsize) {
+  char* p;
 
   if (prompt != NULL) {
     fprintf(stderr, "%s: ", prompt);
   } else {
     fprintf(stderr, "enter value for '%c': ", c);
   }
   if (fgets(buf, bsize, stdin) == NULL) {
     return (-1);
   }
   if ((p = strchr(buf, '\n')) != NULL) {
     *p = '\0';
   }
 
   return (0);
 }
 
-static void usage(char *name) {
+static void usage(char* name) {
   fprintf(stderr, "usage: %s fmtstring\n", name);
 }
 
-main(int argc, char **argv) {
+main(int argc, char** argv) {
   int rc, fd;
   char *s, *p;
   void *arg1, *arg2;
-  Sockbuf *sb;
-  BerElement *ber;
+  Sockbuf* sb;
+  BerElement* ber;
   char fmt[2];
   char buf[BUFSIZ];
   extern int lber_debug;
 
   lber_debug = 255;
   if (argc < 2) {
     usage(argv[0]);
     exit(1);
@@ -119,43 +119,43 @@ main(int argc, char **argv) {
   rc = 0;
   fmt[1] = '\0';
   for (s = argv[1]; *s; s++) {
     switch (*s) {
       case 'i': /* int */
       case 'b': /* boolean */
       case 'e': /* enumeration */
         getline(NULL, *s, buf, sizeof(buf));
-        arg1 = (void *)atoi(buf);
+        arg1 = (void*)atoi(buf);
         break;
 
       case 'n': /* null */
         arg1 = NULL;
         break;
 
       case 'o': /* octet string (non-null terminated) */
         getline(NULL, *s, buf, sizeof(buf));
-        arg1 = (void *)buf;
-        arg2 = (void *)strlen(buf);
+        arg1 = (void*)buf;
+        arg2 = (void*)strlen(buf);
         break;
 
       case 's': /* string */
         getline(NULL, *s, buf, sizeof(buf));
-        arg1 = (void *)buf;
+        arg1 = (void*)buf;
         break;
 
       case 'B': /* bit string */
         getline(NULL, *s, buf, sizeof(buf));
-        arg1 = (void *)buf;
-        arg2 = (void *)strlen(buf);
+        arg1 = (void*)buf;
+        arg2 = (void*)strlen(buf);
         break;
 
       case 't': /* tag for the next element */
         getline(NULL, *s, buf, sizeof(buf));
-        arg1 = (void *)buf;
+        arg1 = (void*)buf;
         break;
 
       case '{': /* begin sequence */
       case '}': /* end sequence */
       case '[': /* begin set */
       case ']': /* end set */
         break;
 
--- a/ldap/c-sdk/libraries/liblber/idtest.c
+++ b/ldap/c-sdk/libraries/liblber/idtest.c
@@ -48,19 +48,19 @@
  */
 
 /* idtest.c - ber decoding test program using isode libraries */
 
 #include <stdio.h>
 #include <psap.h>
 #include <quipu/attr.h>
 
-static usage(char *name) { fprintf(stderr, "usage: %s\n", name); }
+static usage(char* name) { fprintf(stderr, "usage: %s\n", name); }
 
-main(int argc, char **argv) {
+main(int argc, char** argv) {
   PE pe;
   PS psin, psout, pserr;
 
   /* read the pe from standard in */
   if ((psin = ps_alloc(std_open)) == NULLPS) {
     perror("ps_alloc");
     exit(1);
   }
--- a/ldap/c-sdk/libraries/liblber/io.c
+++ b/ldap/c-sdk/libraries/liblber/io.c
@@ -54,37 +54,37 @@
   (sb->sb_ber.ber_end > sb->sb_ber.ber_ptr    \
        ? (unsigned char)*sb->sb_ber.ber_ptr++ \
        : ber_filbuf(sb, len))
 
 #ifdef macintosh
 /*
  * MacTCP/OpenTransport
  */
-#  define read(s, b, l) tcpread(s, 0, (unsigned char *)b, l, NULL)
+#  define read(s, b, l) tcpread(s, 0, (unsigned char*)b, l, NULL)
 #  define MAX_WRITE 65535
 #  define BerWrite(sb, b, l) \
-    tcpwrite(sb->sb_sd, (unsigned char *)(b), (l < MAX_WRITE) ? l : MAX_WRITE)
+    tcpwrite(sb->sb_sd, (unsigned char*)(b), (l < MAX_WRITE) ? l : MAX_WRITE)
 #else /* macintosh */
 #  if defined(_WIN32) || defined(_WINDOWS) || defined(XP_OS2)
 /*
  * 32-bit Windows Socket API (under Windows NT or Windows 95)
  */
 #    define read(s, b, l) recv(s, b, l, 0)
 #    define BerWrite(s, b, l) send(s->sb_sd, b, l, 0)
 #  else /* _WIN32 */
 /*
  * everything else (Unix/BSD 4.3 socket API)
  */
 #    define BerWrite(sb, b, l) write(sb->sb_sd, b, l)
-#    define udp_read(sb, b, l, al)                                             \
-      recvfrom(sb->sb_sd, (char *)b, l, 0, (struct sockaddr *)sb->sb_fromaddr, \
+#    define udp_read(sb, b, l, al)                                           \
+      recvfrom(sb->sb_sd, (char*)b, l, 0, (struct sockaddr*)sb->sb_fromaddr, \
                (al = sizeof(struct sockaddr), &al))
-#    define udp_write(sb, b, l)                                               \
-      sendto(sb->sb_sd, (char *)(b), l, 0, (struct sockaddr *)sb->sb_useaddr, \
+#    define udp_write(sb, b, l)                                             \
+      sendto(sb->sb_sd, (char*)(b), l, 0, (struct sockaddr*)sb->sb_useaddr, \
              sizeof(struct sockaddr))
 #  endif /* _WIN32 */
 #endif   /* macintosh */
 
 #ifndef udp_read
 #  define udp_read(sb, b, l, al) CLDAP NOT SUPPORTED
 #  define udp_write(sb, b, l) CLDAP NOT SUPPORTED
 #endif /* udp_read */
@@ -94,42 +94,42 @@ size_t lber_bufsize = EXBUFSIZ;
 
 #ifdef LDAP_DEBUG
 int lber_debug;
 #endif
 
 /*
  * function prototypes
  */
-static void nslberi_install_compat_io_fns(Sockbuf *sb);
-static int nslberi_extread_compat(int s, void *buf, int len,
-                                  struct lextiof_socket_private *arg);
-static int nslberi_extwrite_compat(int s, const void *buf, int len,
-                                   struct lextiof_socket_private *arg);
-static ber_tag_t get_tag(Sockbuf *sb, BerElement *ber);
-static ber_len_t get_ber_len(BerElement *ber);
-static ber_len_t read_len_in_ber(Sockbuf *sb, BerElement *ber);
+static void nslberi_install_compat_io_fns(Sockbuf* sb);
+static int nslberi_extread_compat(int s, void* buf, int len,
+                                  struct lextiof_socket_private* arg);
+static int nslberi_extwrite_compat(int s, const void* buf, int len,
+                                   struct lextiof_socket_private* arg);
+static ber_tag_t get_tag(Sockbuf* sb, BerElement* ber);
+static ber_len_t get_ber_len(BerElement* ber);
+static ber_len_t read_len_in_ber(Sockbuf* sb, BerElement* ber);
 
 /*
  * internal global structure for memory allocation callback functions
  */
 static struct lber_memalloc_fns nslberi_memalloc_fns;
 
 /*
  * buffered read from "sb".
  * returns value of first character read on success and -1 on error.
  */
-static int ber_filbuf(Sockbuf *sb, ber_slen_t len) {
+static int ber_filbuf(Sockbuf* sb, ber_slen_t len) {
   ssize_t rc;
 #ifdef CLDAP
   int addrlen;
 #endif /* CLDAP */
 
   if (sb->sb_ber.ber_buf == NULL) {
-    if ((sb->sb_ber.ber_buf = (char *)NSLBERI_MALLOC(READBUFSIZ)) == NULL) {
+    if ((sb->sb_ber.ber_buf = (char*)NSLBERI_MALLOC(READBUFSIZ)) == NULL) {
       return (-1);
     }
     sb->sb_ber.ber_flags &= ~LBER_FLAG_NO_FREE_BUFFER;
     sb->sb_ber.ber_ptr = sb->sb_ber.ber_buf;
     sb->sb_ber.ber_end = sb->sb_ber.ber_buf;
   }
 
   if (sb->sb_naddr > 0) {
@@ -172,17 +172,17 @@ static int ber_filbuf(Sockbuf *sb, ber_s
     sb->sb_ber.ber_ptr = sb->sb_ber.ber_buf + 1;
     sb->sb_ber.ber_end = sb->sb_ber.ber_buf + rc;
     return ((unsigned char)*sb->sb_ber.ber_buf);
   }
 
   return (-1);
 }
 
-static ber_int_t BerRead(Sockbuf *sb, char *buf, ber_slen_t len) {
+static ber_int_t BerRead(Sockbuf* sb, char* buf, ber_slen_t len) {
   int c;
   ber_int_t nread = 0;
 
   while (len > 0) {
     ber_int_t inberbuf = sb->sb_ber.ber_end - sb->sb_ber.ber_ptr;
     if (inberbuf > 0) {
       size_t tocopy = len > inberbuf ? inberbuf : len;
       SAFEMEMCPY(buf, sb->sb_ber.ber_ptr, tocopy);
@@ -207,17 +207,17 @@ static ber_int_t BerRead(Sockbuf *sb, ch
 }
 
 /*
  * Note: ber_read() only uses the ber_end and ber_ptr elements of ber.
  * Functions like ber_get_tag(), ber_skip_tag, and ber_peek_tag() rely on
  * that fact, so if this code is changed to use any additional elements of
  * the ber structure, those functions will need to be changed as well.
  */
-ber_int_t LDAP_CALL ber_read(BerElement *ber, char *buf, ber_len_t len) {
+ber_int_t LDAP_CALL ber_read(BerElement* ber, char* buf, ber_len_t len) {
   ber_len_t actuallen;
   ber_uint_t nleft;
 
   nleft = ber->ber_end - ber->ber_ptr;
   actuallen = nleft < len ? nleft : len;
 
   SAFEMEMCPY(buf, ber->ber_ptr, (size_t)actuallen);
 
@@ -225,44 +225,44 @@ ber_int_t LDAP_CALL ber_read(BerElement 
 
   return ((ber_int_t)actuallen);
 }
 
 /*
  * enlarge the ber buffer.
  * return 0 on success, -1 on error.
  */
-int nslberi_ber_realloc(BerElement *ber, ber_len_t len) {
+int nslberi_ber_realloc(BerElement* ber, ber_len_t len) {
   ber_uint_t need, have, total;
   size_t have_bytes;
-  Seqorset *s;
+  Seqorset* s;
   ber_int_t off;
-  char *oldbuf;
+  char* oldbuf;
   int freeoldbuf = 0;
 
   ber->ber_buf_reallocs++;
 
   have_bytes = ber->ber_end - ber->ber_buf;
   have = have_bytes / lber_bufsize;
   need = (len < lber_bufsize ? 1 : (len + (lber_bufsize - 1)) / lber_bufsize);
   total = have * lber_bufsize + need * lber_bufsize * ber->ber_buf_reallocs;
 
   oldbuf = ber->ber_buf;
 
   if (ber->ber_buf == NULL) {
-    if ((ber->ber_buf = (char *)NSLBERI_MALLOC((size_t)total)) == NULL) {
+    if ((ber->ber_buf = (char*)NSLBERI_MALLOC((size_t)total)) == NULL) {
       return (-1);
     }
     ber->ber_flags &= ~LBER_FLAG_NO_FREE_BUFFER;
   } else {
     if (!(ber->ber_flags & LBER_FLAG_NO_FREE_BUFFER)) {
       freeoldbuf = 1;
     }
     /* transition to malloc'd buffer */
-    if ((ber->ber_buf = (char *)NSLBERI_MALLOC((size_t)total)) == NULL) {
+    if ((ber->ber_buf = (char*)NSLBERI_MALLOC((size_t)total)) == NULL) {
       return (-1);
     }
     ber->ber_flags &= ~LBER_FLAG_NO_FREE_BUFFER;
     /* copy existing data into new malloc'd buffer */
     SAFEMEMCPY(ber->ber_buf, oldbuf, have_bytes);
   }
 
   ber->ber_end = ber->ber_buf + total;
@@ -290,17 +290,17 @@ int nslberi_ber_realloc(BerElement *ber,
   }
 
   return (0);
 }
 
 /*
  * returns "len" on success and -1 on failure.
  */
-ber_int_t LDAP_CALL ber_write(BerElement *ber, char *buf, ber_len_t len,
+ber_int_t LDAP_CALL ber_write(BerElement* ber, char* buf, ber_len_t len,
                               int nosos) {
   if (nosos || ber->ber_sos == NULL) {
     if (ber->ber_ptr + len > ber->ber_end) {
       if (nslberi_ber_realloc(ber, len) != 0) return (-1);
     }
     SAFEMEMCPY(ber->ber_ptr, buf, (size_t)len);
     ber->ber_ptr += len;
     return (len);
@@ -310,29 +310,29 @@ ber_int_t LDAP_CALL ber_write(BerElement
     }
     SAFEMEMCPY(ber->ber_sos->sos_ptr, buf, (size_t)len);
     ber->ber_sos->sos_ptr += len;
     ber->ber_sos->sos_clen += len;
     return (len);
   }
 }
 
-void LDAP_CALL ber_free(BerElement *ber, int freebuf) {
+void LDAP_CALL ber_free(BerElement* ber, int freebuf) {
   if (ber != NULL) {
     if (freebuf && !(ber->ber_flags & LBER_FLAG_NO_FREE_BUFFER)) {
       NSLBERI_FREE(ber->ber_buf);
     }
-    NSLBERI_FREE((char *)ber);
+    NSLBERI_FREE((char*)ber);
   }
 }
 
 /*
  * return >= 0 on success, -1 on failure.
  */
-int LDAP_CALL ber_flush(Sockbuf *sb, BerElement *ber, int freeit) {
+int LDAP_CALL ber_flush(Sockbuf* sb, BerElement* ber, int freeit) {
   ssize_t nwritten = 0, towrite, rc;
   int i = 0;
 
   if (ber->ber_rwptr == NULL) {
     ber->ber_rwptr = ber->ber_buf;
   } else if (ber->ber_rwptr >= ber->ber_end) {
     /* we will use the ber_rwptr to continue an exited flush,
        so if rwptr is not within the buffer we return an error. */
@@ -424,74 +424,74 @@ int LDAP_CALL ber_flush(Sockbuf *sb, Ber
   } while (towrite > 0);
 
   if (freeit) ber_free(ber, 1);
 
   return (0);
 }
 
 /* we pre-allocate a buffer to save the extra malloc later */
-BerElement *LDAP_CALL ber_alloc_t(int options) {
-  BerElement *ber;
+BerElement* LDAP_CALL ber_alloc_t(int options) {
+  BerElement* ber;
 
-  if ((ber = (BerElement *)NSLBERI_CALLOC(
+  if ((ber = (BerElement*)NSLBERI_CALLOC(
            1, sizeof(struct berelement) + lber_bufsize)) == NULL) {
     return (NULL);
   }
 
   /*
    * for compatibility with the C LDAP API standard, we recognize
    * LBER_USE_DER as LBER_OPT_USE_DER.  See lber.h for a bit more info.
    */
   if (options & LBER_USE_DER) {
     options &= ~LBER_USE_DER;
     options |= LBER_OPT_USE_DER;
   }
 
   ber->ber_tag = LBER_DEFAULT;
   ber->ber_options = options;
-  ber->ber_buf = (char *)ber + sizeof(struct berelement);
+  ber->ber_buf = (char*)ber + sizeof(struct berelement);
   ber->ber_ptr = ber->ber_buf;
   ber->ber_end = ber->ber_buf + lber_bufsize;
   ber->ber_flags = LBER_FLAG_NO_FREE_BUFFER;
 
   return (ber);
 }
 
-BerElement *LDAP_CALL ber_alloc() { return (ber_alloc_t(0)); }
+BerElement* LDAP_CALL ber_alloc() { return (ber_alloc_t(0)); }
 
-BerElement *LDAP_CALL der_alloc() { return (ber_alloc_t(LBER_OPT_USE_DER)); }
+BerElement* LDAP_CALL der_alloc() { return (ber_alloc_t(LBER_OPT_USE_DER)); }
 
-BerElement *LDAP_CALL ber_dup(BerElement *ber) {
-  BerElement *new;
+BerElement* LDAP_CALL ber_dup(BerElement* ber) {
+  BerElement* new;
 
   if ((new = ber_alloc()) == NULL) return (NULL);
 
   *new = *ber;
 
   return (new);
 }
 
-void LDAP_CALL ber_init_w_nullchar(BerElement *ber, int options) {
-  (void)memset((char *)ber, '\0', sizeof(struct berelement));
+void LDAP_CALL ber_init_w_nullchar(BerElement* ber, int options) {
+  (void)memset((char*)ber, '\0', sizeof(struct berelement));
   ber->ber_tag = LBER_DEFAULT;
 
   /*
    * For compatibility with the C LDAP API standard, we recognize
    * LBER_USE_DER as LBER_OPT_USE_DER.  See lber.h for a bit more info.
    */
   if (options & LBER_USE_DER) {
     options &= ~LBER_USE_DER;
     options |= LBER_OPT_USE_DER;
   }
 
   ber->ber_options = options;
 }
 
-void LDAP_CALL ber_reset(BerElement *ber, int was_writing) {
+void LDAP_CALL ber_reset(BerElement* ber, int was_writing) {
   if (was_writing) {
     ber->ber_end = ber->ber_ptr;
     ber->ber_ptr = ber->ber_buf;
   } else {
     ber->ber_ptr = ber->ber_end;
   }
 
   ber->ber_rwptr = NULL;
@@ -500,17 +500,17 @@ void LDAP_CALL ber_reset(BerElement *ber
   memset(ber->ber_struct, 0, BER_CONTENTS_STRUCT_SIZE);
 }
 
 /* Returns the length of the ber buffer so far,
    taking into account sequences/sets also.
    CAUTION: Returns 0 on null buffers as well
    as 0 on empty buffers!
 */
-size_t LDAP_CALL ber_get_buf_datalen(BerElement *ber) {
+size_t LDAP_CALL ber_get_buf_datalen(BerElement* ber) {
   size_t datalen;
 
   if ((ber == NULL) || (ber->ber_buf == NULL) || (ber->ber_ptr == NULL)) {
     datalen = 0;
   } else if (ber->ber_sos == NULLSEQORSET) {
     /* there are no sequences or sets yet,
        so just subtract ptr from the beginning of the ber buffer */
     datalen = ber->ber_ptr - ber->ber_buf;
@@ -523,17 +523,17 @@ size_t LDAP_CALL ber_get_buf_datalen(Ber
 
   return datalen;
 }
 
 /*
   if buf is 0 then malloc a buffer of length size
   returns > 0 on success, 0 otherwise
 */
-int LDAP_CALL ber_stack_init(BerElement *ber, int options, char *buf,
+int LDAP_CALL ber_stack_init(BerElement* ber, int options, char* buf,
                              size_t size) {
   if (NULL == ber) return 0;
 
   memset(ber, 0, sizeof(*ber));
 
   /*
    * for compatibility with the C LDAP API standard, we recognize
    * LBER_USE_DER as LBER_OPT_USE_DER.  See lber.h for a bit more info.
@@ -550,53 +550,53 @@ int LDAP_CALL ber_stack_init(BerElement 
   if (ber->ber_buf && !(ber->ber_flags & LBER_FLAG_NO_FREE_BUFFER)) {
     NSLBERI_FREE(ber->ber_buf);
   }
 
   if (buf) {
     ber->ber_buf = ber->ber_ptr = buf;
     ber->ber_flags = LBER_FLAG_NO_FREE_BUFFER;
   } else {
-    ber->ber_buf = ber->ber_ptr = (char *)NSLBERI_MALLOC(size);
+    ber->ber_buf = ber->ber_ptr = (char*)NSLBERI_MALLOC(size);
   }
 
   ber->ber_end = ber->ber_buf + size;
 
   return ber->ber_buf != 0;
 }
 
 /*
  * This call allows to release only the data part of
  * the target Sockbuf.
  * Other info of this Sockbuf are kept unchanged.
  */
-void LDAP_CALL ber_sockbuf_free_data(Sockbuf *p) {
+void LDAP_CALL ber_sockbuf_free_data(Sockbuf* p) {
   if (p != NULL) {
     if (p->sb_ber.ber_buf != NULL &&
         !(p->sb_ber.ber_flags & LBER_FLAG_NO_FREE_BUFFER)) {
       NSLBERI_FREE(p->sb_ber.ber_buf);
       p->sb_ber.ber_buf = NULL;
     }
   }
 }
 
 /* simply returns ber_buf in the ber ...
    explicitly for DS MMR only...
 */
-char *LDAP_CALL ber_get_buf_databegin(BerElement *ber) {
+char* LDAP_CALL ber_get_buf_databegin(BerElement* ber) {
   if (NULL != ber) {
     return ber->ber_buf;
   } else {
     return NULL;
   }
 }
 
 #ifdef LDAP_DEBUG
 
-void ber_dump(BerElement *ber, int inout) {
+void ber_dump(BerElement* ber, int inout) {
   char msg[128];
   sprintf(msg, "ber_dump: buf 0x%p, ptr 0x%p, rwptr 0x%p, end 0x%p\n",
           ber->ber_buf, ber->ber_ptr, ber->ber_rwptr, ber->ber_end);
   ber_err_print(msg);
   if (inout == 1) {
     sprintf(msg, "          current len %ld, contents:\n",
             (long)(ber->ber_end - ber->ber_ptr));
     ber_err_print(msg);
@@ -604,17 +604,17 @@ void ber_dump(BerElement *ber, int inout
   } else {
     sprintf(msg, "          current len %ld, contents:\n",
             (long)(ber->ber_ptr - ber->ber_buf));
     ber_err_print(msg);
     lber_bprint(ber->ber_buf, ber->ber_ptr - ber->ber_buf);
   }
 }
 
-void ber_sos_dump(Seqorset *sos) {
+void ber_sos_dump(Seqorset* sos) {
   char msg[80];
   ber_err_print("*** sos dump ***\n");
   while (sos != NULLSEQORSET) {
     sprintf(msg, "ber_sos_dump: clen %d first 0x%p ptr 0x%p\n", sos->sos_clen,
             sos->sos_first, sos->sos_ptr);
     ber_err_print(msg);
     sprintf(msg, "              current len %ld contents:\n",
             (long)(sos->sos_ptr - sos->sos_first));
@@ -625,73 +625,73 @@ void ber_sos_dump(Seqorset *sos) {
   }
   ber_err_print("*** end dump ***\n");
 }
 
 #endif
 
 /* return the tag - LBER_DEFAULT returned means trouble
  * assumes the tag is only one byte! */
-static ber_tag_t get_tag(Sockbuf *sb, BerElement *ber) {
+static ber_tag_t get_tag(Sockbuf* sb, BerElement* ber) {
   unsigned char xbyte;
 
-  if ((BerRead(sb, (char *)&xbyte, 1)) != 1) {
+  if ((BerRead(sb, (char*)&xbyte, 1)) != 1) {
     return (LBER_DEFAULT);
   }
 
   /* we only handle small (one byte) tags */
   if ((xbyte & LBER_BIG_TAG_MASK) == LBER_BIG_TAG_MASK) {
     return (LBER_DEFAULT);
   }
 
   ber->ber_tag_contents[0] = xbyte;
   ber->ber_struct[BER_STRUCT_TAG].ldapiov_len = 1;
   return ((ber_tag_t)xbyte);
 }
 
 /* Error checking? */
 /* Takes a ber and returns the actual length */
-static ber_len_t get_ber_len(BerElement *ber) {
+static ber_len_t get_ber_len(BerElement* ber) {
   int noctets;
   ber_len_t len = 0;
   char xbyte;
 
   xbyte = ber->ber_len_contents[0];
 
   /* long form */
   if (xbyte & 0x80) {
     noctets = (int)(xbyte & 0x7f);
     if (noctets >= MAX_LEN_SIZE) {
       return (LBER_DEFAULT);
     }
-    SAFEMEMCPY((char *)&len + sizeof(ber_len_t) - noctets,
+    SAFEMEMCPY((char*)&len + sizeof(ber_len_t) - noctets,
                &ber->ber_len_contents[1], noctets);
     len = LBER_NTOHL(len);
     return (len);
   } else {
     return ((ber_len_t)(xbyte));
   }
 }
 
 /* LBER_DEFAULT means trouble
    reads in the length, stores it in ber->ber_struct, and returns get_ber_len */
-static ber_len_t read_len_in_ber(Sockbuf *sb, BerElement *ber) {
+static ber_len_t read_len_in_ber(Sockbuf* sb, BerElement* ber) {
   unsigned char xbyte;
   int noctets;
   int rc = 0, read_result = 0;
 
   /*
    * Next, read the length.  The first byte contains the length
    * of the length.  If bit 8 is set, the length is the long
    * form, otherwise it's the short form.  We don't allow a
    * length that's greater than what we can hold in a ber_int_t
    */
   if (ber->ber_tag_len_read == 1) {
     /* the length of the length hasn't been read yet */
-    if (BerRead(sb, (char *)&xbyte, 1) != 1) {
+    if (BerRead(sb, (char*)&xbyte, 1) != 1) {
       return (LBER_DEFAULT);
     }
     ber->ber_tag_len_read = 2;
     ber->ber_len_contents[0] = xbyte;
   } else {
     rc = ber->ber_tag_len_read - 2;
     xbyte = ber->ber_len_contents[0];
   }
@@ -712,22 +712,22 @@ static ber_len_t read_len_in_ber(Sockbuf
     ber->ber_tag_len_read = rc + 2; /* adds tag (1 byte) and lenlen (1 byte) */
     ber->ber_struct[BER_STRUCT_LEN].ldapiov_len = 1 + noctets;
   } else { /* short form of the length value */
     ber->ber_struct[BER_STRUCT_LEN].ldapiov_len = 1;
   }
   return (get_ber_len(ber));
 }
 
-ber_tag_t LDAP_CALL ber_get_next(Sockbuf *sb, ber_len_t *len, BerElement *ber) {
+ber_tag_t LDAP_CALL ber_get_next(Sockbuf* sb, ber_len_t* len, BerElement* ber) {
   ber_len_t newlen;
   ber_len_t toread;
   ber_int_t rc;
   ber_len_t orig_taglen_read = 0;
-  char *orig_rwptr = ber->ber_rwptr ? ber->ber_rwptr : ber->ber_buf;
+  char* orig_rwptr = ber->ber_rwptr ? ber->ber_rwptr : ber->ber_buf;
 
 #ifdef LDAP_DEBUG
   if (lber_debug) ber_err_print("ber_get_next\n");
 #endif
 
   /*
    * When rwptr is NULL this signifies that the tag and length have not been
    * read in their entirety yet. (if at all)
@@ -780,17 +780,17 @@ ber_tag_t LDAP_CALL ber_get_next(Sockbuf
       return (LBER_DEFAULT);
     }
 
     /* check to see if we already have enough memory allocated */
     if (((ber_len_t)ber->ber_end - (ber_len_t)ber->ber_buf) < newlen) {
       if (ber->ber_buf && !(ber->ber_flags & LBER_FLAG_NO_FREE_BUFFER)) {
         NSLBERI_FREE(ber->ber_buf);
       }
-      if ((ber->ber_buf = (char *)NSLBERI_CALLOC(1, (size_t)newlen)) == NULL) {
+      if ((ber->ber_buf = (char*)NSLBERI_CALLOC(1, (size_t)newlen)) == NULL) {
         return (LBER_DEFAULT);
       }
       ber->ber_flags &= ~LBER_FLAG_NO_FREE_BUFFER;
       orig_rwptr = ber->ber_buf;
     }
 
     ber->ber_len = newlen;
     ber->ber_ptr = ber->ber_buf;
@@ -822,62 +822,62 @@ ber_tag_t LDAP_CALL ber_get_next(Sockbuf
 #endif
 
   *len = (ber_len_t)ber->ber_rwptr - (ber_len_t)orig_rwptr;
   ber->ber_rwptr = NULL;
   ber->ber_struct[BER_STRUCT_VAL].ldapiov_len = ber->ber_len;
   return (ber->ber_tag);
 }
 
-Sockbuf *LDAP_CALL ber_sockbuf_alloc() {
-  return ((Sockbuf *)NSLBERI_CALLOC(1, sizeof(struct sockbuf)));
+Sockbuf* LDAP_CALL ber_sockbuf_alloc() {
+  return ((Sockbuf*)NSLBERI_CALLOC(1, sizeof(struct sockbuf)));
 }
 
-void LDAP_CALL ber_sockbuf_free(Sockbuf *p) {
+void LDAP_CALL ber_sockbuf_free(Sockbuf* p) {
   if (p != NULL) {
     if (p->sb_ber.ber_buf != NULL &&
         !(p->sb_ber.ber_flags & LBER_FLAG_NO_FREE_BUFFER)) {
       NSLBERI_FREE(p->sb_ber.ber_buf);
     }
     NSLBERI_FREE(p);
   }
 }
 
 /*
  * return 0 on success and -1 on error
  */
-int LDAP_CALL ber_set_option(struct berelement *ber, int option, void *value) {
+int LDAP_CALL ber_set_option(struct berelement* ber, int option, void* value) {
   /*
    * memory allocation callbacks are global, so it is OK to pass
    * NULL for ber.  Handle this as a special case.
    */
   if (option == LBER_OPT_MEMALLOC_FN_PTRS) {
     /* struct copy */
-    nslberi_memalloc_fns = *((struct lber_memalloc_fns *)value);
+    nslberi_memalloc_fns = *((struct lber_memalloc_fns*)value);
     return (0);
   }
 
   /*
    * lber_debug is global, so it is OK to pass
    * NULL for ber.  Handle this as a special case.
    */
   if (option == LBER_OPT_DEBUG_LEVEL) {
 #ifdef LDAP_DEBUG
-    lber_debug = *(int *)value;
+    lber_debug = *(int*)value;
 #endif
     return (0);
   }
 
   /*
    * lber_bufsize is global, so it is OK to pass
    * NULL for ber. Handle this as a special case.
    */
   if (option == LBER_OPT_BUFSIZE) {
-    if (*(size_t *)value > EXBUFSIZ) {
-      lber_bufsize = *(size_t *)value;
+    if (*(size_t*)value > EXBUFSIZ) {
+      lber_bufsize = *(size_t*)value;
     }
     return (0);
   }
 
   /*
    * all the rest require a non-NULL ber
    */
   if (!NSLBERI_VALID_BERELEMENT_POINTER(ber)) {
@@ -889,98 +889,98 @@ int LDAP_CALL ber_set_option(struct bere
     case LBER_OPT_TRANSLATE_STRINGS:
       if (value != NULL) {
         ber->ber_options |= option;
       } else {
         ber->ber_options &= ~option;
       }
       break;
     case LBER_OPT_REMAINING_BYTES:
-      ber->ber_end = ber->ber_ptr + *((ber_len_t *)value);
+      ber->ber_end = ber->ber_ptr + *((ber_len_t*)value);
       break;
     case LBER_OPT_TOTAL_BYTES:
-      ber->ber_end = ber->ber_buf + *((ber_len_t *)value);
+      ber->ber_end = ber->ber_buf + *((ber_len_t*)value);
       break;
     case LBER_OPT_BYTES_TO_WRITE:
-      ber->ber_ptr = ber->ber_buf + *((ber_len_t *)value);
+      ber->ber_ptr = ber->ber_buf + *((ber_len_t*)value);
       break;
     default:
       return (-1);
   }
 
   return (0);
 }
 
 /*
  * return 0 on success and -1 on error
  */
-int LDAP_CALL ber_get_option(struct berelement *ber, int option, void *value) {
+int LDAP_CALL ber_get_option(struct berelement* ber, int option, void* value) {
   /*
    * memory callocation callbacks are global, so it is OK to pass
    * NULL for ber.  Handle this as a special case
    */
   if (option == LBER_OPT_MEMALLOC_FN_PTRS) {
     /* struct copy */
-    *((struct lber_memalloc_fns *)value) = nslberi_memalloc_fns;
+    *((struct lber_memalloc_fns*)value) = nslberi_memalloc_fns;
     return (0);
   }
 
   /*
    * lber_debug is global, so it is OK to pass
    * NULL for ber.  Handle this as a special case.
    */
   if (option == LBER_OPT_DEBUG_LEVEL) {
 #ifdef LDAP_DEBUG
-    *(int *)value = lber_debug;
+    *(int*)value = lber_debug;
 #endif
     return (0);
   }
 
   /*
    * lber_bufsize is global, so it is OK to pass
    * NULL for ber. Handle this as a special case.
    */
   if (option == LBER_OPT_BUFSIZE) {
-    *(size_t *)value = lber_bufsize;
+    *(size_t*)value = lber_bufsize;
     return (0);
   }
 
   /*
    * all the rest require a non-NULL ber
    */
   if (!NSLBERI_VALID_BERELEMENT_POINTER(ber)) {
     return (-1);
   }
 
   switch (option) {
     case LBER_OPT_USE_DER:
     case LBER_OPT_TRANSLATE_STRINGS:
-      *((int *)value) = (ber->ber_options & option);
+      *((int*)value) = (ber->ber_options & option);
       break;
     case LBER_OPT_REMAINING_BYTES:
-      *((ber_len_t *)value) = ber->ber_end - ber->ber_ptr;
+      *((ber_len_t*)value) = ber->ber_end - ber->ber_ptr;
       break;
     case LBER_OPT_TOTAL_BYTES:
-      *((ber_len_t *)value) = ber->ber_end - ber->ber_buf;
+      *((ber_len_t*)value) = ber->ber_end - ber->ber_buf;
       break;
     case LBER_OPT_BYTES_TO_WRITE:
-      *((ber_len_t *)value) = ber->ber_ptr - ber->ber_buf;
+      *((ber_len_t*)value) = ber->ber_ptr - ber->ber_buf;
       break;
     default:
       return (-1);
   }
 
   return (0);
 }
 
 /*
  * return 0 on success and -1 on error
  */
-int LDAP_CALL ber_sockbuf_set_option(Sockbuf *sb, int option, void *value) {
-  struct lber_x_ext_io_fns *extiofns;
+int LDAP_CALL ber_sockbuf_set_option(Sockbuf* sb, int option, void* value) {
+  struct lber_x_ext_io_fns* extiofns;
 
   if (!NSLBERI_VALID_SOCKBUF_POINTER(sb)) {
     return (-1);
   }
 
   /* check for a NULL value for certain options. */
   if (NULL == value) {
     switch (option) {
@@ -995,27 +995,27 @@ int LDAP_CALL ber_sockbuf_set_option(Soc
         break;
       default:
         return (-1);
     }
   }
 
   switch (option) {
     case LBER_SOCKBUF_OPT_VALID_TAG:
-      sb->sb_valid_tag = *((ber_tag_t *)value);
+      sb->sb_valid_tag = *((ber_tag_t*)value);
       /* use NULL to reset */
       if (value != NULL) {
         sb->sb_options |= option;
       } else {
         sb->sb_options &= ~option;
       }
       break;
     case LBER_SOCKBUF_OPT_MAX_INCOMING_SIZE:
       if (value != NULL) {
-        sb->sb_max_incoming = *((ber_len_t *)value);
+        sb->sb_max_incoming = *((ber_len_t*)value);
         sb->sb_options |= option;
       } else {
         /* setting the max incoming to 0 seems to be the only
            way to tell the callers of ber_sockbuf_get_option
            that this option isn't set. */
         sb->sb_max_incoming = 0;
         sb->sb_options &= ~option;
       }
@@ -1025,33 +1025,33 @@ int LDAP_CALL ber_sockbuf_set_option(Soc
     case LBER_SOCKBUF_OPT_NO_READ_AHEAD:
       if (value != NULL) {
         sb->sb_options |= option;
       } else {
         sb->sb_options &= ~option;
       }
       break;
     case LBER_SOCKBUF_OPT_DESC:
-      sb->sb_sd = *((LBER_SOCKET *)value);
+      sb->sb_sd = *((LBER_SOCKET*)value);
       break;
     case LBER_SOCKBUF_OPT_COPYDESC:
-      sb->sb_copyfd = *((LBER_SOCKET *)value);
+      sb->sb_copyfd = *((LBER_SOCKET*)value);
       break;
     case LBER_SOCKBUF_OPT_READ_FN:
-      sb->sb_io_fns.lbiof_read = (LDAP_IOF_READ_CALLBACK *)value;
+      sb->sb_io_fns.lbiof_read = (LDAP_IOF_READ_CALLBACK*)value;
       nslberi_install_compat_io_fns(sb);
       break;
     case LBER_SOCKBUF_OPT_WRITE_FN:
-      sb->sb_io_fns.lbiof_write = (LDAP_IOF_WRITE_CALLBACK *)value;
+      sb->sb_io_fns.lbiof_write = (LDAP_IOF_WRITE_CALLBACK*)value;
       nslberi_install_compat_io_fns(sb);
       break;
     case LBER_SOCKBUF_OPT_EXT_IO_FNS:
-      extiofns = (struct lber_x_ext_io_fns *)value;
+      extiofns = (struct lber_x_ext_io_fns*)value;
       if (extiofns == NULL) { /* remove */
-        (void)memset((char *)&sb->sb_ext_io_fns, '\0',
+        (void)memset((char*)&sb->sb_ext_io_fns, '\0',
                      sizeof(sb->sb_ext_io_fns));
       } else if (extiofns->lbextiofn_size == LBER_X_EXTIO_FNS_SIZE) {
         /* struct copy */
         sb->sb_ext_io_fns = *extiofns;
       } else if (extiofns->lbextiofn_size == LBER_X_EXTIO_FNS_SIZE_REV0) {
         /* backwards compatibility for older struct */
         sb->sb_ext_io_fns.lbextiofn_size = LBER_X_EXTIO_FNS_SIZE;
         sb->sb_ext_io_fns.lbextiofn_read = extiofns->lbextiofn_read;
@@ -1059,133 +1059,133 @@ int LDAP_CALL ber_sockbuf_set_option(Soc
         sb->sb_ext_io_fns.lbextiofn_writev = NULL;
         sb->sb_ext_io_fns.lbextiofn_socket_arg = extiofns->lbextiofn_socket_arg;
       } else {
         return (-1);
       }
       break;
     case LBER_SOCKBUF_OPT_SOCK_ARG:
       sb->sb_ext_io_fns.lbextiofn_socket_arg =
-          (struct lextiof_socket_private *)value;
+          (struct lextiof_socket_private*)value;
       break;
     default:
       return (-1);
   }
 
   return (0);
 }
 
 /*
  * return 0 on success and -1 on error
  */
-int LDAP_CALL ber_sockbuf_get_option(Sockbuf *sb, int option, void *value) {
-  struct lber_x_ext_io_fns *extiofns;
+int LDAP_CALL ber_sockbuf_get_option(Sockbuf* sb, int option, void* value) {
+  struct lber_x_ext_io_fns* extiofns;
 
   if (!NSLBERI_VALID_SOCKBUF_POINTER(sb) || (NULL == value)) {
     return (-1);
   }
 
   switch (option) {
     case LBER_SOCKBUF_OPT_VALID_TAG:
-      *((ber_tag_t *)value) = sb->sb_valid_tag;
+      *((ber_tag_t*)value) = sb->sb_valid_tag;
       break;
     case LBER_SOCKBUF_OPT_MAX_INCOMING_SIZE:
-      *((ber_len_t *)value) = sb->sb_max_incoming;
+      *((ber_len_t*)value) = sb->sb_max_incoming;
       break;
     case LBER_SOCKBUF_OPT_TO_FILE:
     case LBER_SOCKBUF_OPT_TO_FILE_ONLY:
     case LBER_SOCKBUF_OPT_NO_READ_AHEAD:
-      *((int *)value) = (sb->sb_options & option);
+      *((int*)value) = (sb->sb_options & option);
       break;
     case LBER_SOCKBUF_OPT_DESC:
-      *((LBER_SOCKET *)value) = sb->sb_sd;
+      *((LBER_SOCKET*)value) = sb->sb_sd;
       break;
     case LBER_SOCKBUF_OPT_COPYDESC:
-      *((LBER_SOCKET *)value) = sb->sb_copyfd;
+      *((LBER_SOCKET*)value) = sb->sb_copyfd;
       break;
     case LBER_SOCKBUF_OPT_READ_FN:
-      *((LDAP_IOF_READ_CALLBACK **)value) = sb->sb_io_fns.lbiof_read;
+      *((LDAP_IOF_READ_CALLBACK**)value) = sb->sb_io_fns.lbiof_read;
       break;
     case LBER_SOCKBUF_OPT_WRITE_FN:
-      *((LDAP_IOF_WRITE_CALLBACK **)value) = sb->sb_io_fns.lbiof_write;
+      *((LDAP_IOF_WRITE_CALLBACK**)value) = sb->sb_io_fns.lbiof_write;
       break;
     case LBER_SOCKBUF_OPT_EXT_IO_FNS:
-      extiofns = (struct lber_x_ext_io_fns *)value;
+      extiofns = (struct lber_x_ext_io_fns*)value;
       if (extiofns == NULL) {
         return (-1);
       } else if (extiofns->lbextiofn_size == LBER_X_EXTIO_FNS_SIZE) {
         /* struct copy */
         *extiofns = sb->sb_ext_io_fns;
       } else if (extiofns->lbextiofn_size == LBER_X_EXTIO_FNS_SIZE_REV0) {
         /* backwards compatibility for older struct */
         extiofns->lbextiofn_read = sb->sb_ext_io_fns.lbextiofn_read;
         extiofns->lbextiofn_write = sb->sb_ext_io_fns.lbextiofn_write;
         extiofns->lbextiofn_socket_arg = sb->sb_ext_io_fns.lbextiofn_socket_arg;
       } else {
         return (-1);
       }
       break;
     case LBER_SOCKBUF_OPT_SOCK_ARG:
-      *((struct lextiof_socket_private **)value) =
+      *((struct lextiof_socket_private**)value) =
           sb->sb_ext_io_fns.lbextiofn_socket_arg;
       break;
     default:
       return (-1);
   }
 
   return (0);
 }
 
 /* new dboreham code below: */
 
 struct byte_buffer {
-  unsigned char *p;
+  unsigned char* p;
   int offset;
   int length;
 };
 typedef struct byte_buffer byte_buffer;
 
 /* This call allocates us a BerElement structure plus some extra memory.
  * It returns a pointer to the BerElement, plus a pointer to the extra memory.
  * This routine also allocates a ber data buffer within the same block, thus
  * saving a call to calloc later when we read data.
  */
-void *LDAP_CALL ber_special_alloc(size_t size, BerElement **ppBer) {
-  char *mem = NULL;
+void* LDAP_CALL ber_special_alloc(size_t size, BerElement** ppBer) {
+  char* mem = NULL;
 
   /* Make sure mem size requested is aligned */
   if (0 != (size & 0x03)) {
     size += (sizeof(ber_int_t) - (size & 0x03));
   }
 
   mem = NSLBERI_MALLOC(sizeof(struct berelement) + lber_bufsize + size);
   if (NULL == mem) {
     return NULL;
   }
-  *ppBer = (BerElement *)(mem + size);
+  *ppBer = (BerElement*)(mem + size);
   memset(*ppBer, 0, sizeof(struct berelement));
   (*ppBer)->ber_tag = LBER_DEFAULT;
   (*ppBer)->ber_buf = mem + size + sizeof(struct berelement);
   (*ppBer)->ber_ptr = (*ppBer)->ber_buf;
   (*ppBer)->ber_end = (*ppBer)->ber_buf + lber_bufsize;
   (*ppBer)->ber_flags = LBER_FLAG_NO_FREE_BUFFER;
-  return (void *)mem;
+  return (void*)mem;
 }
 
-void LDAP_CALL ber_special_free(void *buf, BerElement *ber) {
+void LDAP_CALL ber_special_free(void* buf, BerElement* ber) {
   if (!(ber->ber_flags & LBER_FLAG_NO_FREE_BUFFER)) {
     NSLBERI_FREE(ber->ber_buf);
   }
   NSLBERI_FREE(buf);
 }
 
 /* Copy up to bytes_to_read bytes from b into return_buffer.
  * Returns a count of bytes copied (always >= 0).
  */
-static int read_bytes(byte_buffer *b, unsigned char *return_buffer,
+static int read_bytes(byte_buffer* b, unsigned char* return_buffer,
                       int bytes_to_read) {
   /* copy up to bytes_to_read bytes into the caller's buffer, return the number
    * of bytes copied */
   int bytes_to_copy = 0;
 
   if (bytes_to_read <= (b->length - b->offset)) {
     bytes_to_copy = bytes_to_read;
   } else {
@@ -1198,31 +1198,31 @@ static int read_bytes(byte_buffer *b, un
   } else {
     SAFEMEMCPY(return_buffer, b->p + b->offset, bytes_to_copy);
     b->offset += bytes_to_copy;
   }
   return bytes_to_copy;
 }
 
 /* return the tag - LBER_DEFAULT returned means trouble */
-static ber_tag_t get_buffer_tag(byte_buffer *sb) {
+static ber_tag_t get_buffer_tag(byte_buffer* sb) {
   unsigned char xbyte;
   ber_tag_t tag;
-  char *tagp;
+  char* tagp;
   int i;
 
   if ((i = read_bytes(sb, &xbyte, 1)) != 1) {
     return (LBER_DEFAULT);
   }
 
   if ((xbyte & LBER_BIG_TAG_MASK) != LBER_BIG_TAG_MASK) {
     return ((ber_uint_t)xbyte);
   }
 
-  tagp = (char *)&tag;
+  tagp = (char*)&tag;
   tagp[0] = xbyte;
   for (i = 1; i < sizeof(ber_int_t); i++) {
     if (read_bytes(sb, &xbyte, 1) != 1) return (LBER_DEFAULT);
 
     tagp[i] = xbyte;
 
     if (!(xbyte & LBER_MORE_TAG_MASK)) break;
   }
@@ -1237,19 +1237,19 @@ static ber_tag_t get_buffer_tag(byte_buf
 /* Like ber_get_next, but from a byte buffer the caller already has. */
 /* Bytes_Scanned returns the number of bytes we actually looked at in the
  * buffer. */
 /* ber_get_next_buffer is now implemented in terms of ber_get_next_buffer_ext */
 /* and is here for backward compatibility.  This new function allows us to pass
  */
 /* the Sockbuf structure along */
 
-ber_uint_t LDAP_CALL ber_get_next_buffer(void *buffer, size_t buffer_size,
-                                         ber_len_t *len, BerElement *ber,
-                                         ber_uint_t *Bytes_Scanned) {
+ber_uint_t LDAP_CALL ber_get_next_buffer(void* buffer, size_t buffer_size,
+                                         ber_len_t* len, BerElement* ber,
+                                         ber_uint_t* Bytes_Scanned) {
   return (ber_get_next_buffer_ext(buffer, buffer_size, len, ber, Bytes_Scanned,
                                   NULL));
 }
 
 /*
  * Returns the tag of the message or LBER_ return code if an error occurs.
  *
  * If there was not enough data in the buffer to complete the message this
@@ -1260,20 +1260,20 @@ ber_uint_t LDAP_CALL ber_get_next_buffer
  * type or the value preset via LBER_SOCKBUF_OPT_MAX_INCOMING_SIZE option,
  * *Bytes_Scanned is set to zero and return code is set to LBER_OVERFLOW.
  *
  * For backward compatibility errno is also set on these error conditions:
  *
  * EINVAL   - LBER_SOCKBUF_OPT_VALID_TAG option set but tag doesn't match.
  * EMSGSIZE - an overflow condition as described above for LBER_OVERFLOW.
  */
-ber_uint_t LDAP_CALL ber_get_next_buffer_ext(void *buffer, size_t buffer_size,
-                                             ber_len_t *len, BerElement *ber,
-                                             ber_uint_t *Bytes_Scanned,
-                                             Sockbuf *sock) {
+ber_uint_t LDAP_CALL ber_get_next_buffer_ext(void* buffer, size_t buffer_size,
+                                             ber_len_t* len, BerElement* ber,
+                                             ber_uint_t* Bytes_Scanned,
+                                             Sockbuf* sock) {
   ber_tag_t tag = 0;
   ber_len_t netlen;
   ber_len_t toread;
   unsigned char lc;
   ssize_t rc;
   int noctets, diff;
   byte_buffer sb = {0};
 
@@ -1329,17 +1329,17 @@ ber_uint_t LDAP_CALL ber_get_next_buffer
 
     if (ber->ber_tag_len_read) {
       int nbytes;
 
       noctets = ((ber->ber_len_contents[0]) & 0x7f);
       diff = noctets + 1 /* tag */ - ber->ber_tag_len_read;
 
       if ((nbytes = read_bytes(&sb,
-                               (unsigned char *)&ber->ber_len_contents[0] +
+                               (unsigned char*)&ber->ber_len_contents[0] +
                                    ber->ber_tag_len_read,
                                diff)) != diff) {
         if (nbytes > 0) ber->ber_tag_len_read += nbytes;
 
         goto premature_exit;
       }
       *len = get_ber_len(ber); /* cast ber->ber_len_contents to unsigned long */
 
@@ -1363,29 +1363,29 @@ ber_uint_t LDAP_CALL ber_get_next_buffer
         if (noctets > sizeof(ber_uint_t)) {
 #if !defined(macintosh) && !defined(DOS)
           errno = EMSGSIZE;
 #endif
           *Bytes_Scanned = 0;
           return (LBER_OVERFLOW);
         }
         diff = sizeof(ber_uint_t) - noctets;
-        if ((nbytes = read_bytes(&sb, (unsigned char *)&netlen + diff,
+        if ((nbytes = read_bytes(&sb, (unsigned char*)&netlen + diff,
                                  noctets)) != noctets) {
           /*
            * The length is in long form and we don't get it in one
            * fragment, so stash partial length in the ber element
            * for later use
            */
 
           ber->ber_tag_len_read = nbytes + 1;
           ber->ber_len_contents[0] = lc;
           memset(&(ber->ber_len_contents[1]), 0, sizeof(ber_uint_t));
           SAFEMEMCPY(&(ber->ber_len_contents[1]),
-                     (unsigned char *)&netlen + diff, nbytes);
+                     (unsigned char*)&netlen + diff, nbytes);
 
           goto premature_exit;
         }
         *len = LBER_NTOHL(netlen);
       } else {
         *len = lc;
       }
     }
@@ -1420,17 +1420,17 @@ ber_uint_t LDAP_CALL ber_get_next_buffer
     }
     ber->ber_ptr = ber->ber_buf;
     ber->ber_end = ber->ber_buf + *len;
     ber->ber_rwptr = ber->ber_buf;
   }
 
   toread = (ber_len_t)ber->ber_end - (ber_len_t)ber->ber_rwptr;
   do {
-    if ((rc = read_bytes(&sb, (unsigned char *)ber->ber_rwptr,
+    if ((rc = read_bytes(&sb, (unsigned char*)ber->ber_rwptr,
                          (ber_int_t)toread)) <= 0) {
       goto premature_exit;
     }
 
     toread -= rc;
     ber->ber_rwptr += rc;
   } while (toread > 0);
 
@@ -1455,35 +1455,35 @@ error_exit:
  * are a BER encoding taken from the ber argument. The bvPtr pointer
  * points to the returned berval, which must be freed using
  * ber_bvfree().  This routine returns 0 on success and -1 on error.
  * The use of ber_flatten on a BerElement in which all '{' and '}'
  * format modifiers have not been properly matched can result in a
  * berval whose contents are not a valid BER encoding.
  * Note that the ber_ptr is not modified.
  */
-int LDAP_CALL ber_flatten(BerElement *ber, struct berval **bvPtr) {
-  struct berval *new;
+int LDAP_CALL ber_flatten(BerElement* ber, struct berval** bvPtr) {
+  struct berval* new;
   ber_len_t len;
 
   /* allocate a struct berval */
-  if ((new = (struct berval *)NSLBERI_MALLOC(sizeof(struct berval))) == NULL) {
+  if ((new = (struct berval*)NSLBERI_MALLOC(sizeof(struct berval))) == NULL) {
     return (-1);
   }
 
   /*
    * Copy everything from the BerElement's ber_buf to ber_ptr
    * into the berval structure.
    */
   if (ber == NULL) {
     new->bv_val = NULL;
     new->bv_len = 0;
   } else {
     len = ber->ber_ptr - ber->ber_buf;
-    if ((new->bv_val = (char *)NSLBERI_MALLOC(len + 1)) == NULL) {
+    if ((new->bv_val = (char*)NSLBERI_MALLOC(len + 1)) == NULL) {
       ber_bvfree(new);
       return (-1);
     }
     SAFEMEMCPY(new->bv_val, ber->ber_buf, (size_t)len);
     new->bv_val[len] = '\0';
     new->bv_len = len;
   }
 
@@ -1493,18 +1493,18 @@ int LDAP_CALL ber_flatten(BerElement *be
   return (0);
 }
 
 /*
  * The ber_init function constructs and returns a new BerElement
  * containing a copy of the data in the bv argument.  ber_init
  * returns the null pointer on error.
  */
-BerElement *LDAP_CALL ber_init(const struct berval *bv) {
-  BerElement *ber;
+BerElement* LDAP_CALL ber_init(const struct berval* bv) {
+  BerElement* ber;
 
   /* construct BerElement */
   if ((ber = ber_alloc_t(0)) != NULLBER) {
     /* copy data from the bv argument into BerElement */
     /* XXXmcs: had to cast unsigned long bv_len to long */
     if ((ber_write(ber, bv->bv_val, bv->bv_len, 0)) != (ber_slen_t)bv->bv_len) {
       ber_free(ber, 1);
       return (NULL);
@@ -1522,35 +1522,35 @@ BerElement *LDAP_CALL ber_init(const str
    * in the bv argument or a null pointer on error
    */
   return (ber);
 }
 
 /*
  * memory allocation functions.
  */
-void *nslberi_malloc(size_t size) {
+void* nslberi_malloc(size_t size) {
   return (nslberi_memalloc_fns.lbermem_malloc == NULL
               ? malloc(size)
               : nslberi_memalloc_fns.lbermem_malloc(size));
 }
 
-void *nslberi_calloc(size_t nelem, size_t elsize) {
+void* nslberi_calloc(size_t nelem, size_t elsize) {
   return (nslberi_memalloc_fns.lbermem_calloc == NULL
               ? calloc(nelem, elsize)
               : nslberi_memalloc_fns.lbermem_calloc(nelem, elsize));
 }
 
-void *nslberi_realloc(void *ptr, size_t size) {
+void* nslberi_realloc(void* ptr, size_t size) {
   return (nslberi_memalloc_fns.lbermem_realloc == NULL
               ? realloc(ptr, size)
               : nslberi_memalloc_fns.lbermem_realloc(ptr, size));
 }
 
-void nslberi_free(void *ptr) {
+void nslberi_free(void* ptr) {
   if (nslberi_memalloc_fns.lbermem_free == NULL) {
     free(ptr);
   } else {
     nslberi_memalloc_fns.lbermem_free(ptr);
   }
 }
 
 /*
@@ -1559,36 +1559,36 @@ void nslberi_free(void *ptr) {
  *    installed using ber_sockbuf_set_option( ..., LBER_SOCKBUF_OPT_EXT_IO_FNS,
  *    ... ).
  *
  * the basic strategy is to use the new extended arg to hold a pointer to the
  *    Sockbuf itself so we can find the old functions and call them.
  * note that the integer socket s passed in is not used.  we use the sb_sd
  *    from the Sockbuf itself because it is the correct type.
  */
-static int nslberi_extread_compat(int s, void *buf, int len,
-                                  struct lextiof_socket_private *arg) {
-  Sockbuf *sb = (Sockbuf *)arg;
+static int nslberi_extread_compat(int s, void* buf, int len,
+                                  struct lextiof_socket_private* arg) {
+  Sockbuf* sb = (Sockbuf*)arg;
 
   return (sb->sb_io_fns.lbiof_read(sb->sb_sd, buf, len));
 }
 
-static int nslberi_extwrite_compat(int s, const void *buf, int len,
-                                   struct lextiof_socket_private *arg) {
-  Sockbuf *sb = (Sockbuf *)arg;
+static int nslberi_extwrite_compat(int s, const void* buf, int len,
+                                   struct lextiof_socket_private* arg) {
+  Sockbuf* sb = (Sockbuf*)arg;
 
   return (sb->sb_io_fns.lbiof_write(sb->sb_sd, buf, len));
 }
 
 /*
  * Install I/O compatibility functions.  This can't fail.
  */
-static void nslberi_install_compat_io_fns(Sockbuf *sb) {
+static void nslberi_install_compat_io_fns(Sockbuf* sb) {
   sb->sb_ext_io_fns.lbextiofn_size = LBER_X_EXTIO_FNS_SIZE;
   sb->sb_ext_io_fns.lbextiofn_read = nslberi_extread_compat;
   sb->sb_ext_io_fns.lbextiofn_write = nslberi_extwrite_compat;
   sb->sb_ext_io_fns.lbextiofn_writev = NULL;
-  sb->sb_ext_io_fns.lbextiofn_socket_arg = (void *)sb;
+  sb->sb_ext_io_fns.lbextiofn_socket_arg = (void*)sb;
 }
 /*
  * end of compat I/O functions
  ******************************************************************************
  */
--- a/ldap/c-sdk/libraries/liblber/lber-int.h
+++ b/ldap/c-sdk/libraries/liblber/lber-int.h
@@ -122,27 +122,27 @@ extern "C" {
 #  define NSLDAPI_LBER_SOCKET_IS_PTR
 #endif
 
 #define OLD_LBER_SEQUENCE 0x10 /* w/o constructed bit - broken */
 #define OLD_LBER_SET 0x11      /* w/o constructed bit - broken */
 
 #ifndef _IFP
 #  define _IFP
-typedef int(LDAP_C LDAP_CALLBACK *IFP)();
+typedef int(LDAP_C LDAP_CALLBACK* IFP)();
 #endif
 
 typedef struct seqorset {
   ber_len_t sos_clen;
   ber_tag_t sos_tag;
-  char *sos_first;
-  char *sos_ptr;
-  struct seqorset *sos_next;
+  char* sos_first;
+  char* sos_ptr;
+  struct seqorset* sos_next;
 } Seqorset;
-#define NULLSEQORSET ((Seqorset *)0)
+#define NULLSEQORSET ((Seqorset*)0)
 
 #define SOS_STACK_SIZE 8 /* depth of the pre-allocated sos structure stack */
 
 #define MAX_TAG_SIZE \
   (1 + sizeof(ber_int_t)) /* One byte for the length of the tag */
 #define MAX_LEN_SIZE \
   (1 + sizeof(ber_int_t)) /* One byte for the length of the length */
 #define MAX_VALUE_PREFIX_SIZE \
@@ -160,85 +160,85 @@ typedef struct seqorset {
 struct berelement {
   ldap_x_iovec ber_struct[BER_ARRAY_QUANTITY]; /* See above */
 
   char ber_tag_contents[MAX_TAG_SIZE];
   char ber_len_contents[MAX_LEN_SIZE];
   char ber_pre_contents[MAX_VALUE_PREFIX_SIZE];
   char ber_suf_contents[MAX_LEN_SIZE + 1];
 
-  char *ber_buf; /* update the value value when writing in case realloc is
+  char* ber_buf; /* update the value value when writing in case realloc is
                     called */
-  char *ber_ptr;
-  char *ber_end;
-  struct seqorset *ber_sos;
+  char* ber_ptr;
+  char* ber_end;
+  struct seqorset* ber_sos;
   ber_len_t ber_tag_len_read;
   ber_tag_t ber_tag; /* Remove me someday */
   ber_len_t ber_len; /* Remove me someday */
   int ber_usertag;
   char ber_options;
-  char *ber_rwptr;
+  char* ber_rwptr;
   BERTranslateProc ber_encode_translate_proc;
   BERTranslateProc ber_decode_translate_proc;
   int ber_flags;
 #define LBER_FLAG_NO_FREE_BUFFER 1 /* don't free ber_buf */
   unsigned int ber_buf_reallocs;   /* realloc counter */
   int ber_sos_stack_posn;
   Seqorset ber_sos_stack[SOS_STACK_SIZE];
 };
 
 #define BER_CONTENTS_STRUCT_SIZE (sizeof(ldap_x_iovec) * BER_ARRAY_QUANTITY)
 
-#define NULLBER ((BerElement *)NULL)
+#define NULLBER ((BerElement*)NULL)
 
 #ifdef LDAP_DEBUG
-void ber_dump(BerElement *ber, int inout);
+void ber_dump(BerElement* ber, int inout);
 #endif
 
 /*
  * structure for read/write I/O callback functions.
  */
 struct nslberi_io_fns {
-  LDAP_IOF_READ_CALLBACK *lbiof_read;
-  LDAP_IOF_WRITE_CALLBACK *lbiof_write;
+  LDAP_IOF_READ_CALLBACK* lbiof_read;
+  LDAP_IOF_WRITE_CALLBACK* lbiof_write;
 };
 
 /*
  * Old  structure for use with LBER_SOCKBUF_OPT_EXT_IO_FNS:
  */
 struct lber_x_ext_io_fns_rev0 {
   /* lbextiofn_size should always be set to LBER_X_EXTIO_FNS_SIZE */
   int lbextiofn_size;
-  LDAP_X_EXTIOF_READ_CALLBACK *lbextiofn_read;
-  LDAP_X_EXTIOF_WRITE_CALLBACK *lbextiofn_write;
-  struct lextiof_socket_private *lbextiofn_socket_arg;
+  LDAP_X_EXTIOF_READ_CALLBACK* lbextiofn_read;
+  LDAP_X_EXTIOF_WRITE_CALLBACK* lbextiofn_write;
+  struct lextiof_socket_private* lbextiofn_socket_arg;
 };
 #define LBER_X_EXTIO_FNS_SIZE_REV0 sizeof(struct lber_x_ext_io_fns_rev0)
 
 struct sockbuf {
   LBER_SOCKET sb_sd;
   BerElement sb_ber;
   int sb_naddr;      /* > 0 implies using CLDAP (UDP) */
-  void *sb_useaddr;  /* pointer to sockaddr to use next */
-  void *sb_fromaddr; /* pointer to message source sockaddr */
-  void **sb_addrs;   /* actually an array of pointers to
+  void* sb_useaddr;  /* pointer to sockaddr to use next */
+  void* sb_fromaddr; /* pointer to message source sockaddr */
+  void** sb_addrs;   /* actually an array of pointers to
                         sockaddrs */
 
   int sb_options;        /* to support copying ber elements */
   LBER_SOCKET sb_copyfd; /* for LBER_SOCKBUF_OPT_TO_FILE* opts */
   ber_len_t sb_max_incoming;
   ber_tag_t sb_valid_tag;          /* valid tag to accept */
   struct nslberi_io_fns sb_io_fns; /* classic I/O callback functions */
 
   struct lber_x_ext_io_fns sb_ext_io_fns; /* extended I/O callback functions */
 };
-#define NULLSOCKBUF ((Sockbuf *)NULL)
+#define NULLSOCKBUF ((Sockbuf*)NULL)
 
 /* needed by libldap, even in non-DEBUG builds */
-void ber_err_print(char *data);
+void ber_err_print(char* data);
 
 #ifndef NSLBERI_LBER_INT_FRIEND
 /*
  * Everything from this point on is excluded if NSLBERI_LBER_INT_FRIEND is
  * defined.  The code under ../libraries/libldap defines this.
  */
 
 #  define READBUFSIZ 8192
@@ -250,43 +250,43 @@ void ber_err_print(char *data);
 
 #  define NSLBERI_VALID_SOCKBUF_POINTER(sb) ((sb) != NULLSOCKBUF)
 
 #  define LBER_HTONL(l) htonl(l)
 #  define LBER_NTOHL(l) ntohl(l)
 
 /* function prototypes */
 #  ifdef LDAP_DEBUG
-void lber_bprint(char *data, int len);
+void lber_bprint(char* data, int len);
 #  endif
-void ber_err_print(char *data);
-void *nslberi_malloc(size_t size);
-void *nslberi_calloc(size_t nelem, size_t elsize);
-void *nslberi_realloc(void *ptr, size_t size);
-void nslberi_free(void *ptr);
-int nslberi_ber_realloc(BerElement *ber, ber_len_t len);
+void ber_err_print(char* data);
+void* nslberi_malloc(size_t size);
+void* nslberi_calloc(size_t nelem, size_t elsize);
+void* nslberi_realloc(void* ptr, size_t size);
+void nslberi_free(void* ptr);
+int nslberi_ber_realloc(BerElement* ber, ber_len_t len);
 
 /* blame: dboreham
  * slapd spends much of its time doing memcpy's for the ber code.
  * Most of these are single-byte, so we special-case those and speed
  * things up considerably.
  */
 
 #  ifdef sunos4
 #    define THEMEMCPY(d, s, n) bcopy(s, d, n)
 #  else /* sunos4 */
 #    define THEMEMCPY(d, s, n) memmove(d, s, n)
 #  endif /* sunos4 */
 
 #  ifdef SAFEMEMCPY
 #    undef SAFEMEMCPY
-#    define SAFEMEMCPY(d, s, n)      \
-      if (1 == n)                    \
-        *((char *)d) = *((char *)s); \
-      else                           \
+#    define SAFEMEMCPY(d, s, n)    \
+      if (1 == n)                  \
+        *((char*)d) = *((char*)s); \
+      else                         \
         THEMEMCPY(d, s, n);
 #  endif
 
 /*
  * Memory allocation done in liblber should all go through one of the
  * following macros. This is so we can plug-in alternative memory
  * allocators, etc. as the need arises.
  */
--- a/ldap/c-sdk/libraries/libldap/abandon.c
+++ b/ldap/c-sdk/libraries/libldap/abandon.c
@@ -46,50 +46,50 @@
 #if 0
 #  ifndef lint
 static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
 #  endif
 #endif
 
 #include "ldap-int.h"
 
-static int do_abandon(LDAP *ld, int origid, int msgid,
-                      LDAPControl **serverctrls, LDAPControl **clientctrls);
-static int nsldapi_send_abandon_message(LDAP *ld, LDAPConn *lc, BerElement *ber,
+static int do_abandon(LDAP* ld, int origid, int msgid,
+                      LDAPControl** serverctrls, LDAPControl** clientctrls);
+static int nsldapi_send_abandon_message(LDAP* ld, LDAPConn* lc, BerElement* ber,
                                         int abandon_msgid);
 
 /*
  * ldap_abandon - perform an ldap abandon operation. Parameters:
  *
  * ld     LDAP descriptor
  * msgid  The message id of the operation to abandon
  *
  * ldap_abandon returns 0 if everything went ok, -1 otherwise.
  *
  * Example:
  * ldap_abandon(ld, msgid);
  */
-int LDAP_CALL ldap_abandon(LDAP *ld, int msgid) {
+int LDAP_CALL ldap_abandon(LDAP* ld, int msgid) {
   LDAPDebug(LDAP_DEBUG_TRACE, "ldap_abandon %d\n", msgid, 0, 0);
   LDAPDebug(LDAP_DEBUG_TRACE, "4e65747363617065\n", msgid, 0, 0);
   LDAPDebug(LDAP_DEBUG_TRACE, "466f726576657221\n", msgid, 0, 0);
 
   if (ldap_abandon_ext(ld, msgid, NULL, NULL) == LDAP_SUCCESS) {
     return (0);
   }
 
   return (-1);
 }
 
 /*
  * LDAPv3 extended abandon.
  * Returns an LDAP error code.
  */
-int LDAP_CALL ldap_abandon_ext(LDAP *ld, int msgid, LDAPControl **serverctrls,
-                               LDAPControl **clientctrls) {
+int LDAP_CALL ldap_abandon_ext(LDAP* ld, int msgid, LDAPControl** serverctrls,
+                               LDAPControl** clientctrls) {
   int rc;
 
   LDAPDebug(LDAP_DEBUG_TRACE, "ldap_abandon_ext %d\n", msgid, 0, 0);
 
   if (!NSLDAPI_VALID_LDAP_POINTER(ld)) {
     return (LDAP_PARAM_ERROR);
   }
 
@@ -109,21 +109,21 @@ int LDAP_CALL ldap_abandon_ext(LDAP *ld,
 }
 
 /*
  * Abandon all outstanding requests for msgid (included child requests
  * spawned when chasing referrals).  This function calls itself recursively.
  * No locking is done is this function so it must be done by the caller.
  * Returns an LDAP error code and sets it in LDAP *ld as well
  */
-static int do_abandon(LDAP *ld, int origid, int msgid,
-                      LDAPControl **serverctrls, LDAPControl **clientctrls) {
-  BerElement *ber;
+static int do_abandon(LDAP* ld, int origid, int msgid,
+                      LDAPControl** serverctrls, LDAPControl** clientctrls) {
+  BerElement* ber;
   int i, bererr, lderr, sendabandon;
-  LDAPRequest *lr = NULL;
+  LDAPRequest* lr = NULL;
 
   /*
    * An abandon request looks like this:
    * AbandonRequest ::= MessageID
    */
   LDAPDebug(LDAP_DEBUG_TRACE, "do_abandon origid %d, msgid %d\n", origid, msgid,
             0);
 
@@ -214,27 +214,27 @@ static int do_abandon(LDAP *ld, int orig
   }
 
   /*
    * Record the abandoned message ID (used to discard any server responses
    * that arrive later).
    */
   LDAP_MUTEX_LOCK(ld, LDAP_ABANDON_LOCK);
   if (ld->ld_abandoned == NULL) {
-    if ((ld->ld_abandoned = (int *)NSLDAPI_MALLOC(2 * sizeof(int))) == NULL) {
+    if ((ld->ld_abandoned = (int*)NSLDAPI_MALLOC(2 * sizeof(int))) == NULL) {
       lderr = LDAP_NO_MEMORY;
       LDAP_MUTEX_UNLOCK(ld, LDAP_ABANDON_LOCK);
       goto set_errorcode_and_return;
     }
     i = 0;
   } else {
     for (i = 0; ld->ld_abandoned[i] != -1; i++)
       ; /* NULL */
-    if ((ld->ld_abandoned = (int *)NSLDAPI_REALLOC(
-             (char *)ld->ld_abandoned, (i + 2) * sizeof(int))) == NULL) {
+    if ((ld->ld_abandoned = (int*)NSLDAPI_REALLOC(
+             (char*)ld->ld_abandoned, (i + 2) * sizeof(int))) == NULL) {
       lderr = LDAP_NO_MEMORY;
       LDAP_MUTEX_UNLOCK(ld, LDAP_ABANDON_LOCK);
       goto set_errorcode_and_return;
     }
   }
   ld->ld_abandoned[i] = msgid;
   ld->ld_abandoned[i + 1] = -1;
   LDAP_MUTEX_UNLOCK(ld, LDAP_ABANDON_LOCK);
@@ -243,29 +243,29 @@ set_errorcode_and_return:
   LDAP_SET_LDERRNO(ld, lderr, NULL, NULL);
   return (lderr);
 }
 
 /*
  * Try to send the abandon message that is encoded in ber.  Returns an
  * LDAP result code.
  */
-static int nsldapi_send_abandon_message(LDAP *ld, LDAPConn *lc, BerElement *ber,
+static int nsldapi_send_abandon_message(LDAP* ld, LDAPConn* lc, BerElement* ber,
                                         int abandon_msgid) {
   int lderr = LDAP_SUCCESS;
   int err = 0;
 
   err = nsldapi_send_ber_message(ld, lc->lconn_sb, ber, 1 /* free ber */,
                                  0 /* will not handle EPIPE */);
   if (err == -2) {
     /*
      * "Would block" error.  Queue the abandon as
      * a pending request.
      */
-    LDAPRequest *lr;
+    LDAPRequest* lr;
 
     lr = nsldapi_new_request(lc, ber, abandon_msgid,
                              0 /* no response expected */);
     if (lr == NULL) {
       lderr = LDAP_NO_MEMORY;
       ber_free(ber, 1);
     } else {
       lr->lr_status = LDAP_REQST_WRITING;
--- a/ldap/c-sdk/libraries/libldap/add.c
+++ b/ldap/c-sdk/libraries/libldap/add.c
@@ -64,36 +64,36 @@ static char copyright[] = "@(#) Copyrigh
  * LDAPMod  *attrs[] = {
  *     { 0, "cn", { "babs jensen", "babs", 0 } },
  *     { 0, "sn", { "jensen", 0 } },
  *     { 0, "objectClass", { "person", 0 } },
  *     0
  *   }
  * msgid = ldap_add(ld, dn, attrs);
  */
-int LDAP_CALL ldap_add(LDAP *ld, const char *dn, LDAPMod **attrs) {
+int LDAP_CALL ldap_add(LDAP* ld, const char* dn, LDAPMod** attrs) {
   int msgid;
 
   LDAPDebug(LDAP_DEBUG_TRACE, "ldap_add\n", 0, 0, 0);
 
   if (ldap_add_ext(ld, dn, attrs, NULL, NULL, &msgid) == LDAP_SUCCESS) {
     return (msgid);
   } else {
     return (-1); /* error is in ld handle */
   }
 }
 
 /*
  * LDAPv3 extended add.
  * Returns an LDAP error code.
  */
-int LDAP_CALL ldap_add_ext(LDAP *ld, const char *dn, LDAPMod **attrs,
-                           LDAPControl **serverctrls, LDAPControl **clientctrls,
-                           int *msgidp) {
-  BerElement *ber;
+int LDAP_CALL ldap_add_ext(LDAP* ld, const char* dn, LDAPMod** attrs,
+                           LDAPControl** serverctrls, LDAPControl** clientctrls,
+                           int* msgidp) {
+  BerElement* ber;
   int i, rc, lderr;
 
   /*
    * An add request looks like this:
    * AddRequest ::= SEQUENCE {
    *   entry DistinguishedName,
    *   attrs SEQUENCE OF SEQUENCE {
    *     type AttributeType,
@@ -172,34 +172,34 @@ int LDAP_CALL ldap_add_ext(LDAP *ld, con
   }
 
   if ((lderr = nsldapi_put_controls(ld, serverctrls, 1, ber)) != LDAP_SUCCESS) {
     ber_free(ber, 1);
     return (lderr);
   }
 
   /* send the message */
-  rc = nsldapi_send_initial_request(ld, *msgidp, LDAP_REQ_ADD, (char *)dn, ber);
+  rc = nsldapi_send_initial_request(ld, *msgidp, LDAP_REQ_ADD, (char*)dn, ber);
   *msgidp = rc;
   return (rc < 0 ? LDAP_GET_LDERRNO(ld, NULL, NULL) : LDAP_SUCCESS);
 }
 
-int LDAP_CALL ldap_add_s(LDAP *ld, const char *dn, LDAPMod **attrs) {
+int LDAP_CALL ldap_add_s(LDAP* ld, const char* dn, LDAPMod** attrs) {
   return (ldap_add_ext_s(ld, dn, attrs, NULL, NULL));
 }
 
-int LDAP_CALL ldap_add_ext_s(LDAP *ld, const char *dn, LDAPMod **attrs,
-                             LDAPControl **serverctrls,
-                             LDAPControl **clientctrls) {
+int LDAP_CALL ldap_add_ext_s(LDAP* ld, const char* dn, LDAPMod** attrs,
+                             LDAPControl** serverctrls,
+                             LDAPControl** clientctrls) {
   int err, msgid;
-  LDAPMessage *res;
+  LDAPMessage* res;
 
   if ((err = ldap_add_ext(ld, dn, attrs, serverctrls, clientctrls, &msgid)) !=
       LDAP_SUCCESS) {
     return (err);
   }
 
-  if (ldap_result(ld, msgid, 1, (struct timeval *)NULL, &res) == -1) {
+  if (ldap_result(ld, msgid, 1, (struct timeval*)NULL, &res) == -1) {
     return (LDAP_GET_LDERRNO(ld, NULL, NULL));
   }
 
   return (ldap_result2error(ld, res, 1));
 }
--- a/ldap/c-sdk/libraries/libldap/authzidctrl.c
+++ b/ldap/c-sdk/libraries/libldap/authzidctrl.c
@@ -45,18 +45,18 @@ ld              LDAP pointer to the desi
 ctl_iscritical  Indicates whether the control is critical of not.
                 If this field is non-zero, the operation will only be
                 carried out if the control is recognized by the server
                 and/or client
 
 ctrlp           the address of a place to put the constructed control
 */
 
-int LDAP_CALL ldap_create_authzid_control(LDAP *ld, const char ctl_iscritical,
-                                          LDAPControl **ctrlp) {
+int LDAP_CALL ldap_create_authzid_control(LDAP* ld, const char ctl_iscritical,
+                                          LDAPControl** ctrlp) {
   int rc;
 
   if (!NSLDAPI_VALID_LDAP_POINTER(ld)) {
     return (LDAP_PARAM_ERROR);
   }
 
   if (ctrlp == NULL) {
     LDAP_SET_LDERRNO(ld, LDAP_PARAM_ERROR, NULL, NULL);
@@ -79,21 +79,21 @@ ld              LDAP pointer to the desi
 ctrlp           An array of controls obtained from calling
                 ldap_parse_result on the set of results
                 returned by the server
 
 authzid         authorization identity, as defined in
                 RFC 2829, section 9.
 */
 
-int LDAP_CALL ldap_parse_authzid_control(LDAP *ld, LDAPControl **ctrlp,
-                                         char **authzid) {
+int LDAP_CALL ldap_parse_authzid_control(LDAP* ld, LDAPControl** ctrlp,
+                                         char** authzid) {
   int i, foundAUTHZIDControl;
-  char *authzidp = NULL;
-  LDAPControl *AUTHZIDCtrlp = NULL;
+  char* authzidp = NULL;
+  LDAPControl* AUTHZIDCtrlp = NULL;
 
   if (!NSLDAPI_VALID_LDAP_POINTER(ld)) {
     return (LDAP_PARAM_ERROR);
   }
 
   /* find the control in the list of controls if it exists */
   if (ctrlp == NULL) {
     LDAP_SET_LDERRNO(ld, LDAP_CONTROL_NOT_FOUND, NULL, NULL);
@@ -123,17 +123,17 @@ int LDAP_CALL ldap_parse_authzid_control
    * defined in [AUTH] section 9, granted to the requestor.  If the bind
    * request resulted in an anonymous association, the controlValue field
    * is a string of zero length.  If the bind request resulted in more
    * than one authzid, the primary authzid is returned in the controlValue
    * field.
    */
   if (AUTHZIDCtrlp && AUTHZIDCtrlp->ldctl_value.bv_val &&
       AUTHZIDCtrlp->ldctl_value.bv_len) {
-    authzidp = ((char *)NSLDAPI_MALLOC((AUTHZIDCtrlp->ldctl_value.bv_len + 1)));
+    authzidp = ((char*)NSLDAPI_MALLOC((AUTHZIDCtrlp->ldctl_value.bv_len + 1)));
     if (authzidp == NULL) {
       LDAP_SET_LDERRNO(ld, LDAP_NO_MEMORY, NULL, NULL);
       return (LDAP_NO_MEMORY);
     }
     STRLCPY(authzidp, AUTHZIDCtrlp->ldctl_value.bv_val,
             (AUTHZIDCtrlp->ldctl_value.bv_len + 1));
     *authzid = authzidp;
   } else {
--- a/ldap/c-sdk/libraries/libldap/bind.c
+++ b/ldap/c-sdk/libraries/libldap/bind.c
@@ -54,17 +54,17 @@ static char copyright[] = "@(#) Copyrigh
  * has a valid tgt for now.  ldap_result() should be called to find out the
  * outcome of the bind request.
  *
  * Example:
  * ldap_bind(ld, "cn=manager, o=university of michigan, c=us", "secret",
  *           LDAP_AUTH_SIMPLE)
  */
 
-int LDAP_CALL ldap_bind(LDAP *ld, const char *dn, const char *passwd,
+int LDAP_CALL ldap_bind(LDAP* ld, const char* dn, const char* passwd,
                         int authmethod) {
   /*
    * The bind request looks like this:
    * BindRequest ::= SEQUENCE {
    *   version INTEGER,
    *   name DistinguishedName,   -- who
    *   authentication CHOICE {
    *     simple [0] OCTET STRING -- passwd
@@ -98,36 +98,36 @@ int LDAP_CALL ldap_bind(LDAP *ld, const 
  * user already has a valid tgt for now.
  *
  * Examples:
  * ldap_bind_s(ld, "cn=manager, o=university of michigan, c=us",
  *             "secret", LDAP_AUTH_SIMPLE)
  * ldap_bind_s(ld, "cn=manager, o=university of michigan, c=us",
  *             NULL, LDAP_AUTH_KRBV4)
  */
-int LDAP_CALL ldap_bind_s(LDAP *ld, const char *dn, const char *passwd,
+int LDAP_CALL ldap_bind_s(LDAP* ld, const char* dn, const char* passwd,
                           int authmethod) {
   int err;
 
   LDAPDebug(LDAP_DEBUG_TRACE, "ldap_bind_s\n", 0, 0, 0);
 
   switch (authmethod) {
     case LDAP_AUTH_SIMPLE:
       return (ldap_simple_bind_s(ld, dn, passwd));
 
     default:
       err = LDAP_AUTH_UNKNOWN;
       LDAP_SET_LDERRNO(ld, err, NULL, NULL);
       return (err);
   }
 }
 
-void LDAP_CALL ldap_set_rebind_proc(LDAP *ld,
-                                    LDAP_REBINDPROC_CALLBACK *rebindproc,
-                                    void *arg) {
+void LDAP_CALL ldap_set_rebind_proc(LDAP* ld,
+                                    LDAP_REBINDPROC_CALLBACK* rebindproc,
+                                    void* arg) {
   if (ld == NULL) {
     if (!nsldapi_initialized) {
       nsldapi_initialize_defaults();
     }
     ld = &nsldapi_ld_defaults;
   }
 
   if (NSLDAPI_VALID_LDAP_POINTER(ld)) {
@@ -137,18 +137,18 @@ void LDAP_CALL ldap_set_rebind_proc(LDAP
     LDAP_MUTEX_UNLOCK(ld, LDAP_OPTION_LOCK);
   }
 }
 
 /*
  * return a pointer to the bind DN for the default connection (a copy is
  * not made).  If there is no bind DN available, NULL is returned.
  */
-char *nsldapi_get_binddn(LDAP *ld) {
-  char *binddn;
+char* nsldapi_get_binddn(LDAP* ld) {
+  char* binddn;
 
   binddn = NULL; /* default -- assume they are not bound */
 
   LDAP_MUTEX_LOCK(ld, LDAP_CONN_LOCK);
   if (NULL != ld->ld_defconn &&
       LDAP_CONNST_CONNECTED == ld->ld_defconn->lconn_status &&
       ld->ld_defconn->lconn_bound) {
     if ((binddn = ld->ld_defconn->lconn_binddn) == NULL) {
--- a/ldap/c-sdk/libraries/libldap/cache.c
+++ b/ldap/c-sdk/libraries/libldap/cache.c
@@ -44,17 +44,17 @@
 
 #include "ldap-int.h"
 
 /*
  * ldap_cache_flush - flush part of the LDAP cache. returns an
  * ldap error code (LDAP_SUCCESS, LDAP_NO_SUCH_OBJECT, etc.).
  */
 
-int LDAP_CALL ldap_cache_flush(LDAP *ld, const char *dn, const char *filter) {
+int LDAP_CALL ldap_cache_flush(LDAP* ld, const char* dn, const char* filter) {
   if (!NSLDAPI_VALID_LDAP_POINTER(ld)) {
     return (LDAP_PARAM_ERROR);
   }
 
   if (dn == NULL) {
     dn = "";
   }
 
@@ -63,47 +63,47 @@ int LDAP_CALL ldap_cache_flush(LDAP *ld,
 
 /*
  * nsldapi_add_result_to_cache - add an ldap entry we just read off the network
  * to the ldap cache. this routine parses the ber for the entry and
  * constructs the appropriate add request. this routine calls the
  * cache add routine to actually add the entry.
  */
 
-void nsldapi_add_result_to_cache(LDAP *ld, LDAPMessage *m) {
-  char *dn;
-  LDAPMod **mods;
+void nsldapi_add_result_to_cache(LDAP* ld, LDAPMessage* m) {
+  char* dn;
+  LDAPMod** mods;
   int i, max, rc;
-  char *a;
-  BerElement *ber;
+  char* a;
+  BerElement* ber;
   char buf[50];
   struct berval bv;
-  struct berval *bvp[2];
+  struct berval* bvp[2];
 
   LDAPDebug(LDAP_DEBUG_TRACE, "=> nsldapi_add_result_to_cache id %d type %d\n",
             m->lm_msgid, m->lm_msgtype, 0);
   if (m->lm_msgtype != LDAP_RES_SEARCH_ENTRY || ld->ld_cache_add == NULL) {
     LDAPDebug(LDAP_DEBUG_TRACE, "<= nsldapi_add_result_to_cache not added\n", 0,
               0, 0);
     return;
   }
 
 #define GRABSIZE 5
 
   dn = ldap_get_dn(ld, m);
-  mods = (LDAPMod **)NSLDAPI_MALLOC(GRABSIZE * sizeof(LDAPMod *));
+  mods = (LDAPMod**)NSLDAPI_MALLOC(GRABSIZE * sizeof(LDAPMod*));
   max = GRABSIZE;
   for (i = 0, a = ldap_first_attribute(ld, m, &ber); a != NULL;
        a = ldap_next_attribute(ld, m, ber), i++) {
     if (i == (max - 1)) {
       max += GRABSIZE;
-      mods = (LDAPMod **)NSLDAPI_REALLOC(mods, sizeof(LDAPMod *) * max);
+      mods = (LDAPMod**)NSLDAPI_REALLOC(mods, sizeof(LDAPMod*) * max);
     }
 
-    mods[i] = (LDAPMod *)NSLDAPI_CALLOC(1, sizeof(LDAPMod));
+    mods[i] = (LDAPMod*)NSLDAPI_CALLOC(1, sizeof(LDAPMod));
     mods[i]->mod_op = LDAP_MOD_BVALUES;
     mods[i]->mod_type = a;
     mods[i]->mod_bvalues = ldap_get_values_len(ld, m, a);
   }
   if (ber != NULL) {
     ber_free(ber, 0);
   }
   if ((rc = LDAP_GET_LDERRNO(ld, NULL, NULL)) != LDAP_SUCCESS) {
@@ -113,19 +113,19 @@ void nsldapi_add_result_to_cache(LDAP *l
               ldap_err2string(rc), 0, 0);
     ldap_mods_free(mods, 1);
     return;
   }
 
   /* update special cachedtime attribute */
   if (i == (max - 1)) {
     max++;
-    mods = (LDAPMod **)NSLDAPI_REALLOC(mods, sizeof(LDAPMod *) * max);
+    mods = (LDAPMod**)NSLDAPI_REALLOC(mods, sizeof(LDAPMod*) * max);
   }
-  mods[i] = (LDAPMod *)NSLDAPI_CALLOC(1, sizeof(LDAPMod));
+  mods[i] = (LDAPMod*)NSLDAPI_CALLOC(1, sizeof(LDAPMod));
   mods[i]->mod_op = LDAP_MOD_BVALUES;
   mods[i]->mod_type = "cachedtime";
   sprintf(buf, "%ld", time(NULL));
   bv.bv_val = buf;
   bv.bv_len = strlen(buf);
   bvp[0] = &bv;
   bvp[1] = NULL;
   mods[i]->mod_bvalues = bvp;
--- a/ldap/c-sdk/libraries/libldap/charray.c
+++ b/ldap/c-sdk/libraries/libldap/charray.c
@@ -37,109 +37,109 @@
 /* charray.c - routines for dealing with char * arrays */
 
 #include "ldap-int.h"
 
 /*
  * Add s at the end of the array of strings *a.
  * Return 0 for success, -1 for failure.
  */
-int LDAP_CALL ldap_charray_add(char ***a, char *s) {
+int LDAP_CALL ldap_charray_add(char*** a, char* s) {
   int n;
 
   if (*a == NULL) {
-    *a = (char **)NSLDAPI_MALLOC(2 * sizeof(char *));
+    *a = (char**)NSLDAPI_MALLOC(2 * sizeof(char*));
     if (*a == NULL) {
       return -1;
     }
     n = 0;
   } else {
     for (n = 0; *a != NULL && (*a)[n] != NULL; n++) {
       ; /* NULL */
     }
 
-    *a = (char **)NSLDAPI_REALLOC((char *)*a, (n + 2) * sizeof(char *));
+    *a = (char**)NSLDAPI_REALLOC((char*)*a, (n + 2) * sizeof(char*));
     if (*a == NULL) {
       return -1;
     }
   }
 
   (*a)[n++] = s;
   (*a)[n] = NULL;
   return 0;
 }
 
 /*
  * Add array of strings s at the end of the array of strings *a.
  * Return 0 for success, -1 for failure.
  */
-int LDAP_CALL ldap_charray_merge(char ***a, char **s) {
+int LDAP_CALL ldap_charray_merge(char*** a, char** s) {
   int i, n, nn;
 
   if ((s == NULL) || (s[0] == NULL)) return 0;
 
   for (n = 0; *a != NULL && (*a)[n] != NULL; n++) {
     ; /* NULL */
   }
   for (nn = 0; s[nn] != NULL; nn++) {
     ; /* NULL */
   }
 
-  *a = (char **)NSLDAPI_REALLOC((char *)*a, (n + nn + 1) * sizeof(char *));
+  *a = (char**)NSLDAPI_REALLOC((char*)*a, (n + nn + 1) * sizeof(char*));
   if (*a == NULL) {
     return -1;
   }
 
   for (i = 0; i < nn; i++) {
     (*a)[n + i] = s[i];
   }
   (*a)[n + nn] = NULL;
   return 0;
 }
 
-void LDAP_CALL ldap_charray_free(char **array) {
-  char **a;
+void LDAP_CALL ldap_charray_free(char** array) {
+  char** a;
 
   if (array == NULL) {
     return;
   }
 
   for (a = array; *a != NULL; a++) {
     if (*a != NULL) {
       NSLDAPI_FREE(*a);
     }
   }
-  NSLDAPI_FREE((char *)array);
+  NSLDAPI_FREE((char*)array);
 }
 
-int LDAP_CALL ldap_charray_inlist(char **a, char *s) {
+int LDAP_CALL ldap_charray_inlist(char** a, char* s) {
   int i;
 
   if (a == NULL) return (0);
 
   for (i = 0; a[i] != NULL; i++) {
     if (strcasecmp(s, a[i]) == 0) {
       return (1);
     }
   }
 
   return (0);
 }
 
 /*
  * Duplicate the array of strings a, return NULL upon any memory failure.
  */
-char **LDAP_CALL ldap_charray_dup(char **a) {
+char** LDAP_CALL ldap_charray_dup(char** a) {
   int i;
-  char **new;
+  char** new;
 
   for (i = 0; a[i] != NULL; i++)
     ; /* NULL */
 
-  new = (char **)NSLDAPI_MALLOC((i + 1) * sizeof(char *));
+  new = (char**)NSLDAPI_MALLOC((i + 1) * sizeof(char*));
   if (new == NULL) {
     return NULL;
   }
 
   for (i = 0; a[i] != NULL; i++) {
     new[i] = nsldapi_strdup(a[i]);
     if (new[i] == NULL) {
       int j;
@@ -154,36 +154,36 @@ char **LDAP_CALL ldap_charray_dup(char *
   return (new);
 }
 
 /*
  * Tokenize the string str, return NULL upon any memory failure.
  * XXX: on many platforms this function is not thread safe because it
  * uses strtok().
  */
-char **LDAP_CALL ldap_str2charray(char *str, char *brkstr)
+char** LDAP_CALL ldap_str2charray(char* str, char* brkstr)
 /* This implementation fails if brkstr contains multibyte characters.
    But it works OK if str is UTF-8 and brkstr is 7-bit ASCII.
  */
 {
-  char **res;
-  char *s;
+  char** res;
+  char* s;
   int i;
 #ifdef HAVE_STRTOK_R /* defined in portable.h */
-  char *lasts;
+  char* lasts;
 #endif
 
   i = 1;
   for (s = str; *s; s++) {
     if (strchr(brkstr, *s) != NULL) {
       i++;
     }
   }
 
-  res = (char **)NSLDAPI_MALLOC((i + 1) * sizeof(char *));
+  res = (char**)NSLDAPI_MALLOC((i + 1) * sizeof(char*));
   if (res == NULL) {
     return NULL;
   }
   i = 0;
   for (s = STRTOK(str, brkstr, &lasts); s != NULL;
        s = STRTOK(NULL, brkstr, &lasts)) {
     res[i++] = nsldapi_strdup(s);
     if (res[i - 1] == NULL) {
@@ -194,17 +194,17 @@ char **LDAP_CALL ldap_str2charray(char *
       return NULL;
     }
   }
   res[i] = NULL;
 
   return (res);
 }
 
-int LDAP_CALL ldap_charray_position(char **a, char *s) {
+int LDAP_CALL ldap_charray_position(char** a, char* s) {
   int i;
 
   for (i = 0; a[i] != NULL; i++) {
     if (strcasecmp(s, a[i]) == 0) {
       return (i);
     }
   }
 
--- a/ldap/c-sdk/libraries/libldap/charset.c
+++ b/ldap/c-sdk/libraries/libldap/charset.c
@@ -41,33 +41,33 @@
 /*
  *  charset.c
  */
 
 #include "ldap-int.h"
 
 #ifdef STR_TRANSLATION
 
-void ldap_set_string_translators(LDAP *ld, BERTranslateProc encode_proc,
+void ldap_set_string_translators(LDAP* ld, BERTranslateProc encode_proc,
                                  BERTranslateProc decode_proc) {
   if (ld == NULL) {
     if (!nsldapi_initialized) {
       nsldapi_initialize_defaults();
     }
     ld = &nsldapi_ld_defaults;
   }
 
   if (NSLDAPI_VALID_LDAP_POINTER(ld)) {
     ld->ld_lber_encode_translate_proc = encode_proc;
     ld->ld_lber_decode_translate_proc = decode_proc;
   }
 }
 
-void ldap_enable_translation(LDAP *ld, LDAPMessage *entry, int enable) {
-  char *optionsp;
+void ldap_enable_translation(LDAP* ld, LDAPMessage* entry, int enable) {
+  char* optionsp;
 
   if (ld == NULL) {
     if (!nsldapi_initialized) {
       nsldapi_initialize_defaults();
     }
     ld = &nsldapi_ld_defaults;
   }
 
@@ -76,26 +76,26 @@ void ldap_enable_translation(LDAP *ld, L
 
   if (enable) {
     *optionsp |= LBER_OPT_TRANSLATE_STRINGS;
   } else {
     *optionsp &= ~LBER_OPT_TRANSLATE_STRINGS;
   }
 }
 
-int ldap_translate_from_t61(LDAP *ld, char **bufp, unsigned long *lenp,
+int ldap_translate_from_t61(LDAP* ld, char** bufp, unsigned long* lenp,
                             int free_input) {
   if (ld->ld_lber_decode_translate_proc == NULL) {
     return (LDAP_SUCCESS);
   }
 
   return ((*ld->ld_lber_decode_translate_proc)(bufp, lenp, free_input));
 }
 
-int ldap_translate_to_t61(LDAP *ld, char **bufp, unsigned long *lenp,
+int ldap_translate_to_t61(LDAP* ld, char** bufp, unsigned long* lenp,
                           int free_input) {
   if (ld->ld_lber_encode_translate_proc == NULL) {
     return (LDAP_SUCCESS);
   }
 
   return ((*ld->ld_lber_encode_translate_proc)(bufp, lenp, free_input));
 }
 
@@ -179,25 +179,25 @@ int ldap_translate_to_t61(LDAP *ld, char
 #    endif
 
 typedef unsigned char Byte;
 typedef struct {
   Byte a, b;
 } Couple;
 
 #    ifdef NEEDPROTOS
-static Byte *c_to_hh(Byte *o, Byte c);
-static Byte *c_to_cc(Byte *o, Couple *cc, Byte c);
-static int hh_to_c(Byte *h);
-static Byte *cc_to_t61(Byte *o, Byte *s);
+static Byte* c_to_hh(Byte* o, Byte c);
+static Byte* c_to_cc(Byte* o, Couple* cc, Byte c);
+static int hh_to_c(Byte* h);
+static Byte* cc_to_t61(Byte* o, Byte* s);
 #    else  /* NEEDPROTOS */
-static Byte *c_to_hh();
-static Byte *c_to_cc();
+static Byte* c_to_hh();
+static Byte* c_to_cc();
 static int hh_to_c();
-static Byte *cc_to_t61();
+static Byte* cc_to_t61();
 #    endif /* NEEDPROTOS */
 
 /*
    Character chosen as base in diacritics alone: NO-BREAK SPACE.
    (The standard say it must be a blank space, 0x20.)
 */
 #    define ALONE 0xA0
 
@@ -843,64 +843,64 @@ static Couple trans_iso8859_t61[96] = {
     {0xf1, 0},   {0xce, 'i'}, {0xcf, 'c'}, {0xc2, 'e'}, {0xce, 'e'},
     {0xc8, 'e'}, {0xc7, 'e'}, {0xc2, 'i'}, {0xc3, 'i'}, {0xc8, 'i'},
     {0xf3, 0},   {0xcb, 'n'}, {0xc5, 'o'}, {0xc2, 'o'}, {0xc3, 'o'},
     {0xc4, 'o'}, {0xc8, 'o'}, {0xc4, 'u'}, {0xf9, 0},   {0xce, 'u'},
     {0xc2, 'u'}, {0xc3, 'u'}, {0xc8, 'u'}, {0xc2, 'y'}, {0xfc, 0},
     {0xf0, 0}};
 #    endif
 
-static Byte *c_to_hh(Byte *o, Byte c) {
+static Byte* c_to_hh(Byte* o, Byte c) {
   Byte n;
 
   *o++ = '{';
   *o++ = 'x';
   n = c >> 4;
   *o++ = ((n < 0xA) ? '0' : 'A' - 0xA) + n;
   n = c & 0x0F;
   *o++ = ((n < 0xA) ? '0' : 'A' - 0xA) + n;
   *o++ = '}';
   return o;
 }
 
-static Byte *c_to_cc(Byte *o, Couple *cc, Byte c) {
+static Byte* c_to_cc(Byte* o, Couple* cc, Byte c) {
   if ((*cc).a != 0) {
     if ((*cc).b == 0)
       *o++ = (*cc).a;
     else {
       *o++ = '{';
       *o++ = (*cc).a;
       *o++ = (*cc).b;
       *o++ = '}';
     }
     return o;
   } else
     return c_to_hh(o, c);
 }
 
 /* --- routine to convert from T.61 to ISO 8859-n --- */
 
-int ldap_t61_to_8859(char **bufp, unsigned long *buflenp, int free_input) {
+int ldap_t61_to_8859(char** bufp, unsigned long* buflenp, int free_input) {
   Byte *s, *oo, *o;
   unsigned int n;
   int c;
   unsigned long len;
-  Couple *cc;
+  Couple* cc;
 
   LDAPDebug(LDAP_DEBUG_TRACE, "ldap_t61_to_8859 input length: %ld\n", *buflenp,
             0, 0);
 
   len = *buflenp;
-  s = (Byte *)*bufp;
+  s = (Byte*)*bufp;
 
-  if ((o = oo = (Byte *)NSLDAPI_MALLOC(2 * len + 64)) == NULL) {
+  if ((o = oo = (Byte*)NSLDAPI_MALLOC(2 * len + 64)) == NULL) {
     return (1);
   }
 
-  while ((char *)s - *(char **)bufp < len) {
+  while ((char*)s - *(char**)bufp < len) {
     switch (*s >> 4) {
       case 0xA:
       case 0xB:
         o = c_to_cc(o, &trans_t61a_iso8859[*s - 0xA0], *s);
         s++;
         break;
 
       case 0xD:
@@ -1069,30 +1069,30 @@ int ldap_t61_to_8859(char **bufp, unsign
       default:
         *o++ = *s++;
     }
   }
 
   len = o - oo;
   o = oo;
 
-  if ((oo = (Byte *)NSLDAPI_REALLOC(o, len)) == NULL) {
+  if ((oo = (Byte*)NSLDAPI_REALLOC(o, len)) == NULL) {
     NSLDAPI_FREE(o);
     return (1);
   }
 
   if (free_input) {
     NSLDAPI_FREE(*bufp);
   }
-  *bufp = (char *)oo;
+  *bufp = (char*)oo;
   *buflenp = len;
   return (0);
 }
 
-static int hh_to_c(Byte *h) {
+static int hh_to_c(Byte* h) {
   Byte c;
 
   if ((*h >= '0') && (*h <= '9'))
     c = *h++ - '0';
   else if ((*h >= 'A') && (*h <= 'F'))
     c = *h++ - 'A' + 10;
   else if ((*h >= 'a') && (*h <= 'f'))
     c = *h++ - 'a' + 10;
@@ -1108,17 +1108,17 @@ static int hh_to_c(Byte *h) {
   else if ((*h >= 'a') && (*h <= 'f'))
     c |= *h - 'a' + 10;
   else
     return -1;
 
   return c;
 }
 
-static Byte *cc_to_t61(Byte *o, Byte *s) {
+static Byte* cc_to_t61(Byte* o, Byte* s) {
   int n, c = 0;
 
   switch (*(s + 1)) {
     case '`':
       c = -1;
       break; /* <grave-accent> */
 
     case '!':
@@ -1729,33 +1729,33 @@ static Byte *cc_to_t61(Byte *o, Byte *s)
 
   *o++ = n + 0xC0;
   *o++ = (((*s == ' ') || (*s == '\'')) ? ALONE : *s);
   return o;
 }
 
 /* --- routine to convert from ISO 8859-n to T.61 --- */
 
-int ldap_8859_to_t61(char **bufp, unsigned long *buflenp, int free_input) {
+int ldap_8859_to_t61(char** bufp, unsigned long* buflenp, int free_input) {
   Byte *s, *oo, *o, *aux;
   int c;
   unsigned long len;
-  Couple *cc;
+  Couple* cc;
 
   LDAPDebug(LDAP_DEBUG_TRACE, "ldap_8859_to_t61 input length: %ld\n", *buflenp,
             0, 0);
 
   len = *buflenp;
-  s = (Byte *)*bufp;
+  s = (Byte*)*bufp;
 
-  if ((o = oo = (Byte *)NSLDAPI_MALLOC(2 * len + 64)) == NULL) {
+  if ((o = oo = (Byte*)NSLDAPI_MALLOC(2 * len + 64)) == NULL) {
     return (1);
   }
 
-  while ((char *)s - *(char **)bufp < len) {
+  while ((char*)s - *(char**)bufp < len) {
     switch (*s >> 5) {
       case 2:
         switch (*s) {
           case '^':
             *o++ = 0xC3;
             *o++ = ALONE;
             s++;
             break;
@@ -1835,35 +1835,35 @@ int ldap_8859_to_t61(char **bufp, unsign
       default:
         *o++ = *s++;
     }
   }
 
   len = o - oo;
   o = oo;
 
-  if ((oo = (Byte *)NSLDAPI_REALLOC(o, len)) == NULL) {
+  if ((oo = (Byte*)NSLDAPI_REALLOC(o, len)) == NULL) {
     NSLDAPI_FREE(o);
     return (1);
   }
 
   if (free_input) {
     NSLDAPI_FREE(*bufp);
   }
-  *bufp = (char *)oo;
+  *bufp = (char*)oo;
   *buflenp = len;
   return (0);
 }
 
 #    ifdef NOT_NEEDED_IN_LIBLDAP /* mcs@umich.edu 12 Oct 1995 */
 /* --- routine to convert "escaped" (\hh) characters to 8bits --- */
 
-void convert_escaped_to_8bit(s) char *s;
+void convert_escaped_to_8bit(s) char* s;
 {
-  char *o = s;
+  char* o = s;
   int c;
 
   while (*s) {
     if (*s == '\\') {
       if ((c = hh_to_c(++s)) != -1) {
         *o++ = c;
         s += 2;
       } else
@@ -1871,22 +1871,22 @@ void convert_escaped_to_8bit(s) char *s;
     } else
       *o++ = *s++;
   }
   *o = '\0';
 }
 
 /* --- routine to convert 8bits characters to the "escaped" (\hh) form --- */
 
-char *convert_8bit_to_escaped(s) Byte *s;
+char* convert_8bit_to_escaped(s) Byte* s;
 {
   Byte *o, *oo;
   Byte n;
 
-  if ((o = oo = (Byte *)NSLDAPI_MALLOC(2 * strlen(s) + 64)) == NULL) {
+  if ((o = oo = (Byte*)NSLDAPI_MALLOC(2 * strlen(s) + 64)) == NULL) {
     return (NULL);
   }
 
   while (*s) {
     if (*s < 0x80)
       *o++ = *s++;
     else {
       *o++ = '\\';
@@ -1895,22 +1895,22 @@ char *convert_8bit_to_escaped(s) Byte *s
       n = *s++ & 0x0F;
       *o++ = ((n < 0xA) ? '0' : 'A' - 0xA) + n;
     }
   }
   *o = '\0';
 
   o = oo;
 
-  if ((oo = (Byte *)NSLDAPI_REALLOC(o, strlen(o) + 1)) == NULL) {
+  if ((oo = (Byte*)NSLDAPI_REALLOC(o, strlen(o) + 1)) == NULL) {
     NSLDAPI_FREE(o);
     return (NULL);
   }
 
-  return ((char *)oo);
+  return ((char*)oo);
 }
 
 /* --- routine to convert from T.61 to printable characters --- */
 
 /*
    printable characters [RFC 1488]: 'A'..'Z', 'a'..'z', '0'..'9',
        '\'', '(', ')', '+', ',', '-', '.', '/', ':', '?, ' '.
 
@@ -1920,23 +1920,23 @@ char *convert_8bit_to_escaped(s) Byte *s
 static Couple last_t61_printabled[32] = {
     {0, 0},     {'A', 'E'}, {'D', 0},   {0, 0},     {'H', 0},   {0, 0},
     {'I', 'J'}, {'L', 0},   {'L', 0},   {'O', 0},   {'O', 'E'}, {0, 0},
     {'T', 'H'}, {'T', 0},   {'N', 'G'}, {'n', 0},   {'k', 0},   {'a', 'e'},
     {'d', 0},   {'d', 0},   {'h', 0},   {'i', 0},   {'i', 'j'}, {'l', 0},
     {'l', 0},   {'o', 0},   {'o', 'e'}, {'s', 's'}, {'t', 'h'}, {'t', 0},
     {'n', 'g'}, {0, 0}};
 
-char *t61_printable(s) Byte *s;
+char* t61_printable(s) Byte* s;
 {
   Byte *o, *oo;
   Byte n;
-  Couple *cc;
+  Couple* cc;
 
-  if ((o = oo = (Byte *)NSLDAPI_MALLOC(2 * strlen(s) + 64)) == NULL) {
+  if ((o = oo = (Byte*)NSLDAPI_MALLOC(2 * strlen(s) + 64)) == NULL) {
     return (NULL);
   }
 
   while (*s) {
     if (((*s >= 'A') && (*s <= 'Z')) || ((*s >= 'a') && (*s <= 'z')) ||
         ((*s >= '0') && (*s <= '9')) || ((*s >= '\'') && (*s <= ')')) ||
         ((*s >= '+') && (*s <= '/')) || (*s == '?') || (*s == ' '))
       *o++ = *s++;
@@ -1981,19 +1981,19 @@ char *t61_printable(s) Byte *s;
       }
       s++;
     }
   }
   *o = '\0';
 
   o = oo;
 
-  if ((oo = (Byte *)NSLDAPI_REALLOC(o, strlen(o) + 1)) == NULL) {
+  if ((oo = (Byte*)NSLDAPI_REALLOC(o, strlen(o) + 1)) == NULL) {
     NSLDAPI_FREE(o);
     return (NULL);
   }
 
-  return ((char *)oo);
+  return ((char*)oo);
 }
 #    endif /* NOT_NEEDED_IN_LIBLDAP */ /* mcs@umich.edu 12 Oct 1995 */
 
 #  endif /* LDAP_CHARSET_8859 */
 #endif   /* STR_TRANSLATION */
--- a/ldap/c-sdk/libraries/libldap/cldap.c
+++ b/ldap/c-sdk/libraries/libldap/cldap.c
@@ -86,69 +86,69 @@ XXX not MT - safe XXX
 struct cldap_retinfo {
   int cri_maxtries;
   int cri_try;
   int cri_useaddr;
   long cri_timeout;
 };
 
 #  ifdef NEEDPROTOS
-static int add_addr(LDAP *ld, struct sockaddr *sap);
-static int cldap_result(LDAP *ld, int msgid, LDAPMessage **res,
-                        struct cldap_retinfo *crip, char *base);
-static int cldap_parsemsg(LDAP *ld, int msgid, BerElement *ber,
-                          LDAPMessage **res, char *base);
+static int add_addr(LDAP* ld, struct sockaddr* sap);
+static int cldap_result(LDAP* ld, int msgid, LDAPMessage** res,
+                        struct cldap_retinfo* crip, char* base);
+static int cldap_parsemsg(LDAP* ld, int msgid, BerElement* ber,
+                          LDAPMessage** res, char* base);
 #  else  /* NEEDPROTOS */
 static int add_addr();
 static int cldap_result();
 static int cldap_parsemsg();
 #  endif /* NEEDPROTOS */
 
 /*
  * cldap_open - initialize and connect to an ldap server.  A magic cookie to
  * be used for future communication is returned on success, NULL on failure.
  *
  * Example:
  * LDAP  *ld;
  * ld = cldap_open(hostname, port);
  */
 
-LDAP *cldap_open(char *host, int port) {
+LDAP* cldap_open(char* host, int port) {
   int s;
   ldap_x_in_addr_t address;
   struct sockaddr_in sock;
-  struct hostent *hp;
-  LDAP *ld;
-  char *p;
+  struct hostent* hp;
+  LDAP* ld;
+  char* p;
   int i;
 
   LDAPDebug(LDAP_DEBUG_TRACE, "cldap_open\n", 0, 0, 0);
 
   if (port == 0) {
     port = LDAP_PORT;
   }
 
   if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
     return (NULL);
   }
 
   sock.sin_addr.s_addr = 0;
   sock.sin_family = AF_INET;
   sock.sin_port = 0;
-  if (bind(s, (struct sockaddr *)&sock, sizeof(sock)) < 0) {
+  if (bind(s, (struct sockaddr*)&sock, sizeof(sock)) < 0) {
     close(s);
     return (NULL);
   }
 
   if ((ld = ldap_init(host, port)) == NULL) {
     close(s);
     return (NULL);
   }
   if ((ld->ld_sbp->sb_fromaddr =
-           (void *)NSLDAPI_CALLOC(1, sizeof(struct sockaddr))) == NULL) {
+           (void*)NSLDAPI_CALLOC(1, sizeof(struct sockaddr))) == NULL) {
     NSLDAPI_FREE(ld);
     close(s);
     return (NULL);
   }
   ld->ld_sbp->sb_sd = s;
   ld->ld_sbp->sb_naddr = 0;
   ld->ld_version = LDAP_VERSION2;
 
@@ -169,43 +169,43 @@ LDAP *cldap_open(char *host, int port) {
       if ((address = inet_addr(host)) == -1) {
         /* XXXmcs: need to use DNS callbacks here XXX */
         XXX if ((hp = gethostbyname(host)) == NULL) {
           LDAP_SET_ERRNO(ld, EHOSTUNREACH);
           continue;
         }
 
         for (i = 0; hp->h_addr_list[i] != 0; ++i) {
-          SAFEMEMCPY((char *)&sock.sin_addr.s_addr, (char *)hp->h_addr_list[i],
+          SAFEMEMCPY((char*)&sock.sin_addr.s_addr, (char*)hp->h_addr_list[i],
                      sizeof(sock.sin_addr.s_addr));
-          if (add_addr(ld, (struct sockaddr *)&sock) < 0) {
+          if (add_addr(ld, (struct sockaddr*)&sock) < 0) {
             close(s);
             NSLDAPI_FREE(ld);
             return (NULL);
           }
         }
 
       } else {
         sock.sin_addr.s_addr = address;
-        if (add_addr(ld, (struct sockaddr *)&sock) < 0) {
+        if (add_addr(ld, (struct sockaddr*)&sock) < 0) {
           close(s);
           NSLDAPI_FREE(ld);
           return (NULL);
         }
       }
 
       if (ld->ld_host == NULL) {
         ld->ld_host = nsldapi_strdup(host);
       }
     }
 
   } else {
     address = INADDR_LOOPBACK;
     sock.sin_addr.s_addr = htonl(address);
-    if (add_addr(ld, (struct sockaddr *)&sock) < 0) {
+    if (add_addr(ld, (struct sockaddr*)&sock) < 0) {
       close(s);
       NSLDAPI_FREE(ld);
       return (NULL);
     }
   }
 
   if (ld->ld_sbp->sb_addrs == NULL ||
       (ld->ld_defconn = nsldapi_new_connection(ld, NULL, 1, 0, 0)) == NULL) {
@@ -216,33 +216,32 @@ LDAP *cldap_open(char *host, int port) {
   ld->ld_sbp->sb_useaddr = ld->ld_sbp->sb_addrs[0];
   cldap_setretryinfo(ld, 0, 0);
 
 #  ifdef LDAP_DEBUG
   putchar('\n');
   for (i = 0; i < ld->ld_sbp->sb_naddr; ++i) {
     LDAPDebug(
         LDAP_DEBUG_TRACE, "end of cldap_open address %d is %s\n", i,
-        inet_ntoa(((struct sockaddr_in *)ld->ld_sbp->sb_addrs[i])->sin_addr),
-        0);
+        inet_ntoa(((struct sockaddr_in*)ld->ld_sbp->sb_addrs[i])->sin_addr), 0);
   }
 #  endif
 
   return (ld);
 }
 
-void cldap_close(LDAP *ld) { ldap_ld_free(ld, NULL, NULL, 0); }
+void cldap_close(LDAP* ld) { ldap_ld_free(ld, NULL, NULL, 0); }
 
-void cldap_setretryinfo(LDAP *ld, int tries, int timeout) {
+void cldap_setretryinfo(LDAP* ld, int tries, int timeout) {
   ld->ld_cldaptries = (tries <= 0) ? DEF_CLDAP_TRIES : tries;
   ld->ld_cldaptimeout = (timeout <= 0) ? DEF_CLDAP_TIMEOUT : timeout;
 }
 
-int cldap_search_s(LDAP *ld, char *base, int scope, char *filter, char **attrs,
-                   int attrsonly, LDAPMessage **res, char *logdn) {
+int cldap_search_s(LDAP* ld, char* base, int scope, char* filter, char** attrs,
+                   int attrsonly, LDAPMessage** res, char* logdn) {
   int ret, msgid;
   struct cldap_retinfo cri;
 
   *res = NULLMSG;
 
   (void)memset(&cri, 0, sizeof(cri));
 
   if (logdn != NULL) {
@@ -254,17 +253,17 @@ int cldap_search_s(LDAP *ld, char *base,
   do {
     if (cri.cri_try != 0) {
       --ld->ld_msgid; /* use same id as before */
     }
     ld->ld_sbp->sb_useaddr = ld->ld_sbp->sb_addrs[cri.cri_useaddr];
 
     LDAPDebug(
         LDAP_DEBUG_TRACE, "cldap_search_s try %d (to %s)\n", cri.cri_try,
-        inet_ntoa(((struct sockaddr_in *)ld->ld_sbp->sb_useaddr)->sin_addr), 0);
+        inet_ntoa(((struct sockaddr_in*)ld->ld_sbp->sb_useaddr)->sin_addr), 0);
 
     if ((msgid = ldap_search(ld, base, scope, filter, attrs, attrsonly)) ==
         -1) {
       return (LDAP_GET_LDERRNO(ld, NULL, NULL));
     }
 #  ifndef NO_CACHE
     if (ld->ld_cache != NULL && ld->ld_responses != NULL) {
       LDAPDebug(LDAP_DEBUG_TRACE, "cldap_search_s res from cache\n", 0, 0, 0);
@@ -274,50 +273,50 @@ int cldap_search_s(LDAP *ld, char *base,
     }
 #  endif /* NO_CACHE */
     ret = cldap_result(ld, msgid, res, &cri, base);
   } while (ret == -1);
 
   return (ret);
 }
 
-static int add_addr(LDAP *ld, struct sockaddr *sap) {
+static int add_addr(LDAP* ld, struct sockaddr* sap) {
   struct sockaddr *newsap, **addrs;
 
-  if ((newsap = (struct sockaddr *)NSLDAPI_MALLOC(sizeof(struct sockaddr))) ==
+  if ((newsap = (struct sockaddr*)NSLDAPI_MALLOC(sizeof(struct sockaddr))) ==
       NULL) {
     LDAP_SET_LDERRNO(ld, LDAP_NO_MEMORY, NULL, NULL);
     return (-1);
   }
 
   if (ld->ld_sbp->sb_naddr == 0) {
-    addrs = (struct sockaddr **)NSLDAPI_MALLOC(sizeof(struct sockaddr *));
+    addrs = (struct sockaddr**)NSLDAPI_MALLOC(sizeof(struct sockaddr*));
   } else {
-    addrs = (struct sockaddr **)NSLDAPI_REALLOC(
+    addrs = (struct sockaddr**)NSLDAPI_REALLOC(
         ld->ld_sbp->sb_addrs,
-        (ld->ld_sbp->sb_naddr + 1) * sizeof(struct sockaddr *));
+        (ld->ld_sbp->sb_naddr + 1) * sizeof(struct sockaddr*));
   }
 
   if (addrs == NULL) {
     NSLDAPI_FREE(newsap);
     LDAP_SET_LDERRNO(ld, LDAP_NO_MEMORY, NULL, NULL);
     return (-1);
   }
 
-  SAFEMEMCPY((char *)newsap, (char *)sap, sizeof(struct sockaddr));
+  SAFEMEMCPY((char*)newsap, (char*)sap, sizeof(struct sockaddr));
   addrs[ld->ld_sbp->sb_naddr++] = newsap;
-  ld->ld_sbp->sb_addrs = (void **)addrs;
+  ld->ld_sbp->sb_addrs = (void**)addrs;
   return (0);
 }
 
-static int cldap_result(LDAP *ld, int msgid, LDAPMessage **res,
-                        struct cldap_retinfo *crip, char *base) {
-  Sockbuf *sb = ld->ld_sbp;
+static int cldap_result(LDAP* ld, int msgid, LDAPMessage** res,
+                        struct cldap_retinfo* crip, char* base) {
+  Sockbuf* sb = ld->ld_sbp;
   BerElement ber;
-  char *logdn;
+  char* logdn;
   int ret, fromaddr, i;
   ber_int_t id;
   struct timeval tv;
 
   fromaddr = -1;
 
   if (crip->cri_try == 0) {
     crip->cri_maxtries = ld->ld_cldaptries * sb->sb_naddr;
@@ -380,18 +379,18 @@ static int cldap_result(LDAP *ld, int ms
                 "cldap_result: looking for msgid %d; got %ld\n", msgid, id, 0);
       ret = -1; /* ignore and keep looking */
     } else {
       /*
        * got a result: determine which server it came from
        * decode into ldap message chain
        */
       for (fromaddr = 0; fromaddr < sb->sb_naddr; ++fromaddr) {
-        if (memcmp(&((struct sockaddr_in *)sb->sb_addrs[fromaddr])->sin_addr,
-                   &((struct sockaddr_in *)sb->sb_fromaddr)->sin_addr,
+        if (memcmp(&((struct sockaddr_in*)sb->sb_addrs[fromaddr])->sin_addr,
+                   &((struct sockaddr_in*)sb->sb_fromaddr)->sin_addr,
                    sizeof(struct in_addr)) == 0) {
           break;
         }
       }
       ret = cldap_parsemsg(ld, msgid, &ber, res, base);
       NSLDAPI_FREE(ber.ber_buf); /* gack! */
       LDAPDebug(LDAP_DEBUG_TRACE, "cldap_result got result (%d)\n", ret, 0, 0);
     }
@@ -413,43 +412,43 @@ static int cldap_result(LDAP *ld, int ms
 
     for (; i >= 0; --i) {
       if (i == fromaddr) {
         continue;
       }
       sb->sb_useaddr = sb->sb_addrs[i];
       LDAPDebug(LDAP_DEBUG_TRACE, "cldap_result abandoning id %d (to %s)\n",
                 msgid,
-                inet_ntoa(((struct sockaddr_in *)sb->sb_useaddr)->sin_addr), 0);
+                inet_ntoa(((struct sockaddr_in*)sb->sb_useaddr)->sin_addr), 0);
       (void)ldap_abandon(ld, msgid);
     }
   }
 
   LDAP_SET_LDERRNO(ld, ret, NULL, NULL);
   return (ret);
 }
 
-static int cldap_parsemsg(LDAP *ld, int msgid, BerElement *ber,
-                          LDAPMessage **res, char *base) {
+static int cldap_parsemsg(LDAP* ld, int msgid, BerElement* ber,
+                          LDAPMessage** res, char* base) {
   ber_tag_t tag;
   ber_len_t len;
   int baselen, slen, rc;
   char *dn, *p, *cookie;
   LDAPMessage *chain, *prev, *ldm;
-  struct berval *bv;
+  struct berval* bv;
 
   rc = LDAP_DECODING_ERROR; /* pessimistic */
   ldm = chain = prev = NULLMSG;
   baselen = (base == NULL) ? 0 : strlen(base);
   bv = NULL;
 
   for (tag = ber_first_element(ber, &len, &cookie);
        tag != LBER_ERROR && tag != LBER_END_OF_SEQOFSET && rc != LDAP_SUCCESS;
        tag = ber_next_element(ber, &len, cookie)) {
-    if ((ldm = (LDAPMessage *)NSLDAPI_CALLOC(1, sizeof(LDAPMessage))) == NULL) {
+    if ((ldm = (LDAPMessage*)NSLDAPI_CALLOC(1, sizeof(LDAPMessage))) == NULL) {
       rc = LDAP_NO_MEMORY;
       break; /* return with error */
     } else if ((rc = nsldapi_alloc_ber_with_options(ld, &ldm->lm_ber)) !=
                LDAP_SUCCESS) {
       break; /* return with error*/
     }
     ldm->lm_msgid = msgid;
     ldm->lm_msgtype = tag;
@@ -473,17 +472,17 @@ static int cldap_parsemsg(LDAP *ld, int 
       if (ber_scanf(ber, "{aO", &dn, &bv) == LBER_ERROR) {
         break; /* return w/error */
       }
       LDAPDebug(LDAP_DEBUG_TRACE, "cldap_parsemsg entry %s\n", dn, 0, 0);
       if (dn != NULL && *(dn + (slen = strlen(dn)) - 1) == '*' && baselen > 0) {
         /*
          * substitute original searchbase for trailing '*'
          */
-        if ((p = (char *)NSLDAPI_MALLOC(slen + baselen)) == NULL) {
+        if ((p = (char*)NSLDAPI_MALLOC(slen + baselen)) == NULL) {
           rc = LDAP_NO_MEMORY;
           NSLDAPI_FREE(dn);
           break; /* return w/error */
         }
         strcpy(p, dn);
         strcpy(p + slen - 1, base);
         NSLDAPI_FREE(dn);
         dn = p;
--- a/ldap/c-sdk/libraries/libldap/compare.c
+++ b/ldap/c-sdk/libraries/libldap/compare.c
@@ -53,38 +53,38 @@ static char copyright[] = "@(#) Copyrigh
 /*
  * ldap_compare - perform an ldap compare operation.  The dn
  * of the entry to compare to and the attribute and value to compare (in
  * attr and value) are supplied.  The msgid of the response is returned.
  *
  * Example:
  * ldap_compare(ld, "c=us@cn=bob", "userPassword", "secret")
  */
-int LDAP_CALL ldap_compare(LDAP *ld, const char *dn, const char *attr,
-                           const char *value) {
+int LDAP_CALL ldap_compare(LDAP* ld, const char* dn, const char* attr,
+                           const char* value) {
   int msgid;
   struct berval bv;
 
   LDAPDebug(LDAP_DEBUG_TRACE, "ldap_compare\n", 0, 0, 0);
 
-  bv.bv_val = (char *)value;
+  bv.bv_val = (char*)value;
   bv.bv_len = (value == NULL) ? 0 : strlen(value);
 
   if (ldap_compare_ext(ld, dn, attr, &bv, NULL, NULL, &msgid) == LDAP_SUCCESS) {
     return (msgid);
   } else {
     return (-1); /* error is in ld handle */
   }
 }
 
-int LDAP_CALL ldap_compare_ext(LDAP *ld, const char *dn, const char *attr,
-                               const struct berval *bvalue,
-                               LDAPControl **serverctrls,
-                               LDAPControl **clientctrls, int *msgidp) {
-  BerElement *ber;
+int LDAP_CALL ldap_compare_ext(LDAP* ld, const char* dn, const char* attr,
+                               const struct berval* bvalue,
+                               LDAPControl** serverctrls,
+                               LDAPControl** clientctrls, int* msgidp) {
+  BerElement* ber;
   int rc, lderr;
 
   /* The compare request looks like this:
    * CompareRequest ::= SEQUENCE {
    *   entry DistinguishedName,
    *   ava SEQUENCE {
    *     type AttributeType,
    *     value AttributeValue
@@ -138,42 +138,42 @@ int LDAP_CALL ldap_compare_ext(LDAP *ld,
   }
 
   if ((lderr = nsldapi_put_controls(ld, serverctrls, 1, ber)) != LDAP_SUCCESS) {
     ber_free(ber, 1);
     return (lderr);
   }
 
   /* send the message */
-  rc = nsldapi_send_initial_request(ld, *msgidp, LDAP_REQ_COMPARE, (char *)dn,
+  rc = nsldapi_send_initial_request(ld, *msgidp, LDAP_REQ_COMPARE, (char*)dn,
                                     ber);
   *msgidp = rc;
   return (rc < 0 ? LDAP_GET_LDERRNO(ld, NULL, NULL) : LDAP_SUCCESS);
 }
 
-int LDAP_CALL ldap_compare_s(LDAP *ld, const char *dn, const char *attr,
-                             const char *value) {
+int LDAP_CALL ldap_compare_s(LDAP* ld, const char* dn, const char* attr,
+                             const char* value) {
   struct berval bv;
 
-  bv.bv_val = (char *)value;
+  bv.bv_val = (char*)value;
   bv.bv_len = (value == NULL) ? 0 : strlen(value);
 
   return (ldap_compare_ext_s(ld, dn, attr, &bv, NULL, NULL));
 }
 
-int LDAP_CALL ldap_compare_ext_s(LDAP *ld, const char *dn, const char *attr,
-                                 const struct berval *bvalue,
-                                 LDAPControl **serverctrls,
-                                 LDAPControl **clientctrls) {
+int LDAP_CALL ldap_compare_ext_s(LDAP* ld, const char* dn, const char* attr,
+                                 const struct berval* bvalue,
+                                 LDAPControl** serverctrls,
+                                 LDAPControl** clientctrls) {
   int err, msgid;
-  LDAPMessage *res;
+  LDAPMessage* res;
 
   if ((err = ldap_compare_ext(ld, dn, attr, bvalue, serverctrls, clientctrls,
                               &msgid)) != LDAP_SUCCESS) {
     return (err);
   }
 
-  if (ldap_result(ld, msgid, 1, (struct timeval *)NULL, &res) == -1) {
+  if (ldap_result(ld, msgid, 1, (struct timeval*)NULL, &res) == -1) {
     return (LDAP_GET_LDERRNO(ld, NULL, NULL));
   }
 
   return (ldap_result2error(ld, res, 1));
 }
--- a/ldap/c-sdk/libraries/libldap/compat.c
+++ b/ldap/c-sdk/libraries/libldap/compat.c
@@ -49,50 +49,50 @@ static char copyright[] = "@(#) Copyrigh
 #  endif
 #endif
 
 #include "ldap-int.h"
 
 #if defined(HPUX10) && defined(_REENTRANT) && !defined(HPUX11)
 extern int h_errno;
 
-struct hostent *nsldapi_compat_gethostbyname_r(const char *name,
-                                               struct hostent *result,
-                                               char *buffer, int buflen,
-                                               int *h_errnop) {
-  struct hostent_data *hep;
+struct hostent* nsldapi_compat_gethostbyname_r(const char* name,
+                                               struct hostent* result,
+                                               char* buffer, int buflen,
+                                               int* h_errnop) {
+  struct hostent_data* hep;
 
   if (buflen < sizeof(struct hostent_data)) { /* sanity check */
     *h_errnop = NO_RECOVERY;                  /* XXX best error code to use? */
     return (NULL);
   }
 
-  hep = (struct hostent_data *)buffer;
+  hep = (struct hostent_data*)buffer;
   hep->current = NULL;
 
   if (gethostbyname_r(name, result, hep) == -1) {
     *h_errnop = h_errno; /* XXX don't see anywhere else to get this */
     return NULL;
   }
   return result;
 }
 
-char *nsldapi_compat_ctime_r(const time_t *clock, char *buf, int buflen) {
+char* nsldapi_compat_ctime_r(const time_t* clock, char* buf, int buflen) {
   NSLDAPI_CTIME1(clock, buf, buflen);
   return buf;
 }
 #endif /* HPUX10 && _REENTRANT && !HPUX11 */
 
 #if defined(LINUX) || defined(AIX) || defined(HPUX) || defined(_WINDOWS)
 /*
  * Copies src to the dstsize buffer at dst. The copy will never
  * overflow the destination buffer and the buffer will always be null
  * terminated.
  */
-size_t nsldapi_compat_strlcpy(char *dst, const char *src, size_t len) {
+size_t nsldapi_compat_strlcpy(char* dst, const char* src, size_t len) {
   size_t slen = strlen(src);
   size_t copied;
 
   if (len == 0) return (slen);
 
   if (slen >= len)
     copied = len - 1;
   else
--- a/ldap/c-sdk/libraries/libldap/control.c
+++ b/ldap/c-sdk/libraries/libldap/control.c
@@ -33,29 +33,29 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 /* control.c - routines to handle ldapv3 controls */
 
 #include "ldap-int.h"
 
-static LDAPControl *ldap_control_dup(LDAPControl *ctrl);
-static int ldap_control_copy_contents(LDAPControl *ctrl_dst,
-                                      LDAPControl *ctrl_src);
+static LDAPControl* ldap_control_dup(LDAPControl* ctrl);
+static int ldap_control_copy_contents(LDAPControl* ctrl_dst,
+                                      LDAPControl* ctrl_src);
 
 /*
  * Append a list of LDAPv3 controls to ber.  If ctrls is NULL, use default
  * set of controls from ld.
  * Return an LDAP error code (LDAP_SUCCESS if all goes well).
  * If closeseq is non-zero, we do an extra ber_put_seq() as well.
  */
-int nsldapi_put_controls(LDAP *ld, LDAPControl **ctrls, int closeseq,
-                         BerElement *ber) {
-  LDAPControl *c;
+int nsldapi_put_controls(LDAP* ld, LDAPControl** ctrls, int closeseq,
+                         BerElement* ber) {
+  LDAPControl* c;
   int rc, i;
 
   rc = LDAP_ENCODING_ERROR; /* the most popular error */
 
   /* if no controls were passed in, use global list from LDAP * */
   LDAP_MUTEX_LOCK(ld, LDAP_CTRL_LOCK);
   if (ctrls == NULL) {
     ctrls = ld->ld_servercontrols;
@@ -131,22 +131,22 @@ error_exit:
   LDAP_SET_LDERRNO(ld, rc, NULL, NULL);
   return (rc);
 }
 
 /*
  * Pull controls out of "ber" (if any present) and return them in "controlsp."
  * Returns an LDAP error code.
  */
-int nsldapi_get_controls(BerElement *ber, LDAPControl ***controlsp) {
-  LDAPControl *newctrl;
+int nsldapi_get_controls(BerElement* ber, LDAPControl*** controlsp) {
+  LDAPControl* newctrl;
   ber_tag_t tag;
   ber_len_t len;
   int rc, maxcontrols, curcontrols;
-  char *last;
+  char* last;
 
   /*
    * Each LDAPMessage can have a set of controls appended
    * to it. Controls are used to extend the functionality
    * of an LDAP operation (e.g., add an attribute size limit
    * to the search operation). These controls look like this:
    *
    * Controls ::= SEQUENCE OF Control
@@ -192,24 +192,24 @@ int nsldapi_get_controls(BerElement *ber
 
   maxcontrols = curcontrols = 0;
   for (tag = ber_first_element(ber, &len, &last);
        tag != LBER_ERROR && tag != LBER_END_OF_SEQORSET;
        tag = ber_next_element(ber, &len, last)) {
     if (curcontrols >= maxcontrols - 1) {
 #define CONTROL_GRABSIZE 5
       maxcontrols += CONTROL_GRABSIZE;
-      *controlsp = (struct ldapcontrol **)NSLDAPI_REALLOC(
-          (char *)*controlsp, maxcontrols * sizeof(struct ldapcontrol *));
+      *controlsp = (struct ldapcontrol**)NSLDAPI_REALLOC(
+          (char*)*controlsp, maxcontrols * sizeof(struct ldapcontrol*));
       if (*controlsp == NULL) {
         rc = LDAP_NO_MEMORY;
         goto free_and_return;
       }
     }
-    if ((newctrl = (struct ldapcontrol *)NSLDAPI_CALLOC(
+    if ((newctrl = (struct ldapcontrol*)NSLDAPI_CALLOC(
              1, sizeof(LDAPControl))) == NULL) {
       rc = LDAP_NO_MEMORY;
       goto free_and_return;
     }
 
     (*controlsp)[curcontrols++] = newctrl;
     (*controlsp)[curcontrols] = NULL;
 
@@ -260,17 +260,17 @@ free_and_return:;
   return (rc);
 }
 
 /*
  * Skips forward in a ber to find a control tag, then calls on
  * nsldapi_get_controls() to parse them into an LDAPControl list.
  * Returns an LDAP error code.
  */
-int nsldapi_find_controls(BerElement *ber, LDAPControl ***controlsp) {
+int nsldapi_find_controls(BerElement* ber, LDAPControl*** controlsp) {
   ber_tag_t tag;
   ber_len_t len;
 
   if (ber == NULLBER) {
     return (LDAP_DECODING_ERROR);
   }
 
   tag = ber_peek_tag(ber, &len);
@@ -280,42 +280,42 @@ int nsldapi_find_controls(BerElement *be
     /* Skip ahead to the next sequence */
     ber->ber_ptr += len;
     tag = ber_peek_tag(ber, &len);
   }
 
   return (nsldapi_get_controls(ber, controlsp));
 }
 
-void LDAP_CALL ldap_control_free(LDAPControl *ctrl) {
+void LDAP_CALL ldap_control_free(LDAPControl* ctrl) {
   if (ctrl != NULL) {
     if (ctrl->ldctl_oid != NULL) {
       NSLDAPI_FREE(ctrl->ldctl_oid);
     }
     if (ctrl->ldctl_value.bv_val != NULL) {
       NSLDAPI_FREE(ctrl->ldctl_value.bv_val);
     }
-    NSLDAPI_FREE((char *)ctrl);
+    NSLDAPI_FREE((char*)ctrl);
   }
 }
 
-void LDAP_CALL ldap_controls_free(LDAPControl **ctrls) {
+void LDAP_CALL ldap_controls_free(LDAPControl** ctrls) {
   int i;
 
   if (ctrls != NULL) {
     for (i = 0; ctrls[i] != NULL; i++) {
       ldap_control_free(ctrls[i]);
     }
-    NSLDAPI_FREE((char *)ctrls);
+    NSLDAPI_FREE((char*)ctrls);
   }
 }
 
-LDAPControl *LDAP_CALL ldap_find_control(const char *oid, LDAPControl **ctrls) {
+LDAPControl* LDAP_CALL ldap_find_control(const char* oid, LDAPControl** ctrls) {
   int i, foundControl;
-  LDAPControl *Ctrlp = NULL;
+  LDAPControl* Ctrlp = NULL;
 
   /* find the control in the list of controls if it exists */
   if (ctrls == NULL) {
     return (NULL);
   }
   foundControl = 0;
   for (i = 0; ((ctrls[i] != NULL) && (!foundControl)); i++) {
     foundControl = !strcmp(ctrls[i]->ldctl_oid, oid);
@@ -371,35 +371,35 @@ ldap_control_append( LDAPControl **ctrl_
 }
 #endif /* 0 */
 
 /*
  * Replace *ldctrls with a copy of newctrls.
  * returns 0 if successful.
  * return -1 if not and set error code inside LDAP *ld.
  */
-int nsldapi_dup_controls(LDAP *ld, LDAPControl ***ldctrls,
-                         LDAPControl **newctrls) {
+int nsldapi_dup_controls(LDAP* ld, LDAPControl*** ldctrls,
+                         LDAPControl** newctrls) {
   int count;
 
   if (*ldctrls != NULL) {
     ldap_controls_free(*ldctrls);
   }
 
   if (newctrls == NULL || newctrls[0] == NULL) {
     *ldctrls = NULL;
     return (0);
   }
 
   for (count = 0; newctrls[count] != NULL; ++count) {
     ;
   }
 
-  if ((*ldctrls = (LDAPControl **)NSLDAPI_MALLOC(
-           (count + 1) * sizeof(LDAPControl *))) == NULL) {
+  if ((*ldctrls = (LDAPControl**)NSLDAPI_MALLOC(
+           (count + 1) * sizeof(LDAPControl*))) == NULL) {
     LDAP_SET_LDERRNO(ld, LDAP_NO_MEMORY, NULL, NULL);
     return (-1);
   }
   (*ldctrls)[count] = NULL;
 
   for (count = 0; newctrls[count] != NULL; ++count) {
     if (((*ldctrls)[count] = ldap_control_dup(newctrls[count])) == NULL) {
       ldap_controls_free(*ldctrls);
@@ -410,39 +410,39 @@ int nsldapi_dup_controls(LDAP *ld, LDAPC
   }
 
   return (0);
 }
 
 /*
  * return a malloc'd copy of "ctrl" (NULL if memory allocation fails)
  */
-static LDAPControl *
+static LDAPControl*
 /* LDAP_CALL */ /* keep this routine internal for now */
-ldap_control_dup(LDAPControl *ctrl) {
-  LDAPControl *rctrl;
+ldap_control_dup(LDAPControl* ctrl) {
+  LDAPControl* rctrl;
 
-  if ((rctrl = (LDAPControl *)NSLDAPI_MALLOC(sizeof(LDAPControl))) == NULL) {
+  if ((rctrl = (LDAPControl*)NSLDAPI_MALLOC(sizeof(LDAPControl))) == NULL) {
     return (NULL);
   }
 
   if (ldap_control_copy_contents(rctrl, ctrl) != LDAP_SUCCESS) {
     NSLDAPI_FREE(rctrl);
     return (NULL);
   }
 
   return (rctrl);
 }
 
 /*
  * duplicate the contents of "ctrl_src" and place in "ctrl_dst"
  */
 static int
 /* LDAP_CALL */ /* keep this routine internal for now */
-ldap_control_copy_contents(LDAPControl *ctrl_dst, LDAPControl *ctrl_src) {
+ldap_control_copy_contents(LDAPControl* ctrl_dst, LDAPControl* ctrl_src) {
   size_t len;
 
   if (NULL == ctrl_dst || NULL == ctrl_src) {
     return (LDAP_PARAM_ERROR);
   }
 
   ctrl_dst->ldctl_iscritical = ctrl_src->ldctl_iscritical;
 
@@ -465,36 +465,36 @@ ldap_control_copy_contents(LDAPControl *
   }
 
   return (LDAP_SUCCESS);
 }
 
 /*
  * build an allocated LDAPv3 control.  Returns an LDAP error code.
  */
-int nsldapi_build_control(char *oid, BerElement *ber, int freeber,
-                          char iscritical, LDAPControl **ctrlp) {
+int nsldapi_build_control(char* oid, BerElement* ber, int freeber,
+                          char iscritical, LDAPControl** ctrlp) {
   int rc;
-  struct berval *bvp;
+  struct berval* bvp;
 
   if (ber == NULL) {
     bvp = NULL;
   } else {
     /* allocate struct berval with contents of the BER encoding */
     rc = ber_flatten(ber, &bvp);
     if (freeber) {
       ber_free(ber, 1);
     }
     if (rc == -1) {
       return (LDAP_NO_MEMORY);
     }
   }
 
   /* allocate the new control structure */
-  if ((*ctrlp = (LDAPControl *)NSLDAPI_MALLOC(sizeof(LDAPControl))) == NULL) {
+  if ((*ctrlp = (LDAPControl*)NSLDAPI_MALLOC(sizeof(LDAPControl))) == NULL) {
     if (bvp != NULL) {
       ber_bvfree(bvp);
     }
     return (LDAP_NO_MEMORY);
   }
 
   /* fill in the fields of this new control */
   (*ctrlp)->ldctl_iscritical = iscritical;
--- a/ldap/c-sdk/libraries/libldap/countvalues.c
+++ b/ldap/c-sdk/libraries/libldap/countvalues.c
@@ -39,22 +39,22 @@
  *  All rights reserved.
  */
 /*
  *  countvalues.c
  */
 
 #include "ldap-int.h"
 
-int LDAP_CALL ldap_count_values(char **vals) {
+int LDAP_CALL ldap_count_values(char** vals) {
   int i;
 
   if (vals == NULL) return (0);
 
   for (i = 0; vals[i] != NULL; i++)
     ; /* NULL */
 
   return (i);
 }
 
-int LDAP_CALL ldap_count_values_len(struct berval **vals) {
-  return (ldap_count_values((char **)vals));
+int LDAP_CALL ldap_count_values_len(struct berval** vals) {
+  return (ldap_count_values((char**)vals));
 }
--- a/ldap/c-sdk/libraries/libldap/delete.c
+++ b/ldap/c-sdk/libraries/libldap/delete.c
@@ -50,32 +50,32 @@ static char copyright[] = "@(#) Copyrigh
  * ldap_delete - initiate an ldap delete operation. Parameters:
  *
  * ld    LDAP descriptor
  * dn    DN of the object to delete
  *
  * Example:
  * msgid = ldap_delete(ld, dn);
  */
-int LDAP_CALL ldap_delete(LDAP *ld, const char *dn) {
+int LDAP_CALL ldap_delete(LDAP* ld, const char* dn) {
   int msgid;
 
   LDAPDebug(LDAP_DEBUG_TRACE, "ldap_delete\n", 0, 0, 0);
 
   if (ldap_delete_ext(ld, dn, NULL, NULL, &msgid) == LDAP_SUCCESS) {
     return (msgid);
   } else {
     return (-1); /* error is in ld handle */
   }
 }
 
-int LDAP_CALL ldap_delete_ext(LDAP *ld, const char *dn,
-                              LDAPControl **serverctrls,
-                              LDAPControl **clientctrls, int *msgidp) {
-  BerElement *ber;
+int LDAP_CALL ldap_delete_ext(LDAP* ld, const char* dn,
+                              LDAPControl** serverctrls,
+                              LDAPControl** clientctrls, int* msgidp) {
+  BerElement* ber;
   int rc, lderr;
 
   /*
    * A delete request looks like this:
    * DelRequet ::= DistinguishedName,
    */
 
   LDAPDebug(LDAP_DEBUG_TRACE, "ldap_delete_ext\n", 0, 0, 0);
@@ -120,35 +120,35 @@ int LDAP_CALL ldap_delete_ext(LDAP *ld, 
   }
 
   if ((lderr = nsldapi_put_controls(ld, serverctrls, 1, ber)) != LDAP_SUCCESS) {
     ber_free(ber, 1);
     return (lderr);
   }
 
   /* send the message */
-  rc = nsldapi_send_initial_request(ld, *msgidp, LDAP_REQ_DELETE, (char *)dn,
+  rc = nsldapi_send_initial_request(ld, *msgidp, LDAP_REQ_DELETE, (char*)dn,
                                     ber);
   *msgidp = rc;
   return (rc < 0 ? LDAP_GET_LDERRNO(ld, NULL, NULL) : LDAP_SUCCESS);
 }
 
-int LDAP_CALL ldap_delete_s(LDAP *ld, const char *dn) {
+int LDAP_CALL ldap_delete_s(LDAP* ld, const char* dn) {
   return (ldap_delete_ext_s(ld, dn, NULL, NULL));
 }
 
-int LDAP_CALL ldap_delete_ext_s(LDAP *ld, const char *dn,
-                                LDAPControl **serverctrls,
-                                LDAPControl **clientctrls) {
+int LDAP_CALL ldap_delete_ext_s(LDAP* ld, const char* dn,
+                                LDAPControl** serverctrls,
+                                LDAPControl** clientctrls) {
   int err, msgid;
-  LDAPMessage *res;
+  LDAPMessage* res;
 
   if ((err = ldap_delete_ext(ld, dn, serverctrls, clientctrls, &msgid)) !=
       LDAP_SUCCESS) {
     return (err);
   }
 
-  if (ldap_result(ld, msgid, 1, (struct timeval *)NULL, &res) == -1) {
+  if (ldap_result(ld, msgid, 1, (struct timeval*)NULL, &res) == -1) {
     return (LDAP_GET_LDERRNO(ld, NULL, NULL));
   }
 
   return (ldap_result2error(ld, res, 1));
 }
--- a/ldap/c-sdk/libraries/libldap/disptmpl.c
+++ b/ldap/c-sdk/libraries/libldap/disptmpl.c
@@ -47,58 +47,58 @@
  */
 /*
  * disptmpl.c:  display template library routines for LDAP clients
  */
 
 #include "ldap-int.h"
 #include "disptmpl.h"
 
-static void free_disptmpl(struct ldap_disptmpl *tmpl);
-static int read_next_tmpl(char **bufp, long *blenp,
-                          struct ldap_disptmpl **tmplp, int dtversion);
+static void free_disptmpl(struct ldap_disptmpl* tmpl);
+static int read_next_tmpl(char** bufp, long* blenp,
+                          struct ldap_disptmpl** tmplp, int dtversion);
 
-static char *tmploptions[] = {"addable", "modrdn", "altview", NULL};
+static char* tmploptions[] = {"addable", "modrdn", "altview", NULL};
 
 static unsigned long tmploptvals[] = {
     LDAP_DTMPL_OPT_ADDABLE,
     LDAP_DTMPL_OPT_ALLOWMODRDN,
     LDAP_DTMPL_OPT_ALTVIEW,
 };
 
-static char *itemtypes[] = {
+static char* itemtypes[] = {
     "cis",      "mls",      "dn",        "bool", "jpeg", "jpegbtn",   "fax",
     "faxbtn",   "audiobtn", "time",      "date", "url",  "searchact", "linkact",
     "adddnact", "addact",   "verifyact", "mail", NULL};
 
 static unsigned long itemsynids[] = {
     LDAP_SYN_CASEIGNORESTR, LDAP_SYN_MULTILINESTR,   LDAP_SYN_DN,
     LDAP_SYN_BOOLEAN,       LDAP_SYN_JPEGIMAGE,      LDAP_SYN_JPEGBUTTON,
     LDAP_SYN_FAXIMAGE,      LDAP_SYN_FAXBUTTON,      LDAP_SYN_AUDIOBUTTON,
     LDAP_SYN_TIME,          LDAP_SYN_DATE,           LDAP_SYN_LABELEDURL,
     LDAP_SYN_SEARCHACTION,  LDAP_SYN_LINKACTION,     LDAP_SYN_ADDDNACTION,
     LDAP_SYN_ADDDNACTION,   LDAP_SYN_VERIFYDNACTION, LDAP_SYN_RFC822ADDR,
 };
 
-static char *itemoptions[] = {"ro",       "sort",        "1val", "hide",
+static char* itemoptions[] = {"ro",       "sort",        "1val", "hide",
                               "required", "hideiffalse", NULL};
 
 static unsigned long itemoptvals[] = {
     LDAP_DITEM_OPT_READONLY,      LDAP_DITEM_OPT_SORTVALUES,
     LDAP_DITEM_OPT_SINGLEVALUED,  LDAP_DITEM_OPT_HIDEIFEMPTY,
     LDAP_DITEM_OPT_VALUEREQUIRED, LDAP_DITEM_OPT_HIDEIFFALSE,
 };
 
 #define ADDEF_CONSTANT "constant"
 #define ADDEF_ADDERSDN "addersdn"
 
-int LDAP_CALL ldap_init_templates(char *file,
-                                  struct ldap_disptmpl **tmpllistp) {
-  FILE *fp;
-  char *buf;
+int LDAP_CALL ldap_init_templates(char* file,
+                                  struct ldap_disptmpl** tmpllistp) {
+  FILE* fp;
+  char* buf;
   long rlen, len;
   int rc, eof;
 
   *tmpllistp = NULLDISPTMPL;
 
   if ((fp = NSLDAPI_FOPEN(file, "r")) == NULL) {
     return (LDAP_TMPL_ERR_FILE);
   }
@@ -130,20 +130,20 @@ int LDAP_CALL ldap_init_templates(char *
   }
 
   rc = ldap_init_templates_buf(buf, rlen, tmpllistp);
   NSLDAPI_FREE(buf);
 
   return (rc);
 }
 
-int LDAP_CALL ldap_init_templates_buf(char *buf, long buflen,
-                                      struct ldap_disptmpl **tmpllistp) {
+int LDAP_CALL ldap_init_templates_buf(char* buf, long buflen,
+                                      struct ldap_disptmpl** tmpllistp) {
   int rc = 0, version;
-  char **toks;
+  char** toks;
   struct ldap_disptmpl *prevtmpl, *tmpl;
 
   *tmpllistp = prevtmpl = NULLDISPTMPL;
 
   if (nsldapi_next_line_tokens(&buf, &buflen, &toks) != 2 ||
       strcasecmp(toks[0], "version") != 0) {
     nsldapi_free_strarray(toks);
     return (LDAP_TMPL_ERR_SYNTAX);
@@ -167,28 +167,28 @@ int LDAP_CALL ldap_init_templates_buf(ch
 
   if (rc != 0) {
     ldap_free_templates(*tmpllistp);
   }
 
   return (rc);
 }
 
-void LDAP_CALL ldap_free_templates(struct ldap_disptmpl *tmpllist) {
+void LDAP_CALL ldap_free_templates(struct ldap_disptmpl* tmpllist) {
   struct ldap_disptmpl *tp, *nexttp;
 
   if (tmpllist != NULL) {
     for (tp = tmpllist; tp != NULL; tp = nexttp) {
       nexttp = tp->dt_next;
       free_disptmpl(tp);
     }
   }
 }
 
-static void free_disptmpl(struct ldap_disptmpl *tmpl) {
+static void free_disptmpl(struct ldap_disptmpl* tmpl) {
   if (tmpl != NULL) {
     if (tmpl->dt_name != NULL) {
       NSLDAPI_FREE(tmpl->dt_name);
     }
 
     if (tmpl->dt_pluralname != NULL) {
       NSLDAPI_FREE(tmpl->dt_pluralname);
     }
@@ -254,44 +254,44 @@ static void free_disptmpl(struct ldap_di
         }
       }
     }
 
     NSLDAPI_FREE(tmpl);
   }
 }
 
-struct ldap_disptmpl *LDAP_CALL
-ldap_first_disptmpl(struct ldap_disptmpl *tmpllist) {
+struct ldap_disptmpl* LDAP_CALL
+ldap_first_disptmpl(struct ldap_disptmpl* tmpllist) {
   return (tmpllist);
 }
 
-struct ldap_disptmpl *LDAP_CALL
-ldap_next_disptmpl(struct ldap_disptmpl *tmpllist, struct ldap_disptmpl *tmpl) {
+struct ldap_disptmpl* LDAP_CALL
+ldap_next_disptmpl(struct ldap_disptmpl* tmpllist, struct ldap_disptmpl* tmpl) {
   return (tmpl == NULLDISPTMPL ? tmpl : tmpl->dt_next);
 }
 
-struct ldap_disptmpl *LDAP_CALL
-ldap_name2template(char *name, struct ldap_disptmpl *tmpllist) {
-  struct ldap_disptmpl *dtp;
+struct ldap_disptmpl* LDAP_CALL
+ldap_name2template(char* name, struct ldap_disptmpl* tmpllist) {
+  struct ldap_disptmpl* dtp;
 
   for (dtp = ldap_first_disptmpl(tmpllist); dtp != NULLDISPTMPL;
        dtp = ldap_next_disptmpl(tmpllist, dtp)) {
     if (strcasecmp(name, dtp->dt_name) == 0) {
       return (dtp);
     }
   }
 
   return (NULLDISPTMPL);
 }
 
-struct ldap_disptmpl *LDAP_CALL
-ldap_oc2template(char **oclist, struct ldap_disptmpl *tmpllist) {
-  struct ldap_disptmpl *dtp;
-  struct ldap_oclist *oclp;
+struct ldap_disptmpl* LDAP_CALL
+ldap_oc2template(char** oclist, struct ldap_disptmpl* tmpllist) {
+  struct ldap_disptmpl* dtp;
+  struct ldap_oclist* oclp;
   int i, j, needcnt, matchcnt;
 
   if (tmpllist == NULL || oclist == NULL || oclist[0] == NULL) {
     return (NULLDISPTMPL);
   }
 
   for (dtp = ldap_first_disptmpl(tmpllist); dtp != NULLDISPTMPL;
        dtp = ldap_next_disptmpl(tmpllist, dtp)) {
@@ -310,56 +310,56 @@ ldap_oc2template(char **oclist, struct l
         return (dtp);
       }
     }
   }
 
   return (NULLDISPTMPL);
 }
 
-struct ldap_tmplitem *LDAP_CALL ldap_first_tmplrow(struct ldap_disptmpl *tmpl) {
+struct ldap_tmplitem* LDAP_CALL ldap_first_tmplrow(struct ldap_disptmpl* tmpl) {
   return (tmpl->dt_items);
 }
 
-struct ldap_tmplitem *LDAP_CALL ldap_next_tmplrow(struct ldap_disptmpl *tmpl,
-                                                  struct ldap_tmplitem *row) {
+struct ldap_tmplitem* LDAP_CALL ldap_next_tmplrow(struct ldap_disptmpl* tmpl,
+                                                  struct ldap_tmplitem* row) {
   return (row == NULLTMPLITEM ? row : row->ti_next_in_col);
 }
 
-struct ldap_tmplitem *LDAP_CALL ldap_first_tmplcol(struct ldap_disptmpl *tmpl,
-                                                   struct ldap_tmplitem *row) {
+struct ldap_tmplitem* LDAP_CALL ldap_first_tmplcol(struct ldap_disptmpl* tmpl,
+                                                   struct ldap_tmplitem* row) {
   return (row);
 }
 
-struct ldap_tmplitem *LDAP_CALL ldap_next_tmplcol(struct ldap_disptmpl *tmpl,
-                                                  struct ldap_tmplitem *row,
-                                                  struct ldap_tmplitem *col) {
+struct ldap_tmplitem* LDAP_CALL ldap_next_tmplcol(struct ldap_disptmpl* tmpl,
+                                                  struct ldap_tmplitem* row,
+                                                  struct ldap_tmplitem* col) {
   return (col == NULLTMPLITEM ? col : col->ti_next_in_row);
 }
 
-char **LDAP_CALL ldap_tmplattrs(struct ldap_disptmpl *tmpl, char **includeattrs,
+char** LDAP_CALL ldap_tmplattrs(struct ldap_disptmpl* tmpl, char** includeattrs,
                                 int exclude, unsigned long syntaxmask) {
   /*
    * this routine should filter out duplicate attributes...
    */
   struct ldap_tmplitem *tirowp, *ticolp;
   int i, attrcnt, memerr;
-  char **attrs;
+  char** attrs;
 
   attrcnt = 0;
   memerr = 0;
 
-  if ((attrs = (char **)NSLDAPI_MALLOC(sizeof(char *))) == NULL) {
+  if ((attrs = (char**)NSLDAPI_MALLOC(sizeof(char*))) == NULL) {
     return (NULL);
   }
 
   if (includeattrs != NULL) {
     for (i = 0; !memerr && includeattrs[i] != NULL; ++i) {
-      if ((attrs = (char **)NSLDAPI_REALLOC(
-               attrs, (attrcnt + 2) * sizeof(char *))) == NULL ||
+      if ((attrs = (char**)NSLDAPI_REALLOC(
+               attrs, (attrcnt + 2) * sizeof(char*))) == NULL ||
           (attrs[attrcnt++] = nsldapi_strdup(includeattrs[i])) == NULL) {
         memerr = 1;
       } else {
         attrs[attrcnt] = NULL;
       }
     }
   }
 
@@ -370,87 +370,87 @@ char **LDAP_CALL ldap_tmplattrs(struct l
       if (syntaxmask != 0) {
         if ((exclude && (syntaxmask & ticolp->ti_syntaxid) != 0) ||
             (!exclude && (syntaxmask & ticolp->ti_syntaxid) == 0)) {
           continue;
         }
       }
 
       if (ticolp->ti_attrname != NULL) {
-        if ((attrs = (char **)NSLDAPI_REALLOC(
-                 attrs, (attrcnt + 2) * sizeof(char *))) == NULL ||
+        if ((attrs = (char**)NSLDAPI_REALLOC(
+                 attrs, (attrcnt + 2) * sizeof(char*))) == NULL ||
             (attrs[attrcnt++] = nsldapi_strdup(ticolp->ti_attrname)) == NULL) {
           memerr = 1;
         } else {
           attrs[attrcnt] = NULL;
         }
       }
     }
   }
 
   if (memerr || attrcnt == 0) {
     for (i = 0; i < attrcnt; ++i) {
       if (attrs[i] != NULL) {
         NSLDAPI_FREE(attrs[i]);
       }
     }
 
-    NSLDAPI_FREE((char *)attrs);
+    NSLDAPI_FREE((char*)attrs);
     return (NULL);
   }
 
   return (attrs);
 }
 
-static int read_next_tmpl(char **bufp, long *blenp,
-                          struct ldap_disptmpl **tmplp, int dtversion) {
+static int read_next_tmpl(char** bufp, long* blenp,
+                          struct ldap_disptmpl** tmplp, int dtversion) {
   int i, j, tokcnt, samerow, adsource;
   char **toks, *itemopts;
-  struct ldap_disptmpl *tmpl = NULL;
+  struct ldap_disptmpl* tmpl = NULL;
   struct ldap_oclist *ocp = NULL, *prevocp = NULL;
   struct ldap_adddeflist *adp = NULL, *prevadp = NULL;
   struct ldap_tmplitem *rowp = NULL, *ip = NULL, *previp = NULL;
 
   /*
    * template name comes first
    */
   if ((tokcnt = nsldapi_next_line_tokens(bufp, blenp, &toks)) != 1) {
     nsldapi_free_strarray(toks);
     return (tokcnt == 0 ? 0 : LDAP_TMPL_ERR_SYNTAX);
   }
 
-  if ((tmpl = (struct ldap_disptmpl *)NSLDAPI_CALLOC(
+  if ((tmpl = (struct ldap_disptmpl*)NSLDAPI_CALLOC(
            1, sizeof(struct ldap_disptmpl))) == NULL) {
     nsldapi_free_strarray(toks);
     return (LDAP_TMPL_ERR_MEM);
   }
   tmpl->dt_name = toks[0];
-  NSLDAPI_FREE((char *)toks);
+  NSLDAPI_FREE((char*)toks);
 
   /*
    * template plural name comes next
    */
   if ((tokcnt = nsldapi_next_line_tokens(bufp, blenp, &toks)) != 1) {
     nsldapi_free_strarray(toks);
     free_disptmpl(tmpl);
     return (LDAP_TMPL_ERR_SYNTAX);
   }
   tmpl->dt_pluralname = toks[0];
-  NSLDAPI_FREE((char *)toks);
+  NSLDAPI_FREE((char*)toks);
 
   /*
    * template icon name is next
    */
   if ((tokcnt = nsldapi_next_line_tokens(bufp, blenp, &toks)) != 1) {
     nsldapi_free_strarray(toks);
     free_disptmpl(tmpl);
     return (LDAP_TMPL_ERR_SYNTAX);
   }
   tmpl->dt_iconname = toks[0];
-  NSLDAPI_FREE((char *)toks);
+  NSLDAPI_FREE((char*)toks);
 
   /*
    * template options come next
    */
   if ((tokcnt = nsldapi_next_line_tokens(bufp, blenp, &toks)) < 1) {
     nsldapi_free_strarray(toks);
     free_disptmpl(tmpl);
     return (LDAP_TMPL_ERR_SYNTAX);
@@ -463,17 +463,17 @@ static int read_next_tmpl(char **bufp, l
     }
   }
   nsldapi_free_strarray(toks);
 
   /*
    * object class list is next
    */
   while ((tokcnt = nsldapi_next_line_tokens(bufp, blenp, &toks)) > 0) {
-    if ((ocp = (struct ldap_oclist *)NSLDAPI_CALLOC(
+    if ((ocp = (struct ldap_oclist*)NSLDAPI_CALLOC(
              1, sizeof(struct ldap_oclist))) == NULL) {
       nsldapi_free_strarray(toks);
       free_disptmpl(tmpl);
       return (LDAP_TMPL_ERR_MEM);
     }
     ocp->oc_objclasses = toks;
     if (tmpl->dt_oclist == NULL) {
       tmpl->dt_oclist = ocp;
@@ -495,43 +495,43 @@ static int read_next_tmpl(char **bufp, l
     free_disptmpl(tmpl);
     return (LDAP_TMPL_ERR_SYNTAX);
   }
   if (toks[0][0] != '\0') {
     tmpl->dt_authattrname = toks[0];
   } else {
     NSLDAPI_FREE(toks[0]);
   }
-  NSLDAPI_FREE((char *)toks);
+  NSLDAPI_FREE((char*)toks);
 
   /*
    * read default attribute to use for RDN
    */
   if ((tokcnt = nsldapi_next_line_tokens(bufp, blenp, &toks)) != 1) {
     nsldapi_free_strarray(toks);
     free_disptmpl(tmpl);
     return (LDAP_TMPL_ERR_SYNTAX);
   }
   tmpl->dt_defrdnattrname = toks[0];
-  NSLDAPI_FREE((char *)toks);
+  NSLDAPI_FREE((char*)toks);
 
   /*
    * read default location for new entries
    */
   if ((tokcnt = nsldapi_next_line_tokens(bufp, blenp, &toks)) != 1) {
     nsldapi_free_strarray(toks);
     free_disptmpl(tmpl);
     return (LDAP_TMPL_ERR_SYNTAX);
   }
   if (toks[0][0] != '\0') {
     tmpl->dt_defaddlocation = toks[0];
   } else {
     NSLDAPI_FREE(toks[0]);
   }
-  NSLDAPI_FREE((char *)toks);
+  NSLDAPI_FREE((char*)toks);
 
   /*
    * read list of rules used to define default values for new entries
    */
   while ((tokcnt = nsldapi_next_line_tokens(bufp, blenp, &toks)) > 0) {
     if (strcasecmp(ADDEF_CONSTANT, toks[0]) == 0) {
       adsource = LDAP_ADSRC_CONSTANTVALUE;
     } else if (strcasecmp(ADDEF_ADDERSDN, toks[0]) == 0) {
@@ -542,29 +542,29 @@ static int read_next_tmpl(char **bufp, l
     if (adsource == 0 || tokcnt < 2 ||
         (adsource == LDAP_ADSRC_CONSTANTVALUE && tokcnt != 3) ||
         (adsource == LDAP_ADSRC_ADDERSDN && tokcnt != 2)) {
       nsldapi_free_strarray(toks);
       free_disptmpl(tmpl);
       return (LDAP_TMPL_ERR_SYNTAX);
     }
 
-    if ((adp = (struct ldap_adddeflist *)NSLDAPI_CALLOC(
+    if ((adp = (struct ldap_adddeflist*)NSLDAPI_CALLOC(
              1, sizeof(struct ldap_adddeflist))) == NULL) {
       nsldapi_free_strarray(toks);
       free_disptmpl(tmpl);
       return (LDAP_TMPL_ERR_MEM);
     }
     adp->ad_source = adsource;
     adp->ad_attrname = toks[1];
     if (adsource == LDAP_ADSRC_CONSTANTVALUE) {
       adp->ad_value = toks[2];
     }
     NSLDAPI_FREE(toks[0]);
-    NSLDAPI_FREE((char *)toks);
+    NSLDAPI_FREE((char*)toks);
 
     if (tmpl->dt_adddeflist == NULL) {
       tmpl->dt_adddeflist = adp;
     } else {
       prevadp->ad_next = adp;
     }
     prevadp = adp;
   }
@@ -576,17 +576,17 @@ static int read_next_tmpl(char **bufp, l
   while ((tokcnt = nsldapi_next_line_tokens(bufp, blenp, &toks)) > 0) {
     if (strcasecmp(toks[0], "item") == 0) {
       if (tokcnt < 4) {
         nsldapi_free_strarray(toks);
         free_disptmpl(tmpl);
         return (LDAP_TMPL_ERR_SYNTAX);
       }
 
-      if ((ip = (struct ldap_tmplitem *)NSLDAPI_CALLOC(
+      if ((ip = (struct ldap_tmplitem*)NSLDAPI_CALLOC(
                1, sizeof(struct ldap_tmplitem))) == NULL) {
         nsldapi_free_strarray(toks);
         free_disptmpl(tmpl);
         return (LDAP_TMPL_ERR_MEM);
       }
 
       /*
        * find syntaxid from config file string
@@ -626,26 +626,26 @@ static int read_next_tmpl(char **bufp, l
         NSLDAPI_FREE(toks[3]);
       } else {
         ip->ti_attrname = toks[3];
       }
       if (toks[4] != NULL) { /* extra args. */
         for (i = 0; toks[i + 4] != NULL; ++i) {
           ;
         }
-        if ((ip->ti_args = (char **)NSLDAPI_CALLOC(i + 1, sizeof(char *))) ==
+        if ((ip->ti_args = (char**)NSLDAPI_CALLOC(i + 1, sizeof(char*))) ==
             NULL) {
           free_disptmpl(tmpl);
           return (LDAP_TMPL_ERR_MEM);
         }
         for (i = 0; toks[i + 4] != NULL; ++i) {
           ip->ti_args[i] = toks[i + 4];
         }
       }
-      NSLDAPI_FREE((char *)toks);
+      NSLDAPI_FREE((char*)toks);
 
       if (tmpl->dt_items == NULL) {
         tmpl->dt_items = rowp = ip;
       } else if (samerow) {
         previp->ti_next_in_row = ip;
       } else {
         rowp->ti_next_in_col = ip;
         rowp = ip;
@@ -667,27 +667,27 @@ static int read_next_tmpl(char **bufp, l
   }
 
   *tmplp = tmpl;
   return (0);
 }
 
 struct tmplerror {
   int e_code;
-  char *e_reason;
+  char* e_reason;
 };
 
 static struct tmplerror ldap_tmplerrlist[] = {
     {LDAP_TMPL_ERR_VERSION, "Bad template version"},
     {LDAP_TMPL_ERR_MEM, "Out of memory"},
     {LDAP_TMPL_ERR_SYNTAX, "Bad template syntax"},
     {LDAP_TMPL_ERR_FILE, "File error reading template"},
     {-1, 0}};
 
-char *LDAP_CALL ldap_tmplerr2string(int err) {
+char* LDAP_CALL ldap_tmplerr2string(int err) {
   int i;
 
   for (i = 0; ldap_tmplerrlist[i].e_code != -1; i++) {
     if (err == ldap_tmplerrlist[i].e_code)
       return (ldap_tmplerrlist[i].e_reason);
   }
 
   return ("Unknown error");
--- a/ldap/c-sdk/libraries/libldap/dsparse.c
+++ b/ldap/c-sdk/libraries/libldap/dsparse.c
@@ -48,40 +48,40 @@
 /*
  * dsparse.c:  parsing routines used by display template and search
  * preference file library routines for LDAP clients.
  *
  */
 
 #include "ldap-int.h"
 
-static int next_line(char **bufp, long *blenp, char **linep);
-static char *next_token(char **sp);
+static int next_line(char** bufp, long* blenp, char** linep);
+static char* next_token(char** sp);
 
-int nsldapi_next_line_tokens(char **bufp, long *blenp, char ***toksp) {
+int nsldapi_next_line_tokens(char** bufp, long* blenp, char*** toksp) {
   char *p, *line, *token, **toks;
   int rc, tokcnt;
 
   *toksp = NULL;
 
   if ((rc = next_line(bufp, blenp, &line)) <= 0) {
     return (rc);
   }
 
-  if ((toks = (char **)NSLDAPI_CALLOC(1, sizeof(char *))) == NULL) {
+  if ((toks = (char**)NSLDAPI_CALLOC(1, sizeof(char*))) == NULL) {
     NSLDAPI_FREE(line);
     return (-1);
   }
   tokcnt = 0;
 
   p = line;
   while ((token = next_token(&p)) != NULL) {
-    if ((toks = (char **)NSLDAPI_REALLOC(
-             toks, (tokcnt + 2) * sizeof(char *))) == NULL) {
-      NSLDAPI_FREE((char *)toks);
+    if ((toks = (char**)NSLDAPI_REALLOC(toks, (tokcnt + 2) * sizeof(char*))) ==
+        NULL) {
+      NSLDAPI_FREE((char*)toks);
       NSLDAPI_FREE(line);
       return (-1);
     }
     toks[tokcnt] = token;
     toks[++tokcnt] = NULL;
   }
 
   if (tokcnt == 1 && strcasecmp(toks[0], "END") == 0) {
@@ -89,26 +89,26 @@ int nsldapi_next_line_tokens(char **bufp
     nsldapi_free_strarray(toks);
     toks = NULL;
   }
 
   NSLDAPI_FREE(line);
 
   if (tokcnt == 0) {
     if (toks != NULL) {
-      NSLDAPI_FREE((char *)toks);
+      NSLDAPI_FREE((char*)toks);
     }
   } else {
     *toksp = toks;
   }
 
   return (tokcnt);
 }
 
-static int next_line(char **bufp, long *blenp, char **linep) {
+static int next_line(char** bufp, long* blenp, char** linep) {
   char *linestart, *line, *p;
   long plen;
 
   linestart = *bufp;
   p = *bufp;
   plen = *blenp;
 
   do {
@@ -147,17 +147,17 @@ static int next_line(char **bufp, long *
   }
 
   SAFEMEMCPY(line, linestart, p - linestart);
   line[p - linestart - 1] = '\0';
   *linep = line;
   return (strlen(line));
 }
 
-static char *next_token(char **sp) {
+static char* next_token(char** sp) {
   int in_quote = 0;
   char *p, *tokstart, *t;
 
   if (**sp == '\0') {
     return (NULL);
   }
 
   p = *sp;
@@ -197,18 +197,18 @@ static char *next_token(char **sp) {
 
   if (t == tokstart) {
     return (NULL);
   }
 
   return (nsldapi_strdup(tokstart));
 }
 
-void nsldapi_free_strarray(char **sap) {
+void nsldapi_free_strarray(char** sap) {
   int i;
 
   if (sap != NULL) {
     for (i = 0; sap[i] != NULL; ++i) {
       NSLDAPI_FREE(sap[i]);
     }
-    NSLDAPI_FREE((char *)sap);
+    NSLDAPI_FREE((char*)sap);
   }
 }
--- a/ldap/c-sdk/libraries/libldap/error.c
+++ b/ldap/c-sdk/libraries/libldap/error.c
@@ -33,17 +33,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 #include "ldap-int.h"
 
 struct ldaperror {
   int e_code;
-  char *e_reason;
+  char* e_reason;
 };
 
 static struct ldaperror ldap_errlist[] = {
     {LDAP_SUCCESS, "Success"},
     {LDAP_OPERATIONS_ERROR, "Operations error"},
     {LDAP_PROTOCOL_ERROR, "Protocol error"},
     {LDAP_TIMELIMIT_EXCEEDED, "Timelimit exceeded"},
     {LDAP_SIZELIMIT_EXCEEDED, "Sizelimit exceeded"},
@@ -106,43 +106,43 @@ static struct ldaperror ldap_errlist[] =
     {LDAP_NOT_SUPPORTED, "Not supported by this version of the LDAP protocol"},
     {LDAP_CONTROL_NOT_FOUND, "Requested LDAP control not found"},
     {LDAP_NO_RESULTS_RETURNED, "No results returned"},
     {LDAP_MORE_RESULTS_TO_RETURN, "More results to return"},
     {LDAP_CLIENT_LOOP, "Client detected loop"},
     {LDAP_REFERRAL_LIMIT_EXCEEDED, "Referral hop limit exceeded"},
     {-1, 0}};
 
-char *LDAP_CALL ldap_err2string(int err) {
+char* LDAP_CALL ldap_err2string(int err) {
   int i;
 
   LDAPDebug(LDAP_DEBUG_TRACE, "ldap_err2string\n", 0, 0, 0);
 
   for (i = 0; ldap_errlist[i].e_code != -1; i++) {
     if (err == ldap_errlist[i].e_code) return (ldap_errlist[i].e_reason);
   }
 
   return ("Unknown error");
 }
 
-static char *nsldapi_safe_strerror(int e) {
-  char *s;
+static char* nsldapi_safe_strerror(int e) {
+  char* s;
 
   if ((s = strerror(e)) == NULL) {
     s = "unknown error";
   }
 
   return (s);
 }
 
-void LDAP_CALL ldap_perror(LDAP *ld, const char *s) {
+void LDAP_CALL ldap_perror(LDAP* ld, const char* s) {
   int i, err;
-  char *matched = NULL;
-  char *errmsg = NULL;
-  char *separator;
+  char* matched = NULL;
+  char* errmsg = NULL;
+  char* separator;
   char msg[1024];
 
   LDAPDebug(LDAP_DEBUG_TRACE, "ldap_perror\n", 0, 0, 0);
 
   if (s == NULL) {
     s = separator = "";
   } else {
     separator = ": ";
@@ -180,30 +180,30 @@ void LDAP_CALL ldap_perror(LDAP *ld, con
       return;
     }
   }
   snprintf(msg, sizeof(msg), "%s%sNot an LDAP errno %d\n", s, separator, err);
   ber_err_print(msg);
   LDAP_MUTEX_UNLOCK(ld, LDAP_ERR_LOCK);
 }
 
-int LDAP_CALL ldap_result2error(LDAP *ld, LDAPMessage *r, int freeit) {
+int LDAP_CALL ldap_result2error(LDAP* ld, LDAPMessage* r, int freeit) {
   int lderr_parse, lderr;
 
   lderr_parse =
       ldap_parse_result(ld, r, &lderr, NULL, NULL, NULL, NULL, freeit);
 
   if (lderr_parse != LDAP_SUCCESS) {
     return (lderr_parse);
   }
 
   return (lderr);
 }
 
-int LDAP_CALL ldap_get_lderrno(LDAP *ld, char **m, char **s) {
+int LDAP_CALL ldap_get_lderrno(LDAP* ld, char** m, char** s) {
   if (!NSLDAPI_VALID_LDAP_POINTER(ld)) {
     return (LDAP_PARAM_ERROR); /* punt */
   }
 
   if (ld->ld_get_lderrno_fn == NULL) {
     if (m != NULL) {
       *m = ld->ld_matched;
     }
@@ -219,17 +219,17 @@ int LDAP_CALL ldap_get_lderrno(LDAP *ld,
 /*
  * Note: there is no need for callers of ldap_set_lderrno() to lock the
  * ld mutex.  If applications intend to share an LDAP session handle
  * between threads they *must* perform their own locking around the
  * session handle or they must install a "set lderrno" thread callback
  * function.
  *
  */
-int LDAP_CALL ldap_set_lderrno(LDAP *ld, int e, char *m, char *s) {
+int LDAP_CALL ldap_set_lderrno(LDAP* ld, int e, char* m, char* s) {
   if (!NSLDAPI_VALID_LDAP_POINTER(ld)) {
     return (LDAP_PARAM_ERROR);
   }
 
   if (ld->ld_set_lderrno_fn != NULL) {
     ld->ld_set_lderrno_fn(e, m, s, ld->ld_lderrno_arg);
   } else {
     LDAP_MUTEX_LOCK(ld, LDAP_ERR_LOCK);
@@ -249,21 +249,21 @@ int LDAP_CALL ldap_set_lderrno(LDAP *ld,
 }
 
 /*
  * Returns an LDAP error that says whether parse succeeded.  The error code
  * from the LDAP result itself is returned in the errcodep result parameter.
  * If any of the result params. (errcodep, matchednp, errmsgp, referralsp,
  * or serverctrlsp) are NULL we don't return that info.
  */
-int LDAP_CALL ldap_parse_result(LDAP *ld, LDAPMessage *res, int *errcodep,
-                                char **matchednp, char **errmsgp,
-                                char ***referralsp, LDAPControl ***serverctrlsp,
+int LDAP_CALL ldap_parse_result(LDAP* ld, LDAPMessage* res, int* errcodep,
+                                char** matchednp, char** errmsgp,
+                                char*** referralsp, LDAPControl*** serverctrlsp,
                                 int freeit) {
-  LDAPMessage *lm;
+  LDAPMessage* lm;
   int err, errcode;
   char *m, *e;
   m = e = NULL;
 
   LDAPDebug(LDAP_DEBUG_TRACE, "ldap_parse_result\n", 0, 0, 0);
 
   if (!NSLDAPI_VALID_LDAP_POINTER(ld) ||
       !NSLDAPI_VALID_LDAPMESSAGE_POINTER(res)) {
@@ -333,19 +333,19 @@ int LDAP_CALL ldap_parse_result(LDAP *ld
 
   return (err);
 }
 
 /*
  * returns an LDAP error code indicating success or failure of parsing
  * does NOT set any error information inside "ld"
  */
-int nsldapi_parse_result(LDAP *ld, int msgtype, BerElement *rber, int *errcodep,
-                         char **matchednp, char **errmsgp, char ***referralsp,
-                         LDAPControl ***serverctrlsp) {
+int nsldapi_parse_result(LDAP* ld, int msgtype, BerElement* rber, int* errcodep,
+                         char** matchednp, char** errmsgp, char*** referralsp,
+                         LDAPControl*** serverctrlsp) {
   BerElement ber;
   ber_len_t len;
   ber_int_t errcode;
   int berrc, err;
   char *m, *e;
 
   /*
    * Parse the result message.  LDAPv3 result messages look like this:
--- a/ldap/c-sdk/libraries/libldap/extendop.c
+++ b/ldap/c-sdk/libraries/libldap/extendop.c
@@ -44,21 +44,21 @@
  * Example:
  * struct berval exdata;
  * char *exoid;
  * int err, msgid;
  * ... fill in oid and data ...
  * err = ldap_extended_operation(ld, exoid, &exdata, NULL, NULL, &msgid);
  */
 
-int LDAP_CALL ldap_extended_operation(LDAP *ld, const char *exoid,
-                                      const struct berval *exdata,
-                                      LDAPControl **serverctrls,
-                                      LDAPControl **clientctrls, int *msgidp) {
-  BerElement *ber;
+int LDAP_CALL ldap_extended_operation(LDAP* ld, const char* exoid,
+                                      const struct berval* exdata,
+                                      LDAPControl** serverctrls,
+                                      LDAPControl** clientctrls, int* msgidp) {
+  BerElement* ber;
   int rc, msgid;
 
   /*
    * the ldapv3 extended operation request looks like this:
    *
    * ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
    *   requestName  LDAPOID,
    *   requestValue  OCTET STRING
@@ -145,31 +145,31 @@ int LDAP_CALL ldap_extended_operation(LD
  *
  * Example:
  * struct berval exdata, exretval;
  * char *exoid;
  * int rc;
  * ... fill in oid and data ...
  * rc = ldap_extended_operation_s(ld, exoid, &exdata, &exretval);
  */
-int LDAP_CALL ldap_extended_operation_s(LDAP *ld, const char *requestoid,
-                                        const struct berval *requestdata,
-                                        LDAPControl **serverctrls,
-                                        LDAPControl **clientctrls,
-                                        char **retoidp,
-                                        struct berval **retdatap) {
+int LDAP_CALL ldap_extended_operation_s(LDAP* ld, const char* requestoid,
+                                        const struct berval* requestdata,
+                                        LDAPControl** serverctrls,
+                                        LDAPControl** clientctrls,
+                                        char** retoidp,
+                                        struct berval** retdatap) {
   int err, msgid;
-  LDAPMessage *result;
+  LDAPMessage* result;
 
   if ((err = ldap_extended_operation(ld, requestoid, requestdata, serverctrls,
                                      clientctrls, &msgid)) != LDAP_SUCCESS) {
     return (err);
   }
 
-  if (ldap_result(ld, msgid, 1, (struct timeval *)0, &result) == -1) {
+  if (ldap_result(ld, msgid, 1, (struct timeval*)0, &result) == -1) {
     return (LDAP_GET_LDERRNO(ld, NULL, NULL));
   }
 
   if ((err = ldap_parse_extended_result(ld, result, retoidp, retdatap, 0)) !=
       LDAP_SUCCESS) {
     ldap_msgfree(result);
     return (err);
   }
@@ -177,24 +177,24 @@ int LDAP_CALL ldap_extended_operation_s(
   return (ldap_result2error(ld, result, 1));
 }
 
 /*
  * Pull the oid returned by the server and the data out of an extended
  * operation result.  Return an LDAP error code.
  */
 int LDAP_CALL ldap_parse_extended_result(
-    LDAP *ld, LDAPMessage *res, char **retoidp, /* may be NULL */
-    struct berval **retdatap,                   /* may be NULL */
+    LDAP* ld, LDAPMessage* res, char** retoidp, /* may be NULL */
+    struct berval** retdatap,                   /* may be NULL */
     int freeit) {
   struct berelement ber;
   ber_len_t len;
   ber_int_t err;
   char *m, *e, *roid;
-  struct berval *rdata;
+  struct berval* rdata;
 
   LDAPDebug(LDAP_DEBUG_TRACE, "ldap_parse_extended_result\n", 0, 0, 0);
 
   if (!NSLDAPI_VALID_LDAP_POINTER(ld)) {
     return (LDAP_PARAM_ERROR);
   }
 
   if (!NSLDAPI_VALID_LDAPMESSAGE_EXRESULT_POINTER(res)) {
--- a/ldap/c-sdk/libraries/libldap/free.c
+++ b/ldap/c-sdk/libraries/libldap/free.c
@@ -46,17 +46,17 @@
 #if 0
 #  ifndef lint
 static char copyright[] = "@(#) Copyright (c) 1994 The Regents of the University of Michigan.\nAll rights reserved.\n";
 #  endif
 #endif
 
 #include "ldap-int.h"
 
-void LDAP_CALL ldap_getfilter_free(LDAPFiltDesc *lfdp) {
+void LDAP_CALL ldap_getfilter_free(LDAPFiltDesc* lfdp) {
   LDAPFiltList *flp, *nextflp;
   LDAPFiltInfo *fip, *nextfip;
 
   if (lfdp == NULL) {
     return;
   }
 
   for (flp = lfdp->lfd_filtlist; flp != NULL; flp = nextflp) {
@@ -92,17 +92,17 @@ void LDAP_CALL ldap_getfilter_free(LDAPF
   NSLDAPI_FREE(lfdp);
 }
 
 /*
  * free a null-terminated array of pointers to mod structures. the
  * structures are freed, not the array itself, unless the freemods
  * flag is set.
  */
-void LDAP_CALL ldap_mods_free(LDAPMod **mods, int freemods) {
+void LDAP_CALL ldap_mods_free(LDAPMod** mods, int freemods) {
   int i;
 
   if (!NSLDAPI_VALID_LDAPMOD_ARRAY(mods)) {
     return;
   }
 
   for (i = 0; mods[i] != NULL; i++) {
     if (mods[i]->mod_op & LDAP_MOD_BVALUES) {
@@ -110,31 +110,31 @@ void LDAP_CALL ldap_mods_free(LDAPMod **
         ber_bvecfree(mods[i]->mod_bvalues);
       }
     } else if (mods[i]->mod_values != NULL) {
       ldap_value_free(mods[i]->mod_values);
     }
     if (mods[i]->mod_type != NULL) {
       NSLDAPI_FREE(mods[i]->mod_type);
     }
-    NSLDAPI_FREE((char *)mods[i]);
+    NSLDAPI_FREE((char*)mods[i]);
   }
 
-  if (freemods) NSLDAPI_FREE((char *)mods);
+  if (freemods) NSLDAPI_FREE((char*)mods);
 }
 
 /*
  * ldap_memfree() is needed to ensure that memory allocated by the C runtime
  * associated with libldap is freed by the same runtime code.
  */
-void LDAP_CALL ldap_memfree(void *s) {
+void LDAP_CALL ldap_memfree(void* s) {
   if (s != NULL) {
     NSLDAPI_FREE(s);
   }
 }
 
 /*
  * ldap_ber_free() is just a cover for ber_free()
  * ber_free() checks for ber == NULL, so we don't bother.
  */
-void LDAP_CALL ldap_ber_free(BerElement *ber, int freebuf) {
+void LDAP_CALL ldap_ber_free(BerElement* ber, int freebuf) {
   ber_free(ber, freebuf);
 }
--- a/ldap/c-sdk/libraries/libldap/freevalues.c
+++ b/ldap/c-sdk/libraries/libldap/freevalues.c
@@ -39,26 +39,26 @@
  *  All rights reserved.
  */
 /*
  *  freevalues.c
  */
 
 #include "ldap-int.h"
 
-void LDAP_CALL ldap_value_free(char **vals) {
+void LDAP_CALL ldap_value_free(char** vals) {
   int i;
 
   if (vals == NULL) return;
   for (i = 0; vals[i] != NULL; i++) NSLDAPI_FREE(vals[i]);
-  NSLDAPI_FREE((char *)vals);
+  NSLDAPI_FREE((char*)vals);
 }
 
-void LDAP_CALL ldap_value_free_len(struct berval **vals) {
+void LDAP_CALL ldap_value_free_len(struct berval** vals) {
   int i;
 
   if (vals == NULL) return;
   for (i = 0; vals[i] != NULL; i++) {
     NSLDAPI_FREE(vals[i]->bv_val);
     NSLDAPI_FREE(vals[i]);
   }
-  NSLDAPI_FREE((char *)vals);
+  NSLDAPI_FREE((char*)vals);
 }
--- a/ldap/c-sdk/libraries/libldap/friendly.c
+++ b/ldap/c-sdk/libraries/libldap/friendly.c
@@ -45,21 +45,21 @@
 #if 0
 #  ifndef lint
 static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n";
 #  endif
 #endif
 
 #include "ldap-int.h"
 
-char *LDAP_CALL ldap_friendly_name(char *filename, char *name,
-                                   FriendlyMap *map) {
+char* LDAP_CALL ldap_friendly_name(char* filename, char* name,
+                                   FriendlyMap* map) {
   int i, entries;
-  FILE *fp;
-  char *s;
+  FILE* fp;
+  char* s;
   char buf[BUFSIZ];
 
   if (map == NULL) {
     return (name);
   }
   if (NULL == name) {
     return (name);
   }
@@ -117,18 +117,18 @@ char *LDAP_CALL ldap_friendly_name(char 
 
   for (i = 0; (*map)[i].f_unfriendly != NULL; i++) {
     if (strcasecmp(name, (*map)[i].f_unfriendly) == 0)
       return ((*map)[i].f_friendly);
   }
   return (name);
 }
 
-void LDAP_CALL ldap_free_friendlymap(FriendlyMap *map) {
-  struct friendly *pF;
+void LDAP_CALL ldap_free_friendlymap(FriendlyMap* map) {
+  struct friendly* pF;
 
   if (map == NULL || *map == NULL) {
     return;
   }
 
   for (pF = *map; pF->f_unfriendly; pF++) {
     NSLDAPI_FREE(pF->f_unfriendly);
     NSLDAPI_FREE(pF->f_friendly);
--- a/ldap/c-sdk/libraries/libldap/getattr.c
+++ b/ldap/c-sdk/libraries/libldap/getattr.c
@@ -45,28 +45,28 @@
 #if 0
 #  ifndef lint
 static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
 #  endif
 #endif
 
 #include "ldap-int.h"
 
-static unsigned long bytes_remaining(BerElement *ber) {
+static unsigned long bytes_remaining(BerElement* ber) {
   ber_len_t len;
 
   if (ber_get_option(ber, LBER_OPT_REMAINING_BYTES, &len) != 0) {
     return (0); /* not sure what else to do.... */
   }
   return (len);
 }
 
-char *LDAP_CALL ldap_first_attribute(LDAP *ld, LDAPMessage *entry,
-                                     BerElement **ber) {
-  char *attr;
+char* LDAP_CALL ldap_first_attribute(LDAP* ld, LDAPMessage* entry,
+                                     BerElement** ber) {
+  char* attr;
   int err;
   ber_len_t seqlength;
 
   LDAPDebug(LDAP_DEBUG_TRACE, "ldap_first_attribute\n", 0, 0, 0);
 
   if (!NSLDAPI_VALID_LDAP_POINTER(ld)) {
     return (NULL); /* punt */
   }
@@ -106,19 +106,19 @@ char *LDAP_CALL ldap_first_attribute(LDA
   if (attr == NULL || err != LDAP_SUCCESS) {
     ber_free(*ber, 0);
     *ber = NULL;
   }
   return (attr);
 }
 
 /* ARGSUSED */
-char *LDAP_CALL ldap_next_attribute(LDAP *ld, LDAPMessage *entry,
-                                    BerElement *ber) {
-  char *attr;
+char* LDAP_CALL ldap_next_attribute(LDAP* ld, LDAPMessage* entry,
+                                    BerElement* ber) {
+  char* attr;
   int err;
 
   LDAPDebug(LDAP_DEBUG_TRACE, "ldap_next_attribute\n", 0, 0, 0);
 
   if (!NSLDAPI_VALID_LDAP_POINTER(ld)) {
     return (NULL); /* punt */
   }
 
--- a/ldap/c-sdk/libraries/libldap/getdn.c
+++ b/ldap/c-sdk/libraries/libldap/getdn.c
@@ -45,18 +45,18 @@
 #if 0
 #  ifndef lint
 static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
 #  endif
 #endif
 
 #include "ldap-int.h"
 
-char *LDAP_CALL ldap_get_dn(LDAP *ld, LDAPMessage *entry) {
-  char *dn;
+char* LDAP_CALL ldap_get_dn(LDAP* ld, LDAPMessage* entry) {
+  char* dn;
   struct berelement tmp;
 
   LDAPDebug(LDAP_DEBUG_TRACE, "ldap_get_dn\n", 0, 0, 0);
 
   if (!NSLDAPI_VALID_LDAP_POINTER(ld)) {
     return (NULL); /* punt */
   }
 
@@ -69,29 +69,29 @@ char *LDAP_CALL ldap_get_dn(LDAP *ld, LD
   if (ber_scanf(&tmp, "{a", &dn) == LBER_ERROR) {
     LDAP_SET_LDERRNO(ld, LDAP_DECODING_ERROR, NULL, NULL);
     return (NULL);
   }
 
   return (dn);
 }
 
-char *LDAP_CALL ldap_dn2ufn(const char *dn) {
+char* LDAP_CALL ldap_dn2ufn(const char* dn) {
   char *p, *ufn, *r;
   size_t plen;
   int state;
 
   LDAPDebug(LDAP_DEBUG_TRACE, "ldap_dn2ufn\n", 0, 0, 0);
 
   if (dn == NULL) {
     dn = "";
   }
 
   if (ldap_is_dns_dn(dn) || (p = strchr(dn, '=')) == NULL)
-    return (nsldapi_strdup((char *)dn));
+    return (nsldapi_strdup((char*)dn));
 
   ufn = nsldapi_strdup(++p);
 
 #define INQUOTE 1
 #define OUTQUOTE 2
   state = OUTQUOTE;
   for (p = ufn, r = ufn; *p; p += plen) {
     plen = 1;
@@ -117,17 +117,17 @@ char *LDAP_CALL ldap_dn2ufn(const char *
           *r++ = ',';
         else
           *r++ = *p;
         break;
       case '=':
         if (state == INQUOTE)
           *r++ = *p;
         else {
-          char *rsave = r;
+          char* rsave = r;
           LDAP_UTF8DEC(r);
           *rsave = '\0';
           while (!ldap_utf8isspace(r) && *r != ';' && *r != ',' && r > ufn)
             LDAP_UTF8DEC(r);
           LDAP_UTF8INC(r);
 
           if (strcasecmp(r, "c") && strcasecmp(r, "o") && strcasecmp(r, "ou") &&
               strcasecmp(r, "st") && strcasecmp(r, "l") &&
@@ -143,57 +143,57 @@ char *LDAP_CALL ldap_dn2ufn(const char *
         break;
     }
   }
   *r = '\0';
 
   return (ufn);
 }
 
-char **LDAP_CALL ldap_explode_dns(const char *dn) {
+char** LDAP_CALL ldap_explode_dns(const char* dn) {
   int ncomps, maxcomps;
   char *s, *cpydn;
-  char **rdns;
+  char** rdns;
 #ifdef HAVE_STRTOK_R /* defined in portable.h */
-  char *lasts;
+  char* lasts;
 #endif
 
   if (dn == NULL) {
     dn = "";
   }
 
-  if ((rdns = (char **)NSLDAPI_MALLOC(8 * sizeof(char *))) == NULL) {
+  if ((rdns = (char**)NSLDAPI_MALLOC(8 * sizeof(char*))) == NULL) {
     return (NULL);
   }
 
   maxcomps = 8;
   ncomps = 0;
-  cpydn = nsldapi_strdup((char *)dn);
+  cpydn = nsldapi_strdup((char*)dn);
   for (s = STRTOK(cpydn, "@.", &lasts); s != NULL;
        s = STRTOK(NULL, "@.", &lasts)) {
     if (ncomps == maxcomps) {
       maxcomps *= 2;
-      if ((rdns = (char **)NSLDAPI_REALLOC(rdns, maxcomps * sizeof(char *))) ==
+      if ((rdns = (char**)NSLDAPI_REALLOC(rdns, maxcomps * sizeof(char*))) ==
           NULL) {
         NSLDAPI_FREE(cpydn);
         return (NULL);
       }
     }
     rdns[ncomps++] = nsldapi_strdup(s);
   }
   rdns[ncomps] = NULL;
   NSLDAPI_FREE(cpydn);
 
   return (rdns);
 }
 
 #define LDAP_DN 1
 #define LDAP_RDN 2
 
-static char **ldap_explode(const char *dn, const int notypes,
+static char** ldap_explode(const char* dn, const int notypes,
                            const int nametype) {
   char *p, *q, *rdnstart, **rdns = NULL;
   size_t plen = 0;
   int state = 0;
   int count = 0;
   int startquote = 0;
   int endquote = 0;
   int len = 0;
@@ -206,21 +206,21 @@ static char **ldap_explode(const char *d
   }
 
 #if 0
   if (ldap_is_dns_dn(dn)) {
     return(ldap_explode_dns(dn));
   }
 #endif
 
-  while (ldap_utf8isspace((char *)dn)) { /* ignore leading spaces */
+  while (ldap_utf8isspace((char*)dn)) { /* ignore leading spaces */
     ++dn;
   }
 
-  p = rdnstart = (char *)dn;
+  p = rdnstart = (char*)dn;
   state = OUTQUOTE;
 
   do {
     p += plen;
     plen = 1;
     switch (*p) {
       case '\\':
         if (*++p == '\0')
@@ -253,21 +253,21 @@ static char **ldap_explode(const char *d
              * to <attr>=<value>,<string>,<attr>=<value>
              * This is not a valid dn */
             ldap_charray_free(rdns);
             return NULL;
           }
           goteq = 0;
           ++count;
           if (rdns == NULL) {
-            if ((rdns = (char **)NSLDAPI_MALLOC(8 * sizeof(char *))) == NULL)
+            if ((rdns = (char**)NSLDAPI_MALLOC(8 * sizeof(char*))) == NULL)
               return (NULL);
           } else if (count >= 8) {
-            if ((rdns = (char **)NSLDAPI_REALLOC(
-                     rdns, (count + 1) * sizeof(char *))) == NULL)
+            if ((rdns = (char**)NSLDAPI_REALLOC(
+                     rdns, (count + 1) * sizeof(char*))) == NULL)
               return (NULL);
           }
           rdns[count] = NULL;
           endquote = 0;
           if (notypes) {
             for (q = rdnstart; q < p && *q != '='; ++q) {
               ;
             }
@@ -281,17 +281,17 @@ static char **ldap_explode(const char *d
 
             if ((*(p - 1) == '"') && startquote) {
               endquote = 1;
               --p;
             }
           }
 
           len = p - rdnstart;
-          if ((rdns[count - 1] = (char *)NSLDAPI_CALLOC(1, len + 1)) != NULL) {
+          if ((rdns[count - 1] = (char*)NSLDAPI_CALLOC(1, len + 1)) != NULL) {
             SAFEMEMCPY(rdns[count - 1], rdnstart, len);
             if (!endquote) {
               /* trim trailing spaces unless
                * they are properly escaped */
               while (len > 0 && ldap_utf8isspace(&rdns[count - 1][len - 1]) &&
                      ((len == 1) || (rdns[count - 1][len - 2] != '\\'))) {
                 --len;
               }
@@ -319,20 +319,20 @@ static char **ldap_explode(const char *d
         plen = LDAP_UTF8LEN(p);
         break;
     }
   } while (*p);
 
   return (rdns);
 }
 
-char **LDAP_CALL ldap_explode_dn(const char *dn, const int notypes) {
+char** LDAP_CALL ldap_explode_dn(const char* dn, const int notypes) {
   return (ldap_explode(dn, notypes, LDAP_DN));
 }
 
-char **LDAP_CALL ldap_explode_rdn(const char *rdn, const int notypes) {
+char** LDAP_CALL ldap_explode_rdn(const char* rdn, const int notypes) {
   return (ldap_explode(rdn, notypes, LDAP_RDN));
 }
 
-int LDAP_CALL ldap_is_dns_dn(const char *dn) {
+int LDAP_CALL ldap_is_dns_dn(const char* dn) {
   return (dn != NULL && dn[0] != '\0' && strchr(dn, '=') == NULL &&
           strchr(dn, ',') == NULL);
 }
--- a/ldap/c-sdk/libraries/libldap/getdxbyname.c
+++ b/ldap/c-sdk/libraries/libldap/getdxbyname.c
@@ -74,75 +74,75 @@ XXX not MT - safe XXX
 #  include "ldap-int.h"
 
 #  if defined(DOS)
 #    include "msdos.h"
 #  endif /* DOS */
 
 #  ifdef NEEDPROTOS
                  static char *
-                 *decode_answer(unsigned char *answer, int len);
+                 *decode_answer(unsigned char* answer, int len);
 #  else  /* NEEDPROTOS */
                  static char *
                  *decode_answer();
 #  endif /* NEEDPROTOS */
 
 extern int h_errno;
-extern char *h_errlist[];
+extern char* h_errlist[];
 
 #  define MAX_TO_SORT 32
 
 /*
  * nsldapi_getdxbyname - lookup DNS DX records for domain and return an ordered
  * array.
  */
-char **nsldapi_getdxbyname(char *domain) {
+char** nsldapi_getdxbyname(char* domain) {
   unsigned char buf[PACKETSZ];
-  char **dxs;
+  char** dxs;
   int rc;
 
   LDAPDebug(LDAP_DEBUG_TRACE, "nsldapi_getdxbyname( %s )\n", domain, 0, 0);
 
   memset(buf, 0, sizeof(buf));
 
   /* XXX not MT safe XXX */
   if ((rc = res_search(domain, C_IN, T_TXT, buf, sizeof(buf))) < 0 ||
       (rc > sizeof(buf)) || (dxs = decode_answer(buf, rc)) == NULL) {
     /*
      * punt:  return list consisting of the original domain name only
      */
-    if ((dxs = (char **)NSLDAPI_MALLOC(2 * sizeof(char *))) == NULL ||
+    if ((dxs = (char**)NSLDAPI_MALLOC(2 * sizeof(char*))) == NULL ||
         (dxs[0] = nsldapi_strdup(domain)) == NULL) {
       if (dxs != NULL) {
         NSLDAPI_FREE(dxs);
       }
       dxs = NULL;
     } else {
       dxs[1] = NULL;
     }
   }
 
   return (dxs);
 }
 
-static char **decode_answer(unsigned char *answer, int len) {
-  HEADER *hp;
+static char** decode_answer(unsigned char* answer, int len) {
+  HEADER* hp;
   char buf[256], **dxs;
   unsigned char *eom, *p;
   int ancount, err, rc, type, class, dx_count, rr_len;
   int dx_pref[MAX_TO_SORT];
 
 #  ifdef LDAP_DEBUG
   if (ldap_debug & LDAP_DEBUG_PACKETS) {
     /* __p_query(answer);  */
   }
 #  endif /* LDAP_DEBUG */
 
   dxs = NULL;
-  hp = (HEADER *)answer;
+  hp = (HEADER*)answer;
   eom = answer + len;
 
   if (len < sizeof(*hp)) {
     h_errno = NO_RECOVERY;
     return (NULL);
   }
 
   if (ntohs(hp->qdcount) != 1) {
@@ -190,18 +190,18 @@ static char **decode_answer(unsigned cha
     if (p + rr_len > eom) {
       err = NO_RECOVERY;
       continue;
     }
     if (class == C_IN && type == T_TXT) {
       int i, n, pref, txt_len;
       char *q, *r;
 
-      q = (char *)p;
-      while (q < (char *)p + rr_len && err == 0) {
+      q = (char*)p;
+      while (q < (char*)p + rr_len && err == 0) {
         if (*q >= 3 && strncasecmp(q + 1, "dx:", 3) == 0) {
           txt_len = *q - 3;
           r = q + 4;
           while (isspace(*r)) {
             ++r;
             --txt_len;
           }
           pref = 0;
@@ -214,23 +214,22 @@ static char **decode_answer(unsigned cha
           if (dx_count < MAX_TO_SORT - 1) {
             dx_pref[dx_count] = pref;
           }
           while (isspace(*r)) {
             ++r;
             --txt_len;
           }
           if (dx_count == 0) {
-            dxs = (char **)NSLDAPI_MALLOC(2 * sizeof(char *));
+            dxs = (char**)NSLDAPI_MALLOC(2 * sizeof(char*));
           } else {
-            dxs =
-                (char **)NSLDAPI_REALLOC(dxs, (dx_count + 2) * sizeof(char *));
+            dxs = (char**)NSLDAPI_REALLOC(dxs, (dx_count + 2) * sizeof(char*));
           }
-          if (dxs == NULL || (dxs[dx_count] = (char *)NSLDAPI_CALLOC(
-                                  1, txt_len + 1)) == NULL) {
+          if (dxs == NULL ||
+              (dxs[dx_count] = (char*)NSLDAPI_CALLOC(1, txt_len + 1)) == NULL) {
             err = NO_RECOVERY;
             continue;
           }
           SAFEMEMCPY(dxs[dx_count], r, txt_len);
           dxs[++dx_count] = NULL;
         }
         q += (*q + 1); /* move past last TXT record */
       }
@@ -241,17 +240,17 @@ static char **decode_answer(unsigned cha
   if (err == 0) {
     if (dx_count == 0) {
       err = NO_DATA;
     } else {
       /*
        * sort records based on associated preference value
        */
       int i, j, sort_count, tmp_pref;
-      char *tmp_dx;
+      char* tmp_dx;
 
       sort_count = (dx_count < MAX_TO_SORT) ? dx_count : MAX_TO_SORT;
       for (i = 0; i < sort_count; ++i) {
         for (j = i + 1; j < sort_count; ++j) {
           if (dx_pref[i] > dx_pref[j]) {
             tmp_pref = dx_pref[i];
             dx_pref[i] = dx_pref[j];
             dx_pref[j] = tmp_pref;
--- a/ldap/c-sdk/libraries/libldap/geteffectiverightsctrl.c
+++ b/ldap/c-sdk/libraries/libldap/geteffectiverightsctrl.c
@@ -55,22 +55,22 @@
    ctl_iscritical  Indicates whether the control is critical of not. If
                    this field is non-zero, the operation will only be car-
                    ried out if the control is recognized by the server
                    and/or client
 
    ctrlp           the address of a place to put the constructed control
 */
 
-int LDAP_CALL ldap_create_geteffectiveRights_control(LDAP *ld,
-                                                     const char *authzid,
-                                                     const char **attrlist,
+int LDAP_CALL ldap_create_geteffectiveRights_control(LDAP* ld,
+                                                     const char* authzid,
+                                                     const char** attrlist,
                                                      const char ctl_iscritical,
-                                                     LDAPControl **ctrlp) {
-  BerElement *ber;
+                                                     LDAPControl** ctrlp) {
+  BerElement* ber;
   int rc;
 
   if (!NSLDAPI_VALID_LDAP_POINTER(ld)) {
     return (LDAP_PARAM_ERROR);
   }
 
   if (ctrlp == NULL) {
     LDAP_SET_LDERRNO(ld, LDAP_PARAM_ERROR, NULL, NULL);
--- a/ldap/c-sdk/libraries/libldap/getentry.c
+++ b/ldap/c-sdk/libraries/libldap/getentry.c
@@ -45,60 +45,60 @@
 #if 0
 #  ifndef lint
 static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
 #  endif
 #endif
 
 #include "ldap-int.h"
 
-LDAPMessage *LDAP_CALL ldap_first_entry(LDAP *ld, LDAPMessage *chain) {
+LDAPMessage* LDAP_CALL ldap_first_entry(LDAP* ld, LDAPMessage* chain) {
   if (!NSLDAPI_VALID_LDAP_POINTER(ld) || chain == NULLMSG) {
     return (NULLMSG);
   }
 
   if (chain->lm_msgtype == LDAP_RES_SEARCH_ENTRY) {
     return (chain);
   }
 
   return (ldap_next_entry(ld, chain));
 }
 
-LDAPMessage *LDAP_CALL ldap_next_entry(LDAP *ld, LDAPMessage *entry) {
+LDAPMessage* LDAP_CALL ldap_next_entry(LDAP* ld, LDAPMessage* entry) {
   if (!NSLDAPI_VALID_LDAP_POINTER(ld) || entry == NULLMSG) {
     return (NULLMSG);
   }
 
   for (entry = entry->lm_chain; entry != NULLMSG; entry = entry->lm_chain) {
     if (entry->lm_msgtype == LDAP_RES_SEARCH_ENTRY) {
       return (entry);
     }
   }
 
   return (NULLMSG);
 }
 
-int LDAP_CALL ldap_count_entries(LDAP *ld, LDAPMessage *chain) {
+int LDAP_CALL ldap_count_entries(LDAP* ld, LDAPMessage* chain) {
   int i;
 
   if (!NSLDAPI_VALID_LDAP_POINTER(ld)) {
     return (-1);
   }
 
   for (i = 0; chain != NULL; chain = chain->lm_chain) {
     if (chain->lm_msgtype == LDAP_RES_SEARCH_ENTRY) {
       ++i;
     }
   }
 
   return (i);
 }
 
-int LDAP_CALL ldap_get_entry_controls(LDAP *ld, LDAPMessage *entry,
-                                      LDAPControl ***serverctrlsp) {
+int LDAP_CALL ldap_get_entry_controls(LDAP* ld, LDAPMessage* entry,
+                                      LDAPControl*** serverctrlsp) {
   int rc;
   BerElement tmpber;
 
   LDAPDebug(LDAP_DEBUG_TRACE, "ldap_get_entry_controls\n", 0, 0, 0);
 
   if (!NSLDAPI_VALID_LDAP_POINTER(ld)) {
     return (LDAP_PARAM_ERROR);
   }
--- a/ldap/c-sdk/libraries/libldap/getfilter.c
+++ b/ldap/c-sdk/libraries/libldap/getfilter.c
@@ -46,30 +46,30 @@
 #  ifndef lint
 static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n";
 #  endif
 #endif
 
 #include "ldap-int.h"
 #include "regex.h"
 
-static int break_into_words(char *str, char *delims, char ***wordsp);
+static int break_into_words(char* str, char* delims, char*** wordsp);
 
 #if !defined(macintosh) && !defined(DOS)
-extern char *LDAP_CALL re_comp();
+extern char* LDAP_CALL re_comp();
 #endif
 
 #define FILT_MAX_LINE_LEN 1024
 
-LDAPFiltDesc *LDAP_CALL ldap_init_getfilter(char *fname) {
-  FILE *fp;
-  char *buf;
+LDAPFiltDesc* LDAP_CALL ldap_init_getfilter(char* fname) {
+  FILE* fp;
+  char* buf;
   long rlen, len;
   int eof;
-  LDAPFiltDesc *lfdp;
+  LDAPFiltDesc* lfdp;
 
   if ((fp = NSLDAPI_FOPEN(fname, "r")) == NULL) {
     return (NULL);
   }
 
   if (fseek(fp, 0L, SEEK_END) != 0) { /* move to end to get len */
     fclose(fp);
     return (NULL);
@@ -97,26 +97,25 @@ LDAPFiltDesc *LDAP_CALL ldap_init_getfil
   }
 
   lfdp = ldap_init_getfilter_buf(buf, rlen);
   NSLDAPI_FREE(buf);
 
   return (lfdp);
 }
 
-LDAPFiltDesc *LDAP_CALL ldap_init_getfilter_buf(char *buf, long buflen) {
-  LDAPFiltDesc *lfdp;
+LDAPFiltDesc* LDAP_CALL ldap_init_getfilter_buf(char* buf, long buflen) {
+  LDAPFiltDesc* lfdp;
   LDAPFiltList *flp, *nextflp;
   LDAPFiltInfo *fip, *nextfip;
   char *errmsg, *tag, **tok;
   int tokcnt, i;
 
   if ((buf == NULL) || (buflen < 0) ||
-      (lfdp = (LDAPFiltDesc *)NSLDAPI_CALLOC(1, sizeof(LDAPFiltDesc))) ==
-          NULL) {
+      (lfdp = (LDAPFiltDesc*)NSLDAPI_CALLOC(1, sizeof(LDAPFiltDesc))) == NULL) {
     return (NULL);
   }
 
   flp = nextflp = NULL;
   fip = NULL;
   tag = NULL;
 
   while (buflen > 0 &&
@@ -126,17 +125,17 @@ LDAPFiltDesc *LDAP_CALL ldap_init_getfil
         if (tag != NULL) {
           NSLDAPI_FREE(tag);
         }
         tag = tok[0];
         NSLDAPI_FREE(tok);
         break;
       case 4:
       case 5: /* start of filter info. list */
-        if ((nextflp = (LDAPFiltList *)NSLDAPI_CALLOC(
+        if ((nextflp = (LDAPFiltList*)NSLDAPI_CALLOC(
                  1, sizeof(LDAPFiltList))) == NULL) {
           ldap_getfilter_free(lfdp);
           return (NULL);
         }
         nextflp->lfl_tag = nsldapi_strdup(tag);
         nextflp->lfl_pattern = tok[0];
         if ((errmsg = re_comp(nextflp->lfl_pattern)) != NULL) {
           char msg[512];
@@ -161,17 +160,17 @@ LDAPFiltDesc *LDAP_CALL ldap_init_getfil
         for (i = 2; i < 5; ++i) {
           tok[i - 2] = tok[i];
         }
         /* fall through */
 
       case 2:
       case 3:                  /* filter, desc, and optional search scope */
         if (nextflp != NULL) { /* add to info list */
-          if ((nextfip = (LDAPFiltInfo *)NSLDAPI_CALLOC(
+          if ((nextfip = (LDAPFiltInfo*)NSLDAPI_CALLOC(
                    1, sizeof(LDAPFiltInfo))) == NULL) {
             ldap_getfilter_free(lfdp);
             nsldapi_free_strarray(tok);
             return (NULL);
           }
           if (fip == NULL) { /* first one */
             nextflp->lfl_ilist = nextfip;
           } else {
@@ -213,18 +212,18 @@ LDAPFiltDesc *LDAP_CALL ldap_init_getfil
 
   if (tag != NULL) {
     NSLDAPI_FREE(tag);
   }
 
   return (lfdp);
 }
 
-int LDAP_CALL ldap_set_filter_additions(LDAPFiltDesc *lfdp, char *prefix,
-                                        char *suffix) {
+int LDAP_CALL ldap_set_filter_additions(LDAPFiltDesc* lfdp, char* prefix,
+                                        char* suffix) {
   if (lfdp == NULL) {
     return (LDAP_PARAM_ERROR);
   }
 
   if (lfdp->lfd_filtprefix != NULL) {
     NSLDAPI_FREE(lfdp->lfd_filtprefix);
   }
   lfdp->lfd_filtprefix = (prefix == NULL) ? NULL : nsldapi_strdup(prefix);
@@ -235,24 +234,24 @@ int LDAP_CALL ldap_set_filter_additions(
   lfdp->lfd_filtsuffix = (suffix == NULL) ? NULL : nsldapi_strdup(suffix);
 
   return (LDAP_SUCCESS);
 }
 
 /*
  * ldap_setfilteraffixes() is deprecated -- use ldap_set_filter_additions()
  */
-void LDAP_CALL ldap_setfilteraffixes(LDAPFiltDesc *lfdp, char *prefix,
-                                     char *suffix) {
+void LDAP_CALL ldap_setfilteraffixes(LDAPFiltDesc* lfdp, char* prefix,
+                                     char* suffix) {
   (void)ldap_set_filter_additions(lfdp, prefix, suffix);
 }
 
-LDAPFiltInfo *LDAP_CALL ldap_getfirstfilter(LDAPFiltDesc *lfdp, char *tagpat,
-                                            char *value) {
-  LDAPFiltList *flp;
+LDAPFiltInfo* LDAP_CALL ldap_getfirstfilter(LDAPFiltDesc* lfdp, char* tagpat,
+                                            char* value) {
+  LDAPFiltList* flp;
 
   if (lfdp == NULL || tagpat == NULL || value == NULL) {
     return (NULL); /* punt */
   }
 
   if (lfdp->lfd_curvalcopy != NULL) {
     NSLDAPI_FREE(lfdp->lfd_curvalcopy);
     NSLDAPI_FREE(lfdp->lfd_curvalwords);
@@ -286,18 +285,18 @@ LDAPFiltInfo *LDAP_CALL ldap_getfirstfil
     NSLDAPI_FREE(lfdp->lfd_curvalcopy);
     lfdp->lfd_curvalcopy = NULL;
     return (NULL);
   }
 
   return (ldap_getnextfilter(lfdp));
 }
 
-LDAPFiltInfo *LDAP_CALL ldap_getnextfilter(LDAPFiltDesc *lfdp) {
-  LDAPFiltInfo *fip;
+LDAPFiltInfo* LDAP_CALL ldap_getnextfilter(LDAPFiltDesc* lfdp) {
+  LDAPFiltInfo* fip;
 
   if (lfdp == NULL || (fip = lfdp->lfd_curfip) == NULL) {
     return (NULL);
   }
 
   lfdp->lfd_curfip = fip->lfi_next;
 
   ldap_build_filter(lfdp->lfd_filter, LDAP_FILT_MAXSIZ, fip->lfi_filter,
@@ -306,31 +305,31 @@ LDAPFiltInfo *LDAP_CALL ldap_getnextfilt
   lfdp->lfd_retfi.lfi_filter = lfdp->lfd_filter;
   lfdp->lfd_retfi.lfi_desc = fip->lfi_desc;
   lfdp->lfd_retfi.lfi_scope = fip->lfi_scope;
   lfdp->lfd_retfi.lfi_isexact = fip->lfi_isexact;
 
   return (&lfdp->lfd_retfi);
 }
 
-static char *filter_add_strn(char *f, char *flimit, char *v, size_t vlen)
+static char* filter_add_strn(char* f, char* flimit, char* v, size_t vlen)
 /* Copy v into f.  If flimit is too small, return NULL;
  * otherwise return (f + vlen).
  */
 {
   auto size_t flen = flimit - f;
   if (vlen > flen) { /* flimit is too small */
     if (flen > 0) SAFEMEMCPY(f, v, flen);
     return NULL;
   }
   if (vlen > 0) SAFEMEMCPY(f, v, vlen);
   return f + vlen;
 }
 
-static char *filter_add_value(char *f, char *flimit, char *v, int escape_all)
+static char* filter_add_value(char* f, char* flimit, char* v, int escape_all)
 /* Copy v into f, but with parentheses escaped.  But only escape * and \
  * if escape_all is non-zero so that either "*" or "\2a" can be used in
  * v, with different meanings.
  * If flimit is too small, return NULL; otherwise
  * return (f + the number of bytes copied).
  */
 {
   auto char x[4];
@@ -377,19 +376,19 @@ static char *filter_add_value(char *f, c
           f = NULL; /* overflow */
         }
         break;
     }
   }
   return f;
 }
 
-int LDAP_CALL ldap_create_filter(char *filtbuf, unsigned long buflen,
-                                 char *pattern, char *prefix, char *suffix,
-                                 char *attr, char *value, char **valwords) {
+int LDAP_CALL ldap_create_filter(char* filtbuf, unsigned long buflen,
+                                 char* pattern, char* prefix, char* suffix,
+                                 char* attr, char* value, char** valwords) {
   char *p, *f, *flimit;
   int i, wordcount, wordnum, endwordnum, escape_all;
 
   /*
    * there is some confusion on what to create for a filter if
    * attr or value are null pointers.  For now we just leave them
    * as TO BE DEALT with
    */
@@ -478,38 +477,38 @@ int LDAP_CALL ldap_create_filter(char *f
   }
   *f = '\0';
   return (LDAP_SUCCESS);
 }
 
 /*
  * ldap_build_filter() is deprecated -- use ldap_create_filter() instead
  */
-void LDAP_CALL ldap_build_filter(char *filtbuf, unsigned long buflen,
-                                 char *pattern, char *prefix, char *suffix,
-                                 char *attr, char *value, char **valwords) {
+void LDAP_CALL ldap_build_filter(char* filtbuf, unsigned long buflen,
+                                 char* pattern, char* prefix, char* suffix,
+                                 char* attr, char* value, char** valwords) {
   (void)ldap_create_filter(filtbuf, buflen, pattern, prefix, suffix, attr,
                            value, valwords);
 }
 
-static int break_into_words(char *str, char *delims, char ***wordsp) {
+static int break_into_words(char* str, char* delims, char*** wordsp) {
   char *word, **words;
   int count;
-  char *lasts;
+  char* lasts;
 
-  if ((words = (char **)NSLDAPI_CALLOC(1, sizeof(char *))) == NULL) {
+  if ((words = (char**)NSLDAPI_CALLOC(1, sizeof(char*))) == NULL) {
     return (-1);
   }
   count = 0;
   words[count] = NULL;
 
   word = ldap_utf8strtok_r(str, delims, &lasts);
   while (word != NULL) {
-    if ((words = (char **)NSLDAPI_REALLOC(
-             words, (count + 2) * sizeof(char *))) == NULL) {
+    if ((words = (char**)NSLDAPI_REALLOC(words, (count + 2) * sizeof(char*))) ==
+        NULL) {
       return (-1);
     }
 
     words[count] = word;
     words[++count] = NULL;
     word = ldap_utf8strtok_r(NULL, delims, &lasts);
   }
 
--- a/ldap/c-sdk/libraries/libldap/getoption.c
+++ b/ldap/c-sdk/libraries/libldap/getoption.c
@@ -33,20 +33,20 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 #include "ldap-int.h"
 
 #define LDAP_GET_BITOPT(ld, bit) ((ld)->ld_options & bit) != 0 ? 1 : 0
 
-static int nsldapi_get_api_info(LDAPAPIInfo *aip);
-static int nsldapi_get_feature_info(LDAPAPIFeatureInfo *fip);
+static int nsldapi_get_api_info(LDAPAPIInfo* aip);
+static int nsldapi_get_feature_info(LDAPAPIFeatureInfo* fip);
 
-int LDAP_CALL ldap_get_option(LDAP *ld, int option, void *optdata) {
+int LDAP_CALL ldap_get_option(LDAP* ld, int option, void* optdata) {
   int rc = 0;
 
   if (!nsldapi_initialized) {
     nsldapi_initialize_defaults();
   }
 
   /*
    * optdata MUST be a valid pointer...
@@ -54,36 +54,36 @@ int LDAP_CALL ldap_get_option(LDAP *ld, 
   if (NULL == optdata) {
     return (LDAP_PARAM_ERROR);
   }
   /*
    * process global options (not associated with an LDAP session handle)
    */
   if (option == LDAP_OPT_MEMALLOC_FN_PTRS) {
     /* struct copy */
-    *((struct ldap_memalloc_fns *)optdata) = nsldapi_memalloc_fns;
+    *((struct ldap_memalloc_fns*)optdata) = nsldapi_memalloc_fns;
     return (0);
   }
 
   if (option == LDAP_OPT_API_INFO) {
-    rc = nsldapi_get_api_info((LDAPAPIInfo *)optdata);
+    rc = nsldapi_get_api_info((LDAPAPIInfo*)optdata);
     if (rc != LDAP_SUCCESS) {
       if (ld != NULL) {
         LDAP_SET_LDERRNO(ld, rc, NULL, NULL);
       }
       return (-1);
     }
     return (0);
   }
   /*
    * LDAP_OPT_DEBUG_LEVEL is global
    */
   if (LDAP_OPT_DEBUG_LEVEL == option) {
 #ifdef LDAP_DEBUG
-    *((int *)optdata) = ldap_debug;
+    *((int*)optdata) = ldap_debug;
 #endif /* LDAP_DEBUG */
     return (0);
   }
 
   /*
    * if ld is NULL, arrange to return options from our default settings
    */
   if (ld == NULL) {
@@ -93,128 +93,128 @@ int LDAP_CALL ldap_get_option(LDAP *ld, 
   if (!NSLDAPI_VALID_LDAP_POINTER(ld)) {
     return (-1); /* punt */
   }
 
   if (ld != &nsldapi_ld_defaults) LDAP_MUTEX_LOCK(ld, LDAP_OPTION_LOCK);
   switch (option) {
 #ifdef LDAP_DNS
     case LDAP_OPT_DNS:
-      *((int *)optdata) = LDAP_GET_BITOPT(ld, LDAP_BITOPT_DNS);
+      *((int*)optdata) = LDAP_GET_BITOPT(ld, LDAP_BITOPT_DNS);
       break;
 #endif
 
     case LDAP_OPT_REFERRALS:
-      *((int *)optdata) = LDAP_GET_BITOPT(ld, LDAP_BITOPT_REFERRALS);
+      *((int*)optdata) = LDAP_GET_BITOPT(ld, LDAP_BITOPT_REFERRALS);
       break;
 
     case LDAP_OPT_SSL:
-      *((int *)optdata) = LDAP_GET_BITOPT(ld, LDAP_BITOPT_SSL);
+      *((int*)optdata) = LDAP_GET_BITOPT(ld, LDAP_BITOPT_SSL);
       break;
 
     case LDAP_OPT_RESTART:
-      *((int *)optdata) = LDAP_GET_BITOPT(ld, LDAP_BITOPT_RESTART);
+      *((int*)optdata) = LDAP_GET_BITOPT(ld, LDAP_BITOPT_RESTART);
       break;
 
     case LDAP_OPT_RECONNECT:
-      *((int *)optdata) = LDAP_GET_BITOPT(ld, LDAP_BITOPT_RECONNECT);
+      *((int*)optdata) = LDAP_GET_BITOPT(ld, LDAP_BITOPT_RECONNECT);
       break;
 
     case LDAP_OPT_NOREBIND:
-      *((int *)optdata) = LDAP_GET_BITOPT(ld, LDAP_BITOPT_NOREBIND);
+      *((int*)optdata) = LDAP_GET_BITOPT(ld, LDAP_BITOPT_NOREBIND);
       break;
 
 #ifdef LDAP_ASYNC_IO
     case LDAP_OPT_ASYNC_CONNECT:
-      *((int *)optdata) = LDAP_GET_BITOPT(ld, LDAP_BITOPT_ASYNC);
+      *((int*)optdata) = LDAP_GET_BITOPT(ld, LDAP_BITOPT_ASYNC);
       break;
 #endif /* LDAP_ASYNC_IO */
 
     /* stuff in the sockbuf */
     case LDAP_X_OPT_SOCKBUF:
-      *((Sockbuf **)optdata) = ld->ld_sbp;
+      *((Sockbuf**)optdata) = ld->ld_sbp;
       break;
 
     case LDAP_OPT_DESC:
       if (ber_sockbuf_get_option(ld->ld_sbp, LBER_SOCKBUF_OPT_DESC, optdata) !=
           0) {
         LDAP_SET_LDERRNO(ld, LDAP_LOCAL_ERROR, NULL, NULL);
         rc = -1;
       }
       break;
 
     /* fields in the LDAP structure */
     case LDAP_OPT_DEREF:
-      *((int *)optdata) = ld->ld_deref;
+      *((int*)optdata) = ld->ld_deref;
       break;
     case LDAP_OPT_SIZELIMIT:
-      *((int *)optdata) = ld->ld_sizelimit;
+      *((int*)optdata) = ld->ld_sizelimit;
       break;
     case LDAP_OPT_TIMELIMIT:
-      *((int *)optdata) = ld->ld_timelimit;
+      *((int*)optdata) = ld->ld_timelimit;
       break;
     case LDAP_OPT_REFERRAL_HOP_LIMIT:
-      *((int *)optdata) = ld->ld_refhoplimit;
+      *((int*)optdata) = ld->ld_refhoplimit;
       break;
     case LDAP_OPT_PROTOCOL_VERSION:
-      *((int *)optdata) = ld->ld_version;
+      *((int*)optdata) = ld->ld_version;
       break;
     case LDAP_OPT_SERVER_CONTROLS:
       /* fall through */
     case LDAP_OPT_CLIENT_CONTROLS:
-      *((LDAPControl ***)optdata) = NULL;
+      *((LDAPControl***)optdata) = NULL;
       /* nsldapi_dup_controls returns -1 and sets lderrno on error */
-      rc = nsldapi_dup_controls(ld, (LDAPControl ***)optdata,
+      rc = nsldapi_dup_controls(ld, (LDAPControl***)optdata,
                                 (option == LDAP_OPT_SERVER_CONTROLS)
                                     ? ld->ld_servercontrols
                                     : ld->ld_clientcontrols);
       break;
 
     /* rebind proc */
     case LDAP_OPT_REBIND_FN:
-      *((LDAP_REBINDPROC_CALLBACK **)optdata) = ld->ld_rebind_fn;
+      *((LDAP_REBINDPROC_CALLBACK**)optdata) = ld->ld_rebind_fn;
       break;
     case LDAP_OPT_REBIND_ARG:
-      *((void **)optdata) = ld->ld_rebind_arg;
+      *((void**)optdata) = ld->ld_rebind_arg;
       break;
 
     /* i/o function pointers */
     case LDAP_OPT_IO_FN_PTRS:
       if (ld->ld_io_fns_ptr == NULL) {
         memset(optdata, 0, sizeof(struct ldap_io_fns));
       } else {
         /* struct copy */
-        *((struct ldap_io_fns *)optdata) = *(ld->ld_io_fns_ptr);
+        *((struct ldap_io_fns*)optdata) = *(ld->ld_io_fns_ptr);
       }
       break;
 
     /* extended i/o function pointers */
     case LDAP_X_OPT_EXTIO_FN_PTRS:
-      if (((struct ldap_x_ext_io_fns *)optdata)->lextiof_size ==
+      if (((struct ldap_x_ext_io_fns*)optdata)->lextiof_size ==
           LDAP_X_EXTIO_FNS_SIZE_REV0) {
-        ((struct ldap_x_ext_io_fns_rev0 *)optdata)->lextiof_close =
+        ((struct ldap_x_ext_io_fns_rev0*)optdata)->lextiof_close =
             ld->ld_extclose_fn;
-        ((struct ldap_x_ext_io_fns_rev0 *)optdata)->lextiof_connect =
+        ((struct ldap_x_ext_io_fns_rev0*)optdata)->lextiof_connect =
             ld->ld_extconnect_fn;
-        ((struct ldap_x_ext_io_fns_rev0 *)optdata)->lextiof_read =
+        ((struct ldap_x_ext_io_fns_rev0*)optdata)->lextiof_read =
             ld->ld_extread_fn;
-        ((struct ldap_x_ext_io_fns_rev0 *)optdata)->lextiof_write =
+        ((struct ldap_x_ext_io_fns_rev0*)optdata)->lextiof_write =
             ld->ld_extwrite_fn;
-        ((struct ldap_x_ext_io_fns_rev0 *)optdata)->lextiof_poll =
+        ((struct ldap_x_ext_io_fns_rev0*)optdata)->lextiof_poll =
             ld->ld_extpoll_fn;
-        ((struct ldap_x_ext_io_fns_rev0 *)optdata)->lextiof_newhandle =
+        ((struct ldap_x_ext_io_fns_rev0*)optdata)->lextiof_newhandle =
             ld->ld_extnewhandle_fn;
-        ((struct ldap_x_ext_io_fns_rev0 *)optdata)->lextiof_disposehandle =
+        ((struct ldap_x_ext_io_fns_rev0*)optdata)->lextiof_disposehandle =
             ld->ld_extdisposehandle_fn;
-        ((struct ldap_x_ext_io_fns_rev0 *)optdata)->lextiof_session_arg =
+        ((struct ldap_x_ext_io_fns_rev0*)optdata)->lextiof_session_arg =
             ld->ld_ext_session_arg;
-      } else if (((struct ldap_x_ext_io_fns *)optdata)->lextiof_size ==
+      } else if (((struct ldap_x_ext_io_fns*)optdata)->lextiof_size ==
                  LDAP_X_EXTIO_FNS_SIZE) {
         /* struct copy */
-        *((struct ldap_x_ext_io_fns *)optdata) = ld->ld_ext_io_fns;
+        *((struct ldap_x_ext_io_fns*)optdata) = ld->ld_ext_io_fns;
       } else {
         LDAP_SET_LDERRNO(ld, LDAP_PARAM_ERROR, NULL, NULL);
         rc = -1;
       }
       break;
 
     /* get socketargp in extended i/o function */
     case LDAP_X_OPT_SOCKETARG:
@@ -223,120 +223,120 @@ int LDAP_CALL ldap_get_option(LDAP *ld, 
         LDAP_SET_LDERRNO(ld, LDAP_LOCAL_ERROR, NULL, NULL);
         rc = -1;
       }
       break;
 
     /* thread function pointers */
     case LDAP_OPT_THREAD_FN_PTRS:
       /* struct copy */
-      *((struct ldap_thread_fns *)optdata) = ld->ld_thread;
+      *((struct ldap_thread_fns*)optdata) = ld->ld_thread;
       break;
 
     /* extra thread function pointers */
     case LDAP_OPT_EXTRA_THREAD_FN_PTRS:
       /* struct copy */
-      *((struct ldap_extra_thread_fns *)optdata) = ld->ld_thread2;
+      *((struct ldap_extra_thread_fns*)optdata) = ld->ld_thread2;
       break;
 
     /* DNS function pointers */
     case LDAP_OPT_DNS_FN_PTRS:
       /* struct copy */
-      *((struct ldap_dns_fns *)optdata) = ld->ld_dnsfn;
+      *((struct ldap_dns_fns*)optdata) = ld->ld_dnsfn;
       break;
 
     /* cache function pointers */
     case LDAP_OPT_CACHE_FN_PTRS:
       /* struct copy */
-      *((struct ldap_cache_fns *)optdata) = ld->ld_cache;
+      *((struct ldap_cache_fns*)optdata) = ld->ld_cache;
       break;
     case LDAP_OPT_CACHE_STRATEGY:
-      *((int *)optdata) = ld->ld_cache_strategy;
+      *((int*)optdata) = ld->ld_cache_strategy;
       break;
     case LDAP_OPT_CACHE_ENABLE:
-      *((int *)optdata) = ld->ld_cache_on;
+      *((int*)optdata) = ld->ld_cache_on;
       break;
 
     case LDAP_OPT_ERROR_NUMBER:
-      *((int *)optdata) = LDAP_GET_LDERRNO(ld, NULL, NULL);
+      *((int*)optdata) = LDAP_GET_LDERRNO(ld, NULL, NULL);
       break;
 
     case LDAP_OPT_ERROR_STRING:
-      (void)LDAP_GET_LDERRNO(ld, NULL, (char **)optdata);
-      *((char **)optdata) = nsldapi_strdup(*((char **)optdata));
+      (void)LDAP_GET_LDERRNO(ld, NULL, (char**)optdata);
+      *((char**)optdata) = nsldapi_strdup(*((char**)optdata));
       break;
 
     case LDAP_OPT_MATCHED_DN:
-      (void)LDAP_GET_LDERRNO(ld, (char **)optdata, NULL);
-      *((char **)optdata) = nsldapi_strdup(*((char **)optdata));
+      (void)LDAP_GET_LDERRNO(ld, (char**)optdata, NULL);
+      *((char**)optdata) = nsldapi_strdup(*((char**)optdata));
       break;
 
     case LDAP_OPT_PREFERRED_LANGUAGE:
       if (NULL != ld->ld_preferred_language) {
-        *((char **)optdata) = nsldapi_strdup(ld->ld_preferred_language);
+        *((char**)optdata) = nsldapi_strdup(ld->ld_preferred_language);
       } else {
-        *((char **)optdata) = NULL;
+        *((char**)optdata) = NULL;
       }
       break;
 
     case LDAP_OPT_API_FEATURE_INFO:
-      rc = nsldapi_get_feature_info((LDAPAPIFeatureInfo *)optdata);
+      rc = nsldapi_get_feature_info((LDAPAPIFeatureInfo*)optdata);
       if (rc != LDAP_SUCCESS) {
         LDAP_SET_LDERRNO(ld, rc, NULL, NULL);
         rc = -1;
       }
       break;
 
     case LDAP_OPT_HOST_NAME:
-      *((char **)optdata) = nsldapi_strdup(ld->ld_defhost);
+      *((char**)optdata) = nsldapi_strdup(ld->ld_defhost);
       break;
 
     case LDAP_X_OPT_CONNECT_TIMEOUT:
-      *((int *)optdata) = ld->ld_connect_timeout;
+      *((int*)optdata) = ld->ld_connect_timeout;
       break;
 
 #ifdef LDAP_SASLIO_HOOKS
     /* SASL options */
     case LDAP_OPT_X_SASL_MECH:
-      *((char **)optdata) = nsldapi_strdup(ld->ld_def_sasl_mech);
+      *((char**)optdata) = nsldapi_strdup(ld->ld_def_sasl_mech);
       break;
     case LDAP_OPT_X_SASL_REALM:
-      *((char **)optdata) = nsldapi_strdup(ld->ld_def_sasl_realm);
+      *((char**)optdata) = nsldapi_strdup(ld->ld_def_sasl_realm);
       break;
     case LDAP_OPT_X_SASL_AUTHCID:
-      *((char **)optdata) = nsldapi_strdup(ld->ld_def_sasl_authcid);
+      *((char**)optdata) = nsldapi_strdup(ld->ld_def_sasl_authcid);
       break;
     case LDAP_OPT_X_SASL_AUTHZID:
-      *((char **)optdata) = nsldapi_strdup(ld->ld_def_sasl_authzid);
+      *((char**)optdata) = nsldapi_strdup(ld->ld_def_sasl_authzid);
       break;
     case LDAP_OPT_X_SASL_SSF: {
       int sc;
-      sasl_ssf_t *ssf;
-      sasl_conn_t *ctx;
+      sasl_ssf_t* ssf;
+      sasl_conn_t* ctx;
       if (ld->ld_defconn == NULL) {
         return -1;
       }
-      ctx = (sasl_conn_t *)(ld->ld_defconn->lconn_sasl_ctx);
+      ctx = (sasl_conn_t*)(ld->ld_defconn->lconn_sasl_ctx);
       if (ctx == NULL) {
         return -1;
       }
-      sc = sasl_getprop(ctx, SASL_SSF, (const void **)&ssf);
+      sc = sasl_getprop(ctx, SASL_SSF, (const void**)&ssf);
       if (sc != SASL_OK) {
         return -1;
       }
-      *((sasl_ssf_t *)optdata) = *ssf;
+      *((sasl_ssf_t*)optdata) = *ssf;
     } break;
     case LDAP_OPT_X_SASL_SSF_MIN:
-      *((sasl_ssf_t *)optdata) = ld->ld_sasl_secprops.min_ssf;
+      *((sasl_ssf_t*)optdata) = ld->ld_sasl_secprops.min_ssf;
       break;
     case LDAP_OPT_X_SASL_SSF_MAX:
-      *((sasl_ssf_t *)optdata) = ld->ld_sasl_secprops.max_ssf;
+      *((sasl_ssf_t*)optdata) = ld->ld_sasl_secprops.max_ssf;
       break;
     case LDAP_OPT_X_SASL_MAXBUFSIZE:
-      *((sasl_ssf_t *)optdata) = ld->ld_sasl_secprops.maxbufsize;
+      *((sasl_ssf_t*)optdata) = ld->ld_sasl_secprops.maxbufsize;
       break;
     case LDAP_OPT_X_SASL_SSF_EXTERNAL:
     case LDAP_OPT_X_SASL_SECPROPS:
       /*
        * These options are write only.  Making these options
        * read/write would expose semi-private interfaces of libsasl
        * for which there are no cross platform/standardized
        * definitions.
@@ -380,17 +380,17 @@ static LDAPAPIFeatureInfo nsldapi_extens
 
 #define NSLDAPI_EXTENSIONS_COUNT \
   (sizeof(nsldapi_extensions) / sizeof(LDAPAPIFeatureInfo))
 
 /*
  * Retrieve information about this implementation of the LDAP API.
  * Returns an LDAP error code.
  */
-static int nsldapi_get_api_info(LDAPAPIInfo *aip) {
+static int nsldapi_get_api_info(LDAPAPIInfo* aip) {
   int i;
 
   if (aip == NULL) {
     return (LDAP_PARAM_ERROR);
   }
 
   aip->ldapai_api_version = LDAP_API_VERSION;
 
@@ -405,17 +405,17 @@ static int nsldapi_get_api_info(LDAPAPII
   if ((aip->ldapai_vendor_name = nsldapi_strdup(LDAP_VENDOR_NAME)) == NULL) {
     return (LDAP_NO_MEMORY);
   }
 
   if (NSLDAPI_EXTENSIONS_COUNT < 1) {
     aip->ldapai_extensions = NULL;
   } else {
     if ((aip->ldapai_extensions = NSLDAPI_CALLOC(NSLDAPI_EXTENSIONS_COUNT + 1,
-                                                 sizeof(char *))) == NULL) {
+                                                 sizeof(char*))) == NULL) {
       NSLDAPI_FREE(aip->ldapai_vendor_name);
       aip->ldapai_vendor_name = NULL;
       return (LDAP_NO_MEMORY);
     }
 
     for (i = 0; i < NSLDAPI_EXTENSIONS_COUNT; ++i) {
       if ((aip->ldapai_extensions[i] =
                nsldapi_strdup(nsldapi_extensions[i].ldapaif_name)) == NULL) {
@@ -430,17 +430,17 @@ static int nsldapi_get_api_info(LDAPAPII
 
   return (LDAP_SUCCESS);
 }
 
 /*
  * Retrieves information about a specific extended feature of the LDAP API/
  * Returns an LDAP error code.
  */
-static int nsldapi_get_feature_info(LDAPAPIFeatureInfo *fip) {
+static int nsldapi_get_feature_info(LDAPAPIFeatureInfo* fip) {
   int i;
 
   if (fip == NULL || fip->ldapaif_name == NULL) {
     return (LDAP_PARAM_ERROR);
   }
 
   if (fip->ldapaif_info_version != LDAP_FEATURE_INFO_VERSION) {
     fip->ldapaif_info_version = LDAP_FEATURE_INFO_VERSION;
--- a/ldap/c-sdk/libraries/libldap/getvalues.c
+++ b/ldap/c-sdk/libraries/libldap/getvalues.c
@@ -45,22 +45,22 @@
 #if 0
 #  ifndef lint
 static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
 #  endif
 #endif
 
 #include "ldap-int.h"
 
-static void **internal_ldap_get_values(LDAP *ld, LDAPMessage *entry,
-                                       const char *target, int lencall) {
+static void** internal_ldap_get_values(LDAP* ld, LDAPMessage* entry,
+                                       const char* target, int lencall) {
   struct berelement ber;
-  char *attr;
+  char* attr;
   int rc;
-  void **vals;
+  void** vals;
 
   LDAPDebug(LDAP_DEBUG_TRACE, "ldap_get_values\n", 0, 0, 0);
 
   if (!NSLDAPI_VALID_LDAP_POINTER(ld)) {
     return (NULL); /* punt */
   }
   if (target == NULL || !NSLDAPI_VALID_LDAPMESSAGE_ENTRY_POINTER(entry)) {
     LDAP_SET_LDERRNO(ld, LDAP_PARAM_ERROR, NULL, NULL);
@@ -70,26 +70,26 @@ static void **internal_ldap_get_values(L
   ber = *entry->lm_ber;
 
   /* skip sequence, dn, sequence of, and snag the first attr */
   if (ber_scanf(&ber, "{x{{a", &attr) == LBER_ERROR) {
     LDAP_SET_LDERRNO(ld, LDAP_DECODING_ERROR, NULL, NULL);
     return (NULL);
   }
 
-  rc = strcasecmp((char *)target, attr);
+  rc = strcasecmp((char*)target, attr);
   NSLDAPI_FREE(attr);
   if (rc != 0) {
     while (1) {
       if (ber_scanf(&ber, "x}{a", &attr) == LBER_ERROR) {
         LDAP_SET_LDERRNO(ld, LDAP_DECODING_ERROR, NULL, NULL);
         return (NULL);
       }
 
-      rc = strcasecmp((char *)target, attr);
+      rc = strcasecmp((char*)target, attr);
       if (rc == 0) {
         NSLDAPI_FREE(attr);
         break;
       }
       NSLDAPI_FREE(attr);
     }
   }
 
@@ -144,22 +144,22 @@ static void **internal_ldap_get_values(L
 #define LANG_SUBTYPE_INDEX_NONE -1
 #define LANG_SUBTYPE_INDEX_DUPLICATE -2
 
 typedef struct {
   int start;
   int length;
 } _SubStringIndex;
 
-static int parse_subtypes(const char *target, int *baseLenp, char **langp,
-                          _SubStringIndex **subs, int *nsubtypes) {
+static int parse_subtypes(const char* target, int* baseLenp, char** langp,
+                          _SubStringIndex** subs, int* nsubtypes) {
   int nSubtypes = 0;
   int ind = 0;
-  char *nextToken;
-  _SubStringIndex *result = NULL;
+  char* nextToken;
+  _SubStringIndex* result = NULL;
   int langIndex;
   int targetLen;
   int subtypeStart;
 
   langIndex = LANG_SUBTYPE_INDEX_NONE;
   *subs = NULL;
   *langp = NULL;
   *baseLenp = 0;
@@ -173,19 +173,19 @@ static int parse_subtypes(const char *ta
     *baseLenp = subtypeStart - 1;
   } else {
     subtypeStart = targetLen;
     *baseLenp = subtypeStart;
   }
   ind = subtypeStart;
 
   /* How many subtypes? */
-  nextToken = (char *)target + subtypeStart;
+  nextToken = (char*)target + subtypeStart;
   while (nextToken && *nextToken) {
-    char *thisToken = nextToken;
+    char* thisToken = nextToken;
     nextToken = strchr(thisToken, ';');
     if (NULL != nextToken) nextToken++;
     if (0 == strncasecmp(thisToken, "lang-", 5)) {
       /* If there was a previous lang tag, this is illegal! */
       if (langIndex != LANG_SUBTYPE_INDEX_NONE) {
         langIndex = LANG_SUBTYPE_INDEX_DUPLICATE;
         return langIndex;
       } else {
@@ -195,73 +195,73 @@ static int parse_subtypes(const char *ta
       nSubtypes++;
     }
   }
   /* No language subtype? */
   if (langIndex < 0) return langIndex;
 
   /* Allocate array of non-language subtypes */
   if (nSubtypes > 0) {
-    result = (_SubStringIndex *)NSLDAPI_MALLOC(sizeof(*result) * nSubtypes);
+    result = (_SubStringIndex*)NSLDAPI_MALLOC(sizeof(*result) * nSubtypes);
     memset(result, 0, sizeof(*result) * nSubtypes);
   }
   ind = 0;
   nSubtypes = 0;
   ind = subtypeStart;
-  nextToken = (char *)target + subtypeStart;
+  nextToken = (char*)target + subtypeStart;
   while (nextToken && *nextToken) {
-    char *thisToken = nextToken;
+    char* thisToken = nextToken;
     int len;
     nextToken = strchr(thisToken, ';');
     if (NULL != nextToken) {
       len = nextToken - thisToken;
       nextToken++;
     } else {
-      nextToken = (char *)target + targetLen;
+      nextToken = (char*)target + targetLen;
       len = nextToken - thisToken;
     }
     if (0 == strncasecmp(thisToken, "lang-", 5)) {
       int i;
-      *langp = (char *)NSLDAPI_MALLOC(len + 1);
+      *langp = (char*)NSLDAPI_MALLOC(len + 1);
       for (i = 0; i < len; i++) (*langp)[i] = toupper(target[ind + i]);
       (*langp)[len] = 0;
     } else {
       result[nSubtypes].start = thisToken - target;
       result[nSubtypes].length = len;
       nSubtypes++;
     }
   }
   *subs = result;
   *nsubtypes = nSubtypes;
   return langIndex;
 }
 
-static int check_lang_match(const char *target, const char *baseTarget,
-                            _SubStringIndex *targetTypes, int ntargetTypes,
-                            char *targetLang, char *attr) {
+static int check_lang_match(const char* target, const char* baseTarget,
+                            _SubStringIndex* targetTypes, int ntargetTypes,
+                            char* targetLang, char* attr) {
   int langIndex;
-  _SubStringIndex *subtypes;
+  _SubStringIndex* subtypes;
   int baseLen;
-  char *lang;
+  char* lang;
   int nsubtypes;
   int mismatch = 0;
   int match = -1;
   int i;
 
   /* Get all subtypes in the attribute name */
   langIndex = parse_subtypes(attr, &baseLen, &lang, &subtypes, &nsubtypes);
 
   /* Check if there any required non-language subtypes which are
      not in this attribute */
   for (i = 0; i < ntargetTypes; i++) {
-    char *t = (char *)target + targetTypes[i].start;
+    char* t = (char