VirtualBox

Ignore:
Timestamp:
Jul 28, 2014 3:03:24 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
95273
Message:

Additions/x11: do not pull the whole (mini) run-time library into the X.Org drivers.

Location:
trunk/src/VBox/Additions/common/VBoxGuestLib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk

    r51346 r52210  
    4242 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd)
    4343  LIBRARIES += \
    44         VBoxGuestR3LibXFree86
     44        VBoxGuestR3LibXFree86 \
     45        VBoxGuestR3LibXOrg
    4546 endif
    4647endif
     
    196197        $(VBOX_PATH_X11_XFREE_4_3)/exports/include/X11
    197198
     199#
     200# VBoxGuestR3LibXOrg - a reduced version of the guest library which uses
     201# the C server runtime instead of IPRT.
     202#
     203VBoxGuestR3LibXOrg_TEMPLATE = VBOXGUESTR3XORGLIB
     204VBoxGuestR3LibXOrg_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,)
     212VBoxGuestR3LibXOrg_SOURCES  = $(VBoxGuestR3LibXFree86_SOURCES)
     213
    198214VBoxGuestR3LibRuntimeXF86.cpp_CXXFLAGS = -Wno-shadow
    199215
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp

    r51490 r52210  
    7272extern "C" int xf86close(int);
    7373extern "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
    7485#endif
    7586
     
    7990*******************************************************************************/
    8091/** The VBoxGuest device handle. */
    81 #ifdef VBOX_VBGLR3_XFREE86
     92#ifdef VBOX_VBGLR3_XSERVER
    8293static int g_File = -1;
    8394#elif defined(RT_OS_WINDOWS)
     
    115126#ifdef RT_OS_WINDOWS
    116127        if (g_hFile == INVALID_HANDLE_VALUE)
    117 #elif !defined (VBOX_VBGLR3_XFREE86)
     128#elif !defined (VBOX_VBGLR3_XSERVER)
    118129        if (g_File == NIL_RTFILE)
    119130#else
     
    125136#if defined(RT_OS_WINDOWS)
    126137    if (g_hFile != INVALID_HANDLE_VALUE)
    127 #elif !defined(VBOX_VBGLR3_XFREE86)
     138#elif !defined(VBOX_VBGLR3_XSERVER)
    128139    if (g_File != NIL_RTFILE)
    129140#else
     
    234245    g_uConnection = uConnection;
    235246
    236 #elif defined(VBOX_VBGLR3_XFREE86)
     247#elif defined(VBOX_VBGLR3_XSERVER)
    237248    int File = xf86open(pszDeviceName, XF86_O_RDWR);
    238249    if (File == -1)
     
    251262#endif
    252263
    253 #ifndef VBOX_VBGLR3_XFREE86
     264#ifndef VBOX_VBGLR3_XSERVER
    254265    /*
    255266     * Create release logger
     
    296307    if (cInits > 0)
    297308        return;
    298 #if !defined(VBOX_VBGLR3_XFREE86)
     309#if !defined(VBOX_VBGLR3_XSERVER)
    299310    AssertReturnVoid(!cInits);
    300311
     
    331342# endif
    332343
    333 #else  /* VBOX_VBGLR3_XFREE86 */
     344#else  /* VBOX_VBGLR3_XSERVER */
    334345    int File = g_File;
    335346    g_File = -1;
     
    337348        return;
    338349    xf86close(File);
    339 #endif /* VBOX_VBGLR3_XFREE86 */
     350#endif /* VBOX_VBGLR3_XSERVER */
    340351}
    341352
     
    397408 *        header with an error code return field (much better alternative
    398409 *        actually). */
    399 #ifdef VBOX_VBGLR3_XFREE86
     410#ifdef VBOX_VBGLR3_XSERVER
    400411    int rc = xf86ioctl(g_File, iFunction, &Hdr);
    401412#else
     
    412423
    413424#elif defined(RT_OS_DARWIN) || defined(RT_OS_LINUX)
    414 # ifdef VBOX_VBGLR3_XFREE86
     425# ifdef VBOX_VBGLR3_XSERVER
    415426    int rc = xf86ioctl((int)g_File, iFunction, pvData);
    416427# else
     
    426437        rc = -rc;
    427438    else
    428 # ifdef VBOX_VBGLR3_XFREE86
     439# ifdef VBOX_VBGLR3_XSERVER
    429440        rc = VERR_FILE_IO_ERROR;
    430441#  else
     
    448459    return rc;
    449460
    450 #elif defined(VBOX_VBGLR3_XFREE86)
     461#elif defined(VBOX_VBGLR3_XSERVER)
    451462    /* PORTME - This is preferred over the RTFileIOCtl variant below, just be careful with the (int). */
    452463/** @todo test status code passing! */
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibRuntimeXF86.cpp

    r31159 r52210  
    3535#include <iprt/mem.h>
    3636#include <iprt/string.h>
     37#if defined(VBOX_VBGLR3_XFREE86)
    3738extern "C" {
    3839# define XFree86LOADER
     
    4142# undef size_t
    4243}
     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
     56extern "C" void ErrorF(const char *f, ...);
     57extern "C" void VErrorF(const char *f, va_list args);
     58#endif
    4359
    4460/* This is risky as it restricts call to the ANSI format type specifiers. */
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibVideo.cpp

    r52201 r52210  
    3434#include <VBox/HostServices/GuestPropertySvc.h>  /* For Save and RetrieveVideoMode */
    3535#include <iprt/assert.h>
    36 #ifndef VBOX_VBGLR3_XFREE86
     36#if !defined(VBOX_VBGLR3_XFREE86) && !defined(VBOX_VBGLR3_XORG)
    3737# include <iprt/mem.h>
    3838#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette