home *** CD-ROM | disk | FTP | other *** search
/ vsiftp.vmssoftware.com / VSIPUBLIC@vsiftp.vmssoftware.com.tar / FREEWARE / FREEWARE40.ZIP / xsokoban-31 / unix_types.h < prev    next >
C/C++ Source or Header  |  1998-01-11  |  2KB  |  107 lines

  1. /*    @(#)types.h 2.22 88/01/13 SMI; from UCB 7.1 6/4/86    */
  2.  
  3. /*
  4.  * Copyright (c) 1982, 1986 Regents of the University of California.
  5.  * All rights reserved.  The Berkeley software License Agreement
  6.  * specifies the terms and conditions for redistribution.
  7.  */
  8.  
  9. #ifndef    _UNIX_TYPES_
  10. #define    _UNIX_TYPES_
  11.  
  12. /*
  13.  * Basic system types.
  14.  */
  15.  
  16. /*
  17. This is not relevant on VMS:
  18. #include <sys/sysmacros.h>
  19. */
  20. #ifndef  __SOCKET_TYPEDEFS
  21. typedef    unsigned char    u_char;
  22. typedef    unsigned short    u_short;
  23. typedef    unsigned long    u_long;
  24. #define __SOCKET_TYPEDEFS 1
  25. #endif
  26.  
  27. #ifndef __DECC
  28. typedef    unsigned int    u_int;
  29. typedef    unsigned short    ushort;        /* System V compatibility */
  30. typedef    unsigned int    uint;        /* System V compatibility */
  31. #else
  32. #if __DECC_VER < 50200000
  33. typedef    unsigned int    u_int;
  34. typedef    unsigned short    ushort;        /* System V compatibility */
  35. typedef    unsigned int    uint;        /* System V compatibility */
  36. #else               
  37. #define _FD_MASK_   
  38. #endif /* __DECC_VER */
  39. #endif /* __DECC */
  40.  
  41. typedef    struct    _physadr { int r[1]; } *physadr;
  42. typedef    struct    label_t    {
  43.     int    val[14];
  44. } label_t;
  45.  
  46. typedef    struct    _quad { long val[2]; } quad;
  47. typedef    long    daddr_t;
  48.  
  49. /* This appears elsewhere, e.g., in X Windows include files */
  50. #if !defined(CADDR_T) && !defined(__CADDR_T)
  51. typedef    char    *caddr_t;
  52. #define CADDR_T
  53. #define __CADDR_T
  54. #endif
  55.  
  56. #ifndef __STAT
  57. #include <stat.h>
  58. #endif /* __STAT */
  59. typedef    long    swblk_t;
  60.  
  61.  
  62. /* For VMS we need to avoid a couple of multiple definitions */
  63.  
  64. #if !defined (__TYPES) && !defined (__TIME_T) && !defined (__TYPES_LOADED)
  65. /* TYPES.H    */
  66. /*    TYPES - RTL Typedef Definitions     */
  67. typedef long int time_t;
  68. #define __TIME_T
  69. #endif
  70.  
  71. #ifndef __STDDEF
  72. /* STDDEF.H    */
  73. #if defined(vax11c) || defined(__DECC)
  74. #include <stddef.h>
  75. #else
  76. #define __STDDEF
  77. typedef int ptrdiff_t;
  78. typedef int size_t;
  79. #define NULL        (void *) 0
  80. #define offsetof( type, identifier)            \
  81.          ((size_t)(&((type*) NULL)->identifier))
  82. extern volatile int noshare errno;    /* UNIX style error code */
  83. #endif /* vax11c */
  84. #endif
  85.  
  86.  
  87. #ifndef __DEV_T                   /* This started to appear with DECC 5.0 */
  88. typedef    u_short    uid_t;
  89. typedef    u_short    gid_t;
  90. typedef    long    key_t;
  91. #endif
  92.  
  93. #define    NBBY    8        /* number of bits in a byte */
  94.  
  95. typedef    char *    addr_t;
  96.  
  97.  
  98. #if !defined(F_OK) || !defined(X_OK) || !defined(W_OK) || !defined(R_OK)
  99. #define    F_OK    0
  100. #define    X_OK    1
  101. #define    W_OK    2
  102. #define R_OK    4
  103. #endif 
  104.  
  105. #define MAXPATHLEN    256
  106. #endif    /*_UNIX_TYPES_*/
  107.