26763: fix problem on failed cd -s to relative path
[zsh.git] / Src / prototypes.h
blob3dc5badf20828c07c8484d1848891a545d013367
1 /*
2 * prototypes.h - prototypes header file
4 * This file is part of zsh, the Z shell.
6 * Copyright (c) 1992-1997 Paul Falstad
7 * All rights reserved.
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.
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.
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.
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
36 #if !(defined(USES_TERMCAP_H) || defined(USES_TERM_H))
37 extern int tgetent _((char *bp, char *name));
38 extern int tgetnum _((char *id));
39 extern int tgetflag _((char *id));
40 extern char *tgetstr _((char *id, char **area));
41 extern char *tgoto _((char *cm, int destcol, int destline));
42 extern int tputs _((char *cp, int affcnt, int (*outc) (int)));
43 #endif
45 /* MISSING PROTOTYPES FOR VARIOUS OPERATING SYSTEMS */
47 /* HP/UX 9 c89 */
48 #if defined(__hpux) && defined(_XPG3) && !defined(_POSIX1_1988)
49 # define WRITE_ARG_2_T void *
50 #else
51 # define WRITE_ARG_2_T char *
52 #endif
54 #if defined(__hpux) && defined(_HPUX_SOURCE) && !defined(_XPG4_EXTENDED)
55 # define SELECT_ARG_2_T int *
56 #else
57 # define SELECT_ARG_2_T fd_set *
58 #endif
60 #ifdef __osf__
61 char *mktemp _((char *));
62 #endif
64 #if defined(__osf__) && defined(__alpha) && defined(__GNUC__)
65 /* Digital cc does not need these prototypes, gcc does need them */
66 # ifndef HAVE_IOCTL_PROTO
67 int ioctl _((int d, unsigned long request, void *argp));
68 # endif
69 # ifndef HAVE_MKNOD_PROTO
70 int mknod _((const char *pathname, int mode, dev_t device));
71 # endif
72 int nice _((int increment));
73 int select _((int nfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, struct timeval *timeout));
74 #endif
76 #if defined(DGUX) && defined(__STDC__)
77 /* Just plain missing. */
78 extern int getrlimit _((int resource, struct rlimit *rlp));
79 extern int setrlimit _((int resource, const struct rlimit *rlp));
80 extern int getrusage _((int who, struct rusage *rusage));
81 extern int gettimeofday _((struct timeval *tv, struct timezone *tz));
82 extern int wait3 _((union wait *wait_status, int options, struct rusage *rusage));
83 extern int getdomainname _((char *name, int maxlength));
84 extern int select _((int nfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, struct timeval *timeout));
85 #endif /* DGUX and __STDC__ */
87 #ifdef __NeXT__
88 extern pid_t getppid(void);
89 #endif
91 #if defined(__sun__) && !defined(__SVR4) /* SunOS */
92 extern char *strerror _((int errnum));
93 #endif
95 /**************************************************/
96 /*** prototypes for functions built in compat.c ***/
97 #ifndef HAVE_STRSTR
98 extern char *strstr _((const char *s, const char *t));
99 #endif
101 #ifndef HAVE_GETHOSTNAME
102 extern int gethostname _((char *name, size_t namelen));
103 #endif
105 #ifndef HAVE_GETTIMEOFDAY
106 extern int gettimeofday _((struct timeval *tv, struct timezone *tz));
107 #endif
109 #ifndef HAVE_DIFFTIME
110 extern double difftime _((time_t t2, time_t t1));
111 #endif
113 #ifndef HAVE_STRERROR
114 extern char *strerror _((int errnum));
115 #endif
117 /*** end of prototypes for functions in compat.c ***/
118 /***************************************************/
120 #ifndef HAVE_MEMMOVE
121 extern void bcopy _((const void *, void *, int));
122 #endif