Oscillating-piston machines or pumps