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 "LocaleBackend.h" 11 12 13 using BPrivate::gLocaleBackend; 14 15 16 extern "C" int 17 strcoll(const char *a, const char *b) 18 { 19 if (gLocaleBackend != NULL) { 20 int result = 0; 21 status_t status = gLocaleBackend->Strcoll(a, b, result); 22 23 if (status != B_OK) 24 errno = EINVAL; 25 26 return result; 27 } 28 29 return strcmp(a, b); 30 } 31