Merge pull request #3100 from lambdageek/dev/monoerror-exns
[mono-project.git] / mono / metadata / nacl-stub.c
blobe7fcb2d03b407e68d84dea83dc51469ee32bddb2
1 #if defined(__native_client__)
3 #include "nacl-stub.h"
5 struct group *getgrnam(const char *name)
7 return NULL;
10 struct group *getgrgid(gid_t gid)
12 errno = EIO;
13 return NULL;
16 int fsync(int fd)
18 errno = EINVAL;
19 return -1;
22 #ifdef USE_NEWLIB
23 dev_t makedev(int maj, int min)
25 return (maj)*256+(min);
28 int utime(const char *filename, const void *times)
30 errno = EACCES;
31 return -1;
34 int kill(pid_t pid, int sig)
36 errno = EACCES;
37 return -1;
40 int getrusage(int who, void *usage)
42 errno = EACCES;
43 return -1;
46 int lstat(const char *path, struct stat *buf)
48 return stat (path, buf);
51 int getdtablesize(void)
53 #ifdef OPEN_MAX
54 return OPEN_MAX;
55 #else
56 return 256;
57 #endif
60 size_t getpagesize(void)
62 #ifdef PAGE_SIZE
63 return PAGE_SIZE;
64 #else
65 return 4096;
66 #endif
69 int sem_trywait(sem_t *sem) {
70 g_assert_not_reached ();
71 return -1;
74 int sem_timedwait(sem_t *sem, const struct timespec *abs_timeout) {
75 g_assert_not_reached ();
76 return -1;
79 #endif
81 #endif