Deleted Added
full compact
30c30
< FILE_RCSID("@(#)$File: funcs.c,v 1.72 2014/05/14 23:15:42 christos Exp $")
---
> FILE_RCSID("@(#)$File: funcs.c,v 1.77 2014/11/28 02:46:39 christos Exp $")
48,50d47
< #if defined(HAVE_LOCALE_H)
< #include <locale.h>
< #endif
233c230
< if ((m = file_softmagic(ms, ubuf, nb, 0, BINTEST,
---
> if ((m = file_softmagic(ms, ubuf, nb, 0, NULL, BINTEST,
458c455,458
< rx->old_lc_ctype = setlocale(LC_CTYPE, NULL);
---
> #ifdef USE_C_LOCALE
> rx->c_lc_ctype = newlocale(LC_CTYPE_MASK, "C", 0);
> assert(rx->c_lc_ctype != NULL);
> rx->old_lc_ctype = uselocale(rx->c_lc_ctype);
460,461c460
< rx->old_lc_ctype = strdup(rx->old_lc_ctype);
< assert(rx->old_lc_ctype != NULL);
---
> #endif
464d462
< (void)setlocale(LC_CTYPE, "C");
481,482c479,482
< (void)setlocale(LC_CTYPE, rx->old_lc_ctype);
< free(rx->old_lc_ctype);
---
> #ifdef USE_C_LOCALE
> (void)uselocale(rx->old_lc_ctype);
> freelocale(rx->c_lc_ctype);
> #endif