This question already has an answer here:
I read a story in an old scifi mag years back from the 60's or 70's (in Amazing Stories maybe) about a guy stranded alone on an alien planet where there was an intelligent machine that could make things. The only food he had was rotting crumbs from his pocket so all the food that the machine was able to replicate for him only made him sick.
To save his life:
in the end the machine decided to change him instead, into something it could cater for
brilliant little twist as usual. That's about all I remember. Does anyone know the name of that story? I would love to track it down again.