Anti-seismic devices with hydraulic or pneumatic damping