another batch of ccall type fixes for #2901