blob: 8190c9b1ee047cec4f43832c46149ca16806ee0a [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001/* 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 __ARGS((char *, ...));
16extern int fprintf __ARGS((FILE *, char *, ...));
17extern int sprintf __ARGS((char *, char *, ...));
18extern int sscanf __ARGS((char *, char *, ...));
19#ifndef fopen /* could be redefined to fopen64() */
20extern FILE *fopen __ARGS((const char *, const char *));
21#endif
22extern int fclose __ARGS((FILE *));
23extern int fseek __ARGS((FILE *, long, int));
24#ifdef HAVE_FSEEKO
25extern int fseeko __ARGS((FILE *, off_t, int));
26#endif
27extern long ftell __ARGS((FILE *));
Bram Moolenaar25153e12010-02-24 14:47:08 +010028#ifdef HAVE_FSEEKO
Bram Moolenaar071d4272004-06-13 20:20:40 +000029extern off_t ftello __ARGS((FILE *));
30#endif
31extern void rewind __ARGS((FILE *));
32extern int fread __ARGS((char *, int, int, FILE *));
33extern int fwrite __ARGS((char *, int, int, FILE *));
34extern int fputs __ARGS((char *, FILE *));
35#ifndef ferror /* let me say it again: "macros should never have prototypes" */
36extern int ferror __ARGS((FILE *));
37#endif
38extern int fflush __ARGS((FILE *));
39#if defined(sun) || defined(_SEQUENT_)
40/* used inside of stdio macros getc(), puts(), putchar()... */
41extern int _flsbuf __ARGS((int, FILE *));
42extern int _filbuf __ARGS((FILE *));
43#endif
44
45#if !defined(HAVE_SELECT)
46struct pollfd; /* for poll __ARGS */
47extern int poll __ARGS((struct pollfd *, long, int));
48#endif
49
50#ifdef HAVE_MEMSET
51extern void *memset __ARGS((void *, int, size_t));
52#endif
53#ifdef HAVE_BCMP
54extern int bcmp __ARGS((void *, void *, size_t));
55#endif
56#ifdef HAVE_MEMCMP
57extern int memcmp __ARGS((const void *, const void *, size_t));
58#endif
59#ifdef HAVE_STRPBRK
60extern char *strpbrk __ARGS((const char *, const char *));
61#endif
62#ifdef USEBCOPY
63extern void bcopy __ARGS((char *, char *, int));
64#else
65# ifdef USEMEMCPY
66extern void memcpy __ARGS((char *, char *, int));
67# else
68# ifdef USEMEMMOVE
69extern void memmove __ARGS((char *, char *, int));
70# endif
71# endif
72#endif
73/* used inside of FD_ZERO macro: */
74extern void bzero __ARGS((void *, size_t));
75#ifdef HAVE_SETSID
76extern pid_t setsid __ARGS((void));
77#endif
78#ifdef HAVE_SETPGID
79extern int setpgid __ARGS((pid_t, pid_t));
80#endif
81#ifdef HAVE_STRTOL
82extern int strtol __ARGS((char *, char **, int));
83#endif
84#ifdef HAVE_STRFTIME
85extern size_t strftime __ARGS((char *, size_t, char *, struct tm *));
86#endif
87#ifdef HAVE_STRCASECMP
88extern int strcasecmp __ARGS((char *, char *));
89#endif
90#ifdef HAVE_STRNCASECMP
91extern int strncasecmp __ARGS((char *, char *, size_t));
92#endif
93#ifndef strdup
94extern char *strdup __ARGS((const char *));
95#endif
96extern int atoi __ARGS((char *));
97extern int atol __ARGS((char *));
98
99#ifndef USE_SYSTEM
100extern int fork __ARGS((void));
Bram Moolenaar311d9822007-02-27 15:48:28 +0000101# ifndef __TANDEM
Bram Moolenaar071d4272004-06-13 20:20:40 +0000102extern int execvp __ARGS((const char *, const char **));
Bram Moolenaar311d9822007-02-27 15:48:28 +0000103# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000104extern int wait __ARGS((int *)); /* will this break things ...? */
105extern int waitpid __ARGS((pid_t, int *, int));
106#endif
107
108extern int toupper __ARGS((int));
109extern int tolower __ARGS((int));
110
111extern RETSIGTYPE (*signal __ARGS((int, RETSIGTYPE (*func) SIGPROTOARG))) __ARGS(SIGPROTOARG);
112#ifdef HAVE_SIGSET
113extern RETSIGTYPE (*sigset __ARGS((int, RETSIGTYPE (*func) SIGPROTOARG))) __ARGS(SIGPROTOARG);
114#endif
115
116#if defined(HAVE_SETJMP_H)
117# ifdef HAVE_SIGSETJMP
118extern int sigsetjmp __ARGS((sigjmp_buf, int));
119extern void siglongjmp __ARGS((sigjmp_buf, int));
120# else
121extern int setjmp __ARGS((jmp_buf));
122extern void longjmp __ARGS((jmp_buf, int));
123# endif
124#endif
125
126extern int kill __ARGS((int, int));
127
Bram Moolenaar311d9822007-02-27 15:48:28 +0000128#ifndef __TANDEM
Bram Moolenaar071d4272004-06-13 20:20:40 +0000129extern int access __ARGS((char *, int));
Bram Moolenaar311d9822007-02-27 15:48:28 +0000130#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000131extern int fsync __ARGS((int));
132extern int fchown __ARGS((int, int, int));
Bram Moolenaar311d9822007-02-27 15:48:28 +0000133#if defined(HAVE_GETCWD) && !defined(sun) && !defined(__TANDEM)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000134extern char *getcwd __ARGS((char *, int));
135#else
136extern char *getwd __ARGS((char *));
137#endif
138#ifndef __alpha /* suggested by Campbell */
139extern int ioctl __ARGS((int, int, ...));
140#endif
141extern int chmod __ARGS((const char *, mode_t));