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 #5668 from kumpera/wasm-work-p4
[mono.git]
/
support
/
unistd.c
diff --git
a/support/unistd.c
b/support/unistd.c
index da2750abe8a35758ca832e5cc760bbf06dac02ca..0f560e28d00afcb0eaefd31c415b2ca018bdfc29 100644
(file)
--- a/
support/unistd.c
+++ b/
support/unistd.c
@@
-7,6
+7,8
@@
* Copyright (C) 2004-2006 Jonathan Pryor
*/
* Copyright (C) 2004-2006 Jonathan Pryor
*/
+#include <config.h>
+
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif /* ndef _GNU_SOURCE */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif /* ndef _GNU_SOURCE */
@@
-136,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;
@@
-228,7
+230,7
@@
Mono_Posix_Syscall_setdomainname (const char *name, mph_size_t len)
/* Android implements truncate, but doesn't declare it.
* Result is a warning during compilation, so skip it.
*/
/* Android implements truncate, but doesn't declare it.
* Result is a warning during compilation, so skip it.
*/
-#ifndef
PLATFORM
_ANDROID
+#ifndef
HOST
_ANDROID
gint32
Mono_Posix_Syscall_truncate (const char *path, mph_off_t length)
{
gint32
Mono_Posix_Syscall_truncate (const char *path, mph_off_t length)
{