428
|
1 /* This file is part of XEmacs.
|
|
2
|
|
3 XEmacs is free software; you can redistribute it and/or modify it
|
|
4 under the terms of the GNU General Public License as published by the
|
|
5 Free Software Foundation; either version 2, or (at your option) any
|
|
6 later version.
|
|
7
|
|
8 XEmacs is distributed in the hope that it will be useful, but WITHOUT
|
|
9 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
10 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
11 for more details.
|
|
12
|
|
13 You should have received a copy of the GNU General Public License
|
|
14 along with XEmacs; see the file COPYING. If not, write to
|
|
15 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
16 Boston, MA 02111-1307, USA. */
|
|
17
|
|
18 /* Synched up with: Not in FSF. */
|
|
19
|
|
20 /* Authorship:
|
|
21
|
|
22 JWZ: long ago.
|
|
23 */
|
|
24
|
|
25 /* Sun's standard and GCC's header files leave out prototypes for
|
|
26 all sorts of functions. */
|
|
27
|
440
|
28 #ifndef INCLUDED_broken_sun_h_
|
|
29 #define INCLUDED_broken_sun_h_
|
428
|
30
|
|
31 #ifdef __GNUC__
|
|
32 #include <stdlib.h>
|
|
33 #include <stddef.h>
|
|
34
|
|
35 /*********************** stdlib functions *********************/
|
|
36
|
442
|
37 /* void * memchr (const void *, int, size_t); */
|
428
|
38
|
442
|
39 /* int memcmp (const void *, const void *, size_t); */
|
|
40 /* void * memcpy (void *, const void *, size_t); */
|
|
41 /* void * memmove (void *, const void *, size_t);*/
|
428
|
42 /* void * memset (void *, int, int); */
|
442
|
43 /* char * strcat (char *, const char *); */
|
|
44 /* char * strchr (const char *, int); */
|
|
45 /* int strcmp (const char *, const char *); */
|
428
|
46
|
|
47 /* Yes, they even left these functions out! */
|
|
48 int tolower (int);
|
|
49 int toupper (int);
|
|
50
|
|
51 /*********************** stdio functions *********************/
|
|
52
|
|
53 #include <stdio.h> /* else can't declare FILE */
|
|
54
|
442
|
55 /* FILE *fopen (const char *, const char *); */
|
|
56 /* FILE *freopen (const char *, const char *, FILE *); */
|
428
|
57 FILE *tmpfile (void);
|
|
58 int fclose (FILE *);
|
|
59 char *fgets (char *, int, FILE *);
|
|
60 int fgetc (FILE *);
|
|
61 int fflush (FILE *);
|
442
|
62 int fprintf (FILE *, const char *, ...);
|
428
|
63 int fputc (char, FILE *);
|
442
|
64 int fputs (const char *, FILE *);
|
428
|
65 size_t fread (void *, size_t, size_t, FILE *);
|
442
|
66 int fscanf (FILE *, const char *, ...);
|
428
|
67 int fgetpos (FILE *, long *);
|
|
68 int fseek (FILE *, long, int);
|
442
|
69 int fsetpos (FILE *, const long *);
|
428
|
70 long ftell (FILE *);
|
442
|
71 size_t fwrite (const void *, size_t, size_t, FILE *);
|
428
|
72 char *gets (char *);
|
|
73 int pclose (FILE *);
|
442
|
74 void perror (const char *);
|
|
75 int printf (const char *, ...);
|
|
76 int puts (const char *);
|
|
77 int remove (const char *);
|
|
78 int rename (const char *, const char *);
|
428
|
79 int rewind (FILE *);
|
442
|
80 int scanf (const char *, ...);
|
|
81 int sscanf (const char *, const char *, ...);
|
428
|
82 void setbuf (FILE *, char *);
|
|
83 int setvbuf (FILE *, char *, int, size_t);
|
|
84 int ungetc (int, FILE *);
|
442
|
85 int vprintf (const char *, void *);
|
|
86 int vfprintf (FILE *, const char *, void *);
|
|
87 char *vsprintf (char *, const char *, void *);
|
428
|
88
|
|
89 /*********************** signal functions *********************/
|
|
90
|
|
91 int sigblock (int);
|
|
92 #ifndef sigmask
|
|
93 int sigmask (int);
|
|
94 #endif
|
|
95 int sigsetmask (int);
|
|
96 int sigpause (int);
|
|
97
|
|
98 /*********************** time functions ***********************/
|
|
99
|
|
100 struct timeval;
|
|
101 struct timezone;
|
|
102
|
442
|
103 int utimes (const char *, struct timeval *);
|
428
|
104 void tzset (void);
|
|
105 time_t time (time_t *);
|
|
106 int gettimeofday (struct timeval *, struct timezone *);
|
|
107
|
|
108 /*********************** file-system functions *********************/
|
|
109
|
1495
|
110 /* Ilya Golubev reports that stat can be a #define on some systems.
|
|
111 Presumably none of the systems this file is used for, and I don't
|
|
112 know what file to include on a system known to be broken, anyway. */
|
428
|
113 struct stat;
|
|
114 #include </usr/include/sys/types.h>
|
|
115
|
|
116 int fsync (int);
|
442
|
117 int lstat (const char *, struct stat *);
|
428
|
118 int fchmod (int, mode_t);
|
|
119 char *mktemp (char *);
|
442
|
120 /* int creat (const char *, mode_t); better no decl than a conflicting one... */
|
|
121 int symlink (const char *, const char *);
|
|
122 int readlink (const char *, char *, int);
|
428
|
123 void sync (void);
|
|
124 int select (int, fd_set *, fd_set *, fd_set *, struct timeval *);
|
|
125 char * getwd (char *);
|
|
126 /* int lseek (int, long, int); better no decl than a conflicting one... */
|
|
127 int _filbuf ();
|
|
128 int _flsbuf ();
|
|
129
|
|
130 /**************** interprocess communication functions ******************/
|
|
131
|
|
132 int recv (int, char *, int, int);
|
|
133 int socket (int, int, int);
|
|
134 struct sockaddr;
|
|
135 int connect (int, struct sockaddr *, int);
|
|
136 int bind (int, struct sockaddr *, int);
|
|
137 int listen (int, int);
|
|
138 int accept (int, struct sockaddr *, int *);
|
|
139 int gethostname (char *, int);
|
|
140 struct rusage;
|
|
141 int wait3 (void *, int, struct rusage *);
|
|
142 int nice (int);
|
|
143 int killpg (int, int);
|
|
144 int system (char *);
|
|
145
|
|
146
|
|
147 /*********************** low-level OS functions *********************/
|
|
148
|
|
149 int ioctl (int, int, ...);
|
|
150 struct nlist;
|
442
|
151 int nlist (const char *, struct nlist *);
|
428
|
152 int munmap (void *, int);
|
|
153 int brk (void *);
|
|
154 void * sbrk (int);
|
|
155 struct rlimit;
|
|
156 int getrlimit (int, struct rlimit *);
|
|
157 int getpagesize (void);
|
|
158 int shutdown (int, int);
|
|
159 int mprotect (void *, int, int);
|
|
160
|
|
161 /*********************** miscellaneous functions *********************/
|
|
162
|
442
|
163 void tputs (const char *cp, int affcnt, void (*)(int));
|
428
|
164 long random (void);
|
|
165 int srandom (int seed);
|
|
166
|
|
167 #endif /* __GNUC__ */
|
|
168
|
440
|
169 #endif /* INCLUDED_broken_sun_h_ */
|