0
|
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
|
|
28 #ifndef _XEMACS_BROKEN_SUN_H_
|
|
29 #define _XEMACS_BROKEN_SUN_H_
|
|
30
|
|
31 #ifdef __GNUC__
|
|
32 #include <stdlib.h>
|
|
33 #include <stddef.h>
|
|
34
|
|
35 /*********************** stdlib functions *********************/
|
|
36
|
272
|
37 /* void * memchr (CONST void *, int, size_t); */
|
0
|
38
|
272
|
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);*/
|
|
42 /* void * memset (void *, int, int); */
|
|
43 /* char * strcat (char *, CONST char *); */
|
|
44 /* char * strchr (CONST char *, int); */
|
|
45 /* int strcmp (CONST char *, CONST char *); */
|
|
46 int strcasecmp (char *, char *);
|
|
47 void bzero (char *, int);
|
|
48 void bcopy (char *, char *, int);
|
0
|
49
|
|
50 /* Yes, they even left these functions out! */
|
272
|
51 int tolower (int);
|
|
52 int toupper (int);
|
0
|
53
|
|
54 /*********************** stdio functions *********************/
|
|
55
|
|
56 #include <stdio.h> /* else can't declare FILE */
|
|
57
|
272
|
58 /* FILE *fopen (CONST char *, CONST char *); */
|
|
59 /* FILE *freopen (CONST char *, CONST char *, FILE *); */
|
|
60 FILE *tmpfile (void);
|
|
61 int fclose (FILE *);
|
|
62 char *fgets (char *, int, FILE *);
|
|
63 int fgetc (FILE *);
|
|
64 int fflush (FILE *);
|
|
65 int fprintf (FILE *, CONST char *, ...);
|
|
66 int fputc (char, FILE *);
|
|
67 int fputs (CONST char *, FILE *);
|
|
68 size_t fread (void *, size_t, size_t, FILE *);
|
|
69 int fscanf (FILE *, CONST char *, ...);
|
|
70 int fgetpos (FILE *, long *);
|
|
71 int fseek (FILE *, long, int);
|
|
72 int fsetpos (FILE *, CONST long *);
|
|
73 long ftell (FILE *);
|
|
74 size_t fwrite (CONST void *, size_t, size_t, FILE *);
|
|
75 char *gets (char *);
|
|
76 int pclose (FILE *);
|
|
77 void perror (CONST char *);
|
|
78 int printf (CONST char *, ...);
|
|
79 int puts (CONST char *);
|
|
80 int remove (CONST char *);
|
|
81 int rename (CONST char *, CONST char *);
|
|
82 int rewind (FILE *);
|
|
83 int scanf (CONST char *, ...);
|
|
84 int sscanf (CONST char *, CONST char *, ...);
|
|
85 void setbuf (FILE *, char *);
|
|
86 int setvbuf (FILE *, char *, int, size_t);
|
|
87 int ungetc (int, FILE *);
|
|
88 int vprintf (CONST char *, void *);
|
|
89 int vfprintf (FILE *, CONST char *, void *);
|
|
90 char *vsprintf (char *, CONST char *, void *);
|
0
|
91
|
|
92 /*********************** signal functions *********************/
|
|
93
|
272
|
94 int sigblock (int);
|
0
|
95 #ifndef sigmask
|
272
|
96 int sigmask (int);
|
0
|
97 #endif
|
272
|
98 int sigsetmask (int);
|
|
99 int sigpause (int);
|
0
|
100
|
|
101 /*********************** time functions ***********************/
|
|
102
|
|
103 struct timeval;
|
|
104 struct timezone;
|
|
105
|
272
|
106 int utimes (CONST char *, struct timeval *);
|
|
107 void tzset (void);
|
|
108 time_t time (time_t *);
|
|
109 int gettimeofday (struct timeval *, struct timezone *);
|
0
|
110
|
|
111 /*********************** file-system functions *********************/
|
|
112
|
|
113 struct stat;
|
|
114 #include </usr/include/sys/types.h>
|
|
115
|
272
|
116 int fsync (int);
|
|
117 int lstat (CONST char *, struct stat *);
|
|
118 int fchmod (int, mode_t);
|
|
119 char *mktemp (char *);
|
|
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);
|
|
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 ();
|
0
|
129
|
|
130 /**************** interprocess communication functions ******************/
|
|
131
|
272
|
132 int recv (int, char *, int, int);
|
|
133 int socket (int, int, int);
|
0
|
134 struct sockaddr;
|
272
|
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);
|
0
|
140 struct rusage;
|
272
|
141 int wait3 (void *, int, struct rusage *);
|
|
142 int nice (int);
|
|
143 int killpg (int, int);
|
|
144 int system (char *);
|
0
|
145
|
|
146
|
|
147 /*********************** low-level OS functions *********************/
|
|
148
|
272
|
149 int ioctl (int, int, ...);
|
0
|
150 struct nlist;
|
272
|
151 int nlist (CONST char *, struct nlist *);
|
|
152 int munmap (void *, int);
|
|
153 int brk (void *);
|
|
154 void * sbrk (int);
|
0
|
155 struct rlimit;
|
272
|
156 int getrlimit (int, struct rlimit *);
|
|
157 int getpagesize (void);
|
|
158 int shutdown (int, int);
|
|
159 int mprotect (void *, int, int);
|
0
|
160
|
|
161 /*********************** miscellaneous functions *********************/
|
|
162
|
272
|
163 void tputs (CONST char *cp, int affcnt, void (*)(int));
|
|
164 long random (void);
|
|
165 int srandom (int seed);
|
0
|
166
|
|
167 #endif /* __GNUC__ */
|
|
168
|
|
169 #endif /* _XEMACS_BROKEN_SUN_H_ */
|