Should fail the same way on many other POSIX systems as unlink and symlink are documented to be declared in unistd.h which isn't ever included.
troff_generator.c:225:13: error: implicit declaration of function 'unlink' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
unlink( buf );
^
troff_generator.c:226:13: error: implicit declaration of function 'symlink' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
symlink( basename( manpage ), buf );
^
See POSIX reference to confirm that those functions are supposed to be declared by unistd.h
Also see man page:
SYNOPSIS
#include <unistd.h>
int
unlink(const char *path);
Source :man 2 unlink
Note that sys/unistd.h is no official header, neither by C nor by POSIX standard, you should never be required to include that one. Same holds true for sys/param.h. These headers are automatically included for you if you included the correct standard headers.
Should fail the same way on many other POSIX systems as
unlinkandsymlinkare documented to be declared inunistd.hwhich isn't ever included.See POSIX reference to confirm that those functions are supposed to be declared by
unistd.hAlso see man page:
Source :
man 2 unlinkNote that
sys/unistd.his no official header, neither by C nor by POSIX standard, you should never be required to include that one. Same holds true forsys/param.h. These headers are automatically included for you if you included the correct standard headers.