Display depth is a signed int in X11R6.
Remove redundant externs from function declarations.
Put an ifdef guard around an unused and undeclared function.