main() needs to return int
According to the C standard, main always needs to be declared to return an int and can take zero or two parameters. It can officially have two declarations:
int main(int, char **)
The attached patch adds the int return to places where it is missing and uses the more portable two parameter declaration for main. It is against the ruby_1_8_6 branch in svn.