Bug 1399756 - remove trailing spaces in ldap. rs=white-space-only
authorJorg K <jorgk@jorgk.com>
Thu, 15 Feb 2018 21:36:55 +0100
changeset 30279 961aa136630db53e2f0371e445b5f05e554a573a
parent 30278 34495eaff49c8244379992b4c2b0ef7959ed3cd6
child 30280 d0777339c5c9bca2665e288b484e6c504e134e24
push id2140
push userclokep@gmail.com
push dateMon, 12 Mar 2018 19:42:51 +0000
treeherdercomm-beta@2d485f0d3723 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswhite-space-only
bugs1399756
Bug 1399756 - remove trailing spaces in ldap. rs=white-space-only [skip-blame]
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-platform.h
ldap/c-sdk/include/ldap-standard.h
ldap/c-sdk/include/ldap-to-be-deprecated.h
ldap/c-sdk/include/ldap.h
ldap/c-sdk/include/ldap_ssl.h
ldap/c-sdk/include/ldaplog.h
ldap/c-sdk/include/ldappr.h
ldap/c-sdk/include/ldaprot.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/lber-int.h
ldap/c-sdk/libraries/libldap/ldap-int.h
ldap/c-sdk/libraries/libprldap/ldappr-int.h
ldap/xpcom/src/nsLDAPBERElement.cpp
ldap/xpcom/src/nsLDAPBERElement.h
ldap/xpcom/src/nsLDAPBERValue.cpp
ldap/xpcom/src/nsLDAPBERValue.h
ldap/xpcom/src/nsLDAPControl.cpp
ldap/xpcom/src/nsLDAPControl.h
ldap/xpcom/src/nsLDAPMessage.cpp
ldap/xpcom/src/nsLDAPModification.cpp
ldap/xpcom/src/nsLDAPOperation.h
ldap/xpcom/src/nsLDAPProtocolModule.cpp
ldap/xpcom/src/nsLDAPSecurityGlue.cpp
ldap/xpcom/src/nsLDAPServer.cpp
ldap/xpcom/src/nsLDAPServer.h
ldap/xpcom/src/nsLDAPService.h
ldap/xpcom/src/nsLDAPSyncQuery.h
ldap/xpcom/src/nsLDAPURL.h
--- a/ldap/c-sdk/include/disptmpl.h
+++ b/ldap/c-sdk/include/disptmpl.h
@@ -1,43 +1,43 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 /*
  * Copyright (c) 1993, 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms are permitted
  * provided that this notice is preserved and that due credit is given
@@ -55,17 +55,17 @@
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /* calling conventions used by library */
 #ifndef LDAP_CALL
 #if defined( _WINDOWS ) || defined( _WIN32 )
 #define LDAP_C __cdecl
-#ifndef _WIN32 
+#ifndef _WIN32
 #define __stdcall _far _pascal
 #define LDAP_CALLBACK _loadds
 #else
 #define LDAP_CALLBACK
 #endif /* _WIN32 */
 #define LDAP_PASCAL __stdcall
 #define LDAP_CALL LDAP_PASCAL
 #else /* _WINDOWS */
@@ -89,17 +89,17 @@ extern "C" {
 
 
 /*
  * syntax options (confined to second most significant byte)
  */
 #define LDAP_SYN_OPT_DEFER		0x00010000L
 
 
-/* 
+/*
  * display template item syntax ids (defined by common agreement)
  * these are the valid values for the ti_syntaxid of the tmplitem
  * struct (defined below).  A general type is encoded in the
  * most-significant 8 bits, and some options are encoded in the next
  * 8 bits.  The lower 16 bits are reserved for the distinct types.
  */
 #define LDAP_SYN_CASEIGNORESTR	( 1 | LDAP_SYN_TYPE_TEXT )
 #define LDAP_SYN_MULTILINESTR	( 2 | LDAP_SYN_TYPE_TEXT )
@@ -133,17 +133,17 @@ extern "C" {
 /*
  * use calculated label width (based on length of longest label in
  * template) instead of contant width
  */
 #define LDAP_DISP_OPT_AUTOLABELWIDTH	0x00000001L
 #define LDAP_DISP_OPT_HTMLBODYONLY	0x00000002L
 
 /*
- * perform search actions (applies to ldap_entry2text_search only) 
+ * perform search actions (applies to ldap_entry2text_search only)
  */
 #define LDAP_DISP_OPT_DOSEARCHACTIONS	0x00000002L
 
 /*
  * include additional info. relevant to "non leaf" entries only
  * used by ldap_entry2html and ldap_entry2html_search to include "Browse"
  * and "Move Up" HREFs
  */
--- a/ldap/c-sdk/include/iutil.h
+++ b/ldap/c-sdk/include/iutil.h
@@ -1,43 +1,43 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 /*
  * Interface for libiutil the innosoft migration library
  *
  */
 
 #ifndef _IUTIL_H
--- a/ldap/c-sdk/include/lber.h
+++ b/ldap/c-sdk/include/lber.h
@@ -1,43 +1,43 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 /* lber.h - header file for ber_* functions */
 #ifndef _LBER_H
 #define _LBER_H
 
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -88,17 +88,17 @@ extern "C" {
 #define LBER_OPT_BYTES_TO_WRITE		0x10
 #define LBER_OPT_MEMALLOC_FN_PTRS	0x20
 #define LBER_OPT_DEBUG_LEVEL		0x40
 #define LBER_OPT_BUFSIZE			0x80
 
 /*
  * LBER_USE_DER is defined for compatibility with the C LDAP API RFC.
  * In our implementation, we recognize it (instead of the numerically
- * identical LBER_OPT_REMAINING_BYTES) in calls to ber_alloc_t() and 
+ * identical LBER_OPT_REMAINING_BYTES) in calls to ber_alloc_t() and
  * ber_init_w_nullchar() only.  Callers of ber_set_option() or
  * ber_get_option() must use LBER_OPT_USE_DER instead.  Sorry!
  */
 #define LBER_USE_DER			0x01
 
 /* Sockbuf set/get options */
 #define LBER_SOCKBUF_OPT_TO_FILE			0x001
 #define LBER_SOCKBUF_OPT_TO_FILE_ONLY		0x002
@@ -140,17 +140,17 @@ typedef long LBER_SOCKET;
 #else /* macintosh */
 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 
+#ifndef _WIN32
 #define __stdcall _far _pascal
 #define LDAP_CALLBACK _loadds
 #else
 #define LDAP_CALLBACK
 #endif /* _WIN32 */
 #define LDAP_PASCAL __stdcall
 #define LDAP_CALL LDAP_PASCAL
 #else /* _WINDOWS */
@@ -194,17 +194,17 @@ typedef int (LDAP_C LDAP_CALLBACK LDAP_I
 typedef int (LDAP_C LDAP_CALLBACK LDAP_IOF_WRITE_CALLBACK)( LBER_SOCKET s,
 	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 );
 typedef int (LDAP_C LDAP_CALLBACK LDAP_X_EXTIOF_WRITE_CALLBACK)( 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);
-						     
+						
 
 /*
  * 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;
@@ -232,31 +232,31 @@ struct lber_memalloc_fns {
 	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, 
+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, 
+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, 
+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_API(ber_tag_t) LDAP_CALL ber_get_bitstringa( BerElement *ber, 
+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_API(ber_tag_t) LDAP_CALL ber_get_boolean( BerElement *ber, 
+LDAP_API(ber_tag_t) 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_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 );
@@ -265,28 +265,28 @@ LDAP_API(void) LDAP_CALL ber_svecfree( c
 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, BERTranslateProc decode_proc );
 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, 
+LDAP_API(int) 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, 
+LDAP_API(int) 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, 
+LDAP_API(int) LDAP_CALL 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_API(int) 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_boolean( BerElement *ber, 
+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 );
@@ -305,35 +305,35 @@ LDAP_API(BerElement*) LDAP_CALL ber_dup(
 LDAP_API(ber_tag_t) 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_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_API(ber_int_t) LDAP_CALL ber_read( BerElement *ber, char *buf, 
+LDAP_API(ber_int_t) 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, 
+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_API(int) LDAP_CALL ber_stack_init(BerElement *ber, int options, 
+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_API(int) LDAP_CALL ber_set_option( BerElement *ber, int option, 
+LDAP_API(int) LDAP_CALL ber_set_option( BerElement *ber, int option,
 	void *value );
-LDAP_API(int) LDAP_CALL ber_get_option( BerElement *ber, int option, 
+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_API(int) LDAP_CALL ber_sockbuf_set_option( Sockbuf *sb, int option, 
+LDAP_API(int) 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, 
+LDAP_API(int) 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
@@ -1,58 +1,58 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 /* lcache.h - ldap persistent cache */
 #ifndef _LCACHE_H
 #define _LCACHE_H
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /* calling conventions used by library */
 #ifndef LDAP_CALL
 #if defined( _WINDOWS ) || defined( _WIN32 )
 #define LDAP_C __cdecl
-#ifndef _WIN32 
+#ifndef _WIN32
 #define __stdcall _far _pascal
 #define LDAP_CALLBACK _loadds
 #else
 #define LDAP_CALLBACK
 #endif /* _WIN32 */
 #define LDAP_PASCAL __stdcall
 #define LDAP_CALL LDAP_PASCAL
 #else /* _WINDOWS */
@@ -72,17 +72,17 @@ LDAP_API(int) LDAP_C lcache_search( LDAP
 	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_API(int) 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_API(int) LDAP_C lcache_rename( LDAP *ld, int msgid, unsigned long tag,
-	const char *dn, const char *newrdn, const char *newparent, 
+	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_API(int) 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 );
--- a/ldap/c-sdk/include/ldap-deprecated.h
+++ b/ldap/c-sdk/include/ldap-deprecated.h
@@ -1,43 +1,43 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 /* ldap-deprecated.h - deprecated functions and declarations
  *
  * A deprecated API is an API that we recommend you no longer use,
  * due to improvements in the LDAP C SDK. While deprecated APIs are
  * currently still implemented, they may be removed in future
  * implementations, and we recommend using other APIs.
--- a/ldap/c-sdk/include/ldap-extension.h
+++ b/ldap/c-sdk/include/ldap-extension.h
@@ -1,43 +1,43 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 /* ldap-extension.h - extensions to the ldap c api specification */
 
 #ifndef _LDAP_EXTENSION_H
 #define _LDAP_EXTENSION_H
 
 #ifdef __cplusplus
@@ -140,17 +140,17 @@ extern "C" {
 /* 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(LDAPControl *) LDAP_CALL ldap_find_control( const char *oid, 
+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;
@@ -196,44 +196,44 @@ LDAP_API(int) LDAP_CALL ldap_create_sort
         LDAPControl **ctrlp );
 LDAP_API(int) 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(int) LDAP_CALL ldap_create_sort_keylist( LDAPsortkey ***sortKeyList,
         const char *string_rep );
 
-LDAP_API(int) LDAP_CALL ldap_create_userstatus_control( 
+LDAP_API(int) 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, 
+LDAP_API(int) LDAP_CALL ldap_parse_userstatus_control( LDAP *ld,
 		LDAPControl **ctrlp, LDAPuserstatus *us );
 
-LDAP_API(int) LDAP_CALL ldap_create_passwordpolicy_control( LDAP *ld, 
+LDAP_API(int) LDAP_CALL ldap_create_passwordpolicy_control( LDAP *ld,
 		LDAPControl **ctrlp );
-LDAP_API(int) LDAP_CALL ldap_create_passwordpolicy_control_ext( LDAP *ld, 
+LDAP_API(int) LDAP_CALL ldap_create_passwordpolicy_control_ext( LDAP *ld,
 		const char ctl_iscritical, LDAPControl **ctrlp );
-LDAP_API(int) LDAP_CALL ldap_parse_passwordpolicy_control( LDAP *ld, 
+LDAP_API(int) LDAP_CALL 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, 
+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_CALL ldap_passwordpolicy_err2txt( 
+LDAP_API(const char *) LDAP_CALL ldap_passwordpolicy_err2txt(
 		LDAPPasswordPolicyError err );
 
-LDAP_API(int) LDAP_CALL ldap_create_authzid_control( LDAP *ld, 
+LDAP_API(int) 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, 
+LDAP_API(int) LDAP_CALL ldap_parse_authzid_control( LDAP *ld,
 		LDAPControl **ctrlp, char **authzid );
 
-LDAP_API(int) LDAP_CALL ldap_whoami( LDAP *ld, LDAPControl **serverctrls, 
+LDAP_API(int) 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_API(int) LDAP_CALL ldap_parse_whoami( LDAP *ld, LDAPMessage *result, 
+LDAP_API(int) LDAP_CALL 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,  const char ctl_iscritical,
 		LDAPControl **ctrlp );
 
 /*
  * Virtual list view (an LDAPv3 extension -- LDAP_API_FEATURE_VIRTUAL_LIST_VIEW)
@@ -332,17 +332,17 @@ typedef struct ldap_url_desc {
 #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_url_parse_no_defaults( const char *url, 
+LDAP_API(int) 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(int) 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_API(int) LDAP_CALL ldap_url_search_st( LDAP *ld, const char *url,
         int attrsonly, struct timeval *timeout, LDAPMessage **res );
@@ -644,17 +644,17 @@ LDAP_API(void) LDAP_CALL ldap_memcache_d
 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 */
 
-/* 
+/*
  * Socket buffer structure associated to the LDAP connection
  */
 #define LDAP_X_OPT_SOCKBUF            (LDAP_OPT_PRIVATE_EXTENSION_BASE + 0x0F03)
 	/* 0x4000 + 0x0F03 = 0x4F03 = 20227 - API extension */
 
 /*
  * Memory allocation callback functions (an API extension --
  * LDAP_API_FEATURE_X_MEMALLOC_FUNCTIONS).  These are global and can
@@ -834,17 +834,17 @@ LDAP_API(int) LDAP_CALL ldap_passwd( LDA
 
 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_API(int) LDAP_CALL 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(void) LDAP_CALL ldap_add_result_entry( LDAPMessage **list, LDAPMessage *e );
 
 #ifdef __cplusplus
 }
--- a/ldap/c-sdk/include/ldap-platform.h
+++ b/ldap/c-sdk/include/ldap-platform.h
@@ -1,55 +1,55 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 /* ldap-platform.h - platform transparency */
 
 #ifndef _LDAP_PLATFORM_H
 #define _LDAP_PLATFORM_H
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#if defined (WIN32) || defined (_WIN32) || defined( _CONSOLE ) 
+#if defined (WIN32) || defined (_WIN32) || defined( _CONSOLE )
 #include <windows.h>
 #  if defined( _WINDOWS )
 #  include <winsock.h>
 #  endif
 #elif defined(macintosh)
 #ifndef LDAP_TYPE_TIMEVAL_DEFINED
 #include <utime.h>
 #endif
--- a/ldap/c-sdk/include/ldap-standard.h
+++ b/ldap/c-sdk/include/ldap-standard.h
@@ -1,49 +1,49 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 /* ldap-standard.h - standards base header file for libldap */
 /* This file contain the defines and function prototypes matching */
 /* very closely to the latest LDAP C API draft */
- 
+
 #ifndef _LDAP_STANDARD_H
 #define _LDAP_STANDARD_H
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 #include "ldap-platform.h"
@@ -298,21 +298,21 @@ LDAP_API(int) LDAP_CALL ldap_unbind_s( L
 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_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, 
+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_API(int) LDAP_CALL ldap_compare_s( LDAP *ld, const char *dn, 
+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_API(int) 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_API(int) LDAP_CALL ldap_search_st( LDAP *ld, const char *base, int scope,
@@ -332,26 +332,26 @@ LDAP_API(int) LDAP_CALL ldap_msgfree( LD
 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, 
+LDAP_API(LDAPMessage *) LDAP_CALL ldap_first_entry( LDAP *ld,
 	LDAPMessage *chain );
-LDAP_API(LDAPMessage *) LDAP_CALL ldap_next_entry( LDAP *ld, 
+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, 
+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, 
+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,
--- a/ldap/c-sdk/include/ldap-to-be-deprecated.h
+++ b/ldap/c-sdk/include/ldap-to-be-deprecated.h
@@ -1,48 +1,48 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 /* ldap-to-be-deprecated.h - functions and declaration which will be
  * deprecated in a future release.
- * 
+ *
  * A deprecated API is an API that we recommend you no longer use,
  * due to improvements in the LDAP C SDK. While deprecated APIs are
  * currently still implemented, they may be removed in future
  * implementations, and we recommend using other APIs.
  *
  * This header file will act as a first warning before moving functions
  * into an unsupported/deprecated state.  If your favorite application
  * depend on any declaration and defines, and there is a good reason
@@ -68,17 +68,17 @@ extern "C" {
  * 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 );
 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, 
+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 );
 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 );
 
--- a/ldap/c-sdk/include/ldap.h
+++ b/ldap/c-sdk/include/ldap.h
@@ -1,51 +1,51 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 /* ldap.h - general header file for libldap */
 
 #ifndef _LDAP_H
 #define _LDAP_H
 
-/* Standard LDAP API functions and declarations */ 
+/* Standard LDAP API functions and declarations */
 #include "ldap-standard.h"
 
 /* Extensions to the LDAP standard */
 #include "ldap-extension.h"
 
 /* A deprecated API is an API that we recommend you no longer use,
  * due to improvements in the LDAP C SDK. While deprecated APIs are
  * currently still implemented, they may be removed in future
--- a/ldap/c-sdk/include/ldap_ssl.h
+++ b/ldap/c-sdk/include/ldap_ssl.h
@@ -1,59 +1,59 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 #if !defined(LDAP_SSL_H)
 #define LDAP_SSL_H
 
 /* ldap_ssl.h - prototypes for LDAP over SSL functions */
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /*
- * these three defines resolve the SSL strength 
+ * these three defines resolve the SSL strength
  * setting auth weak, diables all cert checking
  * the CNCHECK tests for the man in the middle hack
- */ 
+ */
 #define LDAPSSL_AUTH_WEAK       0
 #define LDAPSSL_AUTH_CERT       1
 #define LDAPSSL_AUTH_CNCHECK    2
 
 /*
  * an ExtendedRequest [LDAPv3] specifying the OID for the
  * Start TLS operation: RFC 2830
  */
@@ -86,37 +86,37 @@ int LDAP_CALL ldap_start_tls_s( 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() intializes security 
+ * The next one supports ldapssl_clientauth_init() intializes security
  * for SSL for client authentication.  The third function initializes
- * security for doing SSL with client authentication, and PKCS, that is, 
+ * security for doing SSL with client authentication, and PKCS, that is,
  * the third function initializes the security module database (secmod.db).
  * The parameters are as follows:
- * const char *certdbpath - path to the cert file.  This can be a shortcut 
+ * const char *certdbpath - path to the cert file.  This can be a shortcut
  *     to the directory name, if so cert7.db will be postfixed to the string.
- * void *certdbhandle - Normally this is NULL.  This memory will need 
+ * void *certdbhandle - Normally this is NULL.  This memory will need
  *     to be freed.
- * int needkeydb - boolean.  Must be !=0 if client Authentification 
+ * int needkeydb - boolean.  Must be !=0 if client Authentification
  *     is required
- * char *keydbpath - path to the key database.  This can be a shortcut 
+ * char *keydbpath - path to the key database.  This can be a shortcut
  *     to the directory name, if so key3.db will be postfixed to the string.
- * void *keydbhandle - Normally this is NULL, This memory will need 
- *     to be freed 
- * int needsecmoddb - boolean.  Must be !=0 to assure that the correct 
+ * void *keydbhandle - Normally this is NULL, This memory will need
+ *     to be freed
+ * int needsecmoddb - boolean.  Must be !=0 to assure that the correct
  *     security module is loaded into memory
  * char *secmodpath - path to the secmod.  This can be a shortcut to the
  *    directory name, if so secmod.db will be postfixed to the string.
  *
- *  These three functions are mutually exclusive.  You can only call 
+ *  These three functions are mutually exclusive.  You can only call
  *     one.  This means that, for a given process, you must call the
  *     appropriate initialization function for the life of the process.
  */
 
 
 /*
  * Initialize the secure parts (Security and SSL) of the runtime for use
  * by a client application.  This is only called once.
@@ -131,75 +131,75 @@ int LDAP_CALL ldapssl_client_init(
  * 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
  * to be passed in.  The sslstrength can take one of the following
  * values:
  *
- *      LDAPSSL_AUTH_WEAK: indicate that you accept the server's 
+ *      LDAPSSL_AUTH_WEAK: indicate that you accept the server's
  *                         certificate without checking the CA who
  *                         issued the certificate
- *      LDAPSSL_AUTH_CERT: indicates that you accept the server's 
+ *      LDAPSSL_AUTH_CERT: indicates that you accept the server's
  *                         certificate only if you trust the CA who
  *                         issued the certificate
  *      LDAPSSL_AUTH_CNCHECK:
  *                         indicates that you accept the server's
  *                         certificate only if you trust the CA who
  *                         issued the certificate and if the value
  *                         of the cn attribute is the DNS hostname
  *                         of the server.  If this option is selected,
  *			   please ensure that the "defhost" parameter
- *			   passed to ldapssl_init() consist of only 
+ *			   passed to ldapssl_init() consist of only
  *			   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. 
+ *			   be passed via a host:port option.
  *
  * Returns 0 if all goes well.
  */
 
 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, 
+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 
+ * 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, 
+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 );
 
 
 
 /*
  * get a meaningful error string back from the security library
- * this function should be called, if ldap_err2string doesn't 
+ * this function should be called, if ldap_err2string doesn't
  * identify the error code.
  */
 const char * LDAP_CALL ldapssl_err2string( const int prerrno );
 
 
 /*
  * Enable SSL client authentication on the given ld.
  * Returns 0 if all goes well.
@@ -210,17 +210,17 @@ int LDAP_CALL ldapssl_enable_clientauth(
 /*
  * 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 );
 
 
 /*
  * 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)
@@ -237,17 +237,17 @@ int LDAP_CALL ldapssl_get_option( LDAP *
 /*
  * 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 );
 
 /*
- * Reset an LDAP session from SSL to a non-secure status. Basically, 
+ * 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 );
 
 #ifdef __cplusplus
 }
 #endif
--- a/ldap/c-sdk/include/ldaplog.h
+++ b/ldap/c-sdk/include/ldaplog.h
@@ -1,43 +1,43 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 #ifndef _LDAPLOG_H
 #define _LDAPLOG_H
 
 #ifdef __cplusplus
 extern "C" {
 #endif
--- a/ldap/c-sdk/include/ldappr.h
+++ b/ldap/c-sdk/include/ldappr.h
@@ -1,43 +1,43 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 #ifndef LDAP_PR_H
 #define LDAP_PR_H
 
 #include "nspr.h"
 
 /*
@@ -250,17 +250,17 @@ int LDAP_CALL prldap_get_default_socket_
  * 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 );
 
 /* Function: prldap_is_installed()
- * Check if NSPR routine is installed 
+ * Check if NSPR routine is installed
  */
 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).
--- a/ldap/c-sdk/include/ldaprot.h
+++ b/ldap/c-sdk/include/ldaprot.h
@@ -1,43 +1,43 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 #ifndef _LDAPROT_H
 #define _LDAPROT_H
 
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -55,17 +55,17 @@ extern "C" {
 
 #define LDAP_URL_PREFIX		"ldap://"
 #define LDAP_URL_PREFIX_LEN	7
 #define LDAPS_URL_PREFIX	"ldaps://"
 #define LDAPS_URL_PREFIX_LEN	8
 #define LDAP_REF_STR		"Referral:\n"
 #define LDAP_REF_STR_LEN	10
 
-/* 
+/*
  * specific LDAP instantiations of BER types we know about
  */
 
 /* general stuff */
 #define LDAP_TAG_MESSAGE	0x30L	/* tag is 16 + constructed bit */
 #define OLD_LDAP_TAG_MESSAGE	0x10L	/* forgot the constructed bit  */
 #define LDAP_TAG_MSGID		0x02L   /* INTEGER */
 #define LDAP_TAG_LDAPDN		0x04L	/* OCTET STRING */
--- a/ldap/c-sdk/include/ldif.h
+++ b/ldap/c-sdk/include/ldif.h
@@ -1,43 +1,43 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 /*
  * Copyright (c) 1996 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms are permitted
  * provided that this notice is preserved and that due credit is given
@@ -78,17 +78,17 @@ extern "C" {
  * first newline + base64 value + continued lines.  Each continued line
  * needs room for a newline and a leading space character.
  */
 #define LDIF_SIZE_NEEDED(tlen,vlen) \
     ((tlen) + 4 + LDIF_BASE64_LEN(vlen) \
     + ((LDIF_BASE64_LEN(vlen) + tlen + 3) / LDIF_MAX_LINE_WIDTH * 2 ))
 
 /*
- * Options for ldif_put_type_and_value_with_options() and 
+ * 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 );
--- a/ldap/c-sdk/include/portable.h
+++ b/ldap/c-sdk/include/portable.h
@@ -1,43 +1,43 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 /*
  * Copyright (c) 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms are permitted
  * provided that this notice is preserved and that due credit is given
@@ -136,32 +136,32 @@
 #define HAVE_SETPWFILE
 #endif
 #endif
 
 /*
  * Are sys_errlist and sys_nerr declared in stdio.h?
  */
 #ifndef SYSERRLIST_IN_STDIO
-#if defined( freebsd ) 
+#if defined( freebsd )
 #define SYSERRLIST_IN_STDIO
 #endif
 #endif
 
 
 /*
  * Is snprintf() part of the standard C runtime library?
  */
 #if defined(_WINDOWS)
 #define snprintf _snprintf
 #endif
 
 
 /*
- * Async IO.  Use a non blocking implementation of connect() and 
+ * Async IO.  Use a non blocking implementation of connect() and
  * dns functions
  */
 #if !defined(LDAP_ASYNC_IO)
 #if !defined(_WINDOWS) && !defined(macintosh)
 #define LDAP_ASYNC_IO
 #endif /* _WINDOWS */
 #endif
 
@@ -186,17 +186,17 @@
 
 
 /*
  * for connect() -- must we block signals when calling connect()?  This
  * is necessary on some buggy UNIXes.
  */
 #if !defined(NSLDAPI_CONNECT_MUST_NOT_BE_INTERRUPTED) && \
 	( defined(AIX) || defined(IRIX) || defined(HPUX) || defined(SUNOS4) \
-	|| defined(SOLARIS) || defined(OSF1) ||defined(freebsd)) 
+	|| defined(SOLARIS) || defined(OSF1) ||defined(freebsd))
 #define NSLDAPI_CONNECT_MUST_NOT_BE_INTERRUPTED
 #endif
 
 /*
  * On most platforms, sigprocmask() works fine even in multithreaded code.
  * But not everywhere.
  */
 #ifdef AIX
@@ -257,17 +257,17 @@ int strncasecmp(const char *, const char
 #define STRTOK( s1, s2, l )		strtok( s1, s2 )
 #elif defined(XP_BEOS)
 #define GETHOSTBYNAME( n, r, b, l, e )  gethostbyname( n )
 #define NSLDAPI_CTIME( c, b, l )                ctime_r( c, b )
 #define STRTOK( s1, s2, l )		strtok_r( s1, s2, l )
 #define HAVE_STRTOK_R
 #else /* UNIX */
 #if (defined(AIX) && defined(_THREAD_SAFE)) || defined(OSF1)
-#define NSLDAPI_NETDB_BUF_SIZE	 sizeof(struct protoent_data) 
+#define NSLDAPI_NETDB_BUF_SIZE	 sizeof(struct protoent_data)
 #else
 #define NSLDAPI_NETDB_BUF_SIZE	1024
 #endif
 
 #if defined(sgi) || defined(HPUX9) || defined(SCOOS) || \
     defined(UNIXWARE) || defined(SUNOS4) || defined(SNI) || defined(BSDI) || \
     defined(NCR) || defined(OSF1) || defined(NEC) || defined(VMS) || \
     ( defined(HPUX10) && !defined(_REENTRANT)) || defined(HPUX11) || \
--- a/ldap/c-sdk/include/proto-ntutil.h
+++ b/ldap/c-sdk/include/proto-ntutil.h
@@ -1,94 +1,94 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 /******************************************************
  *
  *  proto-ntutil.h - Prototypes for utility functions used
  *  throughout slapd on NT.
  *
  ******************************************************/
 #if defined( _WINDOWS )
 
 #ifndef _PROTO_NTUTIL
 #define _PROTO_NTUTIL
 
-/* 
+/*
  *
- * ntreg.c  
+ * ntreg.c
  *
  */
 extern int SlapdGetRegSZ( LPTSTR lpszRegKey, LPSTR lpszValueName, LPTSTR lpszValue );
 
-/* 
+/*
  *
- * getopt.c  
+ * getopt.c
  *
  */
 extern int getopt (int argc, char *const *argv, const char *optstring);
 
-/* 
+/*
  *
- * ntevent.c  
+ * 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, 
+extern void ReportSlapdEvent(WORD wEventType, DWORD dwIdEvent, 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);
 
-/* 
+/*
  *
- * ntgetpassword.c  
+ * ntgetpassword.c
  *
  */
 #ifdef NET_SSL
 extern char *Slapd_GetPassword();
 #ifdef FORTEZZA
 extern char *Slapd_GetFortezzaPIN();
 #endif
 extern void CenterDialog(HWND hwndParent, HWND hwndDialog);
--- a/ldap/c-sdk/include/regex.h
+++ b/ldap/c-sdk/include/regex.h
@@ -1,43 +1,43 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 #if defined( macintosh ) || defined( DOS ) || defined( _WINDOWS ) || defined( NEED_BSDREGEX ) || defined( XP_OS2 )
 /*
  * Copyright (c) 1993 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms are permitted
@@ -51,17 +51,17 @@
  * regex.h -- includes for regular expression matching routines
  * 13 August 1993 Mark C Smith
  */
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include "ldap.h" 
+#include "ldap.h"
 
 #if !defined( NEEDPROTOS ) && defined( __STDC__ )
 #define NEEDPROTOS
 #endif
 
 #ifdef _SLDAPD_H_	/* server build: no need to use LDAP_CALL stuff */
 #ifdef LDAP_CALL
 #undef LDAP_CALL
--- a/ldap/c-sdk/include/srchpref.h
+++ b/ldap/c-sdk/include/srchpref.h
@@ -1,43 +1,43 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 /*
  * Copyright (c) 1993, 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms are permitted
  * provided that this notice is preserved and that due credit is given
@@ -56,17 +56,17 @@
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /* calling conventions used by library */
 #ifndef LDAP_CALL
 #if defined( _WINDOWS ) || defined( _WIN32 )
 #define LDAP_C __cdecl
-#ifndef _WIN32 
+#ifndef _WIN32
 #define __stdcall _far _pascal
 #define LDAP_CALLBACK _loadds
 #else
 #define LDAP_CALLBACK
 #endif /* _WIN32 */
 #define LDAP_PASCAL __stdcall
 #define LDAP_CALL LDAP_PASCAL
 #else /* _WINDOWS */
--- a/ldap/c-sdk/libraries/liblber/lber-int.h
+++ b/ldap/c-sdk/libraries/liblber/lber-int.h
@@ -1,43 +1,43 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 /*
  * Copyright (c) 1990 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms are permitted
  * provided that this notice is preserved and that due credit is given
@@ -260,20 +260,20 @@ 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 );
 
-/* blame: dboreham 
+/* 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. 
+ * 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 */
 
--- a/ldap/c-sdk/libraries/libldap/ldap-int.h
+++ b/ldap/c-sdk/libraries/libldap/ldap-int.h
@@ -1,43 +1,43 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 #ifndef _LDAPINT_H
 #define _LDAPINT_H
 
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 #include <errno.h>
@@ -131,35 +131,35 @@
 
 /* default limit on nesting of referrals */
 #define LDAP_DEFAULT_REFHOPLIMIT	5
 #ifdef LDAP_DNS
 #define LDAP_DX_REF_STR		"dx://"
 #define LDAP_DX_REF_STR_LEN	5
 #endif /* LDAP_DNS */
 
-typedef enum { 
-    LDAP_CACHE_LOCK, 
-    LDAP_MEMCACHE_LOCK, 
+typedef enum {
+    LDAP_CACHE_LOCK,
+    LDAP_MEMCACHE_LOCK,
     LDAP_MSGID_LOCK,
-    LDAP_REQ_LOCK, 
-    LDAP_RESP_LOCK, 
-    LDAP_ABANDON_LOCK, 
+    LDAP_REQ_LOCK,
+    LDAP_RESP_LOCK,
+    LDAP_ABANDON_LOCK,
     LDAP_CTRL_LOCK,
-    LDAP_OPTION_LOCK, 
-    LDAP_ERR_LOCK, 
-    LDAP_CONN_LOCK, 
+    LDAP_OPTION_LOCK,
+    LDAP_ERR_LOCK,
+    LDAP_CONN_LOCK,
     LDAP_IOSTATUS_LOCK,		/* serializes access to ld->ld_iostatus */
-    LDAP_RESULT_LOCK, 
-    LDAP_PEND_LOCK, 
-    LDAP_THREADID_LOCK, 
+    LDAP_RESULT_LOCK,
+    LDAP_PEND_LOCK,
+    LDAP_THREADID_LOCK,
 #ifdef LDAP_SASLIO_HOOKS
     LDAP_SASL_LOCK,
 #endif
-    LDAP_MAX_LOCK 
+    LDAP_MAX_LOCK
 } LDAPLock;
 
 /*
  * This structure represents both ldap messages and ldap responses.
  * These are really the same, except in the case of search responses,
  * where a response has multiple messages.
  */
 
@@ -456,17 +456,17 @@ struct ldap {
             } else { \
                 (ld)->ld_mutex_lock_fn(ld->ld_mutex[lock]); \
                 (ld)->ld_mutex_threadid[lock] = ld->ld_threadid_fn(); \
                 (ld)->ld_mutex_refcnt[lock] = 1; \
             } \
         } else { \
             (ld)->ld_mutex_lock_fn(ld->ld_mutex[lock]); \
         } \
-    } 
+    }
 
 #define LDAP_MUTEX_UNLOCK(ld, lock) \
     if ((ld)->ld_mutex_lock_fn != NULL && ld->ld_mutex != NULL) { \
         if ((ld)->ld_threadid_fn != NULL) { \
             if ((ld)->ld_mutex_threadid[lock] == (ld)->ld_threadid_fn()) { \
                 (ld)->ld_mutex_refcnt[lock]--; \
                 if ((ld)->ld_mutex_refcnt[lock] <= 0) { \
                     (ld)->ld_mutex_threadid[lock] = (void *) -1; \
@@ -559,32 +559,32 @@ struct ldap {
  */
 #define LDAP_IS_CLDAP( ld )	( ld->ld_sbp->sb_naddr > 0 )
 
 /*
  * Some Unix error defs. Under CW 7, we can't define OTUNIXERRORS because
  * it generates many conflicts with errno.h. Define what we need here.
  * These need to be in sync with OpenTransport.h
  */
- 
+
 #if defined(macintosh)
 #define EWOULDBLOCK     35
 #define EHOSTUNREACH    65
 #endif
 
 /*
  * handy macro to check errno "e" for an "in progress" sort of error
  */
 #if defined(macintosh) || defined(_WINDOWS)
 #define NSLDAPI_ERRNO_IO_INPROGRESS( e )  ((e) == EWOULDBLOCK || (e) == EAGAIN)
 #else
 #ifdef EAGAIN
 #define NSLDAPI_ERRNO_IO_INPROGRESS( e )  ((e) == EWOULDBLOCK || (e) == EINPROGRESS || (e) == EAGAIN)
 #else /* EAGAIN */
-#define NSLDAPI_ERRNO_IO_INPROGRESS( e )  ((e) == EWOULDBLOCK || (e) == EINPROGRESS) 
+#define NSLDAPI_ERRNO_IO_INPROGRESS( e )  ((e) == EWOULDBLOCK || (e) == EINPROGRESS)
 #endif /* EAGAIN */
 #endif /* macintosh || _WINDOWS*/
 
 /*
  * macro to return the LDAP protocol version we are using
  */
 #define NSLDAPI_LDAP_VERSION( ld )	( (ld)->ld_defconn == NULL ? \
 					(ld)->ld_version : \
--- a/ldap/c-sdk/libraries/libprldap/ldappr-int.h
+++ b/ldap/c-sdk/libraries/libprldap/ldappr-int.h
@@ -1,43 +1,43 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * 
- * The contents of this file are subject to the Mozilla Public License Version 
- * 1.1 (the "License"); you may not use this file except in compliance with 
- * the License. You may obtain a copy of the License at 
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
- * 
+ *
  * The Original Code is Mozilla Communicator client code, released
  * March 31, 1998.
- * 
+ *
  * The Initial Developer of the Original Code is
  * Netscape Communications Corporation.
  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  * the Initial Developer. All Rights Reserved.
- * 
+ *
  * Contributor(s):
- * 
+ *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * 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 ***** */
 
 /*
  * Internal header for libprldap -- glue NSPR (Netscape Portable Runtime)
  * to libldap.
  *
  */
 
--- a/ldap/xpcom/src/nsLDAPBERElement.cpp
+++ b/ldap/xpcom/src/nsLDAPBERElement.cpp
@@ -1,10 +1,10 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- * 
+ *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsLDAPBERElement.h"
 #include "nsString.h"
 #include "nsCOMPtr.h"
 #include "nsLDAPBERValue.h"
@@ -27,30 +27,30 @@ nsLDAPBERElement::~nsLDAPBERElement()
   return;
 }
 
 NS_IMETHODIMP
 nsLDAPBERElement::Init(nsILDAPBERValue *aValue)
 {
   if (aValue) {
     return NS_ERROR_NOT_IMPLEMENTED;
-  } 
+  }
 
   mElement = ber_alloc_t(LBER_USE_DER);
   return mElement ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
 }
 
 /* void putString (in AUTF8String aString, in unsigned long aTag); */
 NS_IMETHODIMP
-nsLDAPBERElement::PutString(const nsACString & aString, uint32_t aTag, 
+nsLDAPBERElement::PutString(const nsACString & aString, uint32_t aTag,
                             uint32_t *aBytesWritten)
 {
   // XXX if the string translation feature of the C SDK is ever used,
   // this const_cast will break
-  int i = ber_put_ostring(mElement, 
+  int i = ber_put_ostring(mElement,
                           const_cast<char *>(PromiseFlatCString(aString).get()),
                           aString.Length(), aTag);
 
   if (i < 0) {
     return NS_ERROR_FAILURE;
   }
 
   *aBytesWritten = i;
@@ -94,17 +94,17 @@ NS_IMETHODIMP nsLDAPBERElement::GetAsVal
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
   struct berval *bv;
   if ( ber_flatten(mElement, &bv) < 0 ) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
-  nsresult rv = berValue->Set(bv->bv_len, 
+  nsresult rv = berValue->Set(bv->bv_len,
                               reinterpret_cast<uint8_t *>(bv->bv_val));
 
   // whether or not we've succeeded, we're done with the ldap c sdk struct
   ber_bvfree(bv);
 
   // as of this writing, this error can only be NS_ERROR_OUT_OF_MEMORY
   if (NS_FAILED(rv)) {
     return rv;
--- a/ldap/xpcom/src/nsLDAPBERElement.h
+++ b/ldap/xpcom/src/nsLDAPBERElement.h
@@ -1,10 +1,10 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- * 
+ *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "lber.h"
 #include "nsILDAPBERElement.h"
 
 // 070af769-b7f5-40e7-81be-196155ead84c
--- a/ldap/xpcom/src/nsLDAPBERValue.cpp
+++ b/ldap/xpcom/src/nsLDAPBERValue.cpp
@@ -1,10 +1,10 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * 
+ *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsLDAPBERValue.h"
 #include "nsMemory.h"
 #include "nsString.h"
 
@@ -16,58 +16,58 @@ nsLDAPBERValue::nsLDAPBERValue() : mValu
 
 nsLDAPBERValue::~nsLDAPBERValue()
 {
     if (mValue) {
         free(mValue);
     }
 }
 
-// void get (out unsigned long aCount, 
+// void get (out unsigned long aCount,
 //           [array, size_is (aCount), retval] out octet aRetVal); */
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsLDAPBERValue::Get(uint32_t *aCount, uint8_t **aRetVal)
 {
     // if mSize = 0, return a count of a 0 and a null pointer
 
     if (mSize) {
         // get a buffer to hold a copy of the data
         //
         uint8_t *array = static_cast<uint8_t *>(moz_xmalloc(mSize));
 
         if (!array) {
             return NS_ERROR_OUT_OF_MEMORY;
         }
-    
+
         // copy and return
         //
         memcpy(array, mValue, mSize);
         *aRetVal = array;
     } else {
         *aRetVal = 0;
     }
 
     *aCount = mSize;
     return NS_OK;
 }
 
-// void set(in unsigned long aCount, 
+// void set(in unsigned long aCount,
 //          [array, size_is(aCount)] in octet aValue);
 NS_IMETHODIMP
 nsLDAPBERValue::Set(uint32_t aCount, uint8_t *aValue)
 {
     // get rid of any old value being held here
     //
     if (mValue) {
         free(mValue);
     }
 
     // if this is a non-zero value, allocate a buffer and copy
     //
-    if (aCount) { 
+    if (aCount) {
         // get a buffer to hold a copy of this data
         //
         mValue = static_cast<uint8_t *>(moz_xmalloc(aCount));
         if (!mValue) {
             return NS_ERROR_OUT_OF_MEMORY;
         }
 
         // copy the data and return
--- a/ldap/xpcom/src/nsLDAPBERValue.h
+++ b/ldap/xpcom/src/nsLDAPBERValue.h
@@ -1,10 +1,10 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * 
+ *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef _nsLDAPBERValue_h_
 #define _nsLDAPBERValue_h_
 
 #include "ldap.h"
@@ -18,21 +18,21 @@
 
 class nsLDAPBERValue : public nsILDAPBERValue
 {
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSILDAPBERVALUE
 
     nsLDAPBERValue();
-    
+
 protected:
     virtual ~nsLDAPBERValue();
 
-    /** 
+    /**
      * nsLDAPControl needs to be able to grovel through this without an
      * an extra copy
      */
     friend class nsLDAPControl;
 
     uint8_t *mValue;    // pointer to an array
     uint32_t mSize;	    // size of the value, in bytes
 };
--- a/ldap/xpcom/src/nsLDAPControl.cpp
+++ b/ldap/xpcom/src/nsLDAPControl.cpp
@@ -1,10 +1,10 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- * 
+ *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsLDAPControl.h"
 #include "prmem.h"
 #include "plstr.h"
 #include "nsLDAPBERValue.h"
@@ -43,17 +43,17 @@ nsLDAPControl::GetValue(nsILDAPBERValue 
 NS_IMETHODIMP
 nsLDAPControl::SetValue(nsILDAPBERValue * aValue)
 {
   mValue = aValue;
   return NS_OK;
 }
 
 /* attribute boolean isCritical; */
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsLDAPControl::GetIsCritical(bool *aIsCritical)
 {
   *aIsCritical = mIsCritical;
   return NS_OK;
 }
 NS_IMETHODIMP
 nsLDAPControl::SetIsCritical(bool aIsCritical)
 {
@@ -87,17 +87,17 @@ nsLDAPControl::ToLDAPControl(LDAPControl
 
   if (!mValue) {
     // no data associated with this control
     ctl->ldctl_value.bv_len = 0;
     ctl->ldctl_value.bv_val = 0;
   } else {
 
     // just to make the code below a bit more readable
-    nsLDAPBERValue *nsBerVal = 
+    nsLDAPBERValue *nsBerVal =
       static_cast<nsLDAPBERValue *>(static_cast<nsILDAPBERValue *>
                              (mValue.get()));
     ctl->ldctl_value.bv_len = nsBerVal->mSize;
 
     if (!nsBerVal->mSize) {
       // a zero-length value is associated with this control
       return NS_ERROR_NOT_IMPLEMENTED;
     } else {
@@ -105,17 +105,17 @@ nsLDAPControl::ToLDAPControl(LDAPControl
       // same for the berval itself
       ctl->ldctl_value.bv_len = nsBerVal->mSize;
       ctl->ldctl_value.bv_val = static_cast<char *>
                                            (PR_Malloc(nsBerVal->mSize));
       if (!ctl->ldctl_value.bv_val) {
         ldap_control_free(ctl);
         return NS_ERROR_OUT_OF_MEMORY;
       }
-  
+
       memcpy(ctl->ldctl_value.bv_val, nsBerVal->mValue,
              ctl->ldctl_value.bv_len);
     }
   }
 
   *control = ctl;
 
   return NS_OK;
--- a/ldap/xpcom/src/nsLDAPControl.h
+++ b/ldap/xpcom/src/nsLDAPControl.h
@@ -1,10 +1,10 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- * 
+ *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsILDAPControl.h"
 #include "nsCOMPtr.h"
 #include "nsILDAPBERValue.h"
 #include "nsString.h"
@@ -20,17 +20,17 @@ class nsLDAPControl final : public nsILD
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSILDAPCONTROL
 
   nsLDAPControl();
 
   /**
    * return a pointer to C-SDK compatible LDAPControl structure.  Note that
-   * this is allocated with NS_Alloc and must be freed with NS_Free, both by 
+   * this is allocated with NS_Alloc and must be freed with NS_Free, both by
    * ldap_control_free() and friends.
    *
    * @exception null pointer return if allocation failed
    */
   nsresult ToLDAPControl(LDAPControl **aControl);
 
 private:
   ~nsLDAPControl();
--- a/ldap/xpcom/src/nsLDAPMessage.cpp
+++ b/ldap/xpcom/src/nsLDAPMessage.cpp
@@ -1,10 +1,10 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * 
+ *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsLDAPInternal.h"
 #include "nsLDAPMessage.h"
 #include "nspr.h"
 #include "nsDebug.h"
@@ -26,17 +26,17 @@ NS_INTERFACE_MAP_BEGIN(nsLDAPMessage)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsILDAPMessage)
   NS_IMPL_QUERY_CLASSINFO(nsLDAPMessage)
 NS_INTERFACE_MAP_END
 NS_IMPL_CI_INTERFACE_GETTER(nsLDAPMessage, nsILDAPMessage)
 
 
 // constructor
 //
-nsLDAPMessage::nsLDAPMessage() 
+nsLDAPMessage::nsLDAPMessage()
     : mMsgHandle(0),
       mErrorCode(LDAP_SUCCESS),
       mMatchedDn(0),
       mErrorMessage(0),
       mReferrals(0),
       mServerControls(0)
 {
 }
@@ -44,17 +44,17 @@ nsLDAPMessage::nsLDAPMessage()
 // destructor
 //
 nsLDAPMessage::~nsLDAPMessage(void)
 {
     if (mMsgHandle) {
         int rc = ldap_msgfree(mMsgHandle);
 
 // If you are having problems compiling the following code on a Solaris
-// machine with the Forte 6 Update 1 compilers, then you need to make 
+// machine with the Forte 6 Update 1 compilers, then you need to make
 // sure you have applied all the required patches. See:
 // http://www.mozilla.org/unix/solaris-build.html for more details.
 
         switch(rc) {
         case LDAP_RES_BIND:
         case LDAP_RES_SEARCH_ENTRY:
         case LDAP_RES_SEARCH_RESULT:
         case LDAP_RES_MODIFY:
@@ -64,25 +64,25 @@ nsLDAPMessage::~nsLDAPMessage(void)
         case LDAP_RES_COMPARE:
         case LDAP_RES_SEARCH_REFERENCE:
         case LDAP_RES_EXTENDED:
         case LDAP_RES_ANY:
             // success
             break;
 
         case LDAP_SUCCESS:
-            // timed out (dunno why LDAP_SUCCESS is used to indicate this) 
-            MOZ_LOG(gLDAPLogModule, mozilla::LogLevel::Warning, 
+            // timed out (dunno why LDAP_SUCCESS is used to indicate this)
+            MOZ_LOG(gLDAPLogModule, mozilla::LogLevel::Warning,
                    ("nsLDAPMessage::~nsLDAPMessage: ldap_msgfree() "
                     "timed out\n"));
             break;
 
         default:
             // other failure
-            MOZ_LOG(gLDAPLogModule, mozilla::LogLevel::Warning, 
+            MOZ_LOG(gLDAPLogModule, mozilla::LogLevel::Warning,
                    ("nsLDAPMessage::~nsLDAPMessage: ldap_msgfree() "
                     "failed: %s\n", ldap_err2string(rc)));
             break;
         }
     }
 
     if (mMatchedDn) {
         ldap_memfree(mMatchedDn);
@@ -97,44 +97,44 @@ nsLDAPMessage::~nsLDAPMessage(void)
     }
 
     if (mServerControls) {
         ldap_controls_free(mServerControls);
     }
 
 }
 
-/** 
+/**
  * Initializes a message.
  *
  * @param aConnection           The nsLDAPConnection this message is on
  * @param aMsgHandle            The native LDAPMessage to be wrapped.
- * 
+ *
  * @exception NS_ERROR_ILLEGAL_VALUE        null pointer passed in
  * @exception NS_ERROR_UNEXPECTED           internal err; shouldn't happen
  * @exception NS_ERROR_LDAP_DECODING_ERROR  problem during BER decoding
  * @exception NS_ERROR_OUT_OF_MEMORY        ran out of memory
  */
-nsresult 
+nsresult
 nsLDAPMessage::Init(nsILDAPConnection *aConnection, LDAPMessage *aMsgHandle)
 {
-    int parseResult; 
+    int parseResult;
 
     if (!aConnection || !aMsgHandle) {
         NS_WARNING("Null pointer passed in to nsLDAPMessage::Init()");
         return NS_ERROR_ILLEGAL_VALUE;
     }
 
     // initialize the appropriate member vars
     //
     mConnection = aConnection;
     mMsgHandle = aMsgHandle;
 
     // cache the connection handle.  we're violating the XPCOM type-system
-    // here since we're a friend of the connection class and in the 
+    // here since we're a friend of the connection class and in the
     // same module.
     //
     mConnectionHandle = static_cast<nsLDAPConnection *>(aConnection)->mConnectionHandle;
 
     // do any useful message parsing
     //
     const int msgType = ldap_msgtype(mMsgHandle);
     if ( msgType == -1) {
@@ -158,32 +158,32 @@ nsLDAPMessage::Init(nsILDAPConnection *a
 
     case LDAP_RES_BIND:
     case LDAP_RES_SEARCH_RESULT:
     case LDAP_RES_MODIFY:
     case LDAP_RES_ADD:
     case LDAP_RES_DELETE:
     case LDAP_RES_MODRDN:
     case LDAP_RES_COMPARE:
-        parseResult = ldap_parse_result(mConnectionHandle, 
+        parseResult = ldap_parse_result(mConnectionHandle,
                                         mMsgHandle, &mErrorCode, &mMatchedDn,
-                                        &mErrorMessage,&mReferrals, 
+                                        &mErrorMessage,&mReferrals,
                                         &mServerControls, 0);
         switch (parseResult) {
-        case LDAP_SUCCESS: 
+        case LDAP_SUCCESS:
             // we're good
             break;
 
         case LDAP_DECODING_ERROR:
             NS_WARNING("nsLDAPMessage::Init(): ldap_parse_result() hit a "
                        "decoding error");
             return NS_ERROR_LDAP_DECODING_ERROR;
 
         case LDAP_NO_MEMORY:
-            NS_WARNING("nsLDAPMessage::Init(): ldap_parse_result() ran out " 
+            NS_WARNING("nsLDAPMessage::Init(): ldap_parse_result() ran out "
                        "of memory");
             return NS_ERROR_OUT_OF_MEMORY;
 
         case LDAP_PARAM_ERROR:
         case LDAP_MORE_RESULTS_TO_RETURN:
         case LDAP_NO_RESULTS_RETURNED:
         default:
             NS_ERROR("nsLDAPMessage::Init(): ldap_parse_result returned "
@@ -230,25 +230,25 @@ nsLDAPMessage::GetType(int32_t *aType)
     if (*aType == -1) {
         return NS_ERROR_UNEXPECTED;
     };
 
     return NS_OK;
 }
 
 // we don't get to use exceptions, so we'll fake it.  this is an error
-// handler for IterateAttributes().  
+// handler for IterateAttributes().
 //
 nsresult
-nsLDAPMessage::IterateAttrErrHandler(int32_t aLderrno, uint32_t *aAttrCount, 
+nsLDAPMessage::IterateAttrErrHandler(int32_t aLderrno, uint32_t *aAttrCount,
                                      char** *aAttributes, BerElement *position)
 {
 
-    // if necessary, free the position holder used by 
-    // ldap_{first,next}_attribute()  
+    // if necessary, free the position holder used by
+    // ldap_{first,next}_attribute()
     //
     if (position) {
         ldap_ber_free(position, 0);
     }
 
     // deallocate any entries in the array that have been allocated, then
     // the array itself
     //
@@ -279,32 +279,32 @@ nsLDAPMessage::IterateAttrErrHandler(int
     }
 
     NS_WARNING("nsLDAPMessage::IterateAttributes(): LDAP C SDK returned "
                "unexpected value; possible bug or memory corruption");
     return NS_ERROR_UNEXPECTED;
 }
 
 
-// wrapper for ldap_first_attribute 
+// wrapper for ldap_first_attribute
 //
 NS_IMETHODIMP
 nsLDAPMessage::GetAttributes(uint32_t *aAttrCount, char** *aAttributes)
 {
     return IterateAttributes(aAttrCount, aAttributes, true);
 }
 
 // if getP is true, we get the attributes by recursing once
 // (without getP set) in order to fill in *attrCount, then allocate
-// and fill in the *aAttributes.  
-// 
+// and fill in the *aAttributes.
+//
 // if getP is false, just fill in *attrCount and return
-// 
+//
 nsresult
-nsLDAPMessage::IterateAttributes(uint32_t *aAttrCount, char** *aAttributes, 
+nsLDAPMessage::IterateAttributes(uint32_t *aAttrCount, char** *aAttributes,
                  bool getP)
 {
     BerElement *position;
     nsresult rv;
 
     if (!aAttrCount || !aAttributes ) {
         return NS_ERROR_INVALID_POINTER;
     }
@@ -322,86 +322,86 @@ nsLDAPMessage::IterateAttributes(uint32_
 
         // create an array of the appropriate size
         //
         *aAttributes = static_cast<char **>(moz_xmalloc(*aAttrCount *
                                                       sizeof(char *)));
         if (!*aAttributes) {
             return NS_ERROR_OUT_OF_MEMORY;
         }
-    } 
+    }
 
     // get the first attribute
     //
-    char *attr = ldap_first_attribute(mConnectionHandle, 
-                                      mMsgHandle, 
+    char *attr = ldap_first_attribute(mConnectionHandle,
+                                      mMsgHandle,
                                       &position);
     if (!attr) {
         return IterateAttrErrHandler(ldap_get_lderrno(mConnectionHandle, 0, 0),
                                      aAttrCount, aAttributes, position);
     }
 
     // if we're getting attributes, try and fill in the first field
     //
     if (getP) {
         (*aAttributes)[0] = NS_strdup(attr);
         if (!(*aAttributes)[0]) {
             ldap_memfree(attr);
             free(*aAttributes);
             return NS_ERROR_OUT_OF_MEMORY;
         }
 
-        // note that we start counting again, in order to keep our place in 
+        // note that we start counting again, in order to keep our place in
         // the array so that we can unwind gracefully and avoid leakage if
         // we hit an error as we're filling in the array
         //
         *aAttrCount = 1;
     } else {
 
         // otherwise just update the count
         //
         *aAttrCount = 1;
     }
     ldap_memfree(attr);
 
     while (1) {
-    
+
         // get the next attribute
         //
         attr = ldap_next_attribute(mConnectionHandle, mMsgHandle, position);
 
         // check to see if there is an error, or if we're just done iterating
         //
         if (!attr) {
-            
+ 
             // bail out if there's an error
             //
             int32_t lderrno = ldap_get_lderrno(mConnectionHandle, 0, 0);
             if (lderrno != LDAP_SUCCESS) {
-                return IterateAttrErrHandler(lderrno, aAttrCount, aAttributes, 
+                return IterateAttrErrHandler(lderrno, aAttrCount, aAttributes,
                                              position);
             }
 
             // otherwise, there are no more attributes; we're done with
             // the while loop
             //
             break;
 
         } else if (getP) {
 
-            // if ldap_next_attribute did return successfully, and 
+            // if ldap_next_attribute did return successfully, and
             // we're supposed to fill in a value, do so.
             //
             (*aAttributes)[*aAttrCount] = NS_strdup(attr);
             if (!(*aAttributes)[*aAttrCount]) {
                 ldap_memfree(attr);
-                return IterateAttrErrHandler(LDAP_NO_MEMORY, aAttrCount, 
+                return IterateAttrErrHandler(LDAP_NO_MEMORY, aAttrCount,
                                              aAttributes, position);
             }
-       
+
         }
         ldap_memfree(attr);
 
         // we're done using *aAttrCount as a c-style array index (ie starting
         // at 0).  update it to reflect the number of elements now in the array
         //
         *aAttrCount += 1;
     }
@@ -443,39 +443,39 @@ NS_IMETHODIMP nsLDAPMessage::GetDn(nsACS
     ldap_memfree(rawDn);
 
     return NS_OK;
 }
 
 // wrapper for ldap_get_values()
 //
 NS_IMETHODIMP
-nsLDAPMessage::GetValues(const char *aAttr, uint32_t *aCount, 
+nsLDAPMessage::GetValues(const char *aAttr, uint32_t *aCount,
                          char16_t ***aValues)
 {
     char **values;
-    
+
 #if defined(DEBUG)
     // We only want this being logged for debug builds so as not to affect performance too much.
     MOZ_LOG(gLDAPLogModule, mozilla::LogLevel::Debug,
            ("nsLDAPMessage::GetValues(): called with aAttr = '%s'", aAttr));
 #endif
 
     values = ldap_get_values(mConnectionHandle, mMsgHandle, aAttr);
 
     // bail out if there was a problem
     //
     if (!values) {
         int32_t lderrno = ldap_get_lderrno(mConnectionHandle, 0, 0);
 
         if ( lderrno == LDAP_DECODING_ERROR ) {
-            // this may not be an error; it could just be that the 
+            // this may not be an error; it could just be that the
             // caller has asked for an attribute that doesn't exist.
             //
-            MOZ_LOG(gLDAPLogModule, mozilla::LogLevel::Warning, 
+            MOZ_LOG(gLDAPLogModule, mozilla::LogLevel::Warning,
                    ("nsLDAPMessage::GetValues(): ldap_get_values returned "
                     "LDAP_DECODING_ERROR"));
             return NS_ERROR_LDAP_DECODING_ERROR;
 
         } else if ( lderrno == LDAP_PARAM_ERROR ) {
             NS_ERROR("nsLDAPMessage::GetValues(): internal error: 1");
             return NS_ERROR_UNEXPECTED;
 
@@ -492,68 +492,68 @@ nsLDAPMessage::GetValues(const char *aAt
     // create an array of the appropriate size
     //
     *aValues = static_cast<char16_t **>(moz_xmalloc(numVals * sizeof(char16_t *)));
     if (!*aValues) {
         ldap_value_free(values);
         return NS_ERROR_OUT_OF_MEMORY;
     }
 
-    // clone the array (except for the trailing NULL entry) using the 
+    // clone the array (except for the trailing NULL entry) using the
     // shared allocator for XPCOM correctness
     //
     uint32_t i;
     for ( i = 0 ; i < numVals ; i++ ) {
         nsDependentCString sValue(values[i]);
         if (IsUTF8(sValue))
             (*aValues)[i] = ToNewUnicode(NS_ConvertUTF8toUTF16(sValue));
         else
             (*aValues)[i] = ToNewUnicode(NS_ConvertASCIItoUTF16(sValue));
         if ( ! (*aValues)[i] ) {
             NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(i, aValues);
             ldap_value_free(values);
             return NS_ERROR_OUT_OF_MEMORY;
         }
     }
 
-    // now free our value array since we already cloned the values array 
+    // now free our value array since we already cloned the values array
     // to the 'aValues' results array.
     ldap_value_free(values);
 
     *aCount = numVals;
     return NS_OK;
 }
 
 // wrapper for get_values_len
 //
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsLDAPMessage::GetBinaryValues(const char *aAttr, uint32_t *aCount,
                                nsILDAPBERValue ***aValues)
 {
     struct berval **values;
 
 #if defined(DEBUG)
     // We only want this being logged for debug builds so as not to affect performance too much.
     MOZ_LOG(gLDAPLogModule, mozilla::LogLevel::Debug,
-           ("nsLDAPMessage::GetBinaryValues(): called with aAttr = '%s'", 
+           ("nsLDAPMessage::GetBinaryValues(): called with aAttr = '%s'",
             aAttr));
 #endif
 
     values = ldap_get_values_len(mConnectionHandle, mMsgHandle, aAttr);
 
     // bail out if there was a problem
     //
     if (!values) {
         int32_t lderrno = ldap_get_lderrno(mConnectionHandle, 0, 0);
 
         if ( lderrno == LDAP_DECODING_ERROR ) {
-            // this may not be an error; it could just be that the 
+            // this may not be an error; it could just be that the
             // caller has asked for an attribute that doesn't exist.
             //
-            MOZ_LOG(gLDAPLogModule, mozilla::LogLevel::Warning, 
+            MOZ_LOG(gLDAPLogModule, mozilla::LogLevel::Warning,
                    ("nsLDAPMessage::GetBinaryValues(): ldap_get_values "
                     "returned LDAP_DECODING_ERROR"));
             return NS_ERROR_LDAP_DECODING_ERROR;
 
         } else if ( lderrno == LDAP_PARAM_ERROR ) {
             NS_ERROR("nsLDAPMessage::GetBinaryValues(): internal error: 1");
             return NS_ERROR_UNEXPECTED;
 
@@ -564,24 +564,24 @@ nsLDAPMessage::GetBinaryValues(const cha
     }
 
     // count the values
     //
     uint32_t numVals = ldap_count_values_len(values);
 
     // create the out array
     //
-    *aValues = 
+    *aValues =
         static_cast<nsILDAPBERValue **>(moz_xmalloc(numVals * sizeof(nsILDAPBERValue)));
     if (!aValues) {
         ldap_value_free_len(values);
         return NS_ERROR_OUT_OF_MEMORY;
     }
 
-    // clone the array (except for the trailing NULL entry) using the 
+    // clone the array (except for the trailing NULL entry) using the
     // shared allocator for XPCOM correctness
     //
     uint32_t i;
     nsresult rv;
     for ( i = 0 ; i < numVals ; i++ ) {
 
         // create an nsBERValue object
         //
@@ -591,17 +591,17 @@ nsLDAPMessage::GetBinaryValues(const cha
                      " creating nsLDAPBERValue object");
             NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(i, aValues);
             ldap_value_free_len(values);
             return NS_ERROR_OUT_OF_MEMORY;
         }
 
         // copy the value from the struct into the nsBERValue
         //
-        rv = berValue->Set(values[i]->bv_len, 
+        rv = berValue->Set(values[i]->bv_len,
                            reinterpret_cast<uint8_t *>(values[i]->bv_val));
         if (NS_FAILED(rv)) {
             NS_ERROR("nsLDAPMessage::GetBinaryValues(): error setting"
                      " nsBERValue");
             ldap_value_free_len(values);
             return rv == NS_ERROR_OUT_OF_MEMORY ? rv : NS_ERROR_UNEXPECTED;
         }
 
--- a/ldap/xpcom/src/nsLDAPModification.cpp
+++ b/ldap/xpcom/src/nsLDAPModification.cpp
@@ -148,11 +148,11 @@ nsLDAPModification::SetUpModificationOne
   nsresult rv;
 
   if (!mValues)
     mValues = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
   else
     rv = mValues->Clear();
 
   NS_ENSURE_SUCCESS(rv, rv);
-  
+
   return mValues->AppendElement(aValue);
 }
--- a/ldap/xpcom/src/nsLDAPOperation.h
+++ b/ldap/xpcom/src/nsLDAPOperation.h
@@ -1,10 +1,10 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * 
+ *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef _nsLDAPOperation_h_
 #define _nsLDAPOperation_h_
 
 #include "ldap.h"
--- a/ldap/xpcom/src/nsLDAPProtocolModule.cpp
+++ b/ldap/xpcom/src/nsLDAPProtocolModule.cpp
@@ -1,10 +1,10 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * 
+ *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIClassInfoImpl.h"
 #include "mozilla/ModuleUtils.h"
 
 #include "nsLDAPInternal.h"
@@ -100,20 +100,20 @@ nsLDAPInitialize()
 
     if (rv != LDAP_SUCCESS) {
         MOZ_LOG(gLDAPLogModule, mozilla::LogLevel::Error,
                ("nsLDAPInitialize(): pr_ldap_install_routines() failed: %s\n",
                ldap_err2string(rv)));
         return NS_ERROR_FAILURE;
     }
 
-    // Never block for more than 10000 milliseconds (ie 10 seconds) doing any 
+    // Never block for more than 10000 milliseconds (ie 10 seconds) doing any
     // sort of I/O operation.
     //
-    rv = prldap_set_session_option(0, 0, PRLDAP_OPT_IO_MAX_TIMEOUT, 
+    rv = prldap_set_session_option(0, 0, PRLDAP_OPT_IO_MAX_TIMEOUT,
                                    10000);
     if (rv != LDAP_SUCCESS) {
         MOZ_LOG(gLDAPLogModule, mozilla::LogLevel::Error,
                ("nsLDAPInitialize(): error setting PRLDAP_OPT_IO_MAX_TIMEOUT:"
                 " %s\n", ldap_err2string(rv)));
         return NS_ERROR_FAILURE;
     }
 
--- a/ldap/xpcom/src/nsLDAPSecurityGlue.cpp
+++ b/ldap/xpcom/src/nsLDAPSecurityGlue.cpp
@@ -78,20 +78,20 @@ nsLDAPSSLClose(int s, struct lextiof_soc
                  (&socketInfo.soinfo_appdata));
 
     // call the real close function
     //
     return (*(sessionClosure->realClose))(s, socketarg);
 }
 
 // Replacement connection function.  Calls the real connect function,
-// 
+//
 extern "C" int LDAP_CALLBACK
 nsLDAPSSLConnect(const char *hostlist, int defport, int timeout,
-		 unsigned long options, 
+		 unsigned long options,
 		 struct lextiof_session_private *sessionarg,
 		 struct lextiof_socket_private **socketargp )
 {
     PRLDAPSocketInfo socketInfo;
     PRLDAPSessionInfo sessionInfo;
     nsLDAPSSLSocketClosure *socketClosure = nullptr;
     nsLDAPSSLSessionClosure *sessionClosure;
     int	intfd = -1;
@@ -99,37 +99,37 @@ nsLDAPSSLConnect(const char *hostlist, i
     nsCOMPtr <nsISocketProvider> tlsSocketProvider;
     nsCOMPtr <nsISSLSocketControl> sslSocketControl;
     nsresult rv;
 
     // Ensure secure option is set.  Also, clear secure bit in options
     // the we pass to the standard connect() function (since it doesn't know
     // how to handle the secure option).
     //
-    NS_ASSERTION(options & LDAP_X_EXTIOF_OPT_SECURE, 
+    NS_ASSERTION(options & LDAP_X_EXTIOF_OPT_SECURE,
 		 "nsLDAPSSLConnect(): called for non-secure connection");
     options &= ~LDAP_X_EXTIOF_OPT_SECURE;
 
     // Retrieve session info. so we can store a pointer to our session info.
     // in our socket info. later.
     //
     memset(&sessionInfo, 0, sizeof(sessionInfo));
     sessionInfo.seinfo_size = PRLDAP_SESSIONINFO_SIZE;
-    if (prldap_get_session_info(nullptr, sessionarg, &sessionInfo) 
+    if (prldap_get_session_info(nullptr, sessionarg, &sessionInfo)
 	!= LDAP_SUCCESS) {
 	NS_ERROR("nsLDAPSSLConnect(): unable to get session info");
         return -1;
     }
     sessionClosure = reinterpret_cast<nsLDAPSSLSessionClosure *>
                                      (sessionInfo.seinfo_appdata);
-    
+
     // Call the real connect() callback to make the TCP connection.  If it
     // succeeds, *socketargp is set.
     //
-    intfd = (*(sessionClosure->realConnect))(hostlist, defport, timeout, 
+    intfd = (*(sessionClosure->realConnect))(hostlist, defport, timeout,
 					     options, sessionarg, socketargp);
     if ( intfd < 0 ) {
 	MOZ_LOG(gLDAPLogModule, mozilla::LogLevel::Debug,
 	       ("nsLDAPSSLConnect(): standard connect() function returned %d",
 		intfd));
         return intfd;
     }
 
@@ -150,19 +150,19 @@ nsLDAPSSLConnect(const char *hostlist, i
 				       sizeof(nsLDAPSSLSocketClosure)));
     if (!socketClosure) {
 	NS_WARNING("nsLDAPSSLConnect(): unable to allocate socket closure");
 	goto close_socket_and_exit_with_error;
     }
     memset(socketClosure, 0, sizeof(nsLDAPSSLSocketClosure));
     socketClosure->sessionClosure = sessionClosure;
 
-    // Add the NSPR layer for SSL provided by PSM to this socket. 
+    // Add the NSPR layer for SSL provided by PSM to this socket.
     //
-    tlsSocketProvider = do_GetService(NS_STARTTLSSOCKETPROVIDER_CONTRACTID, 
+    tlsSocketProvider = do_GetService(NS_STARTTLSSOCKETPROVIDER_CONTRACTID,
 				      &rv);
     if (NS_FAILED(rv)) {
 	NS_ERROR("nsLDAPSSLConnect(): unable to get socket provider service");
         goto close_socket_and_exit_with_error;
     }
     // XXXdmose: Note that hostlist can be a list of hosts (in the
     // current XPCOM SDK code, it will always be a list of IP
     // addresses).  Because of this, we need to use
@@ -261,17 +261,17 @@ nsLDAPSSLDisposeHandle(LDAP *ld, struct 
     memset(&sessionInfo, 0, sizeof(sessionInfo));
     sessionInfo.seinfo_size = PRLDAP_SESSIONINFO_SIZE;
     if (prldap_get_session_info(ld, nullptr, &sessionInfo) == LDAP_SUCCESS) {
 	sessionClosure = reinterpret_cast<nsLDAPSSLSessionClosure *>
                                   (sessionInfo.seinfo_appdata);
 	disposehdl_fn = sessionClosure->realDisposeHandle;
 	nsLDAPSSLFreeSessionClosure(&sessionClosure);
 	(*disposehdl_fn)(ld, sessionarg);
-    } 
+    }
 }
 
 // Installs appropriate routines and data for making this connection
 // handle SSL.  The aHostName is ultimately passed to PSM and is used to
 // validate certificates.
 //
 nsresult
 nsLDAPInstallSSL( LDAP *ld, const char *aHostName)
@@ -289,17 +289,17 @@ nsLDAPInstallSSL( LDAP *ld, const char *
     }
     memset(sessionClosure, 0, sizeof(nsLDAPSSLSessionClosure));
 
     // Override a few functions, saving a pointer to the original function
     // in each case so we can call it from our SSL savvy functions.
     //
     memset(&iofns, 0, sizeof(iofns));
     iofns.lextiof_size = LDAP_X_EXTIO_FNS_SIZE;
-    if (ldap_get_option(ld, LDAP_X_OPT_EXTIO_FN_PTRS, 
+    if (ldap_get_option(ld, LDAP_X_OPT_EXTIO_FN_PTRS,
 			static_cast<void *>(&iofns)) != LDAP_SUCCESS) {
 	NS_ERROR("nsLDAPInstallSSL(): unexpected error getting"
 		 " LDAP_X_OPT_EXTIO_FN_PTRS");
 	nsLDAPSSLFreeSessionClosure(&sessionClosure);
         return NS_ERROR_UNEXPECTED;
     }
 
     // Make a copy of the hostname to pass to AddToSocket later
@@ -315,17 +315,17 @@ nsLDAPInstallSSL( LDAP *ld, const char *
     //
     sessionClosure->realClose = iofns.lextiof_close;
     iofns.lextiof_close = nsLDAPSSLClose;
     sessionClosure->realConnect = iofns.lextiof_connect;
     iofns.lextiof_connect = nsLDAPSSLConnect;
     sessionClosure->realDisposeHandle = iofns.lextiof_disposehandle;
     iofns.lextiof_disposehandle = nsLDAPSSLDisposeHandle;
 
-    if (ldap_set_option(ld, LDAP_X_OPT_EXTIO_FN_PTRS, 
+    if (ldap_set_option(ld, LDAP_X_OPT_EXTIO_FN_PTRS,
 			static_cast<void *>(&iofns)) != LDAP_SUCCESS) {
 	NS_ERROR("nsLDAPInstallSSL(): error setting LDAP_X_OPT_EXTIO_FN_PTRS");
 	nsLDAPSSLFreeSessionClosure(&sessionClosure);
         return NS_ERROR_FAILURE;
     }
 
     // Store session info. for later retrieval.
     //
--- a/ldap/xpcom/src/nsLDAPServer.cpp
+++ b/ldap/xpcom/src/nsLDAPServer.cpp
@@ -1,10 +1,10 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * 
+ *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsLDAPServer.h"
 
 NS_IMPL_ISUPPORTS(nsLDAPServer, nsILDAPServer)
 
--- a/ldap/xpcom/src/nsLDAPServer.h
+++ b/ldap/xpcom/src/nsLDAPServer.h
@@ -1,10 +1,10 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * 
+ *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsCOMPtr.h"
 #include "nsString.h"
 #include "nsILDAPServer.h"
 #include "nsILDAPURL.h"
--- a/ldap/xpcom/src/nsLDAPService.h
+++ b/ldap/xpcom/src/nsLDAPService.h
@@ -1,10 +1,10 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * 
+ *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "ldap.h"
 #include "nsString.h"
 #include "nsCOMArray.h"
 #include "nsDataHashtable.h"
@@ -12,17 +12,17 @@
 #include "nsILDAPMessage.h"
 #include "nsILDAPMessageListener.h"
 #include "nsCOMPtr.h"
 #include "nsILDAPServer.h"
 #include "nsILDAPConnection.h"
 #include "nsILDAPMessage.h"
 #include "mozilla/Mutex.h"
 
-// 6a89ae33-7a90-430d-888c-0dede53a951a 
+// 6a89ae33-7a90-430d-888c-0dede53a951a
 //
 #define NS_LDAPSERVICE_CID \
 { \
   0x6a89ae33, 0x7a90, 0x430d, \
   {0x88, 0x8c, 0x0d, 0xed, 0xe5, 0x3a, 0x95, 0x1a} \
 }
 
 // This is a little "helper" class, we use to store information
@@ -65,52 +65,51 @@ class nsLDAPServiceEntry
     bool mDelete;           // This entry is due for deletion
     bool mRebinding;        // Keep state if we are rebinding or not
 
     nsCOMPtr<nsILDAPServer> mServer;
     nsCOMPtr<nsILDAPConnection> mConnection;
     nsCOMPtr<nsILDAPMessage> mMessage;
 
     // Array holding all the pending callbacks (listeners) for this entry
-    nsCOMArray<nsILDAPMessageListener> mListeners;  
+    nsCOMArray<nsILDAPMessageListener> mListeners;
 };
 
 // This is the interface we're implementing.
 //
 class nsLDAPService : public nsILDAPService, public nsILDAPMessageListener
 {
-  public: 
+  public:
     // interface decls
     //
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSILDAPSERVICE
     NS_DECL_NSILDAPMESSAGELISTENER
 
     // constructor and destructor
     //
     nsLDAPService();
-    
+
     nsresult Init();
 
   protected:
     virtual ~nsLDAPService();
     nsresult EstablishConnection(nsLDAPServiceEntry *,
                                  nsILDAPMessageListener *);
 
-    // kinda like strtok_r, but with iterators.  for use by 
+    // kinda like strtok_r, but with iterators.  for use by
     // createFilter
     //
     char *NextToken(const char **aIter, const char **aIterEnd);
 
     // count how many tokens are in this string; for use by
     // createFilter; note that unlike with NextToken, these params
     // are copies, not references.
     //
     uint32_t CountTokens(const char * aIter, const char * aIterEnd);
-                   
-    
+
     mozilla::Mutex mLock;       // Lock mechanism
 
     // Hash table holding server entries
     nsDataHashtable<nsStringHashKey, nsLDAPServiceEntry*> mServers;
     // Hash table holding "reverse" lookups from connection to server
     nsDataHashtable<nsVoidPtrHashKey, nsLDAPServiceEntry*> mConnections;
 };
--- a/ldap/xpcom/src/nsLDAPSyncQuery.h
+++ b/ldap/xpcom/src/nsLDAPSyncQuery.h
@@ -36,23 +36,23 @@ class nsLDAPSyncQuery : public nsILDAPSy
     nsCOMPtr<nsILDAPOperation> mOperation;   // current ldap op
     nsCOMPtr<nsILDAPURL> mServerURL;         // LDAP URL
     bool mFinished;                        // control variable for eventQ
     nsString mResults;                       // values to return
     uint32_t mProtocolVersion;               // LDAP version to use
 
     nsresult InitConnection();
     // check that we bound ok and start then call StartLDAPSearch
-    nsresult OnLDAPBind(nsILDAPMessage *aMessage); 
+    nsresult OnLDAPBind(nsILDAPMessage *aMessage);
 
     // add to the results set
-    nsresult OnLDAPSearchEntry(nsILDAPMessage *aMessage); 
+    nsresult OnLDAPSearchEntry(nsILDAPMessage *aMessage);
 
 
-    nsresult OnLDAPSearchResult(nsILDAPMessage *aMessage); 
+    nsresult OnLDAPSearchResult(nsILDAPMessage *aMessage);
 
     // kick off a search
     nsresult StartLDAPSearch();
-    
+
     // Clean up after the LDAP Query is done.
     void FinishLDAPQuery();
 };
 
--- a/ldap/xpcom/src/nsLDAPURL.h
+++ b/ldap/xpcom/src/nsLDAPURL.h
@@ -1,10 +1,10 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- * 
+ *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "ldap.h"
 #include "nsString.h"
 #include "nsILDAPURL.h"
 #include "nsCOMPtr.h"
@@ -14,17 +14,17 @@
 #define NS_LDAPURL_CID \
 { 0xcb7c67f8, 0x0053, 0x4072, \
   { 0x89, 0xe9, 0x50, 0x1c, 0xbd, 0x1b, 0x35, 0xab}}
 
 /**
  * nsLDAPURL
  *
  * nsLDAPURL uses an nsStandardURL stored in mBaseURL as its main url formatter.
- * 
+ *
  * This is done to ensure that the pre-path sections of the URI are correctly
  * formatted and to re-use the functions for nsIURI as appropriate.
  *
  * Handling of the path sections of the URI are done within nsLDAPURL/parts of
  * the LDAP c-sdk. nsLDAPURL holds the individual sections of the path of the
  * URI locally (to allow convenient get/set), but always updates the mBaseURL
  * when one changes to ensure that mBaseURL.spec and the local data are kept
  * consistent.