[Rpm-maint] [rpm-software-management/rpm] AIX: revert xsetprogname and xgetprogname (PR #4056)

Michal Domonkos notifications at github.com
Tue Dec 2 16:29:46 UTC 2025


@dmnks commented on this pull request.



> +
+void rsetprogname(const char *pn)
+{
+#if defined(HAVE_SETPROGNAME) /* BSD'ish systems */
+    setprogname(pn);
+#elif defined(HAVE___PROGNAME) /* glibc and others */
+#else /* AIX systems */
+    if (pn != NULL && rprogname == NULL /* set the value only once */) {
+	const char *p = strrchr(pn, '/'); /* locate the last occurrence of '/' */
+	if (p != NULL)
+	    rprogname = p + 1 /* strip beginning '/' */;
+	else
+	    rprogname = pn;
+    }
+#endif
+}

Moved.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/4056#discussion_r2581958907
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/4056/review/3531076803 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20251202/e370d320/attachment.htm>


More information about the Rpm-maint mailing list