00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef __MACHDEFS_H
00040 #define __MACHDEFS_H
00041 #include "qs_config.h"
00042
00043 #ifdef HAVE_STDIO_H
00044 # include <stdio.h>
00045 #endif
00046
00047 #ifdef HAVE_STDARG_H
00048 # include <stdarg.h>
00049 #endif
00050 #ifdef HAVE_STDLIB_H
00051 # include <stdlib.h>
00052 #endif
00053 #ifdef HAVE_MATH_H
00054 # include <math.h>
00055 #endif
00056 #ifdef HAVE_STRING_H
00057 # include <string.h>
00058 #endif
00059 #ifdef HAVE_STRINGS_H
00060 # include <strings.h>
00061 #endif
00062 #ifdef HAVE_ERRNO_H
00063 # include <errno.h>
00064 #endif
00065 #ifdef TIME_WITH_SYS_TIME
00066 # include <sys/time.h>
00067 # include <time.h>
00068 #else
00069 # ifdef HAVE_SYS_TIME_H
00070 # include <sys/time.h>
00071 # else
00072 # ifdef HAVE_TIME_H
00073 # include <time.h>
00074 # endif
00075 # endif
00076 #endif
00077 #ifdef HAVE_STDDEF_H
00078 # include <stddef.h>
00079 #endif
00080 #ifdef HAVE_UNISTD_H
00081 # include <unistd.h>
00082 #endif
00083 #ifdef HAVE_MALLOC_H
00084 # include <stdlib.h>
00085 #endif
00086 #ifdef HAVE_SYS_TYPES_H
00087 # include <sys/types.h>
00088 #endif
00089 #ifdef HAVE_SYS_STAT_H
00090 # include <sys/stat.h>
00091 #endif
00092 #ifdef HAVE_SYS_RESOURCE_H
00093 # include <sys/resource.h>
00094 #endif
00095 #ifdef HAVE_FCNTL_H
00096 # include <fcntl.h>
00097 #endif
00098 #ifdef HAVE_SYS_SOCKET_H
00099 # include <sys/socket.h>
00100 #endif
00101 #ifdef HAVE_NETDB_H
00102 # include <netdb.h>
00103 #endif
00104 #ifdef HAVE_NETINET_IN_H
00105 # include <netinet/in.h>
00106 #endif
00107
00108 #ifdef HAVE_SOCKET
00109 #define ILL_NETREADY
00110 #endif
00111
00112 #ifdef USEDMALLOC
00113 #include "dmalloc.h"
00114 #endif
00115
00116 #ifdef ILL_ATTRIBUTE
00117 #define ILL_UNUSED __attribute__ ((unused))
00118 #else
00119 #define ILL_UNUSED
00120 #endif
00121
00122 #ifdef ILL_PROTO_PRINTF
00123
00124 extern int printf (
00125 const char *,
00126 ...),
00127 fprintf (
00128 FILE *,
00129 const char *,
00130 ...),
00131 fflush (
00132 FILE *),
00133 scanf (
00134 const char *,
00135 ...),
00136 sscanf (
00137 const char *,
00138 const char *,
00139 ...),
00140 fscanf (
00141 FILE *,
00142 const char *,
00143 ...),
00144 fclose (
00145 FILE *),
00146 ungetc (
00147 int,
00148 FILE *),
00149 _filbuf (
00150 FILE *),
00151 time (
00152 int *);
00153
00154 #ifdef ILL_NETREADY
00155 extern int socket (
00156 int,
00157 int,
00158 int),
00159 connect (
00160 int,
00161 const struct sockaddr *,
00162 int),
00163 accept (
00164 int,
00165 struct sockaddr *,
00166 int *),
00167 bind (
00168 int,
00169 const struct sockaddr *,
00170 int),
00171 listen (
00172 int,
00173 int);
00174 #endif
00175 extern void *memset (
00176 void *,
00177 int,
00178 size_t),
00179 perror (
00180 const char *);
00181 #endif
00182
00183 #ifdef ILL_PROTO_RENAME
00184 extern int rename (
00185 const char *,
00186 const char *);
00187 #endif
00188
00189 #ifdef ILL_PROTO_GETHOSTNAME
00190 extern int gethostname (
00191 char *,
00192 int);
00193 #endif
00194
00195 #ifdef ILL_PROTO_GETRUSAGE
00196 extern int getrusage (
00197 int,
00198 struct rusage *);
00199 #endif
00200
00201 #ifdef ILL_PROTO___VFORK
00202 extern pid_t __vfork (
00203 void);
00204 #endif
00205
00206 #ifndef NULL
00207 #define NULL (0)
00208 #endif
00209
00210
00211
00212
00213
00214 #ifndef M_PI
00215 #define M_PI 3.14159265358979323846
00216 #endif
00217
00218 #endif