From: Paul Eggert<address@hidden>
No, the idea is that normal code should not use #ifdef S_IFLNK.

Well, "normal code" in Emacs does. We have 5 such places at this
time, if I didn't miss any.

These #ifdef uses are problematic, and should be removed. For example,
on a GNU system (make-symbolic-link A B) signals a file-already-exists
error if B already exists, but if I'm reading the code correctly this
does not happen on a system lacking symlinks. It's better to remove
unnecessary discrepancies like this.

How can we use this idea, when the code in question calls functions
like `symlink' or `readlink", which don't exist on hosts that don't
support symlinks?

Use substitutes for symlink and readlink that always fail.
That's easy and works well in practice.

Once compilation and link work, we will also need to carefully review
the affected code,