The first patch is too invasive for 4.02, but could be an option for 4.03 (but it's not clear to me why we would write the unsigned parsing functions in OCaml, and keep the signed parsing in C). The second patch seems reasonable, I'd like the opinion of our release manager.
In fact, since the OCaml implementation of int_of_string'like functions seems to be (between 1.5 and 2 times) faster than the current C implementation (on some machines, maybe not anywhere), it might be interresting (also for portability, homogeneity and simplicity) to encode all of them in OCaml.
The first version principally adds code, and contains modifications of only few lines of the existing ml code. IMHO, it seems safer to release it than the second version that modify the existing C code, except if the syntax "0u..." is considered interesting for int_of_string.
I forgot to tell that this patch also fix "%u", "%lu" and "%nu".
Fixed in commit 16241. I came up independently with the second approach suggested by bvaugon, so it must be the right approach :-) I didn't feel the need to reject int_of_string "-0u123", because we already have a tolerance for int_of_string "-0x123".