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@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1598>
This commit is contained in:
Greg V 2020-04-09 01:43:10 +03:00 committed by Marge Bot
parent ed5d7987dc
commit 1d9eda1b57
1 changed files with 2 additions and 11 deletions

View File

@ -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() */