1.typo in Makefile.am
2. make function parametres const where possible
port updated