This is a reminder of a previous discussion with dsouflis that list_length should be returning a long as is done with vector-length. This should be done as part of the next release.
Fix committed as revision 65 in SVN.
It turns out this change will have a ripple effect throughout the code. A typedef is needed for the return type so it can be used anywhere in the code where the length is used. Fixing this will have to wait until some time after 1.40 is released.