make tests work in 2.6, patch from Tres
update C source and tests for 3.3.2
Merge branch 'tests_332'

* tests_332:
  update C source and tests for 3.3.2