delorie.com/djgpp/doc/libc/libc_647.html | search |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <unistd.h> int readlink(const char *filename, char *buffer, size_t size); |
'\0'
.
Number of copied characters; value -1 is returned in case of
error and errno
is set. When value returned is equal to
size, you cannot determine if there was enough room to
copy whole name. So increase size and try again.
ANSI/ISO C | No |
POSIX | No |
char buf[FILENAME_MAX + 1]; if (readlink("/dev/env/DJDIR/bin/sh.exe", buf, FILENAME_MAX) == -1) if (errno == EINVAL) puts("/dev/env/DJDIR/bin/sh.exe is not a symbolic link."); |
webmaster | delorie software privacy |
Copyright © 2004 | Updated Apr 2004 |