[Mesa-dev] [PATCH] Android: define PIPE_OS_BSD

Chih-Wei Huang cwhuang at android-x86.org
Tue Jun 6 06:30:20 UTC 2017


2017-06-06 13:06 GMT+08:00 Chih-Wei Huang <cwhuang at android-x86.org>:
> 2017-06-05 21:04 GMT+08:00 Emil Velikov <emil.l.velikov at gmail.com>:
>> On 4 June 2017 at 04:31, Chih-Wei Huang <cwhuang at android-x86.org> wrote:
>>> Android bionic is derived from OpenBSD. So the logics of BSD
>>> almost apply to Android as well.
>>>
>> Having platform FOO define both PIPE_OS_BSD and PIPE_OS_LINUX does not
>> seem so obvious bth.
>
> Yeah.. but that's true.
> Android is a BSD-style userspace
> running on a Linux kernel.
>
>>> It fixes the warnings
>>>
>>> external/mesa/src/gallium/auxiliary/os/os_process.c:43:2: warning: unexpected platform in os_process.c [-W#warnings]
>>>  ^
>>> external/mesa/src/gallium/auxiliary/os/os_process.c:97:2: warning: unexpected platform in os_process.c [-W#warnings]
>>
>> These are are due to program_invocation_short_name/getprogname. How
>> about updating the file alike xmlconfig.c?
>
> Oh... I didn't notice that.
> Let me check.

Well, I saw several BSD OSes define
the same context:

#elif defined(__NetBSD__) && defined(__NetBSD_Version__) &&
(__NetBSD_Version__ >= 106000100)
#    include <stdlib.h>
#    define GET_PROGRAM_NAME() getprogname()
#elif defined(__DragonFly__)
#    include <stdlib.h>
#    define GET_PROGRAM_NAME() getprogname()
#elif defined(__APPLE__)
#    include <stdlib.h>
#    define GET_PROGRAM_NAME() getprogname()
#elif ...

Not sure why has no OpenBSD?
Android definitely has getprogname().
(at least since Lollipop as I know)

Should I add:

#elif defined(__OpenBSD__) || defined(ANDROID)
#    include <stdlib.h>
#    define GET_PROGRAM_NAME() getprogname()
#elif...

I either don't understand why not all the BSD OSes
which has getprogname() share the same if case.


-- 
Chih-Wei
Android-x86 project
http://www.android-x86.org


More information about the mesa-dev mailing list