- Timestamp:
- Sep 9, 2009 7:34:07 PM (15 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Builtins.cpp
r22866 r22876 275 275 #endif 276 276 277 #if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS) 277 #if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS) || defined(RT_OS_FREEBSD) 278 278 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostSerial); 279 279 if (RT_FAILURE(rc)) -
trunk/src/VBox/Devices/Makefile.kmk
r22866 r22876 858 858 Storage/DrvHostFloppy% \ 859 859 , $(Drivers_SOURCES)) \ 860 Audio/ossaudio.c 860 Audio/ossaudio.c \ 861 Serial/DrvHostSerial.cpp 861 862 Drivers_SOURCES.freebsd = \ 862 863 Network/DrvTAP.cpp -
trunk/src/VBox/Devices/Serial/DrvHostSerial.cpp
r22277 r22876 38 38 #include <iprt/alloc.h> 39 39 40 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 40 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 41 41 # include <errno.h> 42 42 # ifdef RT_OS_SOLARIS … … 114 114 char *pszDevicePath; 115 115 116 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 116 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 117 117 /** the device handle */ 118 118 RTFILE DeviceFile; … … 245 245 { 246 246 PDRVHOSTSERIAL pThis = PDMICHAR_2_DRVHOSTSERIAL(pInterface); 247 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 247 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 248 248 struct termios *termiosSetup; 249 249 int baud_rate; … … 518 518 uint64_t volatile u64Now = RTTimeNanoTS(); NOREF(u64Now); 519 519 #endif 520 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 520 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 521 521 522 522 size_t cbWritten; … … 599 599 abBuf[0] = pThis->aSendQueue[iTail]; 600 600 601 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 601 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 602 602 603 603 rc = RTFileWrite(pThis->DeviceFile, abBuf, cbProcessed, NULL); … … 764 764 cbRemaining = cbRead; 765 765 766 #elif defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) 766 #elif defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 767 767 768 768 size_t cbRead; … … 924 924 { 925 925 PDRVHOSTSERIAL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTSERIAL); 926 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 926 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 927 927 return RTFileWrite(pThis->WakeupPipeW, "", 1, NULL); 928 928 #elif defined(RT_OS_WINDOWS) … … 935 935 } 936 936 937 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 937 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 938 938 /* -=-=-=-=- Monitor thread -=-=-=-=- */ 939 939 … … 1140 1140 PDRVHOSTSERIAL pThis = PDMICHAR_2_DRVHOSTSERIAL(pInterface); 1141 1141 1142 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 1142 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 1143 1143 int modemStateSet = 0; 1144 1144 int modemStateClear = 0; … … 1189 1189 * Init basic data members and interfaces. 1190 1190 */ 1191 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 1191 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 1192 1192 pThis->DeviceFile = NIL_RTFILE; 1193 1193 # ifdef RT_OS_DARWIN … … 1270 1270 case VERR_ACCESS_DENIED: 1271 1271 return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, 1272 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 1272 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 1273 1273 N_("Cannot open host device '%s' for read/write access. Check the permissions " 1274 1274 "of that device ('/bin/ls -l %s'): Most probably you need to be member " … … 1288 1288 1289 1289 /* Set to non blocking I/O */ 1290 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 1290 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 1291 1291 1292 1292 fcntl(pThis->DeviceFile, F_SETFL, O_NONBLOCK); … … 1340 1340 return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, N_("HostSerial#%d cannot create send thread"), pDrvIns->iInstance); 1341 1341 1342 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 1342 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 1343 1343 /* Linux & darwin needs a separate thread which monitors the status lines. */ 1344 1344 # ifndef RT_OS_LINUX … … 1383 1383 pThis->SendSem = NIL_RTSEMEVENT; 1384 1384 1385 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 1385 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 1386 1386 1387 1387 if (pThis->WakeupPipeW != NIL_RTFILE)
Note:
See TracChangeset
for help on using the changeset viewer.