I'm trying to use cscope to index a source tree that contains symlinks to files located outside of the tree. cscope won't process these files, since dir.c uses lstat() and checks for S_ISREG, which will never be true of the symlink itself. I can make cscope do what I want by changing the lstat() to stat() in accessible_file().
Is the intent to avoid scanning the same file twice? In my case, that never happens, since the symlinks point outside the tree being scanned. Perhaps cscope could check if a symlink points to another file that it has or will index, rather than ignore all symlinks. Or if that's too much work, perhaps a command line argument could tell cscope to allow symlinks (use stat instead of lstat).