projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #4997 from lambdageek/bug-57222
[mono.git]
/
support
/
unistd.c
diff --git
a/support/unistd.c
b/support/unistd.c
index 7fe7dac836324121782e1bb80d7878a7fce1b55b..1123f2bc0fac9112b60e8f398e11b685eb59783c 100644
(file)
--- a/
support/unistd.c
+++ b/
support/unistd.c
@@
-138,24
+138,24
@@
Mono_Posix_Syscall_ttyname_r (int fd, char *buf, mph_size_t len)
}
#endif /* ndef HAVE_TTYNAME_R */
}
#endif /* ndef HAVE_TTYNAME_R */
-gint
32
-Mono_Posix_Syscall_readlink (const char *path, char *buf, mph_size_t len)
+gint
64
+Mono_Posix_Syscall_readlink (const char *path,
unsigned
char *buf, mph_size_t len)
{
{
-
int
r;
+
gint64
r;
mph_return_if_size_t_overflow (len);
mph_return_if_size_t_overflow (len);
- r = readlink (path, buf, (size_t) len);
+ r = readlink (path,
(char*)
buf, (size_t) len);
if (r >= 0 && r < len)
buf [r] = '\0';
return r;
}
#ifdef HAVE_READLINKAT
if (r >= 0 && r < len)
buf [r] = '\0';
return r;
}
#ifdef HAVE_READLINKAT
-gint
32
-Mono_Posix_Syscall_readlinkat (int dirfd, const char *path, char *buf, mph_size_t len)
+gint
64
+Mono_Posix_Syscall_readlinkat (int dirfd, const char *path,
unsigned
char *buf, mph_size_t len)
{
{
-
int
r;
+
gint64
r;
mph_return_if_size_t_overflow (len);
mph_return_if_size_t_overflow (len);
- r = readlinkat (dirfd, path, buf, (size_t) len);
+ r = readlinkat (dirfd, path,
(char*)
buf, (size_t) len);
if (r >= 0 && r < len)
buf [r] = '\0';
return r;
if (r >= 0 && r < len)
buf [r] = '\0';
return r;