Changeset 52210 in vbox for trunk/src/VBox/Additions/common/VBoxGuestLib
- Timestamp:
- Jul 28, 2014 3:03:24 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 95273
- Location:
- trunk/src/VBox/Additions/common/VBoxGuestLib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
r51346 r52210 42 42 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd) 43 43 LIBRARIES += \ 44 VBoxGuestR3LibXFree86 44 VBoxGuestR3LibXFree86 \ 45 VBoxGuestR3LibXOrg 45 46 endif 46 47 endif … … 196 197 $(VBOX_PATH_X11_XFREE_4_3)/exports/include/X11 197 198 199 # 200 # VBoxGuestR3LibXOrg - a reduced version of the guest library which uses 201 # the C server runtime instead of IPRT. 202 # 203 VBoxGuestR3LibXOrg_TEMPLATE = VBOXGUESTR3XORGLIB 204 VBoxGuestR3LibXOrg_DEFS = \ 205 VBOX_WITH_HGCM \ 206 VBOX_VBGLR3_XORG \ 207 RTMEM_NO_WRAP_TO_EF_APIS \ 208 IN_RT_STATIC \ 209 $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \ 210 $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP,) \ 211 $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,) 212 VBoxGuestR3LibXOrg_SOURCES = $(VBoxGuestR3LibXFree86_SOURCES) 213 198 214 VBoxGuestR3LibRuntimeXF86.cpp_CXXFLAGS = -Wno-shadow 199 215 -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp
r51490 r52210 72 72 extern "C" int xf86close(int); 73 73 extern "C" int xf86ioctl(int, unsigned long, pointer); 74 # define VBOX_VBGLR3_XSERVER 75 #elif defined(VBOX_VBGLR3_XORG) 76 # include <sys/stat.h> 77 # include <fcntl.h> 78 # include <unistd.h> 79 # include <sys/ioctl.h> 80 # define xf86open open 81 # define xf86close close 82 # define xf86ioctl ioctl 83 # define XF86_O_RDWR O_RDWR 84 # define VBOX_VBGLR3_XSERVER 74 85 #endif 75 86 … … 79 90 *******************************************************************************/ 80 91 /** The VBoxGuest device handle. */ 81 #ifdef VBOX_VBGLR3_X FREE8692 #ifdef VBOX_VBGLR3_XSERVER 82 93 static int g_File = -1; 83 94 #elif defined(RT_OS_WINDOWS) … … 115 126 #ifdef RT_OS_WINDOWS 116 127 if (g_hFile == INVALID_HANDLE_VALUE) 117 #elif !defined (VBOX_VBGLR3_X FREE86)128 #elif !defined (VBOX_VBGLR3_XSERVER) 118 129 if (g_File == NIL_RTFILE) 119 130 #else … … 125 136 #if defined(RT_OS_WINDOWS) 126 137 if (g_hFile != INVALID_HANDLE_VALUE) 127 #elif !defined(VBOX_VBGLR3_X FREE86)138 #elif !defined(VBOX_VBGLR3_XSERVER) 128 139 if (g_File != NIL_RTFILE) 129 140 #else … … 234 245 g_uConnection = uConnection; 235 246 236 #elif defined(VBOX_VBGLR3_X FREE86)247 #elif defined(VBOX_VBGLR3_XSERVER) 237 248 int File = xf86open(pszDeviceName, XF86_O_RDWR); 238 249 if (File == -1) … … 251 262 #endif 252 263 253 #ifndef VBOX_VBGLR3_X FREE86264 #ifndef VBOX_VBGLR3_XSERVER 254 265 /* 255 266 * Create release logger … … 296 307 if (cInits > 0) 297 308 return; 298 #if !defined(VBOX_VBGLR3_X FREE86)309 #if !defined(VBOX_VBGLR3_XSERVER) 299 310 AssertReturnVoid(!cInits); 300 311 … … 331 342 # endif 332 343 333 #else /* VBOX_VBGLR3_X FREE86*/344 #else /* VBOX_VBGLR3_XSERVER */ 334 345 int File = g_File; 335 346 g_File = -1; … … 337 348 return; 338 349 xf86close(File); 339 #endif /* VBOX_VBGLR3_X FREE86*/350 #endif /* VBOX_VBGLR3_XSERVER */ 340 351 } 341 352 … … 397 408 * header with an error code return field (much better alternative 398 409 * actually). */ 399 #ifdef VBOX_VBGLR3_X FREE86410 #ifdef VBOX_VBGLR3_XSERVER 400 411 int rc = xf86ioctl(g_File, iFunction, &Hdr); 401 412 #else … … 412 423 413 424 #elif defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) 414 # ifdef VBOX_VBGLR3_X FREE86425 # ifdef VBOX_VBGLR3_XSERVER 415 426 int rc = xf86ioctl((int)g_File, iFunction, pvData); 416 427 # else … … 426 437 rc = -rc; 427 438 else 428 # ifdef VBOX_VBGLR3_X FREE86439 # ifdef VBOX_VBGLR3_XSERVER 429 440 rc = VERR_FILE_IO_ERROR; 430 441 # else … … 448 459 return rc; 449 460 450 #elif defined(VBOX_VBGLR3_X FREE86)461 #elif defined(VBOX_VBGLR3_XSERVER) 451 462 /* PORTME - This is preferred over the RTFileIOCtl variant below, just be careful with the (int). */ 452 463 /** @todo test status code passing! */ -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibRuntimeXF86.cpp
r31159 r52210 35 35 #include <iprt/mem.h> 36 36 #include <iprt/string.h> 37 #if defined(VBOX_VBGLR3_XFREE86) 37 38 extern "C" { 38 39 # define XFree86LOADER … … 41 42 # undef size_t 42 43 } 44 #else 45 # include <ctype.h> 46 # include <errno.h> 47 # include <stdarg.h> 48 # include <stdio.h> 49 # include <stdlib.h> 50 # define xalloc malloc 51 # define xf86vsnprintf vsnprintf 52 # define xf86errno errno 53 # define xf86strtoul strtoul 54 # define xf86isspace isspace 55 # define xfree free 56 extern "C" void ErrorF(const char *f, ...); 57 extern "C" void VErrorF(const char *f, va_list args); 58 #endif 43 59 44 60 /* This is risky as it restricts call to the ANSI format type specifiers. */ -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibVideo.cpp
r52201 r52210 34 34 #include <VBox/HostServices/GuestPropertySvc.h> /* For Save and RetrieveVideoMode */ 35 35 #include <iprt/assert.h> 36 #if ndef VBOX_VBGLR3_XFREE8636 #if !defined(VBOX_VBGLR3_XFREE86) && !defined(VBOX_VBGLR3_XORG) 37 37 # include <iprt/mem.h> 38 38 #endif
Note:
See TracChangeset
for help on using the changeset viewer.