1 |
|
/* |
2 |
|
* sys_unix.cpp - System dependent routines, Unix implementation |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-2003 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2004 Christian Bauer |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
24 |
|
#include <sys/stat.h> |
25 |
|
#include <errno.h> |
26 |
|
|
27 |
+ |
#ifdef HAVE_AVAILABILITYMACROS_H |
28 |
+ |
#include <AvailabilityMacros.h> |
29 |
+ |
#endif |
30 |
+ |
|
31 |
|
#ifdef __linux__ |
32 |
|
#include <sys/mount.h> |
33 |
|
#include <linux/cdrom.h> |
149 |
|
PrefsAddString("floppy", "/dev/fd0a"); |
150 |
|
PrefsAddString("floppy", "/dev/fd1a"); |
151 |
|
#elif defined(__APPLE__) && defined(__MACH__) |
152 |
< |
// FIXME: We assume an Aqua build causes <AvailabilityMacros.h> to |
153 |
< |
// be included, thusly enabling this part of code that would cause |
154 |
< |
// Basilisk II to hang otherwise. |
155 |
< |
#ifdef MAC_OS_X_VERSION_10_0 |
156 |
< |
PrefsAddString("floppy", "/dev/fd/0"); |
157 |
< |
PrefsAddString("floppy", "/dev/fd/1"); |
158 |
< |
#endif |
152 |
> |
#if defined(AQUA) || defined(HAVE_FRAMEWORK_IOKIT) |
153 |
> |
extern void DarwinAddFloppyPrefs(void); |
154 |
> |
|
155 |
> |
DarwinAddFloppyPrefs(); |
156 |
> |
#else |
157 |
> |
// Until I can convince the other guys that my Darwin code is useful, |
158 |
> |
// we just add something safe (a non-existant device): |
159 |
> |
PrefsAddString("floppy", "/dev/null"); |
160 |
> |
#endif |
161 |
|
#else |
162 |
|
PrefsAddString("floppy", "/dev/fd0"); |
163 |
|
PrefsAddString("floppy", "/dev/fd1"); |
228 |
|
closedir(cd_dir); |
229 |
|
} |
230 |
|
} |
231 |
< |
#elif defined(__APPLE__) && defined(__MACH__) && defined(MAC_OS_X_VERSION_10_0) |
231 |
> |
#elif defined(__APPLE__) && defined(__MACH__) |
232 |
> |
#if defined(AQUA) || defined(HAVE_FRAMEWORK_IOKIT) |
233 |
|
extern void DarwinAddCDROMPrefs(void); |
234 |
|
|
235 |
|
DarwinAddCDROMPrefs(); |
236 |
+ |
#else |
237 |
+ |
// Until I can convince the other guys that my Darwin code is useful, |
238 |
+ |
// we just do nothing (it is safe to have no cdrom device) |
239 |
+ |
#endif |
240 |
|
#elif defined(__FreeBSD__) || defined(__NetBSD__) |
241 |
|
PrefsAddString("cdrom", "/dev/cd0c"); |
242 |
|
#endif |
264 |
|
PrefsAddString("seriala", "/dev/tty00"); |
265 |
|
PrefsAddString("serialb", "/dev/tty01"); |
266 |
|
#elif defined(__APPLE__) && defined(__MACH__) |
267 |
< |
// FIXME: We assume an Aqua build causes <AvailabilityMacros.h> to |
268 |
< |
// be included, thusly enabling this part of code that would cause |
269 |
< |
// Basilisk II to hang otherwise. |
270 |
< |
#ifdef MAC_OS_X_VERSION_10_0 |
271 |
< |
PrefsAddString("seriala", "/dev/ttys0"); |
272 |
< |
PrefsAddString("serialb", "/dev/ttys1"); |
273 |
< |
#endif |
274 |
< |
// PrefsAddString("seriala", "/dev/cu.modem"); |
275 |
< |
// PrefsAddString("serialb", "/dev/cu.IrDA-IrCOMMch-b"); |
267 |
> |
#if defined(AQUA) || defined(HAVE_FRAMEWORK_IOKIT) |
268 |
> |
extern void DarwinAddSerialPrefs(void); |
269 |
> |
|
270 |
> |
DarwinAddSerialPrefs(); |
271 |
> |
#else |
272 |
> |
// Until I can convince the other guys that my Darwin code is useful, |
273 |
> |
// we just add something safe (non-existant devices): |
274 |
> |
PrefsAddString("seriala", "/dev/null"); |
275 |
> |
PrefsAddString("serialb", "/dev/null"); |
276 |
> |
#endif |
277 |
|
#endif |
278 |
|
} |
279 |
|
|