Skip to content
Newer
Older
100644 128 lines (111 sloc) 4.12 KB
e74702b Initial revision
Tanaka Akira authored
1 /*
2 * prototypes.h - prototypes header file
3 *
4 * This file is part of zsh, the Z shell.
5 *
6 * Copyright (c) 1992-1997 Paul Falstad
7 * All rights reserved.
8 *
9 * Permission is hereby granted, without written agreement and without
10 * license or royalty fees, to use, copy, modify, and distribute this
11 * software and to distribute modified versions of this software for any
12 * purpose, provided that the above copyright notice and the following
13 * two paragraphs appear in all copies of this software.
14 *
15 * In no event shall Paul Falstad or the Zsh Development Group be liable
16 * to any party for direct, indirect, special, incidental, or consequential
17 * damages arising out of the use of this software and its documentation,
18 * even if Paul Falstad and the Zsh Development Group have been advised of
19 * the possibility of such damage.
20 *
21 * Paul Falstad and the Zsh Development Group specifically disclaim any
22 * warranties, including, but not limited to, the implied warranties of
23 * merchantability and fitness for a particular purpose. The software
24 * provided hereunder is on an "as is" basis, and Paul Falstad and the
25 * Zsh Development Group have no obligation to provide maintenance,
26 * support, updates, enhancements, or modifications.
27 *
28 */
29
30 #ifndef HAVE_STDLIB_H
31 char *malloc _((size_t));
32 char *realloc _((void *, size_t));
33 char *calloc _((size_t, size_t));
34 #endif
35
02e0363 Fix term*.h header file collisions.
Bart Schaefer authored
36 #if !(defined(USES_TERMCAP_H) || defined(USES_TERM_H))
8e0a5b0 29134: change termcap prototypes locally for AIX
Peter Stephenson authored
37 /*
38 * These prototypes are only used where we don't have the
39 * headers. In some cases they need tweaking.
40 * TBD: we'd much prefer to get hold of the header where
41 * these are defined.
42 */
43 #ifdef _AIX
44 #define TC_CONST const
45 #else
46 #define TC_CONST
47 #endif
48 extern int tgetent _((char *bp, TC_CONST char *name));
49 extern int tgetnum _((char *id));
50 extern int tgetflag _((char *id));
51 extern char *tgetstr _((char *id, char **area));
52 extern char *tgoto _((TC_CONST char *cm, int destcol, int destline));
53 extern int tputs _((TC_CONST char *cp, int affcnt, int (*outc) (int)));
54 #undef TC_CONST
e74702b Initial revision
Tanaka Akira authored
55 #endif
56
57 /* MISSING PROTOTYPES FOR VARIOUS OPERATING SYSTEMS */
58
25bcf86 13961: add ifdef for tputs in term.h in prototypes.h
Clint Adams authored
59 #if defined(__hpux) && defined(_HPUX_SOURCE) && !defined(_XPG4_EXTENDED)
e74702b Initial revision
Tanaka Akira authored
60 # define SELECT_ARG_2_T int *
61 #else
62 # define SELECT_ARG_2_T fd_set *
63 #endif
64
65 #ifdef __osf__
66 char *mktemp _((char *));
67 #endif
68
69 #if defined(__osf__) && defined(__alpha) && defined(__GNUC__)
70 /* Digital cc does not need these prototypes, gcc does need them */
71 # ifndef HAVE_IOCTL_PROTO
72 int ioctl _((int d, unsigned long request, void *argp));
73 # endif
25bcf86 13961: add ifdef for tputs in term.h in prototypes.h
Clint Adams authored
74 # ifndef HAVE_MKNOD_PROTO
e74702b Initial revision
Tanaka Akira authored
75 int mknod _((const char *pathname, int mode, dev_t device));
25bcf86 13961: add ifdef for tputs in term.h in prototypes.h
Clint Adams authored
76 # endif
e74702b Initial revision
Tanaka Akira authored
77 int nice _((int increment));
78 int select _((int nfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, struct timeval *timeout));
79 #endif
80
81 #if defined(DGUX) && defined(__STDC__)
82 /* Just plain missing. */
83 extern int getrlimit _((int resource, struct rlimit *rlp));
84 extern int setrlimit _((int resource, const struct rlimit *rlp));
85 extern int getrusage _((int who, struct rusage *rusage));
86 extern int gettimeofday _((struct timeval *tv, struct timezone *tz));
87 extern int wait3 _((union wait *wait_status, int options, struct rusage *rusage));
88 extern int getdomainname _((char *name, int maxlength));
89 extern int select _((int nfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, struct timeval *timeout));
90 #endif /* DGUX and __STDC__ */
91
92 #ifdef __NeXT__
93 extern pid_t getppid(void);
94 #endif
95
96 #if defined(__sun__) && !defined(__SVR4) /* SunOS */
97 extern char *strerror _((int errnum));
98 #endif
99
100 /**************************************************/
101 /*** prototypes for functions built in compat.c ***/
102 #ifndef HAVE_STRSTR
103 extern char *strstr _((const char *s, const char *t));
104 #endif
105
106 #ifndef HAVE_GETHOSTNAME
107 extern int gethostname _((char *name, size_t namelen));
108 #endif
109
110 #ifndef HAVE_GETTIMEOFDAY
111 extern int gettimeofday _((struct timeval *tv, struct timezone *tz));
112 #endif
113
114 #ifndef HAVE_DIFFTIME
115 extern double difftime _((time_t t2, time_t t1));
116 #endif
117
118 #ifndef HAVE_STRERROR
119 extern char *strerror _((int errnum));
120 #endif
121
122 /*** end of prototypes for functions in compat.c ***/
123 /***************************************************/
124
125 #ifndef HAVE_MEMMOVE
126 extern void bcopy _((const void *, void *, int));
127 #endif
Something went wrong with that request. Please try again.