#include <stdio.h>
#include <stdlib.h>
+#include "map.h"
#include "mph.h"
G_BEGIN_DECLS
-struct Mono_Posix_Syscall__Passwd {
- /* string */ char *pw_name;
- /* string */ char *pw_passwd;
- /* uid_t */ mph_uid_t pw_uid;
- /* gid_t */ mph_gid_t pw_gid;
- /* string */ char *pw_gecos;
- /* string */ char *pw_dir;
- /* string */ char *pw_shell;
- /* string */ char *_pw_buf_;
-};
-
static const size_t
passwd_offsets[] = {
offsetof (struct passwd, pw_name),
Mono_Posix_Syscall_setpwent (void)
{
errno = 0;
- setpwent ();
- return errno == 0 ? 0 : -1;
+ do {
+ setpwent ();
+ } while (errno == EINTR);
+ mph_return_if_val_in_list5(errno, EIO, EMFILE, ENFILE, ENOMEM, ERANGE);
+ return 0;
}
int
{
errno = 0;
endpwent ();
- return errno == 0 ? 0 : -1;
+ if (errno == EIO)
+ return -1;
+ return 0;
}
G_END_DECLS