(3)Where a footway passes close to a building or other obstruction as it approaches a railway track, a barrier shall be fixed at the corner of the building projecting several feet from it in a direction parallel to the track, so that person approaching the track is compelled to move away from the building and thus obtain timely sight of a train approaching behind it. Where the footway is too narrow to permit of this a turngate shall be installed.