1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* ***** BEGIN LICENSE BLOCK *****
3
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
5
* The contents of this file are subject to the Mozilla Public License Version
6
* 1.1 (the "License"); you may not use this file except in compliance with
7
* the License. You may obtain a copy of the License at
8
* http://www.mozilla.org/MPL/
10
* Software distributed under the License is distributed on an "AS IS" basis,
11
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
* for the specific language governing rights and limitations under the
15
* The Original Code is the Netscape Portable Runtime (NSPR).
17
* The Initial Developer of the Original Code is
18
* Netscape Communications Corporation.
19
* Portions created by the Initial Developer are Copyright (C) 1998-2000
20
* the Initial Developer. All Rights Reserved.
24
* Alternatively, the contents of this file may be used under the terms of
25
* either the GNU General Public License Version 2 or later (the "GPL"), or
26
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27
* in which case the provisions of the GPL or the LGPL are applicable instead
28
* of those above. If you wish to allow use of your version of this file only
29
* under the terms of either the GPL or the LGPL, and not to allow others to
30
* use your version of this file under the terms of the MPL, indicate your
31
* decision by deleting the provisions above and replace them with the notice
32
* and other provisions required by the GPL or the LGPL. If you do not delete
33
* the provisions above, a recipient may use your version of this file under
34
* the terms of any one of the MPL, the GPL or the LGPL.
36
* ***** END LICENSE BLOCK ***** */
38
#ifndef pr_sunos4_h___
39
#define pr_sunos4_h___
44
** Hodge podge of random missing prototypes for the Sunos4 system
50
#include <sys/types.h>
52
#define PATH_MAX _POSIX_PATH_MAX
62
extern int tolower(int);
63
extern int toupper(int);
66
extern char *sys_errlist[];
69
#define strerror(e) sys_errlist[((unsigned)(e) < sys_nerr) ? e : 0]
71
extern void perror(const char *);
76
extern int getopt(int argc, char **argv, char *spec);
79
extern int srandom(long val);
80
extern long random(void);
83
#define memmove(to,from,len) bcopy((char*)(from),(char*)(to),len)
85
extern void bcopy(const char *, char *, int);
89
** SunOS4 sigaction hides interrupts by default, so we can safely define
95
extern int printf(const char *, ...);
96
extern int fprintf(FILE *, const char *, ...);
97
extern int vprintf(const char *, va_list);
98
extern int vfprintf(FILE *, const char *, va_list);
99
extern char *vsprintf(char *, const char *, va_list);
100
extern int scanf(const char *, ...);
101
extern int sscanf(const char *, const char *, ...);
102
extern int fscanf(FILE *, const char *, ...);
103
extern int fgetc(FILE *);
104
extern int fputc(int, FILE *);
105
extern int fputs(const char *, FILE *);
106
extern int puts(const char *);
107
extern int fread(void *, size_t, size_t, FILE *);
108
extern int fwrite(const char *, int, int, FILE *);
109
extern int fseek(FILE *, long, int);
110
extern long ftell(FILE *);
111
extern int rewind(FILE *);
112
extern int fflush(FILE *);
113
extern int _flsbuf(unsigned char, FILE *);
114
extern int fclose(FILE *);
115
extern int remove(const char *);
116
extern int setvbuf(FILE *, char *, int, size_t);
117
extern int system(const char *);
118
extern FILE *popen(const char *, const char *);
119
extern int pclose(FILE *);
122
#define strtoul strtol
124
extern int isatty(int fildes);
125
extern long strtol(const char *, char **, int);
126
extern int putenv(const char *);
127
extern void srand48(long);
128
extern long lrand48(void);
129
extern double drand48(void);
132
extern int strcasecmp(const char *, const char *);
133
extern int strncasecmp(const char *, const char *, size_t);
134
extern int strcoll(const char *, const char *);
137
extern time_t mktime(struct tm *);
138
extern size_t strftime(char *, size_t, const char *, const struct tm *);
139
extern int gettimeofday(struct timeval *, struct timezone *);
140
extern int setitimer(int, struct itimerval *, struct itimerval *);
141
extern time_t time(time_t *);
142
extern time_t timegm(struct tm *);
143
extern struct tm *localtime(const time_t *);
144
extern struct tm *gmtime(const time_t *);
147
extern int rename(const char *, const char *);
148
extern int ioctl(int, int, int *arg);
149
extern int connect(int, struct sockaddr *, int);
150
extern int readlink(const char *, char *, int);
151
extern int symlink(const char *, const char *);
152
extern int ftruncate(int, off_t);
153
extern int fchmod(int, mode_t);
154
extern int fchown(int, uid_t, gid_t);
155
extern int lstat(const char *, struct stat *);
156
extern int fstat(int, struct stat *);
157
extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
158
extern int gethostname(char *, int);
159
extern char *getwd(char *);
160
extern int getpagesize(void);
164
#endif /* pr_sunos4_h___ */