home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Interfaces / CIncludes / errno.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-21  |  2.7 KB  |  76 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3.     ErrNo.h
  4.     Error return codes
  5.     
  6.     Copyright American Telephone & Telegraph
  7.     Used with permission, Apple Computer Inc. 1985-1994
  8.     All rights reserved
  9.  
  10. ************************************************************/
  11.  
  12. /* Conditional Macros:
  13.  *    UsingStaticLibs    - for CFM-68K:  Insures that #pragma lib_export is never used.
  14.  *    UsingSharedLibs    - for CFM-68K:  Insures that all functions and data items are
  15.  *                                    marked as exported
  16.  *    <none>            - for CFM-68K:    Data items are exported using #pragma lib_export,
  17.  *                                    functions are not.  Causes excess code to be
  18.  *                                    generated for data references to static libraries
  19.  *                                    and causes the linker to generate glue for
  20.  *                                    references to shared library routines.
  21.  *    The preceeding macros may not both be defined in the same compilation.
  22.  */
  23.  
  24. #ifndef __ERRNO__
  25. #define __ERRNO__
  26.  
  27. #if defined (UsingStaticLibs) && defined (UsingSharedLibs)
  28.     #error "Only one of the conditional macros 'UsingStaticLibs' and 'UsingSharedLibs' may be defined in a compilation"
  29. #endif
  30.  
  31. #ifdef __CFM68K__
  32.     #ifndef UsingStaticLibs
  33.         #pragma lib_export on
  34.     #endif
  35. #endif
  36.  
  37. extern int errno;
  38.  
  39.  
  40. #define EPERM         1 /* Permission denied */
  41. #define ENOENT         2 /* No such file or directory */
  42. #define ENORSRC      3 /* No such resource */
  43. #define EINTR         4 /* Interrupted system service */
  44. #define EIO          5 /* I/O error */
  45. #define ENXIO         6 /* No such device or address */
  46. #define E2BIG         7 /* Argument list too long */
  47. #define ENOEXEC          8 /* Exec format error */
  48. #define EBADF         9 /* Bad file number */
  49. #define ECHILD        10 /* No children processes */
  50. #define EAGAIN        11 /* Resource temporarily unavailable, try again later */
  51. #define ENOMEM        12 /* Not enough space */
  52. #define EACCES        13 /* Permission denied */
  53. #define EFAULT        14 /* Bad address */
  54. #define ENOTBLK     15 /* Block device required */
  55. #define EBUSY        16 /* Device or resource busy */
  56. #define EEXIST        17 /* File exists */
  57. #define EXDEV        18 /* Cross-device link */
  58. #define ENODEV        19 /* No such device */
  59. #define ENOTDIR     20 /* Not a directory */
  60. #define EISDIR        21 /* Is a directory */
  61. #define EINVAL        22 /* Invalid argument */
  62. #define ENFILE        23 /* File table overflow */
  63. #define EMFILE        24 /* Too many open files */
  64. #define ENOTTY        25 /* Not a character device */
  65. #define ETXTBSY     26 /* Text file busy */
  66. #define EFBIG        27 /* File too large */
  67. #define ENOSPC        28 /* No space left on device */
  68. #define ESPIPE        29 /* Illegal seek */
  69. #define EROFS        30 /* Read only file system */
  70. #define EMLINK        31 /* Too many links */
  71. #define EPIPE        32 /* Broken pipe */
  72. #define EDOM        33 /* Math arg out of domain of func */
  73. #define ERANGE        34 /* Math result not representable */
  74.  
  75. #endif
  76.