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 int strcasecmp (char *, char *);
|
|
47
|
|
48 /* Yes, they even left these functions out! */
|
|
49 int tolower (int);
|
|
50 int toupper (int);
|
|
51
|
|
52 /*********************** stdio functions *********************/
|
|
53
|
|
54 #include <stdio.h> /* else can't declare FILE */
|
|
55
|
442
|
56 /* FILE *fopen (const char *, const char *); */
|
|
57 /* FILE *freopen (const char *, const char *, FILE *); */
|
428
|
58 FILE *tmpfile (void);
|
|
59 int fclose (FILE *);
|
|
60 char *fgets (char *, int, FILE *);
|
|
61 int fgetc (FILE *);
|
|
62 int fflush (FILE *);
|
442
|
63 int fprintf (FILE *, const char *, ...);
|
428
|
64 int fputc (char, FILE *);
|
442
|
65 int fputs (const char *, FILE *);
|
428
|
66 size_t fread (void *, size_t, size_t, FILE *);
|
442
|
67 int fscanf (FILE *, const char *, ...);
|
428
|
68 int fgetpos (FILE *, long *);
|
|
69 int fseek (FILE *, long, int);
|
442
|
70 int fsetpos (FILE *, const long *);
|
428
|
71 long ftell (FILE *);
|
442
|
72 size_t fwrite (const void *, size_t, size_t, FILE *);
|
428
|
73 char *gets (char *);
|
|
74 int pclose (FILE *);
|
442
|
75 void perror (const char *);
|
|
76 int printf (const char *, ...);
|
|
77 int puts (const char *);
|
|
78 int remove (const char *);
|
|
79 int rename (const char *, const char *);
|
428
|
80 int rewind (FILE *);
|
442
|
81 int scanf (const char *, ...);
|
|
82 int sscanf (const char *, const char *, ...);
|
428
|
83 void setbuf (FILE *, char *);
|
|
84 int setvbuf (FILE *, char *, int, size_t);
|
|
85 int ungetc (int, FILE *);
|
442
|
86 int vprintf (const char *, void *);
|
|
87 int vfprintf (FILE *, const char *, void *);
|
|
88 char *vsprintf (char *, const char *, void *);
|
428
|
89
|
|
90 /*********************** signal functions *********************/
|
|
91
|
|
92 int sigblock (int);
|
|
93 #ifndef sigmask
|
|
94 int sigmask (int);
|
|
95 #endif
|
|
96 int sigsetmask (int);
|
|
97 int sigpause (int);
|
|
98
|
|
99 /*********************** time functions ***********************/
|
|
100
|
|
101 struct timeval;
|
|
102 struct timezone;
|
|
103
|
442
|
104 int utimes (const char *, struct timeval *);
|
428
|
105 void tzset (void);
|
|
106 time_t time (time_t *);
|
|
107 int gettimeofday (struct timeval *, struct timezone *);
|
|
108
|
|
109 /*********************** file-system functions *********************/
|
|
110
|
|
111 struct stat;
|
|
112 #include </usr/include/sys/types.h>
|
|
113
|
|
114 int fsync (int);
|
442
|
115 int lstat (const char *, struct stat *);
|
428
|
116 int fchmod (int, mode_t);
|
|
117 char *mktemp (char *);
|
442
|
118 /* int creat (const char *, mode_t); better no decl than a conflicting one... */
|
|
119 int symlink (const char *, const char *);
|
|
120 int readlink (const char *, char *, int);
|
428
|
121 void sync (void);
|
|
122 int select (int, fd_set *, fd_set *, fd_set *, struct timeval *);
|
|
123 char * getwd (char *);
|
|
124 /* int lseek (int, long, int); better no decl than a conflicting one... */
|
|
125 int _filbuf ();
|
|
126 int _flsbuf ();
|
|
127
|
|
128 /**************** interprocess communication functions ******************/
|
|
129
|
|
130 int recv (int, char *, int, int);
|
|
131 int socket (int, int, int);
|
|
132 struct sockaddr;
|
|
133 int connect (int, struct sockaddr *, int);
|
|
134 int bind (int, struct sockaddr *, int);
|
|
135 int listen (int, int);
|
|
136 int accept (int, struct sockaddr *, int *);
|
|
137 int gethostname (char *, int);
|
|
138 struct rusage;
|
|
139 int wait3 (void *, int, struct rusage *);
|
|
140 int nice (int);
|
|
141 int killpg (int, int);
|
|
142 int system (char *);
|
|
143
|
|
144
|
|
145 /*********************** low-level OS functions *********************/
|
|
146
|
|
147 int ioctl (int, int, ...);
|
|
148 struct nlist;
|
442
|
149 int nlist (const char *, struct nlist *);
|
428
|
150 int munmap (void *, int);
|
|
151 int brk (void *);
|
|
152 void * sbrk (int);
|
|
153 struct rlimit;
|
|
154 int getrlimit (int, struct rlimit *);
|
|
155 int getpagesize (void);
|
|
156 int shutdown (int, int);
|
|
157 int mprotect (void *, int, int);
|
|
158
|
|
159 /*********************** miscellaneous functions *********************/
|
|
160
|
442
|
161 void tputs (const char *cp, int affcnt, void (*)(int));
|
428
|
162 long random (void);
|
|
163 int srandom (int seed);
|
|
164
|
|
165 #endif /* __GNUC__ */
|
|
166
|
440
|
167 #endif /* INCLUDED_broken_sun_h_ */
|