Mesa (main): util: __getProgramName: remove check for ancient FreeBSD versions, simplify ifdefs

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Oct 29 06:32:27 UTC 2021


Module: Mesa
Branch: main
Commit: 1d9eda1b57df4f8afa817d55ca43e1e206f223b5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1d9eda1b57df4f8afa817d55ca43e1e206f223b5

Author: Greg V <greg at unrelenting.technology>
Date:   Thu Apr  9 01:43:10 2020 +0300

util: __getProgramName: remove check for ancient FreeBSD versions, simplify ifdefs

FreeBSD 5.0 was released in 2003.
We really do not need to check that we're on >= 4.4.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Eric Engestrom <eric at engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1598>

---

 src/util/u_process.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/src/util/u_process.c b/src/util/u_process.c
index 231286061b0..af808c7b196 100644
--- a/src/util/u_process.c
+++ b/src/util/u_process.c
@@ -94,22 +94,13 @@ __getProgramName()
 #    define GET_PROGRAM_NAME() __getProgramName()
 #elif defined(HAVE_PROGRAM_INVOCATION_NAME)
 #    define GET_PROGRAM_NAME() program_invocation_short_name
-#elif defined(__FreeBSD__) && (__FreeBSD__ >= 2)
-#    include <osreldate.h>
-#    if (__FreeBSD_version >= 440000)
-#        define GET_PROGRAM_NAME() getprogname()
-#    endif
+#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__) || defined(ANDROID)
+#    define GET_PROGRAM_NAME() getprogname()
 #elif defined(__NetBSD__)
 #    include <sys/param.h>
 #    if defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106000100)
 #        define GET_PROGRAM_NAME() getprogname()
 #    endif
-#elif defined(__DragonFly__)
-#    define GET_PROGRAM_NAME() getprogname()
-#elif defined(__APPLE__)
-#    define GET_PROGRAM_NAME() getprogname()
-#elif defined(ANDROID)
-#    define GET_PROGRAM_NAME() getprogname()
 #elif defined(__sun)
 /* Solaris has getexecname() which returns the full path - return just
    the basename to match BSD getprogname() */



More information about the mesa-commit mailing list