1 /*____________________________________________________________________________
2 
3 	FreeAmp - The Free MP3 Player
4 
5 	Portions Copyright (C) 1998-1999 EMusic.com
6 
7 	This program is free software; you can redistribute it and/or modify
8 	it under the terms of the GNU General Public License as published by
9 	the Free Software Foundation; either version 2 of the License, or
10 	(at your option) any later version.
11 
12 	This program is distributed in the hope that it will be useful,
13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 	GNU General Public License for more details.
16 
17 	You should have received a copy of the GNU General Public License
18 	along with this program; if not, write to the Free Software
19 	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 	$Id: config.win32,v 1.16 1999/12/09 08:44:07 elrod Exp $
22 ____________________________________________________________________________*/
23 
24 #ifndef CONFIG_H
25 #define CONFIG_H
26 
27 #if !defined(RC_INVOKED)
28 
29 #include <limits.h>
30 
31 #define HAVE_IO_H 1
32 #define HAVE_ERRNO_H 1
33 
34 #if HAVE_UNISTD_H
35 #define RD_BNRY_FLAGS O_RDONLY
36 #elif HAVE_IO_H
37 #define RD_BNRY_FLAGS O_RDONLY | O_BINARY
38 #endif
39 
40 /* Endian Issues */
41 #ifdef LINUX
42 #include <endian.h>
43 #endif
44 
45 #ifdef WIN32
46 #define __LITTLE_ENDIAN 1234
47 #define __BIG_ENDIAN    4321
48 #define __PDP_ENDIAN    3412
49 #define __BYTE_ORDER    __LITTLE_ENDIAN
50 #define usleep(x) ::Sleep(x/1000)
51 typedef int socklen_t;
52 #endif
53 
54 #ifndef _MAX_PATH
55 #define _MAX_PATH 260
56 #endif
57 
58 /* define our datatypes */
59 // real number
60 typedef double real;
61 
62 #if UCHAR_MAX == 0xff
63 
64 typedef unsigned char	uint8;
65 typedef signed char		int8;
66 
67 #else
68 #error This machine has no 8-bit type
69 #endif
70 
71 #if UINT_MAX == 0xffff
72 
73 typedef unsigned int	uint16;
74 typedef int				int16;
75 
76 #elif USHRT_MAX == 0xffff
77 
78 typedef unsigned short	uint16;
79 typedef short			int16;
80 
81 #else
82 #error This machine has no 16-bit type
83 #endif
84 
85 
86 #if UINT_MAX == 0xfffffffful
87 
88 typedef unsigned int	uint32;
89 typedef int				int32;
90 
91 #elif ULONG_MAX == 0xfffffffful
92 
93 typedef unsigned long	uint32;
94 typedef long			int32;
95 
96 #elif USHRT_MAX == 0xfffffffful
97 
98 typedef unsigned short	uint32;
99 typedef short			int32;
100 
101 #else
102 #error This machine has no 32-bit type
103 #endif
104 
105 
106 // What character marks the end of a directory entry? For DOS and
107 // Windows, it is "\"; in UNIX it is "/".
108 #if defined(WIN32) || defined(OS2) || defined(__DOS__)
109 #define DIR_MARKER '\\'
110 #define DIR_MARKER_STR "\\"
111 #else
112 #define DIR_MARKER '/'
113 #define DIR_MARKER_STR "/"
114 #endif /* WIN32 */
115 
116 // What character(s) marks the end of a line in a text file?
117 // For DOS and Windows, it is "\r\n"; in UNIX it is "\r".
118 #if defined(WIN32) || defined(OS2) || defined(__DOS__)
119 #define LINE_END_MARKER_STR "\r\n"
120 #else
121 #define LINE_END_MARKER_STR "\n"
122 #endif /* WIN32 */
123 
124 #ifndef NULL
125 #ifdef  __cplusplus
126 #define NULL    0
127 #else
128 #define NULL    ((void *)0)
129 #endif
130 #endif /* NULL */
131 
132 #endif /* RC_INVOKED */
133 
134 #endif /* CONFIG_H */
135