[Mesa-dev,RFC] include/pipe: all major Linux libc support endian.h

Submitted by David Heidelberger on March 14, 2014, 6:57 p.m.

Details

Message ID 43688692f53cda3e67cbeb711ca173ed@ixit.cz
State New
Headers show

Not browsing as part of any series.

Commit Message

David Heidelberger March 14, 2014, 6:57 p.m.
---
  src/gallium/include/pipe/p_config.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/include/pipe/p_config.h 
b/src/gallium/include/pipe/p_config.h
index d603681..cd6f560 100644
--- a/src/gallium/include/pipe/p_config.h
+++ b/src/gallium/include/pipe/p_config.h
@@ -130,7 +130,7 @@ 
   * Endian detection.
   */

-#ifdef __GLIBC__
+#if defined(PIPE_OS_LINUX) || defined(__GLIBC__)
  #include <endian.h>

  #if __BYTE_ORDER == __LITTLE_ENDIAN

Comments

On Fri, Mar 14, 2014 at 7:57 PM, David Heidelberger
<david.heidelberger@ixit.cz> wrote:
> ---
>  src/gallium/include/pipe/p_config.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/include/pipe/p_config.h
> b/src/gallium/include/pipe/p_config.h
> index d603681..cd6f560 100644
> --- a/src/gallium/include/pipe/p_config.h
> +++ b/src/gallium/include/pipe/p_config.h
> @@ -130,7 +130,7 @@
>   * Endian detection.
>   */
>
> -#ifdef __GLIBC__
> +#if defined(PIPE_OS_LINUX) || defined(__GLIBC__)
>  #include <endian.h>
>
>  #if __BYTE_ORDER == __LITTLE_ENDIAN

Doesn't this do something else than the subject suggests? All *major*
linux libcs isn't the same as all linux libcs...
On Tue, Mar 18, 2014 at 3:18 PM, David Heidelberger
<david.heidelberger@ixit.cz> wrote:
> Dne 2014-03-18 13:43, Erik Faye-Lund napsal:
>
>> On Fri, Mar 14, 2014 at 7:57 PM, David Heidelberger
>> <david.heidelberger@ixit.cz> wrote:
>>>
>>> ---
>>>  src/gallium/include/pipe/p_config.h | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/src/gallium/include/pipe/p_config.h
>>> b/src/gallium/include/pipe/p_config.h
>>> index d603681..cd6f560 100644
>>> --- a/src/gallium/include/pipe/p_config.h
>>> +++ b/src/gallium/include/pipe/p_config.h
>>> @@ -130,7 +130,7 @@
>>>   * Endian detection.
>>>   */
>>>
>>> -#ifdef __GLIBC__
>>> +#if defined(PIPE_OS_LINUX) || defined(__GLIBC__)
>>>  #include <endian.h>
>>>
>>>  #if __BYTE_ORDER == __LITTLE_ENDIAN
>>
>>
>> Doesn't this do something else than the subject suggests? All *major*
>> linux libcs isn't the same as all linux libcs...
>
>
> In this moment I'm not aware any libc without endian.h on linux,
> where is Mesa supposed to build. If there is any, let me know and I'll add
> it to #ifdef.

Oh, OK. That's not what I read from the commit message, but thanks for
clearing that up. I'm not aware of any either. At least not on
platforms where Mesa with Gallium is a reasonable option.
Dne 2014-03-18 13:43, Erik Faye-Lund napsal:
> On Fri, Mar 14, 2014 at 7:57 PM, David Heidelberger
> <david.heidelberger@ixit.cz> wrote:
>> ---
>>  src/gallium/include/pipe/p_config.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/src/gallium/include/pipe/p_config.h
>> b/src/gallium/include/pipe/p_config.h
>> index d603681..cd6f560 100644
>> --- a/src/gallium/include/pipe/p_config.h
>> +++ b/src/gallium/include/pipe/p_config.h
>> @@ -130,7 +130,7 @@
>>   * Endian detection.
>>   */
>> 
>> -#ifdef __GLIBC__
>> +#if defined(PIPE_OS_LINUX) || defined(__GLIBC__)
>>  #include <endian.h>
>> 
>>  #if __BYTE_ORDER == __LITTLE_ENDIAN
> 
> Doesn't this do something else than the subject suggests? All *major*
> linux libcs isn't the same as all linux libcs...

In this moment I'm not aware any libc without endian.h on linux,
where is Mesa supposed to build. If there is any, let me know and I'll 
add it to #ifdef.

David
I'd like to ask, if anyone else looked at this really simple patch 
and/or tested it?

Thank you

Dne 2014-03-14 19:57, David Heidelberger napsal:
> ---
>  src/gallium/include/pipe/p_config.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/include/pipe/p_config.h
> b/src/gallium/include/pipe/p_config.h
> index d603681..cd6f560 100644
> --- a/src/gallium/include/pipe/p_config.h
> +++ b/src/gallium/include/pipe/p_config.h
> @@ -130,7 +130,7 @@
>   * Endian detection.
>   */
> 
> -#ifdef __GLIBC__
> +#if defined(PIPE_OS_LINUX) || defined(__GLIBC__)
>  #include <endian.h>
> 
>  #if __BYTE_ORDER == __LITTLE_ENDIAN