sys_nerr and *sys_errlist[] in 64-bit

The variables
sys_nerr and *sys_errlist[]
no more exist in 64-bit compiler option.I know one way is to use strerror() function.But I have very long interlinked code which i have to migrate from 32-bit to 64-bit .Can any one tell any other way of doing the same without modifying much od the code??is there any other way to include some more header files or else?
thanks a lot in advance!

Write a 32 bit program that enumerates through the error codes and captures the strings, then generates a source file that contains those strings.

Thanks for the reply&concern
Can you help me with a sample replacement line for
usage of sys_nerr in
int pos = (int)calloc(sys_nerr, sizeof(int));
and usage of sys_errlist in
ptr = (uchar*)sys_errlist[i];
I am not sure with what i think....
Thanks a lot in advance