  We calculate threshold soft-gluon corrections to total cross sections and
transverse momentum distributions for bottom and charm quark production in
fixed-target experiments, considering both pp and pi- p interactions. We
investigate the quality of the near threshold soft-gluon approximation at
next-to-leading order (NLO) and calculate next-to-next-to-leading order (NNLO)
corrections through next-to-next-to-next-to-leading-logarithmic (NNNLL)
accuracy, including some virtual terms. We find that the NNLO threshold
corrections reduce the factorization and renormalization scale dependence of
the cross sections.
