Turn audio into a shareable video. forked from nypublicradio/audiogram

errno.h 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. /* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
  2. *
  3. * Permission is hereby granted, free of charge, to any person obtaining a copy
  4. * of this software and associated documentation files (the "Software"), to
  5. * deal in the Software without restriction, including without limitation the
  6. * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  7. * sell copies of the Software, and to permit persons to whom the Software is
  8. * furnished to do so, subject to the following conditions:
  9. *
  10. * The above copyright notice and this permission notice shall be included in
  11. * all copies or substantial portions of the Software.
  12. *
  13. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  18. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  19. * IN THE SOFTWARE.
  20. */
  21. #ifndef UV_ERRNO_H_
  22. #define UV_ERRNO_H_
  23. #include <errno.h>
  24. #if EDOM > 0
  25. # define UV__ERR(x) (-(x))
  26. #else
  27. # define UV__ERR(x) (x)
  28. #endif
  29. #define UV__EOF (-4095)
  30. #define UV__UNKNOWN (-4094)
  31. #define UV__EAI_ADDRFAMILY (-3000)
  32. #define UV__EAI_AGAIN (-3001)
  33. #define UV__EAI_BADFLAGS (-3002)
  34. #define UV__EAI_CANCELED (-3003)
  35. #define UV__EAI_FAIL (-3004)
  36. #define UV__EAI_FAMILY (-3005)
  37. #define UV__EAI_MEMORY (-3006)
  38. #define UV__EAI_NODATA (-3007)
  39. #define UV__EAI_NONAME (-3008)
  40. #define UV__EAI_OVERFLOW (-3009)
  41. #define UV__EAI_SERVICE (-3010)
  42. #define UV__EAI_SOCKTYPE (-3011)
  43. #define UV__EAI_BADHINTS (-3013)
  44. #define UV__EAI_PROTOCOL (-3014)
  45. /* Only map to the system errno on non-Windows platforms. It's apparently
  46. * a fairly common practice for Windows programmers to redefine errno codes.
  47. */
  48. #if defined(E2BIG) && !defined(_WIN32)
  49. # define UV__E2BIG UV__ERR(E2BIG)
  50. #else
  51. # define UV__E2BIG (-4093)
  52. #endif
  53. #if defined(EACCES) && !defined(_WIN32)
  54. # define UV__EACCES UV__ERR(EACCES)
  55. #else
  56. # define UV__EACCES (-4092)
  57. #endif
  58. #if defined(EADDRINUSE) && !defined(_WIN32)
  59. # define UV__EADDRINUSE UV__ERR(EADDRINUSE)
  60. #else
  61. # define UV__EADDRINUSE (-4091)
  62. #endif
  63. #if defined(EADDRNOTAVAIL) && !defined(_WIN32)
  64. # define UV__EADDRNOTAVAIL UV__ERR(EADDRNOTAVAIL)
  65. #else
  66. # define UV__EADDRNOTAVAIL (-4090)
  67. #endif
  68. #if defined(EAFNOSUPPORT) && !defined(_WIN32)
  69. # define UV__EAFNOSUPPORT UV__ERR(EAFNOSUPPORT)
  70. #else
  71. # define UV__EAFNOSUPPORT (-4089)
  72. #endif
  73. #if defined(EAGAIN) && !defined(_WIN32)
  74. # define UV__EAGAIN UV__ERR(EAGAIN)
  75. #else
  76. # define UV__EAGAIN (-4088)
  77. #endif
  78. #if defined(EALREADY) && !defined(_WIN32)
  79. # define UV__EALREADY UV__ERR(EALREADY)
  80. #else
  81. # define UV__EALREADY (-4084)
  82. #endif
  83. #if defined(EBADF) && !defined(_WIN32)
  84. # define UV__EBADF UV__ERR(EBADF)
  85. #else
  86. # define UV__EBADF (-4083)
  87. #endif
  88. #if defined(EBUSY) && !defined(_WIN32)
  89. # define UV__EBUSY UV__ERR(EBUSY)
  90. #else
  91. # define UV__EBUSY (-4082)
  92. #endif
  93. #if defined(ECANCELED) && !defined(_WIN32)
  94. # define UV__ECANCELED UV__ERR(ECANCELED)
  95. #else
  96. # define UV__ECANCELED (-4081)
  97. #endif
  98. #if defined(ECHARSET) && !defined(_WIN32)
  99. # define UV__ECHARSET UV__ERR(ECHARSET)
  100. #else
  101. # define UV__ECHARSET (-4080)
  102. #endif
  103. #if defined(ECONNABORTED) && !defined(_WIN32)
  104. # define UV__ECONNABORTED UV__ERR(ECONNABORTED)
  105. #else
  106. # define UV__ECONNABORTED (-4079)
  107. #endif
  108. #if defined(ECONNREFUSED) && !defined(_WIN32)
  109. # define UV__ECONNREFUSED UV__ERR(ECONNREFUSED)
  110. #else
  111. # define UV__ECONNREFUSED (-4078)
  112. #endif
  113. #if defined(ECONNRESET) && !defined(_WIN32)
  114. # define UV__ECONNRESET UV__ERR(ECONNRESET)
  115. #else
  116. # define UV__ECONNRESET (-4077)
  117. #endif
  118. #if defined(EDESTADDRREQ) && !defined(_WIN32)
  119. # define UV__EDESTADDRREQ UV__ERR(EDESTADDRREQ)
  120. #else
  121. # define UV__EDESTADDRREQ (-4076)
  122. #endif
  123. #if defined(EEXIST) && !defined(_WIN32)
  124. # define UV__EEXIST UV__ERR(EEXIST)
  125. #else
  126. # define UV__EEXIST (-4075)
  127. #endif
  128. #if defined(EFAULT) && !defined(_WIN32)
  129. # define UV__EFAULT UV__ERR(EFAULT)
  130. #else
  131. # define UV__EFAULT (-4074)
  132. #endif
  133. #if defined(EHOSTUNREACH) && !defined(_WIN32)
  134. # define UV__EHOSTUNREACH UV__ERR(EHOSTUNREACH)
  135. #else
  136. # define UV__EHOSTUNREACH (-4073)
  137. #endif
  138. #if defined(EINTR) && !defined(_WIN32)
  139. # define UV__EINTR UV__ERR(EINTR)
  140. #else
  141. # define UV__EINTR (-4072)
  142. #endif
  143. #if defined(EINVAL) && !defined(_WIN32)
  144. # define UV__EINVAL UV__ERR(EINVAL)
  145. #else
  146. # define UV__EINVAL (-4071)
  147. #endif
  148. #if defined(EIO) && !defined(_WIN32)
  149. # define UV__EIO UV__ERR(EIO)
  150. #else
  151. # define UV__EIO (-4070)
  152. #endif
  153. #if defined(EISCONN) && !defined(_WIN32)
  154. # define UV__EISCONN UV__ERR(EISCONN)
  155. #else
  156. # define UV__EISCONN (-4069)
  157. #endif
  158. #if defined(EISDIR) && !defined(_WIN32)
  159. # define UV__EISDIR UV__ERR(EISDIR)
  160. #else
  161. # define UV__EISDIR (-4068)
  162. #endif
  163. #if defined(ELOOP) && !defined(_WIN32)
  164. # define UV__ELOOP UV__ERR(ELOOP)
  165. #else
  166. # define UV__ELOOP (-4067)
  167. #endif
  168. #if defined(EMFILE) && !defined(_WIN32)
  169. # define UV__EMFILE UV__ERR(EMFILE)
  170. #else
  171. # define UV__EMFILE (-4066)
  172. #endif
  173. #if defined(EMSGSIZE) && !defined(_WIN32)
  174. # define UV__EMSGSIZE UV__ERR(EMSGSIZE)
  175. #else
  176. # define UV__EMSGSIZE (-4065)
  177. #endif
  178. #if defined(ENAMETOOLONG) && !defined(_WIN32)
  179. # define UV__ENAMETOOLONG UV__ERR(ENAMETOOLONG)
  180. #else
  181. # define UV__ENAMETOOLONG (-4064)
  182. #endif
  183. #if defined(ENETDOWN) && !defined(_WIN32)
  184. # define UV__ENETDOWN UV__ERR(ENETDOWN)
  185. #else
  186. # define UV__ENETDOWN (-4063)
  187. #endif
  188. #if defined(ENETUNREACH) && !defined(_WIN32)
  189. # define UV__ENETUNREACH UV__ERR(ENETUNREACH)
  190. #else
  191. # define UV__ENETUNREACH (-4062)
  192. #endif
  193. #if defined(ENFILE) && !defined(_WIN32)
  194. # define UV__ENFILE UV__ERR(ENFILE)
  195. #else
  196. # define UV__ENFILE (-4061)
  197. #endif
  198. #if defined(ENOBUFS) && !defined(_WIN32)
  199. # define UV__ENOBUFS UV__ERR(ENOBUFS)
  200. #else
  201. # define UV__ENOBUFS (-4060)
  202. #endif
  203. #if defined(ENODEV) && !defined(_WIN32)
  204. # define UV__ENODEV UV__ERR(ENODEV)
  205. #else
  206. # define UV__ENODEV (-4059)
  207. #endif
  208. #if defined(ENOENT) && !defined(_WIN32)
  209. # define UV__ENOENT UV__ERR(ENOENT)
  210. #else
  211. # define UV__ENOENT (-4058)
  212. #endif
  213. #if defined(ENOMEM) && !defined(_WIN32)
  214. # define UV__ENOMEM UV__ERR(ENOMEM)
  215. #else
  216. # define UV__ENOMEM (-4057)
  217. #endif
  218. #if defined(ENONET) && !defined(_WIN32)
  219. # define UV__ENONET UV__ERR(ENONET)
  220. #else
  221. # define UV__ENONET (-4056)
  222. #endif
  223. #if defined(ENOSPC) && !defined(_WIN32)
  224. # define UV__ENOSPC UV__ERR(ENOSPC)
  225. #else
  226. # define UV__ENOSPC (-4055)
  227. #endif
  228. #if defined(ENOSYS) && !defined(_WIN32)
  229. # define UV__ENOSYS UV__ERR(ENOSYS)
  230. #else
  231. # define UV__ENOSYS (-4054)
  232. #endif
  233. #if defined(ENOTCONN) && !defined(_WIN32)
  234. # define UV__ENOTCONN UV__ERR(ENOTCONN)
  235. #else
  236. # define UV__ENOTCONN (-4053)
  237. #endif
  238. #if defined(ENOTDIR) && !defined(_WIN32)
  239. # define UV__ENOTDIR UV__ERR(ENOTDIR)
  240. #else
  241. # define UV__ENOTDIR (-4052)
  242. #endif
  243. #if defined(ENOTEMPTY) && !defined(_WIN32)
  244. # define UV__ENOTEMPTY UV__ERR(ENOTEMPTY)
  245. #else
  246. # define UV__ENOTEMPTY (-4051)
  247. #endif
  248. #if defined(ENOTSOCK) && !defined(_WIN32)
  249. # define UV__ENOTSOCK UV__ERR(ENOTSOCK)
  250. #else
  251. # define UV__ENOTSOCK (-4050)
  252. #endif
  253. #if defined(ENOTSUP) && !defined(_WIN32)
  254. # define UV__ENOTSUP UV__ERR(ENOTSUP)
  255. #else
  256. # define UV__ENOTSUP (-4049)
  257. #endif
  258. #if defined(EPERM) && !defined(_WIN32)
  259. # define UV__EPERM UV__ERR(EPERM)
  260. #else
  261. # define UV__EPERM (-4048)
  262. #endif
  263. #if defined(EPIPE) && !defined(_WIN32)
  264. # define UV__EPIPE UV__ERR(EPIPE)
  265. #else
  266. # define UV__EPIPE (-4047)
  267. #endif
  268. #if defined(EPROTO) && !defined(_WIN32)
  269. # define UV__EPROTO UV__ERR(EPROTO)
  270. #else
  271. # define UV__EPROTO UV__ERR(4046)
  272. #endif
  273. #if defined(EPROTONOSUPPORT) && !defined(_WIN32)
  274. # define UV__EPROTONOSUPPORT UV__ERR(EPROTONOSUPPORT)
  275. #else
  276. # define UV__EPROTONOSUPPORT (-4045)
  277. #endif
  278. #if defined(EPROTOTYPE) && !defined(_WIN32)
  279. # define UV__EPROTOTYPE UV__ERR(EPROTOTYPE)
  280. #else
  281. # define UV__EPROTOTYPE (-4044)
  282. #endif
  283. #if defined(EROFS) && !defined(_WIN32)
  284. # define UV__EROFS UV__ERR(EROFS)
  285. #else
  286. # define UV__EROFS (-4043)
  287. #endif
  288. #if defined(ESHUTDOWN) && !defined(_WIN32)
  289. # define UV__ESHUTDOWN UV__ERR(ESHUTDOWN)
  290. #else
  291. # define UV__ESHUTDOWN (-4042)
  292. #endif
  293. #if defined(ESPIPE) && !defined(_WIN32)
  294. # define UV__ESPIPE UV__ERR(ESPIPE)
  295. #else
  296. # define UV__ESPIPE (-4041)
  297. #endif
  298. #if defined(ESRCH) && !defined(_WIN32)
  299. # define UV__ESRCH UV__ERR(ESRCH)
  300. #else
  301. # define UV__ESRCH (-4040)
  302. #endif
  303. #if defined(ETIMEDOUT) && !defined(_WIN32)
  304. # define UV__ETIMEDOUT UV__ERR(ETIMEDOUT)
  305. #else
  306. # define UV__ETIMEDOUT (-4039)
  307. #endif
  308. #if defined(ETXTBSY) && !defined(_WIN32)
  309. # define UV__ETXTBSY UV__ERR(ETXTBSY)
  310. #else
  311. # define UV__ETXTBSY (-4038)
  312. #endif
  313. #if defined(EXDEV) && !defined(_WIN32)
  314. # define UV__EXDEV UV__ERR(EXDEV)
  315. #else
  316. # define UV__EXDEV (-4037)
  317. #endif
  318. #if defined(EFBIG) && !defined(_WIN32)
  319. # define UV__EFBIG UV__ERR(EFBIG)
  320. #else
  321. # define UV__EFBIG (-4036)
  322. #endif
  323. #if defined(ENOPROTOOPT) && !defined(_WIN32)
  324. # define UV__ENOPROTOOPT UV__ERR(ENOPROTOOPT)
  325. #else
  326. # define UV__ENOPROTOOPT (-4035)
  327. #endif
  328. #if defined(ERANGE) && !defined(_WIN32)
  329. # define UV__ERANGE UV__ERR(ERANGE)
  330. #else
  331. # define UV__ERANGE (-4034)
  332. #endif
  333. #if defined(ENXIO) && !defined(_WIN32)
  334. # define UV__ENXIO UV__ERR(ENXIO)
  335. #else
  336. # define UV__ENXIO (-4033)
  337. #endif
  338. #if defined(EMLINK) && !defined(_WIN32)
  339. # define UV__EMLINK UV__ERR(EMLINK)
  340. #else
  341. # define UV__EMLINK (-4032)
  342. #endif
  343. /* EHOSTDOWN is not visible on BSD-like systems when _POSIX_C_SOURCE is
  344. * defined. Fortunately, its value is always 64 so it's possible albeit
  345. * icky to hard-code it.
  346. */
  347. #if defined(EHOSTDOWN) && !defined(_WIN32)
  348. # define UV__EHOSTDOWN UV__ERR(EHOSTDOWN)
  349. #elif defined(__APPLE__) || \
  350. defined(__DragonFly__) || \
  351. defined(__FreeBSD__) || \
  352. defined(__FreeBSD_kernel__) || \
  353. defined(__NetBSD__) || \
  354. defined(__OpenBSD__)
  355. # define UV__EHOSTDOWN (-64)
  356. #else
  357. # define UV__EHOSTDOWN (-4031)
  358. #endif
  359. #if defined(EREMOTEIO) && !defined(_WIN32)
  360. # define UV__EREMOTEIO UV__ERR(EREMOTEIO)
  361. #else
  362. # define UV__EREMOTEIO (-4030)
  363. #endif
  364. #if defined(ENOTTY) && !defined(_WIN32)
  365. # define UV__ENOTTY UV__ERR(ENOTTY)
  366. #else
  367. # define UV__ENOTTY (-4029)
  368. #endif
  369. #if defined(EFTYPE) && !defined(_WIN32)
  370. # define UV__EFTYPE UV__ERR(EFTYPE)
  371. #else
  372. # define UV__EFTYPE (-4028)
  373. #endif
  374. #if defined(EILSEQ) && !defined(_WIN32)
  375. # define UV__EILSEQ UV__ERR(EILSEQ)
  376. #else
  377. # define UV__EILSEQ (-4027)
  378. #endif
  379. #endif /* UV_ERRNO_H_ */