sss_utf8.c revision b32159300fea63222d8dd9200ed634087704ea74
/*
SSSD
Authors:
Stephen Gallagher <sgallagh@redhat.com>
Copyright (C) 2011 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "sss_utf8.h"
#ifdef HAVE_LIBUNISTRING
{
return true;
}
return false;
}
{
}
#else
#endif
/* Returns EOK on match, ENOTUNIQ if comparison succeeds but
* does not match.
* May return other errno error codes on failure
*/
#ifdef HAVE_LIBUNISTRING
{
/* Do a case-insensitive comparison.
* The input must be encoded in UTF8.
* We have no way of knowing the language,
* so we'll pass NULL for the language and
* hope for the best.
*/
int ret;
int resultp;
errno = 0;
&resultp);
if (ret < 0) {
/* An error occurred */
return errno;
}
if (resultp == 0) {
return EOK;
}
return ENOMATCH;
}
{
return ENOMEM;
}
return ENOMEM;
}
if (gret == 0) {
} else {
}
return ret;
}
#else
#endif