[SSSD] [PATCH] Allow using Glib for UTF8 support

Stephen Gallagher sgallagh at redhat.com
Mon Dec 5 14:30:54 UTC 2011


On Fri, 2011-12-02 at 15:16 -0500, Simo Sorce wrote:
> ----- Original Message -----
> > Currently, SSSD only supports using libunistring to manage unicode
> > strings. There are some platforms out there (such as RHEL 5) that do
> > not
> > have libunistring available. With this patch, we add an optional flag
> > to
> > autoconf to allow SSSD to link against Glib and use its unicode
> > functionality.
> 
> Two quick comments.
> 1. Can you use a shorter function name than sss_utf8_case_insensitive_equality ?
> I am all for clarity, but when the function name is so long arguments go on the next line w/o any nesting it is bad :-)
> 
> 2. given result returns just a boolean I would prefer to not use it and just use ret.
> 0 is 'matches' and some other error code means it didn't match, something like ERANGE could be used. or if you feel strongly about having your own value define a value like -1 as ENOMATCH earlier in the code. It makes for a more usable interface if you do not have to care about 2 return variables IMO.


Thanks for the review. Revised patch is attached.

I opted to use ENOTUNIQ for the "not matched" response, since it should
be impossible to receive that error from any of the underlying functions
within the comparison.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Allow-using-Glib-for-UTF8-support.patch
Type: text/x-patch
Size: 14086 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20111205/08d8e246/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20111205/08d8e246/attachment.sig>


More information about the sssd-devel mailing list