65 |
#define TARGET_NATIVE_OK 1 |
#define TARGET_NATIVE_OK 1 |
66 |
#define TARGET_NATIVE_ERROR 0 |
#define TARGET_NATIVE_ERROR 0 |
67 |
|
|
68 |
#define TARGET_NATIVE_ERROR_PERMISION_DENIED EACCES |
#ifndef TARGET_NATIVE_ERROR_PERMISION_DENIED |
69 |
#define TARGET_NATIVE_ERROR_BAD_FILE_DESCRIPTOR EBADF |
#define TARGET_NATIVE_ERROR_PERMISION_DENIED EACCES |
70 |
#define TARGET_NATIVE_ERROR_FILE_EXISTS EEXIST |
#endif |
71 |
#define TARGET_NATIVE_ERROR_INPUT_OUTPUT EIO |
#ifndef TARGET_NATIVE_ERROR_BAD_FILE_DESCRIPTOR |
72 |
#define TARGET_NATIVE_ERROR_TOO_MANY_OPEN_FILES EMFILE |
#define TARGET_NATIVE_ERROR_BAD_FILE_DESCRIPTOR EBADF |
73 |
#define TARGET_NATIVE_ERROR_FILENAME_TO_LONG ENAMETOOLONG |
#endif |
74 |
#define TARGET_NATIVE_ERROR_NO_SUCH_DEVICE ENODEV |
#ifndef TARGET_NATIVE_ERROR_FILE_EXISTS |
75 |
#define TARGET_NATIVE_ERROR_NO_SUCH_FILE ENOENT |
#define TARGET_NATIVE_ERROR_FILE_EXISTS EEXIST |
76 |
#define TARGET_NATIVE_ERROR_NO_SPACE_LEFT ENOSPC |
#endif |
77 |
#define TARGET_NATIVE_ERROR_DIRECTORY_NOT_EMPTY ENOTEMPTY |
#ifndef TARGET_NATIVE_ERROR_INPUT_OUTPUT |
78 |
#define TARGET_NATIVE_ERROR_OPERATION_NOT_PERMITTED EPERM |
#define TARGET_NATIVE_ERROR_INPUT_OUTPUT EIO |
79 |
#define TARGET_NATIVE_ERROR_READ_ONLY_FILE_SYSTEM EROFS |
#endif |
80 |
#define TARGET_NATIVE_ERROR_INVALID_SEEK ESPIPE |
#ifndef TARGET_NATIVE_ERROR_TOO_MANY_OPEN_FILES |
81 |
#define TARGET_NATIVE_ERROR_INTERRUPT_FUNCTION_CALL EINTR |
#define TARGET_NATIVE_ERROR_TOO_MANY_OPEN_FILES EMFILE |
82 |
|
#endif |
83 |
|
#ifndef TARGET_NATIVE_ERROR_FILENAME_TO_LONG |
84 |
|
#define TARGET_NATIVE_ERROR_FILENAME_TO_LONG ENAMETOOLONG |
85 |
|
#endif |
86 |
|
#ifndef TARGET_NATIVE_ERROR_NO_SUCH_DEVICE |
87 |
|
#define TARGET_NATIVE_ERROR_NO_SUCH_DEVICE ENODEV |
88 |
|
#endif |
89 |
|
#ifndef TARGET_NATIVE_ERROR_NO_SUCH_FILE |
90 |
|
#define TARGET_NATIVE_ERROR_NO_SUCH_FILE ENOENT |
91 |
|
#endif |
92 |
|
#ifndef TARGET_NATIVE_ERROR_NO_SPACE_LEFT |
93 |
|
#define TARGET_NATIVE_ERROR_NO_SPACE_LEFT ENOSPC |
94 |
|
#endif |
95 |
|
#ifndef TARGET_NATIVE_ERROR_DIRECTORY_NOT_EMPTY |
96 |
|
#define TARGET_NATIVE_ERROR_DIRECTORY_NOT_EMPTY ENOTEMPTY |
97 |
|
#endif |
98 |
|
#ifndef TARGET_NATIVE_ERROR_OPERATION_NOT_PERMITTED |
99 |
|
#define TARGET_NATIVE_ERROR_OPERATION_NOT_PERMITTED EPERM |
100 |
|
#endif |
101 |
|
#ifndef TARGET_NATIVE_ERROR_READ_ONLY_FILE_SYSTEM |
102 |
|
#define TARGET_NATIVE_ERROR_READ_ONLY_FILE_SYSTEM EROFS |
103 |
|
#endif |
104 |
|
#ifndef TARGET_NATIVE_ERROR_INVALID_SEEK |
105 |
|
#define TARGET_NATIVE_ERROR_INVALID_SEEK ESPIPE |
106 |
|
#endif |
107 |
|
#ifndef TARGET_NATIVE_ERROR_INTERRUPT_FUNCTION_CALL |
108 |
|
#define TARGET_NATIVE_ERROR_INTERRUPT_FUNCTION_CALL EINTR |
109 |
|
#endif |
110 |
|
|
111 |
/***************************** Datatypes *******************************/ |
/***************************** Datatypes *******************************/ |
112 |
|
|
147 |
strerror(errno) |
strerror(errno) |
148 |
#endif |
#endif |
149 |
|
|
150 |
|
#ifndef TARGET_NATIVE_LAST_ERROR_STRING_FORMAT |
151 |
|
#include <string.h> |
152 |
|
#include <errno.h> |
153 |
|
#define TARGET_NATIVE_LAST_ERROR_STRING_FORMAT(buffer,bufferSize,format) \ |
154 |
|
do { \ |
155 |
|
sprintf(buffer,format); \ |
156 |
|
strcat(" (error: "); \ |
157 |
|
strcat(strerror(errno)); \ |
158 |
|
strcat(")"); \ |
159 |
|
} while (0) |
160 |
|
#endif |
161 |
|
|
162 |
/***************************** Functions *******************************/ |
/***************************** Functions *******************************/ |
163 |
|
|
164 |
#ifdef __cplusplus |
#ifdef __cplusplus |
168 |
#endif /* __TARGET_GENERIC__ */ |
#endif /* __TARGET_GENERIC__ */ |
169 |
|
|
170 |
/* end of file */ |
/* end of file */ |
171 |
|
|