home *** CD-ROM | disk | FTP | other *** search
/ vsiftp.vmssoftware.com / VSIPUBLIC@vsiftp.vmssoftware.com.tar / FREEWARE / FREEWARE40.ZIP / pine / c-client / os_sv4.h < prev    next >
C/C++ Source or Header  |  1994-01-09  |  3KB  |  115 lines

  1. /*
  2.  * Program:    Operating-system dependent routines -- SVR4 version
  3.  *
  4.  * Author:    Mark Crispin
  5.  *        Networks and Distributed Computing
  6.  *        Computing & Communications
  7.  *        University of Washington
  8.  *        Administration Building, AG-44
  9.  *        Seattle, WA  98195
  10.  *        Internet: MRC@CAC.Washington.EDU
  11.  *
  12.  * Date:    10 April 1992
  13.  * Last Edited:    16 August 1993
  14.  *
  15.  * Copyright 1993 by the University of Washington
  16.  *
  17.  *  Permission to use, copy, modify, and distribute this software and its
  18.  * documentation for any purpose and without fee is hereby granted, provided
  19.  * that the above copyright notice appears in all copies and that both the
  20.  * above copyright notice and this permission notice appear in supporting
  21.  * documentation, and that the name of the University of Washington not be
  22.  * used in advertising or publicity pertaining to distribution of the software
  23.  * without specific, written prior permission.  This software is made
  24.  * available "as is", and
  25.  * THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
  26.  * WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED
  27.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN
  28.  * NO EVENT SHALL THE UNIVERSITY OF WASHINGTON BE LIABLE FOR ANY SPECIAL,
  29.  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  30.  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT
  31.  * (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION
  32.  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  33.  *
  34.  */
  35.  
  36. #define MAILFILE "/var/mail/%s"
  37. #define ACTIVEFILE "/usr/share/news/active"
  38. #define NEWSSPOOL "/var/spool/news"
  39. #define NEWSRC strcat (strcpy (tmp,myhomedir ()),"/.newsrc")
  40.  
  41. #include <string.h>
  42.  
  43. #include <sys/types.h>
  44. #include <stdlib.h>
  45. #include <dirent.h>
  46. #include <fcntl.h>
  47. #include <unistd.h>
  48. #include <time.h>
  49. #include <sys/utime.h>
  50. #include <sys/uio.h>        /* needed for writev() prototypes */
  51.  
  52.  
  53. /* some cretin SysV's have gettimeofday() but not the right definition!! */
  54.  
  55. #define gettimeofday Gettimeofday
  56.  
  57.  
  58. /* Different names, equivalent things in BSD and SysV */
  59.  
  60. /* L_SET is defined for some strange reason in <sys/file.h> on SVR4. */
  61. #ifndef L_SET
  62. #define L_SET SEEK_SET
  63. #endif
  64. #define L_INCR SEEK_CUR
  65. #define L_XTND SEEK_END
  66.  
  67. #define direct dirent
  68.  
  69.  
  70. /* For flock() emulation */
  71.  
  72. #define LOCK_SH 1
  73. #define LOCK_EX 2
  74. #define LOCK_NB 4
  75. #define LOCK_UN 8
  76.  
  77.  
  78. /* Dummy definition overridden by TCP routines */
  79.  
  80. #ifndef TCPSTREAM
  81. #define TCPSTREAM void
  82. #endif
  83.  
  84. /* Function prototypes */
  85.  
  86. void rfc822_date  ();
  87. void *fs_get  ();
  88. void fs_resize  ();
  89. void fs_give  ();
  90. void fatal  ();
  91. unsigned long strcrlfcpy  ();
  92. unsigned long strcrlflen  ();
  93. long server_login  ();
  94. char *myusername ();
  95. char *myhomedir ();
  96. char *lockname ();
  97. TCPSTREAM *tcp_open  ();
  98. TCPSTREAM *tcp_aopen  ();
  99. char *tcp_getline  ();
  100. long tcp_getbuffer  ();
  101. long tcp_getdata  ();
  102. long tcp_soutr  ();
  103. long tcp_sout  ();
  104. void tcp_close  ();
  105. char *tcp_host  ();
  106. char *tcp_localhost  ();
  107.  
  108. long gethostid ();
  109. long random ();
  110. void *memmove ();
  111. int scandir ();
  112. int flock ();
  113. int gettimeofday ();
  114. int utimes ();
  115.