2 * <sys/stat.h> wrapper functions.
5 * Jonathan Pryor (jonpryor@vt.edu)
7 * Copyright (C) 2004-2006 Jonathan Pryor
12 #endif /* ndef _GNU_SOURCE */
14 #include <sys/types.h>
26 Mono_Posix_Syscall_stat (const char *file_name
, struct Mono_Posix_Stat
*buf
)
35 r
= stat (file_name
, &_buf
);
36 if (r
!= -1 && Mono_Posix_ToStat (&_buf
, buf
) == -1)
42 Mono_Posix_Syscall_fstat (int filedes
, struct Mono_Posix_Stat
*buf
)
51 r
= fstat (filedes
, &_buf
);
52 if (r
!= -1 && Mono_Posix_ToStat (&_buf
, buf
) == -1)
58 Mono_Posix_Syscall_lstat (const char *file_name
, struct Mono_Posix_Stat
*buf
)
67 r
= lstat (file_name
, &_buf
);
68 if (r
!= -1 && Mono_Posix_ToStat (&_buf
, buf
) == -1)
74 Mono_Posix_Syscall_mknod (const char *pathname
, guint32 mode
, mph_dev_t dev
)
76 if (Mono_Posix_FromFilePermissions (mode
, &mode
) == -1)
78 return mknod (pathname
, mode
, dev
);