PageRenderTime 64ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/include/heimdal/protos.h

http://www.minix3.org/
C++ Header | 277 lines | 180 code | 55 blank | 42 comment | 6 complexity | 4dc84a7877f9bd71443a9eb6a6cfa8eb MD5 | raw file
Possible License(s): MIT, WTFPL, AGPL-1.0, BSD-3-Clause, GPL-3.0, LGPL-2.0, JSON, 0BSD
  1. /* -*- C -*-
  2. * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan
  3. * (Royal Institute of Technology, Stockholm, Sweden).
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. *
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. *
  13. * 2. Redistributions in binary form must reproduce the above copyright
  14. * notice, this list of conditions and the following disclaimer in the
  15. * documentation and/or other materials provided with the distribution.
  16. *
  17. * 3. Neither the name of the Institute nor the names of its contributors
  18. * may be used to endorse or promote products derived from this software
  19. * without specific prior written permission.
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
  22. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  23. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  24. * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
  25. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  26. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  27. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  28. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  29. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  30. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  31. * SUCH DAMAGE.
  32. */
  33. /*
  34. * Add here functions that don't have a prototype on your system.
  35. *
  36. * $Id: protos.h,v 1.1.1.1 2000/06/16 19:18:30 thorpej Exp $
  37. */
  38. #ifdef NEED_CRYPT_PROTO
  39. char *crypt(const char*, const char*);
  40. #endif
  41. #ifdef NEED_STRTOK_R_PROTO
  42. char *strtok_r (char *s1, const char *s2, char **lasts);
  43. #endif
  44. #ifndef HAVE_OPTARG_DECLARATION
  45. extern char *optarg;
  46. #endif
  47. #ifndef HAVE_OPTERR_DECLARATION
  48. extern int opterr;
  49. #endif
  50. #ifndef HAVE_OPTIND_DECLARATION
  51. extern int optind;
  52. #endif
  53. #ifndef HAVE_OPTOPT_DECLARATION
  54. extern int optopt;
  55. #endif
  56. #if defined(__GNUC__) && SunOS == 4
  57. /* To get type fd_set */
  58. #include <sys/types.h>
  59. #include <sys/time.h>
  60. /* To get struct sockaddr, struct in_addr and struct hostent */
  61. #include <sys/socket.h>
  62. #include <netinet/in.h>
  63. #include <netdb.h>
  64. /* To get struct stat */
  65. #include <sys/stat.h>
  66. /* To get struct utimbuf */
  67. #include <utime.h>
  68. #if !defined(HAVE_ATEXIT) && defined(HAVE_ON_EXIT)
  69. #define atexit(X) on_exit(X, NULL)
  70. #define HAVE_ATEXIT 1
  71. #endif
  72. #ifdef NEED_UTIME_PROTO
  73. int utime(const char *, const struct utimbuf *);
  74. #endif
  75. int syscall(int, ...);
  76. pid_t getpid(void);
  77. int ftruncate(int, off_t);
  78. int fchmod(int, mode_t);
  79. int fchown(int fd, int owner, int group);
  80. int fsync(int);
  81. int seteuid(uid_t);
  82. int setreuid(int, int);
  83. int flock(int, int);
  84. int gettimeofday(struct timeval *tp, struct timezone *tzp);
  85. int lstat(const char *, struct stat *);
  86. int ioctl(int, int, void *);
  87. int getpriority(int which, int who);
  88. int setpriority(int which, int who, int priority);
  89. int getdtablesize(void);
  90. int initgroups(const char *name, int basegid);
  91. long ulimit(int cmd, long newlimit);
  92. int vhangup(void);
  93. int sigblock(int);
  94. int sigsetmask(int);
  95. int setitimer(int which, struct itimerval *value, struct itimerval *ovalue);
  96. int munmap(caddr_t addr, int len);
  97. int socket(int, int, int);
  98. int setsockopt(int, int, int, void *, int);
  99. int bind(int, void *, int);
  100. int getsockname(int, struct sockaddr *, int *);
  101. int accept(int, struct sockaddr *, int *);
  102. int connect(int, struct sockaddr *, int);
  103. int listen(int, int);
  104. int recv(int s, void *buf, int len, int flags);
  105. int recvfrom(int, char *, int, int, void *, int *);
  106. int sendto(int, const char *, int, int, void *, int);
  107. int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
  108. int shutdown(int, int);
  109. int getpeername(int, struct sockaddr *, int *);
  110. int getsockopt(int, int, int, void *, int *);
  111. int send(int s, const void *msg, int len, int flags);
  112. struct strbuf;
  113. int getmsg(int fd, struct strbuf *ctlptr, struct strbuf *dataptr, int *flags);
  114. char *inet_ntoa(struct in_addr in);
  115. unsigned long inet_addr(const char *cp);
  116. int gethostname(char *, int);
  117. struct hostent *gethostbyname(const char *);
  118. int dn_expand(const u_char *msg,
  119. const u_char *eomorig,
  120. const u_char *comp_dn,
  121. char *exp_dn,
  122. int length);
  123. int res_search(const char *dname,
  124. int class,
  125. int type,
  126. u_char *answer,
  127. int anslen);
  128. int yp_get_default_domain (char **outdomain);
  129. int innetgr(const char *netgroup, const char *machine,
  130. const char *user, const char *domain);
  131. char *getwd(char *pathname);
  132. void bzero(char *b, int length);
  133. int strcasecmp(const char *, const char *);
  134. void swab(const char *, char *, int);
  135. int atoi(const char *str);
  136. char *mktemp(char *);
  137. void srandom(int seed);
  138. int random(void);
  139. int rcmd(char **, unsigned short, char *, char *, char *, int *);
  140. int rresvport(int *);
  141. int openlog(const char *ident, int logopt, int facility);
  142. int syslog(int priority, const char *message, ...);
  143. int ttyslot(void);
  144. char *getpass(const char *);
  145. char *getusershell(void);
  146. void setpwent();
  147. void endpwent();
  148. #include <stdio.h>
  149. int fclose(FILE *);
  150. #endif /* SunOS4 */
  151. #if SunOS == 5
  152. #include <sys/types.h>
  153. #include <sys/resource.h>
  154. char *getusershell(void);
  155. char *strtok_r(char *, const char *, char **);
  156. int getpriority (int which, id_t who);
  157. int setpriority (int which, id_t who, int prio);
  158. int getdtablesize (void);
  159. char *getusershell(void);
  160. void setusershell(void);
  161. void endusershell(void);
  162. #if defined(__GNUC__)
  163. int syscall(int, ...);
  164. int gethostname(char *, int);
  165. struct timeval;
  166. int gettimeofday(struct timeval *tp, void *);
  167. #endif
  168. #endif
  169. #if defined(__osf__) /* OSF/1 */
  170. #if 0
  171. /* To get type fd_set */
  172. #include <sys/types.h>
  173. #include <sys/time.h>
  174. int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
  175. int fsync(int fildes);
  176. int gethostname(char *address, int address_len);
  177. int setreuid(int ruid, int euid);
  178. int ioctl(int d, unsigned long request, void * arg);
  179. #endif
  180. int flock(int fildes, int operation);
  181. int syscall(int, ...);
  182. unsigned short htons(unsigned short hostshort);
  183. unsigned int htonl(unsigned int hostint);
  184. unsigned short ntohs(unsigned short netshort);
  185. unsigned int ntohl(unsigned int netint);
  186. char *mktemp(char *template);
  187. char *getusershell(void);
  188. int rcmd(char **, unsigned short, char *, char *, char *, int *);
  189. int rresvport (int *port);
  190. #endif /* OSF/1 */
  191. #if defined(__sgi)
  192. #include <sys/types.h>
  193. char *ptsname(int fd);
  194. struct spwd *getspuid(uid_t);
  195. #endif /* IRIX */
  196. #if defined(__GNUC__) && defined(_AIX) /* AIX */
  197. struct timeval;
  198. struct timezone;
  199. int gettimeofday (struct timeval *Tp, void *Tzp);
  200. #endif /* AIX */
  201. #if defined(__GNUC__) && defined(__hpux) /* HP-UX */
  202. int syscall(int, ...);
  203. int vhangup(void);
  204. char *ptsname(int fildes);
  205. void utmpname(const char *file);
  206. int innetgr(const char *netgroup, const char *machine,
  207. const char *user, const char *domain);
  208. int dn_comp(char *exp_dn, char *comp_dn, int length,
  209. char **dnptrs, char **lastdnptr);
  210. int res_query(char *dname, int class, int type,
  211. unsigned char *answer, int anslen);
  212. int dn_expand(char *msg, char *eomorig, char *comp_dn,
  213. char *exp_dn, int length);
  214. int res_search(char *dname, int class, int type,
  215. unsigned char *answer, int anslen);
  216. #endif /* HP-UX */
  217. #if defined(WIN32) /* Visual C++ 4.0 (Windows95/NT) */
  218. int open(const char *, int, ...);
  219. int close(int);
  220. int read(int, void *, unsigned int);
  221. int write(int, const void *, unsigned int);
  222. #endif /* WIN32 */