strtol is actually the best of the string to long functions (in the bsd/unix stdc world).
long strtol (char *string, char **endptr, int base);
Pass the string in as the first argument. The 2nd argument is a pointer to the element of the string you want to stop converting at (if you want it to convert until it can't go any further pass in NULL for 2nd parameter). The last parameter is the base of the number. For instance, if the string is "123A" and you pass the base in as 10 you will get 123 as your number (it will stop at A). If your base is 16 it will convert the A as well since it is a valid hex digit.
Also, itoa does not exist in the unix world, snprintf is what you can use as an equivalent.
EDIT: The function is available in stdlib.h....