home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre4.z / postgre4 / src / lib / H / tmp / os.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-27  |  2.2 KB  |  139 lines

  1. /*
  2.  * os.h --
  3.  *    Operating system definitions.
  4.  *
  5.  * Note:
  6.  *    This file is OPERATING SYSTEM dependent!!!
  7.  *
  8.  * Identification:
  9.  *    $Header: /private/postgres/src/lib/H/tmp/RCS/os.h,v 1.6 1990/08/17 08:54:47 cimarron Exp $
  10.  */
  11.  
  12. #ifndef    OSIncluded        /* Include this file only once */
  13. #define OSIncluded    1
  14.  
  15. #include "tmp/c.h"
  16. #include "tmp/unix.h"    /* UNIX operating system definitions */
  17.  
  18. /*
  19.  * SystemPort --
  20.  *    Unbuffered system I/O port.
  21.  */
  22. typedef HostSystemPort    SystemPort;
  23.  
  24. /*
  25.  * SystemFileMode --
  26.  *    File mode.
  27.  */
  28. typedef HostSystemFileMode    SystemFileMode;
  29.  
  30. /*
  31.  * SystemByteCount --
  32.  *    Number of bytes--used in calls to read, write, etc.
  33.  */
  34. typedef HostSystemByteCount    SystemByteCount;
  35.  
  36. /*
  37.  * SystemFilePosition --
  38.  *    Number of bytes from beginning of file.
  39.  */
  40. typedef HostSystemFilePosition    SystemFilePosition;
  41.  
  42. /*
  43.  * SystemFileOffset --
  44.  *    Number of offset bytes for lseek.
  45.  */
  46. typedef HostSystemFileOffset    SystemFileOffset;
  47.  
  48. /*
  49.  * SystemTime --
  50.  *    Time in seconds.
  51.  */
  52. typedef HostSystemTime    SystemTime;
  53.  
  54. /*
  55.  * open --
  56.  *    open(2)
  57.  */
  58. extern
  59. SystemPort
  60. OpenSystemPortFile ARGS((
  61.     const String        path,
  62.     const int        flags,
  63.     const SystemFileMode    mode
  64. ));
  65.  
  66. /*
  67.  * close --
  68.  *    close(2)
  69.  */
  70. extern
  71. void
  72. CloseSystemPort ARGS((
  73.     const SystemPort    port
  74. ));
  75.  
  76. /*
  77.  * read --
  78.  *    read(2)
  79.  *
  80.  * Note:
  81.  *    String may not be proper usage here.
  82.  */
  83. extern
  84. SystemByteCount
  85. SystemPortRead ARGS((
  86.     const SystemPort    port,
  87.     const String        buffer,
  88.     const SystemByteCount    numberBytes
  89. ));
  90.  
  91. /*
  92.  * write --
  93.  *    write(2)
  94.  *
  95.  * Note:
  96.  *    String may not be proper usage here.
  97.  */
  98. extern
  99. SystemByteCount
  100. SystemPortWrite ARGS((
  101.     const SystemPort    port,
  102.     const String        buffer,
  103.     const SystemByteCount    numberBytes
  104. ));
  105.  
  106. /*
  107.  * lseek --
  108.  *    lseek(2)
  109.  */
  110. extern
  111. SystemFilePosition
  112. SystemPortSeek ARGS((
  113.     const SystemPort    port,
  114.     const SystemFileOffset    offset,
  115.     const int        whence
  116. ));
  117.  
  118. /*
  119.  * GetSystemTime --
  120.  *    Returns system time.
  121.  */
  122. SystemTime
  123. GetSystemTime ARGS((
  124.     void
  125. ));
  126.  
  127. /*
  128.  * PointerIsToStaticData --
  129.  * PointerIsToDynamicData --
  130.  *    True iff pointer points to memory allocated at compile-time or
  131.  *    run-time, respectively.
  132.  *
  133.  * Note:
  134.  *    This is compiler and operating system dependent.
  135.  *    Look in "unix.h", etc. for the appropriate definition.
  136.  */
  137.  
  138. #endif    /* !defined(OSIncluded) */
  139.