logo

badwolf

minimalist and privacy-oriented web browser based on WebKitGTK git clone https://hacktivis.me/git/badwolf.git
commit: 48f0fb7fc190c646150e44326da68c063ff9b626
parent 9a3da3ed116c871fc0e06bdcfedfae5933695465
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri, 26 Apr 2024 07:33:56 +0200

badwolf.c: Warn if setlocale() changed errno

Diffstat:

Mbadwolf.c6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/badwolf.c b/badwolf.c @@ -1057,7 +1057,13 @@ int main(int argc, char *argv[]) { GApplication *application; + errno = 0; setlocale(LC_ALL, ""); + if(errno != 0) + { + fprintf(stderr, "badwolf: Warning: Failed to initialize locales: %s\n", strerror(errno)); + errno = 0; + } bindtextdomain(PACKAGE, DATADIR "/locale"); bind_textdomain_codeset(PACKAGE, "UTF-8"); textdomain(PACKAGE);