[PATCH 06/25] Add struct scratch_buffer and its internal helper functions
Stefan Liebler
stli@linux.vnet.ibm.com
Thu Apr 9 10:19:00 GMT 2015
On 04/07/2015 05:49 PM, Florian Weimer wrote:
> On 04/07/2015 04:33 PM, Florian Weimer wrote:
>> On 04/07/2015 03:18 PM, Stefan Liebler wrote:
>>> Hi Florian,
>>>
>>> i get a build error on s390x:
>>> gcc scratch_buffer_grow_preserve.c -c
>>> ...
>>> scratch_buffer_grow_preserve.c: In function
>>> â__libc_scratch_buffer_grow_preserveâ:
>>> scratch_buffer_grow_preserve.c:35:7: error: implicit declaration of
>>> function âmemcpyâ [-Werror=implicit-function-declaration]
>>> memcpy (new_ptr, buffer->__space, buffer->length);
>>> ^
>>> scratch_buffer_grow_preserve.c:35:7: error: incompatible implicit
>>> declaration of built-in function âmemcpyâ [-Werror]
>>> cc1: all warnings being treated as errors
>>>
>>> #include <string.h> in malloc/scratch_buffer_grow_preserve.c solves this
>>> error. Please update scratch_buffer_grow_preserve.c.
>>
>> Sorry about that. I did build on ppc64, but building on s390x is
>> difficult for me due to the binutils 2.24 requirement. I'm trying to
>> get a suitable machine reservation, but I'm not sure if that will succeed.
>>
>> Should I commit this fix blindly, without testing it on s390x?
>
> I found a machine to test this on, so I committed the attached patch.
>
Thanks.
I have another issue with tst-scratch_buffer.c on s390-32 where size_t
is an unsigned long with only 4 bytes:
gcc tst-scratch_buffer.c -c
...
tst-scratch_buffer.c: In function âdo_testâ:
tst-scratch_buffer.c:133:8: error: large integer implicitly truncated to
unsigned type [-Werror=overflow]
&& unchanged_array_size (&buf, 1ULL << 32, 0)
^
tst-scratch_buffer.c:134:8: error: large integer implicitly truncated to
unsigned type [-Werror=overflow]
&& unchanged_array_size (&buf, 0, 1ULL << 32)))
^
cc1: all warnings being treated as errors
Can you change the test and use "1ULL << 31" or make the usage of "1ULL
<< 32" conditionally?
Bye Stefan
More information about the Libc-alpha
mailing list