os-sunos4.h 6.0 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. #ifdef __STDC__
  66. struct ether_addr;
  67. #endif
  68. struct ether_addr *ether_aton(const char *);
  69. int flock(int, int);
  70. #ifdef __STDC__
  71. struct stat;
  72. #endif
  73. int fstat(int, struct stat *);
  74. #ifdef __STDC__
  75. struct statfs;
  76. #endif
  77. int fstatfs(int, struct statfs *);
  78. int fsync(int);
  79. #ifdef __STDC__
  80. struct timeb;
  81. #endif
  82. int ftime(struct timeb *);
  83. int ftruncate(int, off_t);
  84. int getdtablesize(void);
  85. long gethostid(void);
  86. int gethostname(char *, int);
  87. int getopt(int, char * const *, const char *);
  88. int getpagesize(void);
  89. char *getpass(char *);
  90. int getpeername(int, struct sockaddr *, int *);
  91. int getpriority(int, int);
  92. #ifdef __STDC__
  93. struct rlimit;
  94. #endif
  95. int getrlimit(int, struct rlimit *);
  96. int getsockname(int, struct sockaddr *, int *);
  97. int getsockopt(int, int, int, char *, int *);
  98. #ifdef __STDC__
  99. struct timeval;
  100. struct timezone;
  101. #endif
  102. int gettimeofday(struct timeval *, struct timezone *);
  103. char *getusershell(void);
  104. char *getwd(char *);
  105. int initgroups(const char *, int);
  106. int ioctl(int, int, caddr_t);
  107. int iruserok(u_long, int, char *, char *);
  108. int isatty(int);
  109. int killpg(int, int);
  110. int listen(int, int);
  111. #ifdef __STDC__
  112. struct utmp;
  113. #endif
  114. void login(struct utmp *);
  115. int logout(const char *);
  116. off_t lseek(int, off_t, int);
  117. int lstat(const char *, struct stat *);
  118. int mkstemp(char *);
  119. char *mktemp(char *);
  120. int munmap(caddr_t, int);
  121. void openlog(const char *, int, int);
  122. void perror(const char *);
  123. int printf(const char *, ...);
  124. int puts(const char *);
  125. long random(void);
  126. int readlink(const char *, char *, int);
  127. #ifdef __STDC__
  128. struct iovec;
  129. #endif
  130. int readv(int, struct iovec *, int);
  131. int recv(int, char *, u_int, int);
  132. int recvfrom(int, char *, u_int, int, struct sockaddr *, int *);
  133. int rename(const char *, const char *);
  134. int rcmd(char **, u_short, char *, char *, char *, int *);
  135. int rresvport(int *);
  136. int send(int, char *, u_int, int);
  137. int sendto(int, char *, u_int, int, struct sockaddr *, int);
  138. int setenv(const char *, const char *, int);
  139. int seteuid(int);
  140. int setpriority(int, int, int);
  141. int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
  142. int setpgrp(int, int);
  143. void setpwent(void);
  144. int setrlimit(int, struct rlimit *);
  145. int setsockopt(int, int, int, char *, int);
  146. int shutdown(int, int);
  147. int sigblock(int);
  148. void (*signal (int, void (*) (int))) (int);
  149. int sigpause(int);
  150. int sigsetmask(int);
  151. #ifdef __STDC__
  152. struct sigvec;
  153. #endif
  154. int sigvec(int, struct sigvec *, struct sigvec*);
  155. int pcap_snprintf(char *, size_t, const char *, ...);
  156. int socket(int, int, int);
  157. int socketpair(int, int, int, int *);
  158. int symlink(const char *, const char *);
  159. void srandom(int);
  160. int sscanf(char *, const char *, ...);
  161. int stat(const char *, struct stat *);
  162. int statfs(char *, struct statfs *);
  163. char *strerror(int);
  164. int strcasecmp(const char *, const char *);
  165. #ifdef __STDC__
  166. struct tm;
  167. #endif
  168. int strftime(char *, int, char *, struct tm *);
  169. int strncasecmp(const char *, const char *, int);
  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