A child's shirt can mean a children's shirt. So, there's your example for your question in line 2.
A magazine for men is generally called a men's magazine. A man's magazine is generally a magazine belonging to a man.
I don't think you can generalize. The context will usually tell you the meaning.
Student or Learner