1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 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/
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.
13 * The Original Code is the Netscape Portable Runtime (NSPR).
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
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
35 #ifndef pr_sunos4_h___
36 #define pr_sunos4_h___
41 ** Hodge podge of random missing prototypes for the Sunos4 system
47 #include <sys/types.h>
49 #define PATH_MAX _POSIX_PATH_MAX
59 extern int tolower(int);
60 extern int toupper(int);
63 extern char *sys_errlist
[];
66 #define strerror(e) sys_errlist[((unsigned)(e) < sys_nerr) ? e : 0]
68 extern void perror(const char *);
73 extern int getopt(int argc
, char **argv
, char *spec
);
76 extern int srandom(long val
);
77 extern long random(void);
80 #define memmove(to,from,len) bcopy((char*)(from),(char*)(to),len)
82 extern void bcopy(const char *, char *, int);
86 ** SunOS4 sigaction hides interrupts by default, so we can safely define
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 *);
119 #define strtoul strtol
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);
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 *);
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 *);
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);
161 #endif /* pr_sunos4_h___ */