[PATCH] src/pactree.c: Don't ifdef on langinfo.h

Johannes Löthberg johannes at kyriasis.com
Tue May 1 17:14:46 UTC 2018


It's a POSIX header, and we don't currently officially support anything
else.

Signed-off-by: Johannes Löthberg <johannes at kyriasis.com>
---
 src/pactree.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/src/pactree.c b/src/pactree.c
index 13f9e72..45d6e50 100644
--- a/src/pactree.c
+++ b/src/pactree.c
@@ -24,10 +24,7 @@
 #include <locale.h>
 #include <alpm.h>
 #include <alpm_list.h>
-
-#ifdef HAVE_LANGINFO_H
 #include <langinfo.h>
-#endif
 
 #define LINE_MAX     512
 
@@ -255,14 +252,10 @@ static int parse_options(int argc, char *argv[])
 		{0, 0, 0, 0}
 	};
 
-#ifdef HAVE_LANGINFO_H
 	setlocale(LC_ALL, "");
 	if(strcmp(nl_langinfo(CODESET), "UTF-8") == 0) {
 		style = &graph_utf8;
 	}
-#else
-	style = &graph_default;
-#endif
 
 	while((opt = getopt_long(argc, argv, "ab:cd:ghlrsuv", opts, &option_index))) {
 		if(opt < 0) {
-- 
2.17.0


More information about the pacman-contrib mailing list