os-sunos4.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. /*
  2. * Copyright (c) 1989, 1990, 1993, 1994, 1995, 1996
  3. * The Regents of the University of California. All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that: (1) source code distributions
  7. * retain the above copyright notice and this paragraph in its entirety, (2)
  8. * distributions including binary code include the above copyright notice and
  9. * this paragraph in its entirety in the documentation or other materials
  10. * provided with the distribution, and (3) all advertising materials mentioning
  11. * features or use of this software display the following acknowledgement:
  12. * ``This product includes software developed by the University of California,
  13. * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
  14. * the University nor the names of its contributors may be used to endorse
  15. * or promote products derived from this software without specific prior
  16. * written permission.
  17. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  18. * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  19. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  20. */
  21. /* Prototypes missing in SunOS 4 */
  22. #ifdef FILE
  23. int _filbuf(FILE *);
  24. int _flsbuf(u_char, FILE *);
  25. int fclose(FILE *);
  26. int fflush(FILE *);
  27. int fgetc(FILE *);
  28. int fprintf(FILE *, const char *, ...);
  29. int fputc(int, FILE *);
  30. int fputs(const char *, FILE *);
  31. u_int fread(void *, u_int, u_int, FILE *);
  32. int fseek(FILE *, long, int);
  33. u_int fwrite(const void *, u_int, u_int, FILE *);
  34. int pclose(FILE *);
  35. void rewind(FILE *);
  36. void setbuf(FILE *, char *);
  37. int setlinebuf(FILE *);
  38. int ungetc(int, FILE *);
  39. int vfprintf(FILE *, const char *, ...);
  40. int vprintf(const char *, ...);
  41. #endif
  42. #if __GNUC__ <= 1
  43. int read(int, char *, u_int);
  44. int write(int, char *, u_int);
  45. #endif
  46. long a64l(const char *);
  47. #ifdef __STDC__
  48. struct sockaddr;
  49. #endif
  50. int accept(int, struct sockaddr *, int *);
  51. int bind(int, struct sockaddr *, int);
  52. int bcmp(const void *, const void *, u_int);
  53. void bcopy(const void *, void *, u_int);
  54. void bzero(void *, int);
  55. int chroot(const char *);
  56. int close(int);
  57. void closelog(void);
  58. int connect(int, struct sockaddr *, int);
  59. char *crypt(const char *, const char *);
  60. int daemon(int, int);
  61. int fchmod(int, int);
  62. int fchown(int, int, int);
  63. void endgrent(void);
  64. void endpwent(void);
  65. void endservent(void);
  66. #ifdef __STDC__
  67. struct ether_addr;
  68. #endif
  69. struct ether_addr *ether_aton(const char *);
  70. int flock(int, int);
  71. #ifdef __STDC__
  72. struct stat;
  73. #endif
  74. int fstat(int, struct stat *);
  75. #ifdef __STDC__
  76. struct statfs;
  77. #endif
  78. int fstatfs(int, struct statfs *);
  79. int fsync(int);
  80. #ifdef __STDC__
  81. struct timeb;
  82. #endif
  83. int ftime(struct timeb *);
  84. int ftruncate(int, off_t);
  85. int getdtablesize(void);
  86. long gethostid(void);
  87. int gethostname(char *, int);
  88. int getopt(int, char * const *, const char *);
  89. int getpagesize(void);
  90. char *getpass(char *);
  91. int getpeername(int, struct sockaddr *, int *);
  92. int getpriority(int, int);
  93. #ifdef __STDC__
  94. struct rlimit;
  95. #endif
  96. int getrlimit(int, struct rlimit *);
  97. int getsockname(int, struct sockaddr *, int *);
  98. int getsockopt(int, int, int, char *, int *);
  99. #ifdef __STDC__
  100. struct timeval;
  101. struct timezone;
  102. #endif
  103. int gettimeofday(struct timeval *, struct timezone *);
  104. char *getusershell(void);
  105. char *getwd(char *);
  106. int initgroups(const char *, int);
  107. int ioctl(int, int, caddr_t);
  108. int iruserok(u_long, int, char *, char *);
  109. int isatty(int);
  110. int killpg(int, int);
  111. int listen(int, int);
  112. #ifdef __STDC__
  113. struct utmp;
  114. #endif
  115. void login(struct utmp *);
  116. int logout(const char *);
  117. off_t lseek(int, off_t, int);
  118. int lstat(const char *, struct stat *);
  119. int mkstemp(char *);
  120. char *mktemp(char *);
  121. int munmap(caddr_t, int);
  122. void openlog(const char *, int, int);
  123. void perror(const char *);
  124. int printf(const char *, ...);
  125. int puts(const char *);
  126. long random(void);
  127. int readlink(const char *, char *, int);
  128. #ifdef __STDC__
  129. struct iovec;
  130. #endif
  131. int readv(int, struct iovec *, int);
  132. int recv(int, char *, u_int, int);
  133. int recvfrom(int, char *, u_int, int, struct sockaddr *, int *);
  134. int rename(const char *, const char *);
  135. int rcmd(char **, u_short, char *, char *, char *, int *);
  136. int rresvport(int *);
  137. int send(int, char *, u_int, int);
  138. int sendto(int, char *, u_int, int, struct sockaddr *, int);
  139. int setenv(const char *, const char *, int);
  140. int seteuid(int);
  141. int setpriority(int, int, int);
  142. int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
  143. int setpgrp(int, int);
  144. void setpwent(void);
  145. int setrlimit(int, struct rlimit *);
  146. void setservent(int);
  147. int setsockopt(int, int, int, char *, int);
  148. int shutdown(int, int);
  149. int sigblock(int);
  150. void (*signal (int, void (*) (int))) (int);
  151. int sigpause(int);
  152. int sigsetmask(int);
  153. #ifdef __STDC__
  154. struct sigvec;
  155. #endif
  156. int sigvec(int, struct sigvec *, struct sigvec*);
  157. int snprintf(char *, size_t, const char *, ...);
  158. int socket(int, int, int);
  159. int socketpair(int, int, int, int *);
  160. int symlink(const char *, const char *);
  161. void srandom(int);
  162. int sscanf(char *, const char *, ...);
  163. int stat(const char *, struct stat *);
  164. int statfs(char *, struct statfs *);
  165. char *strerror(int);
  166. #ifdef __STDC__
  167. struct tm;
  168. #endif
  169. int strftime(char *, int, char *, struct tm *);
  170. long strtol(const char *, char **, int);
  171. void sync(void);
  172. void syslog(int, const char *, ...);
  173. int system(const char *);
  174. long tell(int);
  175. time_t time(time_t *);
  176. char *timezone(int, int);
  177. int tolower(int);
  178. int toupper(int);
  179. int truncate(char *, off_t);
  180. void unsetenv(const char *);
  181. int vfork(void);
  182. int vsprintf(char *, const char *, ...);
  183. int writev(int, struct iovec *, int);
  184. #ifdef __STDC__
  185. struct rusage;
  186. #endif
  187. int utimes(const char *, struct timeval *);
  188. #if __GNUC__ <= 1
  189. int wait(int *);
  190. pid_t wait3(int *, int, struct rusage *);
  191. #endif
  192. /* Ugly signal hacking */
  193. #ifdef SIG_ERR
  194. #undef SIG_ERR
  195. #define SIG_ERR (void (*)(int))-1
  196. #undef SIG_DFL
  197. #define SIG_DFL (void (*)(int))0
  198. #undef SIG_IGN
  199. #define SIG_IGN (void (*)(int))1
  200. #ifdef KERNEL
  201. #undef SIG_CATCH
  202. #define SIG_CATCH (void (*)(int))2
  203. #endif
  204. #undef SIG_HOLD
  205. #define SIG_HOLD (void (*)(int))3
  206. #endif