Charm production and parton distributions