svn commit: r238182 - head/lib/libc/locale

Konstantin Belousov kostikbel at gmail.com
Fri Jul 6 21:15:52 UTC 2012


On Fri, Jul 06, 2012 at 08:16:22PM +0000, David Chisnall wrote:
> Author: theraven
> Date: Fri Jul  6 20:16:22 2012
> New Revision: 238182
> URL: http://svn.freebsd.org/changeset/base/238182
> 
> Log:
>   Restore the __collate_load_error global that was accidentally removed in the
>   xlocale refactoring.
>   
I think this commit is wrong, or at least not complete.
You failed to restore the actual export of the symbol in locale/Symbol.map.

>   MFC after:	1 week
> 
> Modified:
>   head/lib/libc/locale/collate.c
>   head/lib/libc/locale/setrunelocale.c
> 
> Modified: head/lib/libc/locale/collate.c
> ==============================================================================
> --- head/lib/libc/locale/collate.c	Fri Jul  6 20:14:27 2012	(r238181)
> +++ head/lib/libc/locale/collate.c	Fri Jul  6 20:16:22 2012	(r238182)
> @@ -56,11 +56,11 @@ __FBSDID("$FreeBSD$");
>   * We also modify the collation table test functions to search the thread-local
>   * table first and the global table second.  
>   */
> -#define __collate_load_error (table->__collate_load_error)
>  #define __collate_substitute_nontrivial (table->__collate_substitute_nontrivial)
>  #define __collate_substitute_table_ptr (table->__collate_substitute_table_ptr)
>  #define __collate_char_pri_table_ptr (table->__collate_char_pri_table_ptr)
>  #define __collate_chain_pri_table (table->__collate_chain_pri_table)
> +int __collate_load_error;
>  
>  
>  struct xlocale_collate __xlocale_global_collate = {
> @@ -109,7 +109,9 @@ __collate_load(const char *encoding, loc
>  int
>  __collate_load_tables(const char *encoding)
>  {
> -	return __collate_load_tables_l(encoding, &__xlocale_global_collate);
> +	int ret = __collate_load_tables_l(encoding, &__xlocale_global_collate);
> +	__collate_load_error = __xlocale_global_collate.__collate_load_error;
> +	return ret;
>  }
>  
>  int
> @@ -123,7 +125,7 @@ __collate_load_tables_l(const char *enco
>  
>  	/* 'encoding' must be already checked. */
>  	if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) {
> -		__collate_load_error = 1;
> +		table->__collate_load_error = 1;
>  		return (_LDP_CACHE);
>  	}
>  
> @@ -240,7 +242,7 @@ __collate_load_tables_l(const char *enco
>  			break;
>  		}
>  	}
> -	__collate_load_error = 0;
> +	table->__collate_load_error = 0;
>  
>  	return (_LDP_LOADED);
>  }
> 
> Modified: head/lib/libc/locale/setrunelocale.c
> ==============================================================================
> --- head/lib/libc/locale/setrunelocale.c	Fri Jul  6 20:14:27 2012	(r238181)
> +++ head/lib/libc/locale/setrunelocale.c	Fri Jul  6 20:16:22 2012	(r238182)
> @@ -67,7 +67,6 @@ extern _RuneLocale	*_Read_RuneMagi(FILE 
>  
>  static int		__setrunelocale(struct xlocale_ctype *l, const char *);
>  
> -#define __collate_load_error (table->__collate_load_error)
>  #define __collate_substitute_nontrivial (table->__collate_substitute_nontrivial)
>  #define __collate_substitute_table_ptr (table->__collate_substitute_table_ptr)
>  #define __collate_char_pri_table_ptr (table->__collate_char_pri_table_ptr)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20120706/8220eab4/attachment.pgp


More information about the svn-src-all mailing list