errno_h.c 4.5 KB

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