summaryrefslogtreecommitdiffstats
path: root/security/nss/coreconf/nsinstall/sunos4.h
blob: 3ba064f98bab291d50b62bd3a016a9d2516d3664 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef pr_sunos4_h___
#define pr_sunos4_h___

#ifndef SVR4

/*
** Hodge podge of random missing prototypes for the Sunos4 system
*/
#include <stdio.h>
#include <stdarg.h>
#include <time.h>
#include <limits.h>
#include <sys/types.h>

#define PATH_MAX _POSIX_PATH_MAX

struct timeval;
struct timezone;
struct itimerval;
struct sockaddr;
struct stat;
struct tm;

/* ctype.h */
extern int tolower(int);
extern int toupper(int);

/* errno.h */
extern char *sys_errlist[];
extern int sys_nerr;

#define strerror(e) sys_errlist[((unsigned)(e) < sys_nerr) ? e : 0]

extern void perror(const char *);

/* getopt */
extern char *optarg;
extern int optind;
extern int getopt(int argc, char **argv, char *spec);

/* math.h */
extern int srandom(long val);
extern long random(void);

/* memory.h */
#define memmove(to,from,len) bcopy((char*)(from),(char*)(to),len)

extern void bcopy(const char *, char *, int);

/* signal.h */
/*
** SunOS4 sigaction hides interrupts by default, so we can safely define
** SA_RESTART to 0 (HP-UX is a counter-example -- its sigaction does not
** hide interrupts but lacks an SA_RESTART option; you must use sigvector
** and tweak the sigcontext from within each signal handler!).
*/
#define SA_RESTART 0
#define SA_SIGINFO 0

/* stdio.h */
extern int printf(const char *, ...);
extern int fprintf(FILE *, const char *, ...);
extern int vprintf(const char *, va_list);
extern int vfprintf(FILE *, const char *, va_list);
extern char *vsprintf(char *, const char *, va_list);
extern int scanf(const char *, ...);
extern int sscanf(const char *, const char *, ...);
extern int fscanf(FILE *, const char *, ...);
extern int fgetc(FILE *);
extern int fputc(int, FILE *);
extern int fputs(const char *, FILE *);
extern int puts(const char *);
extern int fread(void *, size_t, size_t, FILE *);
extern int fwrite(const char *, int, int, FILE *);
extern int fseek(FILE *, long, int);
extern long ftell(FILE *);
extern int rewind(FILE *);
extern int fflush(FILE *);
extern int _flsbuf(unsigned char, FILE *);
extern int fclose(FILE *);
extern int remove(const char *);
extern int setvbuf(FILE *, char *, int, size_t);
extern int system(const char *);
extern FILE *popen(const char *, const char *);
extern int pclose(FILE *);

/* stdlib.h */
#define strtoul strtol

extern int isatty(int fildes);
extern long strtol(const char *, char **, int);
extern int putenv(const char *);
extern void srand48(long);
extern long lrand48(void);
extern double drand48(void);

/* string.h */
extern int strcasecmp(const char *, const char *);
extern int strncasecmp(const char *, const char *, size_t);
extern int strcoll(const char *, const char *);

/* time.h */
extern time_t mktime(struct tm *);
extern size_t strftime(char *, size_t, const char *, const struct tm *);
extern int gettimeofday(struct timeval *, struct timezone *);
extern int setitimer(int, struct itimerval *, struct itimerval *);
extern time_t time(time_t *);
extern time_t timegm(struct tm *);
extern struct tm *localtime(const time_t *);
extern struct tm *gmtime(const time_t *);

/* unistd.h */
extern int rename(const char *, const char *);
extern int ioctl(int, int, int *arg);
extern int connect(int, struct sockaddr *, int);
extern int readlink(const char *, char *, int);
extern int symlink(const char *, const char *);
extern int ftruncate(int, off_t);
extern int fchmod(int, mode_t);
extern int fchown(int, uid_t, gid_t);
extern int lstat(const char *, struct stat *);
extern int fstat(int, struct stat *);
extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
extern int gethostname(char *, int);
extern char *getwd(char *);
extern int getpagesize(void);

#endif /* SVR4 */

#endif /* pr_sunos4_h___ */