xref: /vim-8.2.3635/src/osdef1.h.in (revision b3f74069)
1/* autoconf cannot fiddle out declarations. Use our homebrewn tools. (jw) */
2/*
3 * Declarations that may cause conflicts belong here so that osdef.sh
4 * can clean out the forest. Everything else belongs in os_unix.h
5 *
6 * How this works:
7 * - This file contains all unix prototypes that Vim might need.
8 * - The shell script osdef.sh is executed at compile time to remove all the
9 *   prototypes that are in an include file. This results in osdef.h.
10 * - osdef.h is included in vim.h.
11 *
12 * sed cannot always handle so many commands, this is file 1 of 2
13 */
14
15extern int	printf(char *, ...);
16extern int	fprintf(FILE *, char *, ...);
17extern int	sprintf(char *, char *, ...);
18extern int	sscanf(char *, char *, ...);
19#ifndef fopen	/* could be redefined to fopen64() */
20extern FILE	*fopen(const char *, const char *);
21#endif
22extern int	fclose(FILE *);
23extern int	fseek(FILE *, long, int);
24#ifdef HAVE_FSEEKO
25extern int	fseeko(FILE *, off_t, int);
26#endif
27extern long	ftell(FILE *);
28#ifdef HAVE_FSEEKO
29extern off_t	ftello(FILE *);
30#endif
31extern void	rewind(FILE *);
32extern int	fread(char *, int, int, FILE *);
33extern int	fwrite(char *, int, int, FILE *);
34extern int	fputs(char *, FILE *);
35#ifndef ferror	/* let me say it again: "macros should never have prototypes" */
36extern int	ferror(FILE *);
37#endif
38extern int	fflush(FILE *);
39#if defined(sun) || defined(_SEQUENT_)
40/* used inside of stdio macros getc(), puts(), putchar()... */
41extern int	_flsbuf(int, FILE *);
42extern int	_filbuf(FILE *);
43#endif
44
45#if !defined(HAVE_SELECT)
46struct pollfd;			/* for poll() */
47extern int	poll(struct pollfd *, long, int);
48#endif
49
50#ifdef HAVE_MEMSET
51extern void	*memset(void *, int, size_t);
52#endif
53extern int	memcmp(const void *, const void *, size_t);
54#ifdef HAVE_STRPBRK
55extern char	*strpbrk(const char *, const char *);
56#endif
57#ifdef USEBCOPY
58extern void	bcopy(char *, char *, int);
59#else
60# ifdef USEMEMCPY
61extern void	memcpy(char *, char *, int);
62# else
63#  ifdef USEMEMMOVE
64extern void	memmove(char *, char *, int);
65#  endif
66# endif
67#endif
68#if !defined(__BIONIC__) && !defined(__HAIKU__)  // Android's libc #defines bzero to memset.
69// used inside of FD_ZERO macro
70extern void	bzero(void *, size_t);
71#endif
72#ifdef HAVE_SETSID
73extern pid_t	setsid(void);
74#endif
75#ifdef HAVE_SETPGID
76extern int	setpgid(pid_t, pid_t);
77#endif
78#ifdef HAVE_STRTOL
79extern int	strtol(char *, char **, int);
80#endif
81#ifdef HAVE_STRFTIME
82extern size_t	strftime(char *, size_t, char *, struct tm *);
83#endif
84#ifdef HAVE_STRCASECMP
85extern int	strcasecmp(char *, char *);
86#endif
87#ifdef HAVE_STRNCASECMP
88extern int	strncasecmp(char *, char *, size_t);
89#endif
90#ifndef strdup
91extern char	*strdup(const char *);
92#endif
93extern int	atoi(char *);
94extern int	atol(char *);
95
96#ifndef USE_SYSTEM
97extern int	fork(void);
98# ifndef __TANDEM
99extern int	execvp(const char *, const char **);
100# endif
101extern int	wait(int *); /* will this break things ...? */
102extern int	waitpid(pid_t, int *, int);
103#endif
104
105extern int	toupper(int);
106extern int	tolower(int);
107
108extern RETSIGTYPE (*signal(int, RETSIGTYPE (*func) SIGPROTOARG)) SIGPROTOARG;
109#ifdef HAVE_SIGSET
110extern RETSIGTYPE (*sigset(int, RETSIGTYPE (*func) SIGPROTOARG)) SIGPROTOARG;
111#endif
112
113#if defined(HAVE_SETJMP_H)
114# ifdef HAVE_SIGSETJMP
115extern int	sigsetjmp(sigjmp_buf, int);
116extern void	siglongjmp(sigjmp_buf, int);
117# else
118extern int	setjmp(jmp_buf);
119extern void	longjmp(jmp_buf, int);
120# endif
121#endif
122
123extern int	kill(int, int);
124
125#ifndef __TANDEM
126extern int	access(char *, int);
127#endif
128extern int	fsync(int);
129extern int	fchown(int, int, int);
130#if defined(HAVE_GETCWD) && !defined(sun) && !defined(__TANDEM)
131extern char	*getcwd(char *, int);
132#else
133extern char	*getwd(char *);
134#endif
135#ifndef __alpha	/* suggested by Campbell */
136extern int	ioctl(int, int, ...);
137#endif
138extern int	chmod(const char *, mode_t);
139