ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/sys_unix.cpp
(Generate patch)

Comparing BasiliskII/src/Unix/sys_unix.cpp (file contents):
Revision 1.20 by gbeauche, 2003-10-12T21:55:44Z vs.
Revision 1.23 by gbeauche, 2004-06-27T22:06:02Z

# Line 1 | Line 1
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
# Line 24 | Line 24
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>
# Line 145 | Line 149 | void SysAddFloppyPrefs(void)
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");
# Line 222 | Line 228 | void SysAddCDROMPrefs(void)
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
# Line 253 | Line 264 | void SysAddSerialPrefs(void)
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines