1/* 2 * Copyright 2004, Axel D��rfler, axeld@pinc-software.de. All rights reserved. 3 * Copyright 2010, Oliver Tappe, zooey@hirschkaefer.de. 4 * All rights reserved. Distributed under the terms of the MIT License. 5 */ 6 7#include <errno.h> 8#include <string.h> 9 10#include <errno_private.h> 11#include "LocaleBackend.h" 12 13 14using BPrivate::Libroot::gLocaleBackend; 15 16 17extern "C" int 18strcoll(const char *a, const char *b) 19{ 20 if (gLocaleBackend != NULL) { 21 int result = 0; 22 status_t status = gLocaleBackend->Strcoll(a, b, result); 23 24 if (status != B_OK) 25 __set_errno(EINVAL); 26 27 return result; 28 } 29 30 return strcmp(a, b); 31} 32