1 /* 2 * This test tests if error.h is exist and useble 3 *author:ysun@lnxw.com 4 */ 5 6 #include <sys/errno.h> 7 8 static int errno_test; 9 10 __attribute__((unused)) static int dummy1 = E2BIG; 11 __attribute__((unused)) static int dummy2 = EACCES; 12 __attribute__((unused)) static int dummy3 = EADDRINUSE; 13 __attribute__((unused)) static int dummy4 = EADDRNOTAVAIL; 14 __attribute__((unused)) static int dummy5 = EAFNOSUPPORT; 15 __attribute__((unused)) static int dummy6 = EAGAIN; 16 __attribute__((unused)) static int dummy7 = EALREADY; 17 __attribute__((unused)) static int dummy8 = EBADF; 18 #ifdef EBADMSG 19 __attribute__((unused)) static int dummy9 = EBADMSG; 20 #endif 21 __attribute__((unused)) static int dummy10 = EBUSY; 22 __attribute__((unused)) static int dummy11 = ECANCELED; 23 __attribute__((unused)) static int dummy12 = ECHILD; 24 __attribute__((unused)) static int dummy13 = ECONNABORTED; 25 __attribute__((unused)) static int dummy14 = ECONNREFUSED; 26 __attribute__((unused)) static int dummy15 = ECONNRESET; 27 __attribute__((unused)) static int dummy16 = EDEADLK; 28 __attribute__((unused)) static int dummy17 = EDESTADDRREQ; 29 __attribute__((unused)) static int dummy18 = EDOM; 30 __attribute__((unused)) static int dummy19 = EDQUOT; 31 __attribute__((unused)) static int dummy20 = EEXIST; 32 __attribute__((unused)) static int dummy21 = EFAULT; 33 __attribute__((unused)) static int dummy22 = EFBIG; 34 __attribute__((unused)) static int dummy23 = EHOSTUNREACH; 35 __attribute__((unused)) static int dummy24 = EIDRM; 36 __attribute__((unused)) static int dummy25 = EILSEQ; 37 __attribute__((unused)) static int dummy26 = EINPROGRESS; 38 __attribute__((unused)) static int dummy27 = EINTR; 39 __attribute__((unused)) static int dummy28 = EINVAL; 40 __attribute__((unused)) static int dummy29 = EIO; 41 __attribute__((unused)) static int dummy30 = EISCONN; 42 __attribute__((unused)) static int dummy31 = EISDIR; 43 __attribute__((unused)) static int dummy32 = ELOOP; 44 __attribute__((unused)) static int dummy33 = EMFILE; 45 __attribute__((unused)) static int dummy34 = EMLINK; 46 __attribute__((unused)) static int dummy35 = EMSGSIZE; 47 __attribute__((unused)) static int dummy36 = EMULTIHOP; 48 __attribute__((unused)) static int dummy37 = ENAMETOOLONG; 49 __attribute__((unused)) static int dummy38 = ENETDOWN; 50 __attribute__((unused)) static int dummy39 = ENETRESET; 51 __attribute__((unused)) static int dummy40 = ENETUNREACH; 52 __attribute__((unused)) static int dummy41 = ENFILE; 53 __attribute__((unused)) static int dummy42 = ENOBUFS; 54 #ifdef ENODATA 55 __attribute__((unused)) static int dummy43 = ENODATA; 56 #endif 57 __attribute__((unused)) static int dummy44 = ENODEV; 58 __attribute__((unused)) static int dummy45 = ENOENT; 59 __attribute__((unused)) static int dummy46 = ENOEXEC; 60 __attribute__((unused)) static int dummy47 = ENOLCK; 61 __attribute__((unused)) static int dummy48 = ENOLINK; 62 __attribute__((unused)) static int dummy49 = ENOMEM; 63 __attribute__((unused)) static int dummy50 = ENOMSG; 64 __attribute__((unused)) static int dummy51 = ENOPROTOOPT; 65 __attribute__((unused)) static int dummy52 = ENOSPC; 66 #ifdef ENOSR 67 __attribute__((unused)) static int dummy53 = ENOSR; 68 #endif 69 #ifdef ENOSTR 70 __attribute__((unused)) static int dummy54 = ENOSTR; 71 #endif 72 __attribute__((unused)) static int dummy55 = ENOSYS; 73 __attribute__((unused)) static int dummy56 = ENOTCONN; 74 __attribute__((unused)) static int dummy57 = ENOTDIR; 75 __attribute__((unused)) static int dummy58 = ENOTEMPTY; 76 __attribute__((unused)) static int dummy59 = ENOTSOCK; 77 __attribute__((unused)) static int dummy60 = ENOTSUP; 78 __attribute__((unused)) static int dummy61 = ENOTTY; 79 __attribute__((unused)) static int dummy62 = ENXIO; 80 __attribute__((unused)) static int dummy63 = EOPNOTSUPP; 81 __attribute__((unused)) static int dummy64 = EOVERFLOW; 82 __attribute__((unused)) static int dummy65 = EPERM; 83 __attribute__((unused)) static int dummy66 = EPIPE; 84 __attribute__((unused)) static int dummy67 = EPROTO; 85 __attribute__((unused)) static int dummy68 = EPROTONOSUPPORT; 86 __attribute__((unused)) static int dummy69 = EPROTOTYPE; 87 __attribute__((unused)) static int dummy70 = ERANGE; 88 __attribute__((unused)) static int dummy71 = EROFS; 89 __attribute__((unused)) static int dummy72 = ESPIPE; 90 __attribute__((unused)) static int dummy73 = ESRCH; 91 __attribute__((unused)) static int dummy74 = ESTALE; 92 #ifdef ETIME 93 __attribute__((unused)) static int dummy75 = ETIME; 94 #endif 95 __attribute__((unused)) static int dummy76 = ETIMEDOUT; 96 __attribute__((unused)) static int dummy77 = ETXTBSY; 97 __attribute__((unused)) static int dummy78 = EWOULDBLOCK; 98 __attribute__((unused)) static int dummy79 = EXDEV; 99 dummyfcn(void)100__attribute__((unused))static int dummyfcn(void) 101 { 102 errno_test = errno; 103 return 0; 104 } 105