2 (c) Copyright 1998-2000 - Tord Jansson
3 ======================================
5 This file is part of the BladeEnc MP3 Encoder, based on
6 ISO's reference code for MPEG Layer 3 compression.
8 This file doesn't contain any of the ISO reference code and
9 is copyright Tord Jansson (tord.jansson@swipnet.se).
11 BladeEnc is free software; you can redistribute this file
12 and/or modify it under the terms of the GNU Lesser General Public
13 License as published by the Free Software Foundation; either
14 version 2.1 of the License, or (at your option) any later version.
20 ------------ Changes ------------
22 2000-12-11 Andre Piotrowski
24 - added autodetection for Mac OS
26 2001-01-19 Tord Jansson
28 - Added Andrea Vallinotto's Amiga WarpOS changes.
29 - Added some more defines and cleaned up.
38 /*==== THE SYSTEMS WE KNOW OF AND CAN AUTODETECT ==========================*/
40 #define UNIX_AUTOCONF 1 /* All well behaving UNIX systems where you run configure/make */
41 /* Includes Linux, *BSD, Solaris, IRIX, UnixWare, SCO Open Server, AIX, HPUX */
43 #define WIN32_INTEL 2 /* Windows 95/98/NT/2k etc on i386 compatible machines */
45 #define BEOS 3 /* BeOS, version 4.5+ on i386 and PPC */
47 #define MSDOS_DJGPP 4 /* MS-DOS protected mode using DJGPP */
49 #define MAC_OS 5 /* To compile the Mac version you also need Petteri Kamppuri's wrapper */
53 /*==== SYSTEMS WE SUPPORT BUT DON'T KNOW HOW TO AUTODETECT YET ==============*/
54 /*==== THESE NEEDS TO BE SET EXPLICITLY BELOW!!! ==============*/
57 #define WIN32_ALPHA 6 /* Windows NT on DEC/Compaq Alpha architectures */
63 #define AMIGA_WOS 9 /* Amiga WarpOS */
66 /*= UNCOMMENT LINE AND SET SYSTEM HERE IF YOUR SYSTEM CAN'T BE AUTODETECTED! */
67 /*===========================================================================*/
68 /*#define SYSTEM MAC_OS*/
70 /*==== SYSTEM AUTODETECTION PROCEDURE ========================*/
74 # define SYSTEM WIN32_INTEL
82 # define SYSTEM MSDOS_DJGPP
85 # if defined(__dest_os) && (__dest_os == __mac_os) /* defined in "ansi_prefix.mac.h" */
86 # define SYSTEM MAC_OS
90 # define SYSTEM UNIX_AUTOCONF /* Take UNIX for granted... */
97 /*==== Low level defines ======================================================*/
103 BYTEORDER [byteorder] Should either be set to BIG_ENDIAN or LITTLE_ENDIAN
104 depending on the processor.
106 DRAG_DROP Set if Drag-n-Drop operations are supported. If
107 defined, the hint for drag and drop is displayed
110 PRIO Set if priority can be set with the -PRIO switch
111 (UNIX_SYSTEM enables this automatically).
113 MSWIN Set this for MSWin systems. Includes "windows.h" etc.
115 WILDCARDS Set this if the program has to expand wildcards
116 itself on your system.
118 DIRECTORY_SEPARATOR Should either be '\\' or '/'.
119 (UNIX_SYSTEM automatically gives you '/').
121 WAIT_KEY Set this on systems where we as default want to
122 wait for a keypress before quiting.
124 UNIX_SYSTEM Set this for UNIX-systems that are posix and
125 (at least to some extent) bsd compliant to enable
126 stuff like config-file support, priority settings etc.
128 PAUSE_25_LINES Wait for keypress after 25 lines of output when
129 listing important information.
133 /* Most systems allready have these two defines, but some doesn't
134 so we have to put them here, before they are used. */
137 # define BIG_ENDIAN 4321
140 #ifndef LITTLE_ENDIAN
141 # define LITTLE_ENDIAN 1234
145 /*____ UNIX with Autoconf support _____________________________________________*/
147 #if SYSTEM == UNIX_AUTOCONF
149 # define BYTEORDER BYTE_ORDER
151 # include "../../config.h"
153 # define BYTEORDER BIG_ENDIAN
155 # define BYTEORDER LITTLE_ENDIAN
161 /*_____ Windows 95/98/NT Intel defines ________________________________________*/
163 #if SYSTEM == WIN32_INTEL
165 # define BYTEORDER LITTLE_ENDIAN
170 # define DIRECTORY_SEPARATOR '\\'
172 # define PAUSE_25_LINES
175 /*_____ Windows NT DEC Alpha defines __________________________________________*/
177 #if SYSTEM == WIN32_ALPHA
179 # define BYTEORDER LITTLE_ENDIAN
184 # define DIRECTORY_SEPARATOR '\\'
186 # define PAUSE_25_LINES
190 /*____ OS/2 _________________________________________________________________*/
192 #if SYSTEM == IBM_OS2
194 # define BYTEORDER LITTLE_ENDIAN
197 # define DIRECTORY_SEPARATOR '\\'
200 # define PAUSE_25_LINES
204 /*____ Atari TOS ____________________________________________________________*/
206 #if SYSTEM == ATARI_TOS
208 # define BYTEORDER BIG_ENDIAN
209 # define DIRECTORY_SEPARATOR '\\'
211 # define PAUSE_25_LINES
214 /*____ MSDOS_DJGPP __________________________________________________________*/
216 #if SYSTEM == MSDOS_DJGPP
218 # define BYTEORDER LITTLE_ENDIAN
219 # define DIRECTORY_SEPARATOR '\\'
222 /*____ MAC_OS ________________________________________________________________*/
226 # define BYTEORDER BIG_ENDIAN
227 # define DIRECTORY_SEPARATOR ':'
230 /*____ BeOS PowerPC & x86 ___________________________________________________*/
235 # define BYTEORDER LITTLE_ENDIAN
237 # define BYTEORDER BIG_ENDIAN
239 # define DIRECTORY_SEPARATOR '/'
242 /*____ Amiga PowerPC WarpOS / VBCC or Storm-GCC_______________________________*/
244 #if SYSTEM == AMIGA_WOS
245 # define BYTEORDER BIG_ENDIAN
246 # define DIRECTORY_SEPARATOR '/'
247 # define SECOND_DIRECTORY_SEPARATOR ':' /* Special case for volumes */
248 # define PRIO /* Yes, it can be done */
249 # define WILDCARDS /* Uses dos/ParsePatternNoCase() and friends.*/
250 # define PROTO_ARGS /* Undocumented, it's useful for GCC-Storm */
254 # include <dos/dos.h>
256 # pragma default-align
263 /*____ Some defines automatically gives other...*/
267 # define DIRECTORY_SEPARATOR '/'
271 /*==== COMPILER SPECIFIC DEFINES ============================================ */
273 Unfortunately the inline command differs slightly between compilers (for
274 example GCC calls it 'inline' while VC++ calls it '_inline'), so we have
275 to use our own define for it to keep everything compiler independent.
277 Inline just speeds things up, so if we don't recognice the architecture we
278 just define an empty INLINE and take a minor performance hit.
282 #ifdef __GNUC__ /* GNU C and family */
283 # define INLINE inline
286 #ifdef __TURBOC__ /* Borland Turbo C, Turbo C++, and Borland C++ */
287 # define INLINE __inline
290 #ifdef _MSC /* Visual C++ */
291 # define INLINE _inline
295 # define INLINE __inline /* Storm C4 */
299 # define INLINE /* VBCC */
303 # define INLINE /* Empty construct default, minor performance hit. */
307 /*____ To make sure that certain necessary defines are set... */
317 /*==== Other Global Definitions, placed here for convenience ==================*/
319 /*#define PRECISE_TIMER*/ /* Gives more accurate speed calculations, */
320 /* just for debug purposes. Disable in release version! */
322 typedef unsigned char uchar;
324 #if (defined(UNIX_SYSTEM) && !defined(SYS_TYPES_H) && !defined(_SYS_TYPES_H)) || (!defined UNIX_SYSTEM && !defined(__GNUC__))
325 typedef unsigned short ushort;
326 typedef unsigned int uint;
330 #endif /* __SYSTEM__ */