Deleted Added
full compact
42c42
< __FBSDID("$FreeBSD: head/lib/libc/locale/setlocale.c 101366 2002-08-05 09:58:45Z ache $");
---
> __FBSDID("$FreeBSD: head/lib/libc/locale/setlocale.c 101498 2002-08-08 05:51:54Z ache $");
57a58
> #include "ldpart.h"
95c96
< static int wrap_setrunelocale(char *);
---
> static int wrap_setrunelocale(const char *);
209c210,213
< (void)loadlocale(j);
---
> if (loadlocale(j) == NULL) {
> (void)strcpy(new_categories[j], "C");
> (void)loadlocale(j);
> }
238,239c242
< wrap_setrunelocale(locale)
< char *locale;
---
> wrap_setrunelocale(const char *locale)
241c244
< int ret = setrunelocale(locale);
---
> int ret = setrunelocale((char *)locale);
245c248
< return (-1);
---
> return (_LDP_ERROR);
247c250
< return (0);
---
> return (_LDP_LOADED);
254d256
< char *ret;
257,258c259
< int (*func)();
< int saverr;
---
> int (*func)(const char *);
281c282,283
< if (_PathLocale == NULL)
---
> if (_PathLocale == NULL) {
> errno = ENOMEM;
282a285
> }
314,320c317
< ret = func(new) != 0 ? NULL : new;
< if (ret == NULL) {
< saverr = errno;
< if (func(old) != 0 && func("C") == 0)
< (void)strcpy(old, "C");
< errno = saverr;
< } else
---
> if (func(new) != _LDP_ERROR) {
321a319,320
> return (old);
> }
323c322
< return (ret);
---
> return (NULL);