Mail Archives: djgpp/2011/10/18/11:23:53
On 10/18/2011 04:05 PM, RayeR wrote:
>> If you want less source level changes, you can define a macro,
>> something like (untested):
>>
>> #define strtok_r(s1,s2,s3) strtok(s1,s2)
It is easy to create example when simple strtok() is not sufficient
even without threads. One may want to split into tokens several
strings (take first token from the first string, then first from
the second, second and following tokens from both source strings
in the same way).
In that case strtok(s1, s2) will not work properly. With it one must
extract all tokens from the first string and only after that strtok
can be used for splitting another string.
So I think that we may need also strtok_r() for DJGPP
>
> Thanks for explanation. I used the macro and it compiled OK. Maybe it
> would be usefull to include this macro to djgpp string.h
> Unfortunately when I tested compiled x264 to compress sample video it
> crashes immediatelly:
>
> C:\X264>X264.EXE -o out.flv example.y4m
> y4m [info]: 384x288p 0:0 @ 25/1 fps (cfr)
> x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle
> SSE4.2
> x264 [info]: profile High, level 2.1
> Exiting due to signal SIGSEGV
> General Protection Fault at eip=000d9e10
> eax=00a39f10 ebx=00a1fdb0 ecx=000001c0 edx=00a39f10 esi=00226eb0
> edi=00226eb0
> ebp=00000000 esp=001f3eec program=C:\X264\X264.EXE
> cs: sel=01a7 base=029e0000 limit=00acffff
> ds: sel=01af base=029e0000 limit=00acffff
> es: sel=01af base=029e0000 limit=00acffff
> fs: sel=017f base=00005e10 limit=0000ffff
> gs: sel=01bf base=00000000 limit=0010ffff
> ss: sel=01af base=029e0000 limit=00acffff
> App stack: [001f4bb8..00174bbc] Exceptn stack: [00174adc..00172b9c]
>
> (running under XP NTVDM)
> maybe it's issue with sse or something else messed up...
>
>
- Raw text -