From 22c5a76deec393ac7cc9f22d3b22d643d5c96ff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 24 Sep 2007 22:26:03 +0000 Subject: [PATCH] setlocale(, "") now no longer returns an error, but returns "C" now; we don't (yet) support any locale anyway, so evaluating LC_ALL and friends doesn't make much sense at this point. This fixes bug #1499. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22297 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/posix/locale/setlocale.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/system/libroot/posix/locale/setlocale.c b/src/system/libroot/posix/locale/setlocale.c index 1717421bba..0bf9b26ce5 100644 --- a/src/system/libroot/posix/locale/setlocale.c +++ b/src/system/libroot/posix/locale/setlocale.c @@ -1,5 +1,5 @@ /* - * Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved. + * Copyright 2004-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved. * Distributed under the terms of the MIT License. */ @@ -11,7 +11,7 @@ char * setlocale(int category, const char *locale) { - if (locale == NULL) + if (locale == NULL || !locale[0]) return "C"; // ToDo: this should check if liblocale.so is available and use its functions