> if (libprefix && (!strncmp(ext, ".so", 2))) {
> size_t len = ext - filename - 3;
> strncpy(libname, filename + 3, len);
> *(libname + len) = '\0';
> return 1;
> }
>
> I also wonder wether is strncmp is a good idea here as it could match .sowtf
> for example. I think strcmp is more appropriate here, don't you think ?
Couldn't help but notice, if you do use strncmp, shouldn't it be
>strncmp(ext, ".so", 3)
instead of 2?
or
>strncmp(ext, "so", 2)
_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel