annotate Input/aac/include/systems.h @ 19:a3913b2d0acd trunk

[svn] Regenerate Makefiles, AAC fixes.
author nenolod
date Mon, 24 Oct 2005 16:57:20 -0700
parents 6efb9e514224
children 696f87ed66e2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
1 /*
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
2 * The contents of this file are subject to the Mozilla Public
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
3 * License Version 1.1 (the "License"); you may not use this file
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
4 * except in compliance with the License. You may obtain a copy of
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
5 * the License at http://www.mozilla.org/MPL/
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
6 *
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
7 * Software distributed under the License is distributed on an "AS
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
8 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
9 * implied. See the License for the specific language governing
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
10 * rights and limitations under the License.
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
11 *
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
12 * The Original Code is MPEG4IP.
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
13 *
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
14 * The Initial Developer of the Original Code is Cisco Systems Inc.
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
15 * Portions created by Cisco Systems Inc. are
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
16 * Copyright (C) Cisco Systems Inc. 2000, 2001. All Rights Reserved.
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
17 *
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
18 * Contributor(s):
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
19 * Dave Mackie dmackie@cisco.com
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
20 * Bill May wmay@cisco.com
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
21 */
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
22
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
23 #ifndef __SYSTEMS_H__
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
24 #define __SYSTEMS_H__
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
25
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
26 #ifdef WIN32
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
27 #define HAVE_IN_PORT_T
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
28 #define HAVE_SOCKLEN_T
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
29 #include <win32_ver.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
30 #else
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
31 #include <config.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
32 #endif
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
33
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
34
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
35
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
36
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
37 #ifdef WIN32
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
38
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
39 #define _WIN32_WINNT 0x0400
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
40 #include <windows.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
41 #include <stdio.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
42 #include <errno.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
43 #include <stdlib.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
44 #include <time.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
45 #include <limits.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
46
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
47 typedef unsigned __int64 uint64_t;
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
48 typedef unsigned __int32 uint32_t;
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
49 typedef unsigned __int16 uint16_t;
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
50 typedef unsigned __int8 uint8_t;
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
51 typedef unsigned __int64 u_int64_t;
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
52 typedef unsigned __int32 u_int32_t;
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
53 typedef unsigned __int16 u_int16_t;
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
54 typedef unsigned __int8 u_int8_t;
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
55 typedef __int64 int64_t;
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
56 typedef __int32 int32_t;
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
57 typedef __int16 int16_t;
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
58 typedef __int8 int8_t;
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
59 typedef unsigned short in_port_t;
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
60 typedef unsigned int socklen_t;
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
61 typedef int ssize_t;
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
62 #define snprintf _snprintf
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
63 #define strncasecmp _strnicmp
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
64 #define strcasecmp _stricmp
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
65
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
66 #include <io.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
67 #include <fcntl.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
68 #include <sys/types.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
69 #include <sys/stat.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
70 #define write _write
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
71 #define lseek _lseek
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
72 #define close _close
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
73 #define open _open
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
74 #define access _access
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
75 #define vsnprintf _vsnprintf
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
76 #define F_OK 0
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
77 #define OPEN_RDWR (_O_RDWR | _O_BINARY)
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
78 #define OPEN_CREAT (_O_CREAT | _O_BINARY)
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
79 #define OPEN_RDONLY (_O_RDONLY | _O_BINARY)
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
80 #define srandom srand
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
81 #define random rand
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
82
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
83 #define IOSBINARY ios::binary
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
84
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
85 #ifdef __cplusplus
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
86 extern "C" {
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
87 #endif
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
88 int gettimeofday(struct timeval *t, void *);
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
89 #ifdef __cplusplus
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
90 }
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
91 #endif
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
92
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
93 #define PATH_MAX MAX_PATH
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
94 #define MAX_UINT64 -1
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
95 #define LLD "%I64d"
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
96 #define LLU "%I64u"
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
97 #define LLX "%I64x"
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
98 #define M_LLU 1000i64
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
99 #define C_LLU 100i64
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
100 #define I_LLU 1i64
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
101
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
102 #define LOG_EMERG 0
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
103 #define LOG_ALERT 1
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
104 #define LOG_CRIT 2
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
105 #define LOG_ERR 3
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
106 #define LOG_WARNING 4
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
107 #define LOG_NOTICE 5
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
108 #define LOG_INFO 6
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
109 #define LOG_DEBUG 7
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
110
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
111 #if !__STDC__ && _INTEGRAL_MAX_BITS >= 64
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
112 #define VAR_TO_FPOS(fpos, var) (fpos) = (var)
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
113 #define FPOS_TO_VAR(fpos, typed, var) (var) = (typed)(_FPOSOFF(fpos))
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
114 #else
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
115 #define VAR_TO_FPOS(fpos, var) (fpos).lopart = ((var) & UINT_MAX); (fpos).hipart = ((var) >> 32)
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
116 #define FPOS_TO_VAR(fpos, typed, var) (var) = (typed)((uint64_t)((fpos).hipart ) << 32 | (fpos).lopart)
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
117 #endif
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
118
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
119 #define __STRING(expr) #expr
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
120
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
121 #define FOPEN_READ_BINARY "rb"
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
122 #define FOPEN_WRITE_BINARY "wb"
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
123
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
124 #else /* UNIX */
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
125
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
126 #include <stdio.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
127 #include <errno.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
128 #include <stdlib.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
129
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
130 #ifdef HAVE_INTTYPES_H
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
131 #include <inttypes.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
132 #else
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
133 #ifdef HAVE_STDINT_H
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
134 #include <stdint.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
135 #else
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
136 #error "Don't have stdint.h or inttypes.h - no way to get uint8_t"
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
137 #endif
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
138 #endif
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
139
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
140 #include <unistd.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
141 #include <fcntl.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
142 #include <netinet/in.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
143 #include <sys/types.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
144 #include <sys/socket.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
145 #include <netinet/in.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
146 #include <arpa/inet.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
147 #include <syslog.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
148 #include <string.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
149 #include <ctype.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
150 #include <netdb.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
151 #include <sys/stat.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
152 #include <sys/time.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
153 #include <sys/param.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
154
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
155 #define OPEN_RDWR O_RDWR
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
156 #define OPEN_CREAT O_CREAT
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
157 #define OPEN_RDONLY O_RDONLY
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
158
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
159 #define closesocket close
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
160 #define IOSBINARY ios::bin
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
161 #define MAX_UINT64 -1LLU
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
162 #define LLD "%lld"
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
163 #define LLU "%llu"
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
164 #define LLX "%llx"
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
165 #define M_LLU 1000LLU
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
166 #define C_LLU 100LLU
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
167 #define I_LLU 1LLU
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
168 #ifdef HAVE_FPOS_T_POS
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
169 #define FPOS_TO_VAR(fpos, typed, var) (var) = (typed)((fpos).__pos)
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
170 #define VAR_TO_FPOS(fpos, var) (fpos).__pos = (var)
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
171 #else
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
172 #define FPOS_TO_VAR(fpos, typed, var) (var) = (typed)(fpos)
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
173 #define VAR_TO_FPOS(fpos, var) (fpos) = (var)
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
174 #endif
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
175
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
176 #define FOPEN_READ_BINARY "r"
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
177 #define FOPEN_WRITE_BINARY "w"
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
178 #endif /* define unix */
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
179
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
180 #include <stdarg.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
181 typedef void (*error_msg_func_t)(int loglevel,
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
182 const char *lib,
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
183 const char *fmt,
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
184 va_list ap);
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
185 typedef void (*lib_message_func_t)(int loglevel,
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
186 const char *lib,
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
187 const char *fmt,
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
188 ...);
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
189 #ifndef HAVE_IN_PORT_T
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
190 typedef uint16_t in_port_t;
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
191 #endif
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
192
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
193 #ifndef HAVE_SOCKLEN_T
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
194 typedef unsigned int socklen_t;
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
195 #endif
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
196
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
197 #ifdef sun
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
198 #include <limits.h>
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
199 #define u_int8_t uint8_t
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
200 #define u_int16_t uint16_t
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
201 #define u_int32_t uint32_t
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
202 #define u_int64_t uint64_t
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
203 #define __STRING(expr) #expr
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
204 #endif
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
205
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
206 #ifndef HAVE_STRSEP
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
207 #ifdef __cplusplus
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
208 extern "C" {
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
209 #endif
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
210 char *strsep(char **strp, const char *delim);
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
211 #ifdef __cplusplus
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
212 }
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
213 #endif
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
214 #endif
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
215
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
216 #ifndef MIN
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
217 #define MIN(a,b) ((a) < (b) ? (a) : (b))
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
218 #endif
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
219
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
220 #ifndef MAX
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
221 #define MAX(a,b) ((a) > (b) ? (a) : (b))
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
222 #endif
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
223
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
224 #ifndef INADDR_NONE
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
225 #define INADDR_NONE (-1)
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
226 #endif
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
227
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
228 #define MALLOC_STRUCTURE(a) ((a *)malloc(sizeof(a)))
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
229
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
230 #define CHECK_AND_FREE(a) if ((a) != NULL) { free((a)); (a) = NULL;}
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
231
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
232 #ifndef TRUE
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
233 #define TRUE 1
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
234 #endif
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
235
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
236 #ifndef FALSE
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
237 #define FALSE 0
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
238 #endif
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
239
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
240 #endif /* __SYSTEMS_H__ */
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
241
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
242
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
243
6efb9e514224 [svn] Import AAC stuff.
nenolod
parents:
diff changeset
244