test public
Dependencies: HttpServer_snapshot_mbed-os
r_errno.h
00001 /******************************************************************************* 00002 * 00003 * $Rev: $ 00004 * $Date:: $ 00005 * 00006 * Description : errno for POSIX IEEE Std 1003.1-2001 00007 * 00008 * (C) Copyright RENESAS ELECTRONICS Ltd 2012 All Rights Reserved 00009 *****************************************************************************/ 00010 00011 #ifndef SDK_ERRNO 00012 #define SDK_ERRNO 00013 00014 /* Include std headers to override _errno with SDK version */ 00015 #include <stdio.h> 00016 #include <string.h> 00017 #include <stdlib.h> 00018 #include <stddef.h> 00019 #include <math.h> 00020 00021 #ifdef __cplusplus 00022 extern "C" { 00023 #endif 00024 00025 #define _REENTRANT 1 00026 00027 /*********************************************************************************** 00028 System Includes 00029 ***********************************************************************************/ 00030 /* SDK errno extension, SDK returns 0 as success, and -1 when errno set */ 00031 #define ESUCCESS (0) 00032 #define EERROR (-1) 00033 00034 #if(1) /* mbed */ 00035 #define EBADF_RBSP (-17) /* Bad file descriptor */ 00036 #define EINVAL_RBSP (-28) /* Invalid argument */ 00037 #define ENOMEM_RBSP (-33) /* No memory available */ 00038 #define ENOENT_RBSP (-42) /* No such file or directory */ 00039 #define EACCES_RBSP (-64) /* Access denied */ 00040 #define EBUSY_RBSP (-67) /* Device or resource busy */ 00041 #define ECANCELED_RBSP (-68) /* Operation was cancelled */ 00042 #define EIO_RBSP (-74) /* Input or Output error (possibly recoverable)*/ 00043 #define EMFILE_RBSP (-76) /* Too many open files */ 00044 #define ENOSPC_RBSP (-84) /* No space available on device */ 00045 #define ENOTSUP_RBSP (-87) /* Not supported */ 00046 #define EPERM_RBSP (-90) /* Operation not permitted */ 00047 #define EFAULT_RBSP (-97) /* Section fault, bad address */ 00048 #define EOVERFLOW_RBSP (-117) /* Value too large to store in data type */ 00049 #else /* not mbed */ 00050 #define EBADF (-17) /* Bad file descriptor */ 00051 #define EINVAL (-28) /* Invalid argument */ 00052 #define ENOMEM (-33) /* No memory available */ 00053 #define ENOLCK (-34) /* No lock available */ 00054 #define ENOENT (-42) /* No such file or directory */ 00055 #define ETIMEDOUT (-50) /* Timed out */ 00056 #define EACCES (-64) /* Access denied */ 00057 #define EAGAIN (-65) /* Resource unavailable. Try again */ 00058 #define EBUSY (-67) /* Device or resource busy */ 00059 #define ECANCELED (-68) /* Operation was cancelled */ 00060 #define EDOM (-69) /* Maths argument out of domain */ 00061 #define EEXIST (-70) /* File, directory or mount exists */ 00062 #define EFBIG (-71) /* File too big */ 00063 #define EINPROGRESS (-72) /* Operation in progress */ 00064 #define EIO (-74) /* Input or Output error (possibly recoverable)*/ 00065 #define EISDIR (-75) /* Is a directory */ 00066 #define EMFILE (-76) /* Too many open files */ 00067 #define ENAMETOOLONG (-77) /* File name too long */ 00068 #define ENFILE (-78) /* Too many files are open in the system */ 00069 #define ENOBUFS (-79) /* No buffers available */ 00070 #define ENODEV (-80) /* Not a valid device */ 00071 #define ENOSPC (-84) /* No space available on device */ 00072 #define ENOTDIR (-85) /* Not a directory */ 00073 #define ENOTEMPTY (-86) /* Directory not empty */ 00074 #define ENOTSUP (-87) /* Not supported */ 00075 #define ENOTTY (-88) /* No TTY available */ 00076 #define ENXIO (-89) /* Not valid IO address or device (unrecoverable)*/ 00077 #define EPERM (-90) /* Operation not permitted */ 00078 #define EROFS (-91) /* Read only file system */ 00079 #define ESPIPE (-92) /* Invalid seek on pipe */ 00080 #define EXDEV (-93) /* Device cross linked */ 00081 #define ENOTSOCK (-94) /* Not a socket */ 00082 #define EMSGSIZE (-95) /* Message too large */ 00083 #define EINTR (-96) /* Function interrupted */ 00084 #define EFAULT (-97) /* Section fault, bad address */ 00085 #define EPIPE (-98) /* Broken pipe */ 00086 #define EALREADY (-99) /* Connection already started */ 00087 #define EDESTADDRREQ (-100) /* Destination address requred */ 00088 #define EPROTOTYPE (-101) /* Wrong protocol or codec type */ 00089 #define ENOPROTOOPT (-102) /* Protocol or codec not available */ 00090 #define EPROTONOSUPPORT (-103) /* Protocol or codec not supported */ 00091 #define EOPNOTSUPP (-104) /* Operation not supported */ 00092 #define EAFNOSUPPORT (-105) /* Address family not supported */ 00093 #define EADDRINUSE (-106) /* Address already in use */ 00094 #define EADDRNOTAVAIL (-107) /* Address not available */ 00095 #define ECONNRESET (-108) /* Connection reset */ 00096 #define EISCONN (-109) /* Connected */ 00097 #define ENOTCONN (-110) /* Not connected */ 00098 #define ECONNREFUSED (-112) /* Connection refused */ 00099 #define EPROCLIM (-113) /* Too many processes */ 00100 #define EUSERS (-114) /* Too many users */ 00101 #define EDEADLK (-115) /* Resource deadlock would occur */ 00102 #define EPROTO (-116) /* Protocol or codec error */ 00103 #define EOVERFLOW (-117) /* Value too large to store in data type */ 00104 #define ESRCH (-118) /* No such task */ 00105 #define EILSEQ (-119) /* Illegal byte sequence format */ 00106 #define EBADMSG (-120) /* Bad message */ 00107 #define ENOSYS (-121) /* Function not supported */ 00108 #define ECRC (-122) /* CRC failure */ 00109 #define EEOF (-123) /* Position is End Of File */ 00110 #define ESEEKPASTEND (-124) /* Seek past EOF */ 00111 #define EMEDIUMTYPE (-127) /* Wrong medium type */ 00112 #define ENOMEDIUM (-128) /* No medium present */ 00113 #define ESEEKRANGE (-129) /* seek setting error */ /* Source Merge 11-1 */ 00114 #endif /* end mbed */ 00115 00116 /*********************************************************************************** 00117 Defines 00118 ***********************************************************************************/ 00119 /* errno is a macro so it is re-entrant (per thread/task value) - this 00120 * definition works with SH C libs. The errno returns an l-value so 00121 * it can be used on the left of an assignment as it is legal for an 00122 * application to assign to errno. 00123 * 00124 * Note: Application code should not call ioif_get_errno directly. All 00125 * access to errno should be made using the POSIX "errno" macro. 00126 */ 00127 extern int *ioif_get_errno(void); 00128 00129 /* Remove SHC definitions so SDK can be used instead */ 00130 #ifdef _errno 00131 #undef _errno 00132 #endif 00133 00134 #define _errno (*ioif_get_errno()) 00135 00136 #ifndef errno 00137 #define errno _errno 00138 #endif 00139 00140 #define iserrno(e)((unsigned int)(e) >= 0xffffff80UL) 00141 00142 #ifdef __cplusplus 00143 } 00144 #endif 00145 00146 #endif
Generated on Wed Jul 13 2022 05:33:36 by 1.7.2