In computer science in the US, is it harder to get employed as a professor if you've had to do post-docs, or if you decided to work in an industrial research lab for several years?
In many fields these days, it is exactly the opposite: it is hard to get a faculty position until you have spent time as a postdoc. Graduate students are often considered to be simply too inexperienced to become professors. It is also the case that in some fields (e.g., biomedical research) postdocs are a source of cheap labor and professor positions are scarce, so there is a "market" that pushes people toward more and more postdoc.
Industrial labs are a different matter: they may effectively count either for or against you, depending on the situation. In essence: if you are in a postdoc-like position, doing a lot of publications, it's probably in your favor. If you are mostly doing proprietary research that cannot be published, then it's likely to count against you instead.
Specifically in US computer science, the field is currently in transition: historically, there were few postdocs and much hiring directly from graduate school (my own advisor did not even apply for his post). Now, however, the field is moving toward more postdocs before professorship.