#ifndef __ERRNO_LOADED #define __ERRNO_LOADED /**************************************************************************** ** ** - Error definitions ** ***************************************************************************** ** Header introduced by the ANSI C Standard ***************************************************************************** ** ** Copyright 2000 Compaq Computer Corporation ** ** Compaq and the Compaq logo Registered in U.S. Patent and Trademark Office. ** ** Confidential computer software. Valid license from Compaq required for ** possession, use or copying. Consistent with FAR 12.211 and 12.212, ** Commercial Computer Software, Computer Software Documentation, and ** Technical Data for Commercial Items are licensed to the U.S. Government ** under vendor's standard commercial license. ** ****************************************************************************** */ #pragma __nostandard #include #ifdef __cplusplus extern "C" { #endif #if __INITIAL_POINTER_SIZE # pragma __pointer_size __save # pragma __pointer_size 32 #endif /* ** Create 'public' typedefs that are either insensitive to pointer size or ** are sensitive to pointer size and must use short pointers. */ #define EPERM 1 /* Not owner */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such process */ #define EINTR 4 /* Interrupted system call */ #define EIO 5 /* I/O error */ #define ENXIO 6 /* No such device or address */ #define E2BIG 7 /* Arg list too long */ #define ENOEXEC 8 /* Exec format error */ #define EBADF 9 /* Bad file number */ #define ECHILD 10 /* No children */ #define EAGAIN 11 /* No more processes */ #define ENOMEM 12 /* Not enough core */ #define EACCES 13 /* Permission denied */ #define EFAULT 14 /* Bad address */ #define ENOTBLK 15 /* Block device required */ #define EBUSY 16 /* Mount device busy */ #define EEXIST 17 /* File exists */ #define EXDEV 18 /* Cross-device link */ #define ENODEV 19 /* No such device */ #define ENOTDIR 20 /* Not a directory */ #define EISDIR 21 /* Is a directory */ #define EINVAL 22 /* Invalid argument */ #define ENFILE 23 /* File table overflow */ #define EMFILE 24 /* Too many open files */ #define ENOTTY 25 /* Not a typewriter */ #define ETXTBSY 26 /* Text file busy */ #define EFBIG 27 /* File too large */ #define ENOSPC 28 /* No space left on device */ #define ESPIPE 29 /* Illegal seek */ #define EROFS 30 /* Read-only file system */ #define EMLINK 31 /* Too many links */ #define EPIPE 32 /* Broken pipe */ #define EDOM 33 /* Math argument */ #define ERANGE 34 /* Result too large */ #define EWOULDBLOCK 35 /* I/O stream empty */ #define EINPROGRESS 36 /* Operation now in progress */ #define EALREADY 37 /* Operation already in progress */ #define ENOTSOCK 38 /* Socket operation on non-socket */ #define EDESTADDRREQ 39 /* Destination address required */ #define EMSGSIZE 40 /* Message too long */ #define EPROTOTYPE 41 /* Protocol wrong type for socket */ #define ENOPROTOOPT 42 /* Protocol not available */ #define EPROTONOSUPPORT 43 /* Protocol not supported */ #define ESOCKTNOSUPPORT 44 /* Socket type not supported */ #define EOPNOTSUPP 45 /* Operation not supported on socket */ #define EPFNOSUPPORT 46 /* Protocol family not supported */ #define EAFNOSUPPORT 47 /* Address family not supported */ #define EADDRINUSE 48 /* Address already in use */ #define EADDRNOTAVAIL 49 /* Can't assign requested address */ #define ENETDOWN 50 /* Network is down */ #define ENETUNREACH 51 /* Network is unreachable */ #define ENETRESET 52 /* Network dropped connection on reset */ #define ECONNABORTED 53 /* Software caused connection abort */ #define ECONNRESET 54 /* Connection reset by peer */ #define ENOBUFS 55 /* No buffer space available */ #define EISCONN 56 /* Socket is already connected */ #define ENOTCONN 57 /* Socket is not connected */ #define ESHUTDOWN 58 /* Can't send after socket shutdown */ #define ETOOMANYREFS 59 /* Too many references: can't splice */ #define ETIMEDOUT 60 /* Connection timed out */ #define ECONNREFUSED 61 /* Connection refused */ #define ELOOP 62 /* Too many levels of symbolic links */ #define ENAMETOOLONG 63 /* File name too long */ #define EHOSTDOWN 64 /* Host is down */ #define EHOSTUNREACH 65 /* No route to host */ #define ENOTEMPTY 66 /* Directory not empty */ #define EPROCLIM 67 /* Too many processes */ #define EUSERS 68 /* Too many users */ #define EDQUOT 69 /* Disk quota exceeded */ #define ENOMSG 70 /* No message of desired type */ #define EIDRM 71 /* Identifier removed */ #define EALIGN 72 /* Alignment error */ #define ESTALE 73 /* Stale NFS file handle */ #define EREMOTE 74 /* Too many levels of remote in path */ #define ENOLCK 75 /* No locks available */ #define ENOSYS 76 /* Function not implemented */ #define EFTYPE 77 /* Inappropriate operation for file type */ #define ECANCELED 78 /* Operation canceled */ #define EFAIL 79 /* Cannot start operation */ #define EINPROG 80 /* Asynchronous operation in progress */ #define ENOTSUP 81 /* Function not implemented */ #define EDEADLK 82 /* Resource deadlock avoided */ #define ENWAIT 83 /* No waiting processes */ #define EILSEQ 84 /* Illegal byte sequence */ #define EBADCAT 85 /* Bad message catalogue format [1] */ #define EBADMSG 86 /* Corrupted message detected */ #ifndef __HIDE_FORBIDDEN_NAMES #define __ERRNO_MAX 86 /* MUST equal largest errno value */ #define EVMSERR 65535 /* error for non-translatable VMS errors */ #endif /* ** Function prototypes */ int *CMA$TIS_ERRNO_GET_ADDR (void); /* UNIX style error code */ int *CMA$TIS_VMSERRNO_GET_ADDR (void); /* VMS error (errno == EVMSERR) */ void CMA$TIS_ERRNO_SET_VALUE (int __value); void CMA$TIS_VMSERRNO_SET_VALUE (int __value); /* ** In strict ANSI compilation mode, the dollar sign ('$') is not allowed ** in identifier names. This jacket routine provides an ANSI-compliant way ** to access errno. */ #if defined(__DECCXX) && (__DECCXX_VER >= 60000000) && \ (defined(__STD_STRICT_ANSI) || defined(__STD_STRICT_ANSI_ERRORS)) inline static int *__CXX_CMA_TIS_ERRNO_GET_ADDR(void) { return CMA$TIS_ERRNO_GET_ADDR(); } #endif /* ** The CMA function prototypes are defined as uppercase for application ** programs which compile using /NAMES=AS_IS. The CMA shareable images ** only offer the uppercase symbol. ** ** Define lowercase names using a macro such that applications which ** already compile with either /STANDARD=ANSI or /STANDARD=RELAXED ** continue to successfully compile. */ #define cma$tis_errno_get_addr CMA$TIS_ERRNO_GET_ADDR #define cma$tis_vmserrno_get_addr CMA$TIS_VMSERRNO_GET_ADDR #define cma$tis_errno_set_value CMA$TIS_ERRNO_SET_VALUE #define cma$tis_vmserrno_set_value CMA$TIS_VMSERRNO_SET_VALUE /* ** Define macros for accessing errno and vaxc$errno */ #if defined(__DECCXX) && (__DECCXX_VER >= 60000000) && \ (defined(__STD_STRICT_ANSI) || defined(__STD_STRICT_ANSI_ERRORS)) # define errno (*__CXX_CMA_TIS_ERRNO_GET_ADDR()) #else # define errno (*CMA$TIS_ERRNO_GET_ADDR()) #endif #define vaxc$errno (*CMA$TIS_VMSERRNO_GET_ADDR()) /* ** Restore the users pointer context */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size __restore #endif #ifdef __cplusplus } #endif #pragma __standard #endif /* __ERRNO_LOADED */ #ifndef __ERRNODEF_LOADED #define __ERRNODEF_LOADED 1 /**************************************************************************** ** ** - VMS Status Code Equivalents for UNIX-style Error Codes ** ***************************************************************************** ** Header is nonstandard ***************************************************************************** ** ** Copyright 2000 Compaq Computer Corporation ** ** Compaq and the Compaq logo Registered in U.S. Patent and Trademark Office. ** ** Confidential computer software. Valid license from Compaq required for ** possession, use or copying. Consistent with FAR 12.211 and 12.212, ** Commercial Computer Software, Computer Software Documentation, and ** Technical Data for Commercial Items are licensed to the U.S. Government ** under vendor's standard commercial license. ** ****************************************************************************** */ #pragma __nostandard #include #ifdef __cplusplus extern "C" { #endif /* ** Extern model */ #pragma __extern_model __save #pragma __extern_model __globalvalue /* ** Define the external constants */ extern C$_EPERM; /* not owner */ extern C$_ENOENT; /* no such file or directory */ extern C$_ESRCH; /* no such process */ extern C$_EINTR; /* interrupted system call */ extern C$_EIO; /* i/o error */ extern C$_ENXIO; /* no such device or address */ extern C$_E2BIG; /* arg list too long */ extern C$_ENOEXEC; /* exec format error */ extern C$_EBADF; /* bad file number */ extern C$_ECHILD; /* no children */ extern C$_EAGAIN; /* no more processes */ extern C$_ENOMEM; /* not enough core */ extern C$_EACCES; /* permission denied */ extern C$_EFAULT; /* bad address */ extern C$_ENOTBLK; /* block device required */ extern C$_EBUSY; /* mount device busy */ extern C$_EEXIST; /* file exists */ extern C$_EXDEV; /* cross-device link */ extern C$_ENODEV; /* no such device */ extern C$_ENOTDIR; /* not a directory */ extern C$_EISDIR; /* is a directory */ extern C$_EINVAL; /* invalid argument */ extern C$_ENFILE; /* file table overflow */ extern C$_EMFILE; /* too many open files */ extern C$_ENOTTY; /* not a typewriter */ extern C$_ETXTBSY; /* text file busy */ extern C$_EFBIG; /* file too large */ extern C$_ENOSPC; /* no space left on device */ extern C$_ESPIPE; /* illegal seek */ extern C$_EROFS; /* read-only file system */ extern C$_EMLINK; /* too many links */ extern C$_EPIPE; /* broken pipe */ extern C$_EDOM; /* math argument */ extern C$_ERANGE; /* result too large */ extern C$_EWOULDBLOCK; /* I/O operation would block channel */ extern C$_EINPROGRESS; /* Operation now in progress */ extern C$_EALREADY; /* Operation already in progress */ extern C$_ENOTSOCK; /* Socket operation on non-socket */ extern C$_EDESTADDRREQ; /* Destination address required */ extern C$_EMSGSIZE; /* Message too long */ extern C$_EPROTOTYPE; /* Protocol wrong type for socket */ extern C$_ENOPROTOOPT; /* Protocol not available */ extern C$_EPROTONOSUPPORT; /* Protocol not supported */ extern C$_ESOCKTNOSUPPORT; /* Socket type not supported */ extern C$_EOPNOTSUPP; /* Operation not supported on socket */ extern C$_EPFNOSUPPORT; /* Protocol family not supported */ extern C$_EAFNOSUPPORT; /* Address family not supported */ extern C$_EADDRINUSE; /* Address already in use */ extern C$_EADDRNOTAVAIL; /* Can't assign requested address */ extern C$_ENETDOWN; /* Network is down */ extern C$_ENETUNREACH; /* Network is unreachable */ extern C$_ENETRESET; /* Network dropped connection on reset */ extern C$_ECONNABORTED; /* Software caused connection abort */ extern C$_ECONNRESET; /* Connection reset by peer */ extern C$_ENOBUFS; /* No buffer space available */ extern C$_EISCONN; /* Socket is already connected */ extern C$_ENOTCONN; /* Socket is not connected */ extern C$_ESHUTDOWN; /* Can't send after socket shutdown */ extern C$_ETOOMANYREFS; /* Too many references: can't splice */ extern C$_ETIMEDOUT; /* Connection timed out */ extern C$_ECONNREFUSED; /* Connection refused */ extern C$_ELOOP; /* Too many levels of symbolic links */ extern C$_ENAMETOOLONG; /* File name too long */ extern C$_EHOSTDOWN; /* Host is down */ extern C$_EHOSTUNREACH; /* No route to host */ extern C$_ENOTEMPTY; /* Directory not empty */ extern C$_EPROCLIM; /* Too many processes */ extern C$_EUSERS; /* Too many users */ extern C$_EDQUOT; /* Disk quota exceeded */ extern C$_ENOMSG; /* No message of desired type */ extern C$_EIDRM; /* Identifier removed */ extern C$_EALIGN; /* Alignment error */ extern C$_ESTALE; /* Stale NFS file handle */ extern C$_EREMOTE; /* Too many levels of remote in path */ extern C$_ENOLCK; /* No locks available */ extern C$_ENOSYS; /* Function not implemented */ extern C$_EFTYPE; /* Inappropriate operation for file type */ extern C$_ECANCELED; /* Operation canceled */ extern C$_EFAIL; /* Cannot start operation */ extern C$_EINPROG; /* Asynchronous operation in progress */ extern C$_ENOTSUP; /* Function not implemented */ extern C$_EDEADLK; /* Resource deadlock avoided */ extern C$_ENWAIT; /* No waiting processes */ extern C$_EILSEQ; /* Illegal byte sequence */ extern C$_EBADCAT; /* Bad message catalogue format [1] */ extern C$_EBADMSG; /* Corrupted message detected */ /* ** VMS-specific error codes */ extern C$_ERROR; /* C error condition */ extern C$_INV_FRAME; /* invalid frame while in fork state */ extern C$_KILL; /* process killed, unimpl signal specified */ extern C$_LONGJMP; /* longjump requested */ extern C$_LONGJMP_FAILED; /* attempted longjmp failed */ /* ** New in OpenVMS V6.2 */ #if __CRTL_VER >= 60200000 extern C$_SIGUSR1; /* user signal 1 */ extern C$_SIGUSR2; /* user signal 2 */ extern C$_LOCALEIDMISMAT; /* locale version doesn't match DEC C RTL */ extern C$_LOCALEBAD; /* not a locale file */ extern C$_LOCALEINCOMPLET; /* not all requested categories present */ #endif /* ** New in OpenVMS V7.0 */ #if __CRTL_VER >= 70000000 extern C$_SIG0; /* reserved to Digital */ extern C$_SIGN; /* reserved to Digital */ extern C$_SIGPIPE; /* reserved to Digital */ extern C$_SIGCHLD; /* reserved to Digital */ extern C$_HOST_NOT_FOUND; /* Unknown host */ extern C$_TRY_AGAIN; /* Host name lookup failure */ extern C$_NO_RECOVERY; /* Unknown server error */ extern C$_NO_DATA; /* No data record of requested type */ extern C$_NO_ADDRESS; /* No address associated with name */ extern C$_NO_TCP; /* Cannot find TCP routine or UCX$IPC_SHR */ extern C$_NOSYSSHR; /* Link /NOSYSSHR disables image activate */ extern C$_EXIT1; /* reserved to Digital */ extern C$_EXIT255; /* reserved to Digital */ extern C$_ILLSYSTDF; /* Illegal OpenVMS system TDF */ extern C$_QSORT2BIG; /* Array passed to qsort function ... */ #endif /* ** New in OpenVMS V7.3 */ #if __CRTL_VER >= 70300000 extern C$_SIGWINCH; /* reserved to Digital */ #endif #ifdef __cplusplus } #endif #pragma __extern_model __restore #pragma __standard #endif /* __ERRNODEF_LOADED */