comparison src/broken-sun.h @ 0:376386a54a3c r19-14

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