OLD | NEW |
| (Empty) |
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | |
2 /* | |
3 * The contents of this file are subject to the Mozilla Public | |
4 * License Version 1.1 (the "License"); you may not use this file | |
5 * except in compliance with the License. You may obtain a copy of | |
6 * the License at http://www.mozilla.org/MPL/ | |
7 * | |
8 * Software distributed under the License is distributed on an "AS | |
9 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or | |
10 * implied. See the License for the specific language governing | |
11 * rights and limitations under the License. | |
12 * | |
13 * The Original Code is the Netscape Portable Runtime (NSPR). | |
14 * | |
15 * The Initial Developer of the Original Code is Netscape | |
16 * Communications Corporation. Portions created by Netscape are | |
17 * Copyright (C) 1998-2000 Netscape Communications Corporation. All | |
18 * Rights Reserved. | |
19 * | |
20 * Contributor(s): | |
21 * | |
22 * Alternatively, the contents of this file may be used under the | |
23 * terms of the GNU General Public License Version 2 or later (the | |
24 * "GPL"), in which case the provisions of the GPL are applicable | |
25 * instead of those above. If you wish to allow use of your | |
26 * version of this file only under the terms of the GPL and not to | |
27 * allow others to use your version of this file under the MPL, | |
28 * indicate your decision by deleting the provisions above and | |
29 * replace them with the notice and other provisions required by | |
30 * the GPL. If you do not delete the provisions above, a recipient | |
31 * may use your version of this file under either the MPL or the | |
32 * GPL. | |
33 */ | |
34 | |
35 #ifndef pr_sunos4_h___ | |
36 #define pr_sunos4_h___ | |
37 | |
38 #ifndef SVR4 | |
39 | |
40 /* | |
41 ** Hodge podge of random missing prototypes for the Sunos4 system | |
42 */ | |
43 #include <stdio.h> | |
44 #include <stdarg.h> | |
45 #include <time.h> | |
46 #include <limits.h> | |
47 #include <sys/types.h> | |
48 | |
49 #define PATH_MAX _POSIX_PATH_MAX | |
50 | |
51 struct timeval; | |
52 struct timezone; | |
53 struct itimerval; | |
54 struct sockaddr; | |
55 struct stat; | |
56 struct tm; | |
57 | |
58 /* ctype.h */ | |
59 extern int tolower(int); | |
60 extern int toupper(int); | |
61 | |
62 /* errno.h */ | |
63 extern char *sys_errlist[]; | |
64 extern int sys_nerr; | |
65 | |
66 #define strerror(e) sys_errlist[((unsigned)(e) < sys_nerr) ? e : 0] | |
67 | |
68 extern void perror(const char *); | |
69 | |
70 /* getopt */ | |
71 extern char *optarg; | |
72 extern int optind; | |
73 extern int getopt(int argc, char **argv, char *spec); | |
74 | |
75 /* math.h */ | |
76 extern int srandom(long val); | |
77 extern long random(void); | |
78 | |
79 /* memory.h */ | |
80 #define memmove(to,from,len) bcopy((char*)(from),(char*)(to),len) | |
81 | |
82 extern void bcopy(const char *, char *, int); | |
83 | |
84 /* signal.h */ | |
85 /* | |
86 ** SunOS4 sigaction hides interrupts by default, so we can safely define | |
87 ** SA_RESTART to 0. | |
88 */ | |
89 #define SA_RESTART 0 | |
90 | |
91 /* stdio.h */ | |
92 extern int printf(const char *, ...); | |
93 extern int fprintf(FILE *, const char *, ...); | |
94 extern int vprintf(const char *, va_list); | |
95 extern int vfprintf(FILE *, const char *, va_list); | |
96 extern char *vsprintf(char *, const char *, va_list); | |
97 extern int scanf(const char *, ...); | |
98 extern int sscanf(const char *, const char *, ...); | |
99 extern int fscanf(FILE *, const char *, ...); | |
100 extern int fgetc(FILE *); | |
101 extern int fputc(int, FILE *); | |
102 extern int fputs(const char *, FILE *); | |
103 extern int puts(const char *); | |
104 extern int fread(void *, size_t, size_t, FILE *); | |
105 extern int fwrite(const char *, int, int, FILE *); | |
106 extern int fseek(FILE *, long, int); | |
107 extern long ftell(FILE *); | |
108 extern int rewind(FILE *); | |
109 extern int fflush(FILE *); | |
110 extern int _flsbuf(unsigned char, FILE *); | |
111 extern int fclose(FILE *); | |
112 extern int remove(const char *); | |
113 extern int setvbuf(FILE *, char *, int, size_t); | |
114 extern int system(const char *); | |
115 extern FILE *popen(const char *, const char *); | |
116 extern int pclose(FILE *); | |
117 | |
118 /* stdlib.h */ | |
119 #define strtoul strtol | |
120 | |
121 extern int isatty(int fildes); | |
122 extern long strtol(const char *, char **, int); | |
123 extern int putenv(const char *); | |
124 extern void srand48(long); | |
125 extern long lrand48(void); | |
126 extern double drand48(void); | |
127 | |
128 /* string.h */ | |
129 extern int strcasecmp(const char *, const char *); | |
130 extern int strncasecmp(const char *, const char *, size_t); | |
131 extern int strcoll(const char *, const char *); | |
132 | |
133 /* time.h */ | |
134 extern time_t mktime(struct tm *); | |
135 extern size_t strftime(char *, size_t, const char *, const struct tm *); | |
136 extern int gettimeofday(struct timeval *, struct timezone *); | |
137 extern int setitimer(int, struct itimerval *, struct itimerval *); | |
138 extern time_t time(time_t *); | |
139 extern time_t timegm(struct tm *); | |
140 extern struct tm *localtime(const time_t *); | |
141 extern struct tm *gmtime(const time_t *); | |
142 | |
143 /* unistd.h */ | |
144 extern int rename(const char *, const char *); | |
145 extern int ioctl(int, int, int *arg); | |
146 extern int connect(int, struct sockaddr *, int); | |
147 extern int readlink(const char *, char *, int); | |
148 extern int symlink(const char *, const char *); | |
149 extern int ftruncate(int, off_t); | |
150 extern int fchmod(int, mode_t); | |
151 extern int fchown(int, uid_t, gid_t); | |
152 extern int lstat(const char *, struct stat *); | |
153 extern int fstat(int, struct stat *); | |
154 extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); | |
155 extern int gethostname(char *, int); | |
156 extern char *getwd(char *); | |
157 extern int getpagesize(void); | |
158 | |
159 #endif /* SVR4 */ | |
160 | |
161 #endif /* pr_sunos4_h___ */ | |
OLD | NEW |