Am 31.10.2010 14:15, schrieb Hib Eris:
> Hi,
>
> On Sun, Oct 31, 2010 at 2:05 PM, Vincent Torri <[email protected]> wrote:
>>
>> Hey,
>>
>> I have mentioned the problem on IRC must maybe it's better to report here.
>> On Windows 64 bits, long is of size 32 bits long. Hence:
>>
>> strtok_r.cpp:68:29: error: cast from 'const unsigned char*' to 'long
>> unsigned int' loses precision
>>
>> Using unsigned long long int is maybe better. Or using unsigned __int64.
>
> A better approach is the patch I have attached here. It is pretty much
> based on the strtok_r implementation from upstream.
This approach won't work since the current one is also used for msvc -
which has no __rawmemchr at all.
Attached patch fixes the issue for all windows compilers.
>
> Cheers,
>
> Hib
regards,
Patrick
>
>
>
> _______________________________________________
> poppler mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/poppler
diff -Nru poppler-0.14.5.orig/poppler/strtok_r.cpp
poppler-0.14.5/poppler/strtok_r.cpp
--- poppler-0.14.5.orig/poppler/strtok_r.cpp 2010-06-08 22:06:31.000000000
+0200
+++ poppler-0.14.5/poppler/strtok_r.cpp 2010-11-18 01:09:49.273610000 +0100
@@ -65,7 +65,7 @@
/* Handle the first few characters by reading one character at a time.
Do this until CHAR_PTR is aligned on a longword boundary. */
for (char_ptr = (const unsigned char *) s;
- ((unsigned long int) char_ptr & (sizeof (longword) - 1)) != 0;
+ ((unsigned intptr_t) char_ptr & (sizeof (longword) - 1)) != 0;
++char_ptr)
if (*char_ptr == c)
return (__ptr_t) char_ptr;
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler