No empty .Rs/.Re
[netbsd-mini2440.git] / include / heimdal / protos.h
blob1973be8d7a69f98e2eaf295a36690a975c25b008
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.
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.
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.
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.
35 * Add here functions that don't have a prototype on your system.
37 * $Id: protos.h,v 1.1.1.1 2000/06/16 19:18:30 thorpej Exp $
40 #ifdef NEED_CRYPT_PROTO
41 char *crypt(const char*, const char*);
42 #endif
44 #ifdef NEED_STRTOK_R_PROTO
45 char *strtok_r (char *s1, const char *s2, char **lasts);
46 #endif
48 #ifndef HAVE_OPTARG_DECLARATION
49 extern char *optarg;
50 #endif
51 #ifndef HAVE_OPTERR_DECLARATION
52 extern int opterr;
53 #endif
54 #ifndef HAVE_OPTIND_DECLARATION
55 extern int optind;
56 #endif
57 #ifndef HAVE_OPTOPT_DECLARATION
58 extern int optopt;
59 #endif
61 #if defined(__GNUC__) && SunOS == 4
63 /* To get type fd_set */
64 #include <sys/types.h>
65 #include <sys/time.h>
67 /* To get struct sockaddr, struct in_addr and struct hostent */
68 #include <sys/socket.h>
69 #include <netinet/in.h>
70 #include <netdb.h>
72 /* To get struct stat */
73 #include <sys/stat.h>
75 /* To get struct utimbuf */
76 #include <utime.h>
78 #if !defined(HAVE_ATEXIT) && defined(HAVE_ON_EXIT)
79 #define atexit(X) on_exit(X, NULL)
80 #define HAVE_ATEXIT 1
81 #endif
82 #ifdef NEED_UTIME_PROTO
83 int utime(const char *, const struct utimbuf *);
84 #endif
85 int syscall(int, ...);
86 pid_t getpid(void);
87 int ftruncate(int, off_t);
88 int fchmod(int, mode_t);
89 int fchown(int fd, int owner, int group);
90 int fsync(int);
91 int seteuid(uid_t);
92 int setreuid(int, int);
93 int flock(int, int);
94 int gettimeofday(struct timeval *tp, struct timezone *tzp);
95 int lstat(const char *, struct stat *);
96 int ioctl(int, int, void *);
97 int getpriority(int which, int who);
98 int setpriority(int which, int who, int priority);
99 int getdtablesize(void);
100 int initgroups(const char *name, int basegid);
101 long ulimit(int cmd, long newlimit);
102 int vhangup(void);
104 int sigblock(int);
105 int sigsetmask(int);
106 int setitimer(int which, struct itimerval *value, struct itimerval *ovalue);
108 int munmap(caddr_t addr, int len);
110 int socket(int, int, int);
111 int setsockopt(int, int, int, void *, int);
112 int bind(int, void *, int);
113 int getsockname(int, struct sockaddr *, int *);
114 int accept(int, struct sockaddr *, int *);
115 int connect(int, struct sockaddr *, int);
116 int listen(int, int);
117 int recv(int s, void *buf, int len, int flags);
118 int recvfrom(int, char *, int, int, void *, int *);
119 int sendto(int, const char *, int, int, void *, int);
120 int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
121 int shutdown(int, int);
122 int getpeername(int, struct sockaddr *, int *);
123 int getsockopt(int, int, int, void *, int *);
124 int send(int s, const void *msg, int len, int flags);
125 struct strbuf;
126 int getmsg(int fd, struct strbuf *ctlptr, struct strbuf *dataptr, int *flags);
128 char *inet_ntoa(struct in_addr in);
129 unsigned long inet_addr(const char *cp);
130 int gethostname(char *, int);
131 struct hostent *gethostbyname(const char *);
132 int dn_expand(const u_char *msg,
133 const u_char *eomorig,
134 const u_char *comp_dn,
135 char *exp_dn,
136 int length);
137 int res_search(const char *dname,
138 int class,
139 int type,
140 u_char *answer,
141 int anslen);
143 int yp_get_default_domain (char **outdomain);
144 int innetgr(const char *netgroup, const char *machine,
145 const char *user, const char *domain);
147 char *getwd(char *pathname);
149 void bzero(char *b, int length);
150 int strcasecmp(const char *, const char *);
151 void swab(const char *, char *, int);
152 int atoi(const char *str);
153 char *mktemp(char *);
154 void srandom(int seed);
155 int random(void);
157 int rcmd(char **, unsigned short, char *, char *, char *, int *);
158 int rresvport(int *);
159 int openlog(const char *ident, int logopt, int facility);
160 int syslog(int priority, const char *message, ...);
161 int ttyslot(void);
163 char *getpass(const char *);
165 char *getusershell(void);
166 void setpwent();
167 void endpwent();
169 #include <stdio.h>
170 int fclose(FILE *);
172 #endif /* SunOS4 */
174 #if SunOS == 5
176 #include <sys/types.h>
177 #include <sys/resource.h>
179 char *getusershell(void);
180 char *strtok_r(char *, const char *, char **);
181 int getpriority (int which, id_t who);
182 int setpriority (int which, id_t who, int prio);
183 int getdtablesize (void);
184 char *getusershell(void);
185 void setusershell(void);
186 void endusershell(void);
188 #if defined(__GNUC__)
190 int syscall(int, ...);
191 int gethostname(char *, int);
193 struct timeval;
194 int gettimeofday(struct timeval *tp, void *);
196 #endif
197 #endif
199 #if defined(__osf__) /* OSF/1 */
201 #if 0
202 /* To get type fd_set */
203 #include <sys/types.h>
204 #include <sys/time.h>
206 int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
207 int fsync(int fildes);
208 int gethostname(char *address, int address_len);
209 int setreuid(int ruid, int euid);
210 int ioctl(int d, unsigned long request, void * arg);
211 #endif
212 int flock(int fildes, int operation);
213 int syscall(int, ...);
215 unsigned short htons(unsigned short hostshort);
216 unsigned int htonl(unsigned int hostint);
217 unsigned short ntohs(unsigned short netshort);
218 unsigned int ntohl(unsigned int netint);
220 char *mktemp(char *template);
221 char *getusershell(void);
223 int rcmd(char **, unsigned short, char *, char *, char *, int *);
224 int rresvport (int *port);
226 #endif /* OSF/1 */
228 #if defined(__sgi)
229 #include <sys/types.h>
231 char *ptsname(int fd);
232 struct spwd *getspuid(uid_t);
233 #endif /* IRIX */
235 #if defined(__GNUC__) && defined(_AIX) /* AIX */
237 struct timeval;
238 struct timezone;
239 int gettimeofday (struct timeval *Tp, void *Tzp);
241 #endif /* AIX */
243 #if defined(__GNUC__) && defined(__hpux) /* HP-UX */
245 int syscall(int, ...);
247 int vhangup(void);
249 char *ptsname(int fildes);
251 void utmpname(const char *file);
253 int innetgr(const char *netgroup, const char *machine,
254 const char *user, const char *domain);
256 int dn_comp(char *exp_dn, char *comp_dn, int length,
257 char **dnptrs, char **lastdnptr);
259 int res_query(char *dname, int class, int type,
260 unsigned char *answer, int anslen);
262 int dn_expand(char *msg, char *eomorig, char *comp_dn,
263 char *exp_dn, int length);
265 int res_search(char *dname, int class, int type,
266 unsigned char *answer, int anslen);
268 #endif /* HP-UX */
270 #if defined(WIN32) /* Visual C++ 4.0 (Windows95/NT) */
272 int open(const char *, int, ...);
273 int close(int);
274 int read(int, void *, unsigned int);
275 int write(int, const void *, unsigned int);
277 #endif /* WIN32 */