Next: symlinkat, Previous: swab, Up: Functions in <unistd.h>   [Contents][Index]


10.69.84 symlink ¶

POSIX specification:
https://pubs.opengroup.org/onlinepubs/9799919799/functions/symlink.html

Gnulib module: symlink

Portability problems fixed by Gnulib:

  • On some systems, symlink(value,"name/") mistakenly creates a symlink: macOS 14, FreeBSD 7.2, AIX 7.1, Solaris 9.
  • This function is missing on some platforms; however, the replacement always fails with EPERM: mingw, MSVC 14.

Portability problems not fixed by Gnulib:

  • Some file systems do not support symbolic links.
  • If the target is the empty string, this function can create an empty symbolic link instead of failing with ENOENT as GNU/Linux does: FreeBSD 14.0, NetBSD 10.0, OpenBSD 7.8, Solaris 11.4. On Solaris, the empty symbolic link "" resolves like "." does; on the other operating systems, resolution fails with ENOENT.