aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/stdinclude.h
blob: b41870e996c3c9bdb55eea1c825cf1543bf1f07a (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
135
136
137
138
139
140
141
142
143
/* stdinclude.h
 *
 */

/*
    fics - An internet chess server.
    Copyright (C) 1993  Richard V. Nash

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
*/

/* Revision history:
   name		email		yy/mm/dd	Change
   Richard Nash	              	93/10/22	Created
*/

#ifndef _STDINCLUDE_H
#define _STDINCLUDE_H

#include <sys/types.h>

/* Set up system specific defines */
#if defined(SYSTEM_NEXT)

#define HASMALLOCSIZE
#include <sys/vfs.h>

#elif defined(SYSTEM_ULTRIX)

#include <sys/param.h>
#include <sys/mount.h>

#endif

#ifdef SYSTEM_USL
# define NO_TM_ZONE
#endif

#ifdef SYSTEM_SUN4
# define USE_VARARGS
#endif

#ifdef SGI
#define _BSD_SIGNALS
#include <fcntl.h>
#include <bstring.h>
#endif

#if defined(SYSTEM_RS6K)
#include <sys/select.h>
#include <dirent.h>
#define USE_DIRENT
#endif

/* These are included into every .c file */
#if defined(SYSTEM_SUN5)
#define USE_RLIMIT
#define USE_TIMES
#define USE_WAITPID
#define GOOD_STDIO
#define NO_TM_ZONE
#include <string.h>
#include <dirent.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/filio.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#define direct dirent

#else
#include <strings.h>
#include <sys/dir.h>
#endif

#include <sys/stat.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include <ctype.h>
#include <sys/errno.h>
#include <signal.h>
#include <time.h>
#include <math.h>
#include <sys/time.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/wait.h>

/* Forward declare the functions that aren't defined above */

#if defined(SGI)
#include <errno.h>
#define GOOD_STDIO
#define NO_TM_ZONE
#else
#define GOOD_STDIO
/*
extern FILE *popen(char *, char *);
extern int pclose(FILE *);
extern int fputs(char *, FILE *);
extern int fseek(FILE *, long, int);
extern int fread(char *, int, int, FILE *);
extern int fwrite(char *, int, int, FILE *);
extern int socket(int, int, int);
extern int atoi (char *nptr);
extern long atol (char *nptr);
extern int truncate(char *, off_t), ftruncate(int, off_t);
*/
#endif

#ifndef GOOD_STDIO
extern int fclose(FILE *);
extern int fscanf(FILE *, char *, ...);
extern int fprintf(FILE *, char *, ...);
extern int printf(char *, ...);
#endif


#ifndef NETBSD
//extern char *crypt (char *key, char *salt);
#endif

extern time_t time(time_t *);
extern int rand(void);
extern int close(int);
extern size_t malloc_size(void *ptr);

#endif /* _STDINCLUDE_H */