Looking for gpm_oops() in 1.20.0, I found the following: * gpm.h declares prototypes for tools.c functions, but they should be in gpmInt.h instead (tools.c is not in the library, it's internal to gpm instead). * gpm_oops is said to be in tools.c but it isn't there. * Gpm_cnt_digits is really hairy. Especially given that it's only used to malloc the console name. Since consoles are limited to 64 you can just use 2 (or three, to be safe; the lost byte is definitely less than the overhead of two functions, one of them recursive).