I have recently encountered remove() in C which removes files, however i was interested on how it worked. After doing some digging i found its function definition:
#include <errno.h>
#include <stdio.h>
int
remove (const char *file)
{
__set_errno (ENOSYS);
return -1;
}
libc_hidden_def (remove)
stub_warning (remove)
However i am failing to understand what this code does. I know that the function takes a char * and returns a int and returns -1 however the rest of it looks new to me. How does this function work? and what do __set_errno (ENOSYS);, libc_hidden_def (remove) and stub_warning (remove) mean?