xref: /freebsd/contrib/tcsh/tc.os.h (revision e4e9813eb92cd7c4d4b819a8fbed5cbd3d92f5d8)
1 /* $Header: /src/pub/tcsh/tc.os.h,v 3.97 2005/03/03 22:32:01 kim Exp $ */
2 /*
3  * tc.os.h: Shell os dependent defines
4  */
5 /*-
6  * Copyright (c) 1980, 1991 The Regents of the University of California.
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  * 2. Redistributions in binary form must reproduce the above copyright
15  *    notice, this list of conditions and the following disclaimer in the
16  *    documentation and/or other materials provided with the distribution.
17  * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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 #ifndef _h_tc_os
34 #define _h_tc_os
35 
36 #ifdef notdef
37 /*
38  * for SVR4 and linux we used to fork pipelines backwards.
39  * This should not be needed any more.
40  * more info in sh.sem.c
41  */
42 # define BACKPIPE
43 #endif /* notdef */
44 
45 #ifdef __CYGWIN__
46 #  undef NOFILE
47 #  define NOFILE sysconf(_SC_OPEN_MAX)
48 #endif
49 
50 #ifdef   _VMS_POSIX
51 # ifndef  NOFILE
52 #  define  NOFILE 64
53 # endif /* NOFILE */
54 # define  nice(a)       setprio((getpid()),a)
55 # include <sys/time.h>    /* for time stuff in tc.prompt.c */
56 # include <limits.h>
57 #endif /* atp vmsposix */
58 
59 #if defined(DECOSF1) || defined(HPUXVERSION)
60 # include <sys/signal.h>
61 #endif /* DECOSF1 || HPUXVERSION */
62 
63 #ifdef DECOSF1
64 # include <sys/ioctl.h>
65 #endif /* DECOSF1 */
66 
67 #if defined(OPEN_MAX) && !defined(NOFILE)
68 # define NOFILE OPEN_MAX
69 #endif /* OPEN_MAX && !NOFILE */
70 
71 #if defined(USR_NFDS) && !defined(NOFILE)
72 # define NOFILE USR_NFDS
73 #endif /* USR_NFDS && !NOFILE */
74 
75 #ifndef NOFILE
76 # define NOFILE 256
77 #endif /* NOFILE */
78 
79 #ifdef OREO
80 # include <sys/time.h>
81 # ifdef notdef
82   /* Don't include it, because it defines things we don't really have */
83 #  include <sys/resource.h>
84 # endif /* notdef */
85 # ifdef POSIX
86 #  include <sys/tty.h>
87 #  include <termios.h>
88 # endif /* POSIX */
89 #endif /* OREO */
90 
91 #ifndef NCARGS
92 # ifdef _SC_ARG_MAX
93 #  define NCARGS sysconf(_SC_ARG_MAX)
94 # else /* !_SC_ARG_MAX */
95 #  ifdef ARG_MAX
96 #   define NCARGS ARG_MAX
97 #  else /* !ARG_MAX */
98 #   ifdef _MINIX
99 #    define NCARGS 80
100 #   else /* !_MINIX */
101 #    define NCARGS 1024
102 #   endif /* _MINIX */
103 #  endif /* ARG_MAX */
104 # endif /* _SC_ARG_MAX */
105 #endif /* NCARGS */
106 
107 #ifdef convex
108 # include <sys/dmon.h>
109 #endif /* convex */
110 
111 #ifdef titan
112 extern int end;
113 #endif /* titan */
114 
115 #ifdef hpux
116 # ifdef lint
117 /*
118  * Hpux defines struct ucred, in <sys/user.h>, but if I include that
119  * then I need to include the *world*
120  * [all this to pass lint cleanly!!!]
121  * so I define struct ucred here...
122  */
123 struct ucred {
124     int     foo;
125 };
126 # endif /* lint */
127 
128 /*
129  * hpux 7.0 does not define it
130  */
131 # ifndef CSUSP
132 #  define CSUSP 032
133 # endif	/* CSUSP */
134 
135 # include <signal.h>
136 # if !defined(hp9000s500) && !(defined(SIGRTMAX) || defined(SIGRTMIN))
137 /*
138  * hpux < 7
139  */
140 #  include <sys/bsdtty.h>
141 # endif /* !hp9000s500 && !(SIGRTMAX || SIGRTMIN) */
142 
143 # ifndef TIOCSTI
144 #  include <sys/strtio.h>
145 # endif
146 #endif /* hpux */
147 
148 /*
149  * ISC does not define CSUSP
150  */
151 #ifdef ISC
152 # ifndef CSUSP
153 #  define CSUSP 032
154 # endif	/* CSUSP */
155 # if defined(POSIX) && !defined(TIOCGWINSZ)
156 /*
157  * ISC defines this only in termio.h. If we are using POSIX and include
158  * termios.h, then we define it ourselves so that window resizing works.
159  */
160 #  define TIOCGWINSZ      (('T'<<8)|104)
161 # endif /* POSIX && !TIOCGWINSZ */
162 #endif /* ISC */
163 
164 #ifdef ISC202
165 # undef TIOCGWINSZ
166 #endif /* ISC202 */
167 
168 /*
169  * XXX: This will be changed soon to
170  * #if (SYSVREL > 0) && defined(TIOCGWINSZ)
171  * If that breaks on your machine, let me know.
172  *
173  * It would break on glibc, where all this is
174  * defined in <termios.h>. Wrapper added.
175  */
176 #if !defined(linux) && !defined(__GNU__) && !defined(__GLIBC__) && !defined(_VMS_POSIX)
177 # if defined(INTEL) || defined(u3b2) || defined (u3b5) || defined(ub15) || defined(u3b20d) || defined(ISC) || defined(SCO) || defined(tower32)
178 #  ifdef TIOCGWINSZ
179 /*
180  * for struct winsiz
181  */
182 #   include <sys/stream.h>
183 #   include <sys/ptem.h>
184 #  endif /* TIOCGWINSZ */
185 # endif /* INTEL || u3b2 || u3b5 || ub15 || u3b20d || ISC || SCO || tower32 */
186 #endif /* !glibc && !_VMS_POSIX */
187 
188 #ifdef IRIS4D
189 # include <sys/time.h>
190 # include <sys/resource.h>
191 #endif /* IRIS4D */
192 
193 /*
194  * For some versions of system V software, specially ones that use the
195  * Wollongong Software TCP/IP, the FIOCLEX, FIONCLEX, FIONBIO calls
196  * might not work correctly for file descriptors [they work only for
197  * sockets]. So we try to use first the fcntl() and we only use the
198  * ioctl() form, only if we don't have the fcntl() one.
199  *
200  * From: scott@craycos.com (Scott Bolte)
201  */
202 #ifndef WINNT_NATIVE
203 # ifdef F_SETFD
204 #  ifndef FD_CLOEXEC
205 #   define FD_CLOEXEC 1
206 #  endif
207 #  define close_on_exec(fd, v) fcntl((fd), F_SETFD, ((v) ? FD_CLOEXEC : 0))
208 # else /* !F_SETFD */
209 #  ifdef FIOCLEX
210 #   define close_on_exec(fd, v) ioctl((fd), ((v) ? FIOCLEX : FIONCLEX), NULL)
211 #  else /* !FIOCLEX */
212 #   define close_on_exec(fd, v)	/* Nothing */
213 #  endif /* FIOCLEX */
214 # endif /* F_SETFD */
215 #else /* WINNT_NATIVE */
216 # define close_on_exec(fd, v) nt_close_on_exec((fd),(v))
217 #endif /* !WINNT_NATIVE */
218 
219 /*
220  * Stat
221  */
222 #ifdef ISC
223 /* these are not defined for _POSIX_SOURCE under ISC 2.2 */
224 # ifndef S_IFMT
225 #  define S_IFMT	0170000		/* type of file */
226 #  define S_IFDIR	0040000		/* directory */
227 #  define S_IFCHR	0020000		/* character special */
228 #  define S_IFBLK	0060000		/* block special */
229 #  define S_IFREG	0100000		/* regular */
230 #  define S_IFIFO	0010000		/* fifo */
231 #  define S_IFNAM	0050000		/* special named file */
232 #  ifndef ISC202
233 #   define S_IFLNK	0120000		/* symbolic link */
234 #  endif /* ISC202 */
235 # endif /* S_IFMT */
236 #endif /* ISC */
237 
238 #ifdef STAT_MACROS_BROKEN
239 # undef S_ISDIR
240 # undef S_ISCHR
241 # undef S_ISBLK
242 # undef S_ISREG
243 # undef S_ISFIFO
244 # undef S_ISNAM
245 # undef S_ISLNK
246 # undef S_ISSOCK
247 #endif /* STAT_MACROS_BROKEN */
248 
249 #ifdef S_IFMT
250 # if !defined(S_ISDIR) && defined(S_IFDIR)
251 #  define S_ISDIR(a)	(((a) & S_IFMT) == S_IFDIR)
252 # endif	/* ! S_ISDIR && S_IFDIR */
253 # if !defined(S_ISCHR) && defined(S_IFCHR)
254 #  define S_ISCHR(a)	(((a) & S_IFMT) == S_IFCHR)
255 # endif /* ! S_ISCHR && S_IFCHR */
256 # if !defined(S_ISBLK) && defined(S_IFBLK)
257 #  define S_ISBLK(a)	(((a) & S_IFMT) == S_IFBLK)
258 # endif	/* ! S_ISBLK && S_IFBLK */
259 # if !defined(S_ISREG) && defined(S_IFREG)
260 #  define S_ISREG(a)	(((a) & S_IFMT) == S_IFREG)
261 # endif	/* ! S_ISREG && S_IFREG */
262 # if !defined(S_ISFIFO) && defined(S_IFIFO)
263 #  define S_ISFIFO(a)	(((a) & S_IFMT) == S_IFIFO)
264 # endif	/* ! S_ISFIFO && S_IFIFO */
265 # if !defined(S_ISNAM) && defined(S_IFNAM)
266 #  define S_ISNAM(a)	(((a) & S_IFMT) == S_IFNAM)
267 # endif	/* ! S_ISNAM && S_IFNAM */
268 # if !defined(S_ISLNK) && defined(S_IFLNK)
269 #  define S_ISLNK(a)	(((a) & S_IFMT) == S_IFLNK)
270 # endif	/* ! S_ISLNK && S_IFLNK */
271 # if !defined(S_ISSOCK) && defined(S_IFSOCK)
272 #  define S_ISSOCK(a)	(((a) & S_IFMT) == S_IFSOCK)
273 # endif	/* ! S_ISSOCK && S_IFSOCK */
274 #endif /* S_IFMT */
275 
276 #ifdef tower32
277 /* The header files lie; we really don't have symlinks */
278 # undef S_ISLNK
279 # undef S_IFLNK
280 #endif /* tower32 */
281 
282 #ifndef S_IREAD
283 # define S_IREAD 0000400
284 #endif /* S_IREAD */
285 #ifndef S_IROTH
286 # define S_IROTH (S_IREAD >> 6)
287 #endif /* S_IROTH */
288 #ifndef S_IRGRP
289 # define S_IRGRP (S_IREAD >> 3)
290 #endif /* S_IRGRP */
291 #ifndef S_IRUSR
292 # define S_IRUSR S_IREAD
293 #endif /* S_IRUSR */
294 
295 #ifndef S_IWRITE
296 # define S_IWRITE 0000200
297 #endif /* S_IWRITE */
298 #ifndef S_IWOTH
299 # define S_IWOTH (S_IWRITE >> 6)
300 #endif /* S_IWOTH */
301 #ifndef S_IWGRP
302 # define S_IWGRP (S_IWRITE >> 3)
303 #endif /* S_IWGRP */
304 #ifndef S_IWUSR
305 # define S_IWUSR S_IWRITE
306 #endif /* S_IWUSR */
307 
308 #ifndef S_IEXEC
309 # define S_IEXEC 0000100
310 #endif /* S_IEXEC */
311 #ifndef S_IXOTH
312 # define S_IXOTH (S_IEXEC >> 6)
313 #endif /* S_IXOTH */
314 #ifndef S_IXGRP
315 # define S_IXGRP (S_IEXEC >> 3)
316 #endif /* S_IXGRP */
317 #ifndef S_IXUSR
318 # define S_IXUSR S_IEXEC
319 #endif /* S_IXUSR */
320 
321 #ifndef S_ISUID
322 # define S_ISUID 0004000 	/* setuid */
323 #endif /* S_ISUID */
324 #ifndef S_ISGID
325 # define S_ISGID 0002000	/* setgid */
326 #endif /* S_ISGID */
327 #ifndef S_ISVTX
328 # define S_ISVTX 0001000	/* sticky */
329 #endif /* S_ISVTX */
330 #ifndef S_ENFMT
331 # define S_ENFMT S_ISGID	/* record locking enforcement flag */
332 #endif /* S_ENFMT */
333 
334 /* the following macros are for POSIX conformance */
335 #ifndef S_IRWXU
336 # define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
337 #endif /* S_IRWXU */
338 #ifndef S_IRWXG
339 # define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
340 #endif /* S_IRWXG */
341 #ifndef S_IRWXO
342 # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
343 #endif /* S_IRWXO */
344 
345 /*
346  * Access()
347  */
348 #ifndef F_OK
349 # define F_OK 0
350 #endif /* F_OK */
351 #ifndef X_OK
352 # define X_OK 1
353 #endif /* X_OK */
354 #ifndef W_OK
355 # define W_OK 2
356 #endif /* W_OK */
357 #ifndef R_OK
358 # define R_OK 4
359 #endif /* R_OK */
360 
361 /*
362  * Open()
363  */
364 #ifndef O_RDONLY
365 # define O_RDONLY	0
366 #endif /* O_RDONLY */
367 #ifndef O_WRONLY
368 # define O_WRONLY	1
369 #endif /* O_WRONLY */
370 #ifndef O_RDWR
371 # define O_RDWR		2
372 #endif /* O_RDWR */
373 
374 /*
375  * Lseek()
376  */
377 #ifndef L_SET
378 # ifdef SEEK_SET
379 #  define L_SET		SEEK_SET
380 # else /* !SEEK_SET */
381 #  define L_SET		0
382 # endif	/* SEEK_SET */
383 #endif /* L_SET */
384 #ifndef L_INCR
385 # ifdef SEEK_CUR
386 #  define L_INCR	SEEK_CUR
387 # else /* !SEEK_CUR */
388 #  define L_INCR	1
389 # endif	/* SEEK_CUR */
390 #endif /* L_INCR */
391 #ifndef L_XTND
392 # ifdef SEEK_END
393 #  define L_XTND	SEEK_END
394 # else /* !SEEK_END */
395 #  define L_XTND	2
396 # endif /* SEEK_END */
397 #endif /* L_XTND */
398 
399 #if !defined (HAVE_SETPGID) && !defined (SETPGRP_VOID)
400 # define setpgid(pid, pgrp)	setpgrp(pid, pgrp)
401 #endif
402 
403 #if defined(BSDJOBS) && !(defined(POSIX) && defined(POSIXJOBS))
404 # define NEEDtcgetpgrp
405 #endif /* BSDJOBS && !(POSIX && POSIXJOBS) */
406 
407 #ifdef RENO
408 /*
409  * RENO has this broken. It is fixed on 4.4BSD
410  */
411 # define NEEDtcgetpgrp
412 #endif /* RENO */
413 
414 #ifdef SXA
415 # ifndef _BSDX_
416 /*
417  * Only needed in the system V environment.
418  */
419 #  define setrlimit 	bsd_setrlimit
420 #  define getrlimit	bsd_getrlimit
421 # endif	/* _BSDX_ */
422 #endif /* SXA */
423 
424 #if defined(_MINIX) || defined(__EMX__)
425 # define HAVENOLIMIT
426 /*
427  * Minix does not have these, so...
428  */
429 # define getpgrp		getpid
430 #endif /* _MINIX || __EMX__ */
431 
432 #ifdef __EMX__
433 /* XXX: How can we get the tty name in emx? */
434 # define ttyname(fd) (isatty(fd) ? "/dev/tty" : NULL)
435 #endif /* __EMX__ */
436 
437 #ifndef S_IFLNK
438 # define lstat stat
439 #endif /* S_IFLNK */
440 
441 
442 #if defined(BSDTIMES) && !defined(_SEQUENT_)
443 typedef struct timeval timeval_t;
444 #endif /* BSDTIMES && ! _SEQUENT_ */
445 
446 #ifdef NeXT
447 /*
448  * From Tony_Mason@transarc.com, override NeXT's malloc stuff.
449  */
450 # define malloc tcsh_malloc
451 # define calloc tcsh_calloc
452 # define realloc tcsh_realloc
453 # define free tcsh_free
454 #endif /* NeXT */
455 
456 #if defined(HAVE_GETHOSTNAME) && !HAVE_DECL_GETHOSTNAME
457 extern int gethostname __P((char *, int));
458 #endif
459 
460 #ifndef GETPGRP_VOID
461 # define mygetpgrp()    getpgrp(0)
462 #else
463 # define mygetpgrp()    getpgrp()
464 #endif
465 
466 #if !defined(POSIX) || defined(SUNOS4) || defined(UTekV) || defined(sysV88)
467 extern time_t time();
468 extern char *getenv();
469 extern int atoi();
470 # ifndef __EMX__
471 extern char *ttyname();
472 # endif /* __EMX__ */
473 
474 
475 # if defined(SUNOS4)
476 #  ifndef toupper
477 extern int toupper __P((int));
478 #  endif /* toupper */
479 #  ifndef tolower
480 extern int tolower __P((int));
481 #  endif /* tolower */
482 extern caddr_t sbrk __P((int));
483 # else /* !SUNOS4 */
484 #  ifndef WINNT_NATIVE
485 #   ifdef hpux
486 extern void abort();
487 extern void qsort();
488 #   endif /* hpux */
489 #  endif /* !WINNT_NATIVE */
490 # endif	/* SUNOS4 */
491 #ifndef _CX_UX
492 extern void perror();
493 #endif
494 
495 # ifdef BSDSIGS
496 #  if !defined(_AIX370) && !defined(MACH) && !defined(NeXT) && !defined(_AIXPS2) && !defined(ardent) && !defined(SUNOS4) && !defined(HPBSD) && !defined(__MACHTEN__)
497 #   if (!defined(apollo) || !defined(__STDC__)) && !defined(__DGUX__) && !defined(fps500)
498 extern RETSIGTYPE sigvec();
499 #ifndef _CX_UX
500 extern void sigpause();
501 #endif /* _CX_UX */
502 #   endif /* (!apollo || !__STDC__) && !__DGUX__ && !fps500 */
503 #  endif /* _AIX370 || MACH || NeXT || _AIXPS2 || ardent || SUNOS4 || HPBSD */
504 extern sigmask_t sigblock();
505 extern sigmask_t sigsetmask();
506 # endif	/* BSDSIGS */
507 
508 # ifdef BSD
509 extern uid_t getuid(), geteuid();
510 extern gid_t getgid(), getegid();
511 # endif /* BSD */
512 
513 # ifdef SYSMALLOC
514 extern memalign_t malloc();
515 extern memalign_t realloc();
516 extern memalign_t calloc();
517 extern void free();
518 # endif	/* SYSMALLOC */
519 
520 # ifdef BSDJOBS
521 #  ifdef BSDTIMES
522 #   ifdef __MACHTEN__
523 extern pid_t wait3();
524 #   endif /* __MACHTEN__ */
525 #  endif /* BSDTIMES */
526 # endif	/* BSDJOBS */
527 
528 # if (!defined(fps500) && !defined(apollo) && !defined(__lucid) && !defined(HPBSD) && !defined(DECOSF1))
529 extern void setpwent();
530 extern void endpwent();
531 # endif /* !fps500 && !apollo && !__lucid && !HPBSD && !DECOSF1 */
532 
533 # ifndef __STDC__
534 extern struct passwd *getpwuid(), *getpwnam(), *getpwent();
535 #  ifdef HAVE_SHADOW_H
536 extern struct spwd *getspnam(), *getspent();
537 #  endif /* HAVE_SHADOW_H */
538 #  ifdef HAVE_AUTH_H
539 extern struct authorization *getauthuid();
540 #  endif /* HAVE_AUTH_H */
541 # endif /* __STDC__ */
542 
543 # ifndef getcwd
544 extern char *getcwd();
545 # endif	/* getcwd */
546 
547 #else /* POSIX || !SUNOS4 || !UTekV || !sysV88 */
548 
549 # if (defined(SUNOS4) && !defined(__GNUC__)) || defined(_IBMR2) || defined(_IBMESA)
550 extern char *getvwd();
551 # endif	/* (SUNOS4 && ! __GNUC__) || _IBMR2 || _IBMESA */
552 
553 # ifdef SCO
554 extern char *ttyname();
555 # endif /* SCO */
556 
557 # ifdef __clipper__
558 extern char *ttyname();
559 # endif /* __clipper__ */
560 
561 #endif /* !POSIX || SUNOS4 || UTekV || sysV88 */
562 
563 #if defined(SUNOS4) && __GNUC__ == 2
564 /*
565  * Somehow these are missing
566  */
567 extern int ioctl __P((int, int, ...));
568 extern int readlink __P((const char *, char *, size_t));
569 extern void setgrent __P((void));
570 extern void endgrent __P((void));
571 # ifdef REMOTEHOST
572 #  ifndef _SOCKLEN_T	/* Avoid Solaris 2.7 bogosity. */
573 struct sockaddr;
574 extern int getpeername __P((int, struct sockaddr *, int *));
575 #  endif /* _SOCKLEN_T */
576 # endif /* REMOTEHOST */
577 #endif /* SUNOS4 && __GNUC__ == 2 */
578 
579 #if (defined(BSD) && !defined(BSD4_4)) || defined(SUNOS4)
580 # if defined(__alpha) && defined(__osf__) && DECOSF1 < 200
581 extern void bcopy	__P((const void *, void *, size_t));
582 #  define memmove(a, b, c) (bcopy((char *) (b), (char *) (a), (int) (c)), a)
583 # endif /* __alpha && __osf__ && DECOSF1 < 200 */
584 #endif /* (BSD && !BSD4_4) || SUNOS4 */
585 
586 #ifdef SUNOS4
587 # include <memory.h>	/* memset should be declared in <string.h> but isn't */
588 #endif /* SUNOS4 */
589 
590 #if SYSVREL == 4
591 # ifdef REMOTEHOST
592 /* Irix6 defines getpeername(int, void *, int *) which conflicts with
593    the definition below. */
594 #  if !defined(__sgi) && !defined(_OSD_POSIX) && !defined(__MVS__)
595 #   ifndef _SOCKLEN_T	/* Avoid Solaris 2.7 bogosity. */
596 struct sockaddr;
597 extern int getpeername __P((int, struct sockaddr *, int *));
598 #   endif /* _SOCKLEN_T */
599 #  endif /* !__sgi && !_OSD_POSIX && !__MVS__ */
600 # endif /* REMOTEHOST */
601 # ifndef BSDTIMES
602 extern int getrlimit __P((int, struct rlimit *));
603 extern int setrlimit __P((int, const struct rlimit *));
604 # endif /* !BSDTIMES */
605 # if defined(SOLARIS2)
606 extern char *strerror __P((int));
607 # endif /* SOLARIS2 */
608 #endif /* SYSVREL == 4 */
609 
610 #if defined(__alpha) && defined(__osf__) && DECOSF1 < 200
611 /* These are ok for 1.3, but conflict with the header files for 2.0 */
612 extern char *sbrk __P((ssize_t));
613 extern int ioctl __P((int, unsigned long, char *));
614 extern pid_t vfork __P((void));
615 extern int killpg __P((pid_t, int));
616 #endif /* __osf__ && __alpha && DECOSF1 < 200 */
617 
618 #endif /* _h_tc_os */
619