Commit 92337b15a2414c5ead6dde55b366687ec464b847

Guillem Jover 2023-04-17T23:59:03

Make getprogname() porting mandatory Although the function is documented as possibly returning NULL if it cannot find a known source of information, we should still at least attempt to port it to any supported system, and otherwise explicitly mark it as not implementable for such systems if that was to be the case.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/progname.c b/src/progname.c
index bebf714..b62ecd4 100644
--- a/src/progname.c
+++ b/src/progname.c
@@ -126,6 +126,8 @@ done:
 		free(wpath);
 		free(mbname);
 	}
+#else
+#error "Function getprogname() needs to be ported."
 #endif
 
 	return __progname;