Last change
on this file since 413 was 398, checked in by coas-nagasima, 5 years ago |
mbedTLS版Azure IoT Hub接続サンプルのソースコードを追加
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-csrc;charset=UTF-8
|
File size:
415 bytes
|
Line | |
---|
1 | #include <stdio.h>
|
---|
2 | #include <errno.h>
|
---|
3 | #include <fcntl.h>
|
---|
4 | #include "syscall.h"
|
---|
5 |
|
---|
6 | int remove(const char *path)
|
---|
7 | {
|
---|
8 | #ifdef SYS_unlink
|
---|
9 | int r = __syscall(SYS_unlink, path);
|
---|
10 | #else
|
---|
11 | int r = __syscall(SYS_unlinkat, AT_FDCWD, path, 0);
|
---|
12 | #endif
|
---|
13 | #ifdef SYS_rmdir
|
---|
14 | if (r==-EISDIR) r = __syscall(SYS_rmdir, path);
|
---|
15 | #else
|
---|
16 | if (r==-EISDIR) r = __syscall(SYS_unlinkat, AT_FDCWD, path, AT_REMOVEDIR);
|
---|
17 | #endif
|
---|
18 | return __syscall_ret(r);
|
---|
19 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.