Ticket #1: xpcom.diff

File xpcom.diff, 21.3 KB (added by Valery V. Sedletski, 9 years ago)

XPCOM

  • \src\libs\xpcom18a4/Config.kmk

    diff -urN vbox-trunk-bk\src\libs\xpcom18a4/Config.kmk vbox-trunk\src\libs\xpcom18a4/Config.kmk
    old new  
    3737TEMPLATE_XPCOM_ASFLAGS.x86         = -m32
    3838TEMPLATE_XPCOM_ASFLAGS.amd64       = -m64
    3939TEMPLATE_XPCOM_ASDEFS              = $(NO_SUCH_VARIABLE)
    40 TEMPLATE_XPCOM_CXXFLAGS            = -g -pipe -ansi -Wall -Wno-unused -Wno-non-virtual-dtor \
     40# -ansi
     41TEMPLATE_XPCOM_CXXFLAGS            = -g -pipe -Wall -Wno-unused -Wno-non-virtual-dtor \
    4142        $(VBOX_GCC_Wno-invalid-offsetof) -Wno-sign-compare -Wno-unused -Wno-ctor-dtor-privacy \
    4243        $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) \
    4344        $(VBOX_GCC_fdiagnostics-show-option) $(VBOX_GCC_Wno-delete-non-virtual-dtor)
  • \src\libs\xpcom18a4/ipc/ipcd/client/src/ipcdclient.cpp

    diff -urN vbox-trunk-bk\src\libs\xpcom18a4/ipc/ipcd/client/src/ipcdclient.cpp vbox-trunk\src\libs\xpcom18a4/ipc/ipcd/client/src/ipcdclient.cpp
    old new  
    12901290  if (PR_ProcessAttrSetInheritableFD(attr, writable, IPC_STARTUP_PIPE_NAME) != PR_SUCCESS)
    12911291  goto end;
    12921292
     1293#ifdef XP_OS2
     1294  devNull = PR_Open("/dev/nul", PR_RDWR, 0);
     1295#else
    12931296  devNull = PR_Open("/dev/null", PR_RDWR, 0);
     1297#endif
    12941298  if (!devNull)
    12951299    goto end;
    12961300
  • \src\libs\xpcom18a4/ipc/ipcd/daemon/src/ipcdUnix.cpp

    diff -urN vbox-trunk-bk\src\libs\xpcom18a4/ipc/ipcd/daemon/src/ipcdUnix.cpp vbox-trunk\src\libs\xpcom18a4/ipc/ipcd/daemon/src/ipcdUnix.cpp
    old new  
    549549            // redirect all standard file descriptors to /dev/null for
    550550            // proper daemonizing
    551551            PR_Close(PR_STDIN);
     552#ifndef XP_OS2
    552553            PR_Open("/dev/null", O_RDONLY, 0);
    553554            PR_Close(PR_STDOUT);
    554555            PR_Open("/dev/null", O_WRONLY, 0);
    555556            PR_Close(PR_STDERR);
    556557            PR_Open("/dev/null", O_WRONLY, 0);
     558#else
     559            PR_Open("/dev/nul", O_RDONLY, 0);
     560            PR_Close(PR_STDOUT);
     561            PR_Open("/dev/nul", O_WRONLY, 0);
     562            PR_Close(PR_STDERR);
     563            PR_Open("/dev/nul", O_WRONLY, 0);
     564#endif
     565
    557566#endif
    558567
    559568            IPC_NotifyParent();
  • \src\libs\xpcom18a4/Makefile.kmk

    diff -urN vbox-trunk-bk\src\libs\xpcom18a4/Makefile.kmk vbox-trunk\src\libs\xpcom18a4/Makefile.kmk
    old new  
    819819VBox-xpcom-threads_TEMPLATE = XPCOM
    820820VBox-xpcom-threads_INSTTYPE = none
    821821VBox-xpcom-threads_DEFS = _IMPL_NS_COM
     822VBox-xpcom-threads_DEFS.os2 = # OS2_PM_EVENT_QUEUES
    822823VBox-xpcom-threads_SOURCES = \
    823824        xpcom/threads/plevent.c \
    824825        xpcom/threads/nsAutoLock.cpp \
  • \src\libs\xpcom18a4/nsprpub/pr/include/md/_os2_errors.h

    diff -urN vbox-trunk-bk\src\libs\xpcom18a4/nsprpub/pr/include/md/_os2_errors.h vbox-trunk\src\libs\xpcom18a4/nsprpub/pr/include/md/_os2_errors.h
    old new  
    109109NSPR_API(void) _MD_os2_map_sendto_error(PRInt32 err);
    110110#define _PR_MD_MAP_SENDTO_ERROR _MD_os2_map_sendto_error
    111111
    112 NSPR_API(void) _MD_os2_map_writev_error(int err);
     112NSPR_API(void) _MD_os2_map_writev_error(PRInt32 err); // int
    113113#define _PR_MD_MAP_WRITEV_ERROR _MD_os2_map_writev_error
    114114
    115115NSPR_API(void) _MD_os2_map_accept_error(PRInt32 err);
     
    131131#define _PR_MD_MAP_SHUTDOWN_ERROR       _MD_os2_map_shutdown_error
    132132
    133133#ifndef XP_OS2_VACPP
    134 NSPR_API(void) _MD_os2_map_socketpair_error(int err);
     134NSPR_API(void) _MD_os2_map_socketpair_error(PRInt32 err); // int
    135135#define _PR_MD_MAP_SOCKETPAIR_ERROR     _MD_os2_map_socketpair_error
    136136#endif
    137137
     
    156156NSPR_API(void) _MD_os2_map_select_error(PRInt32 err);
    157157#define _PR_MD_MAP_SELECT_ERROR _MD_os2_map_select_error
    158158
    159 NSPR_API(void) _MD_os2_map_lockf_error(int err);
     159NSPR_API(void) _MD_os2_map_lockf_error(PRInt32 err); // int
    160160#define _PR_MD_MAP_LOCKF_ERROR  _MD_os2_map_lockf_error
    161161
    162162#endif /* nspr_os2_errors_h___ */
  • \src\libs\xpcom18a4/nsprpub/pr/src/md/os2/os2sock.c

    diff -urN vbox-trunk-bk\src\libs\xpcom18a4/nsprpub/pr/src/md/os2/os2sock.c vbox-trunk\src\libs\xpcom18a4/nsprpub/pr/src/md/os2/os2sock.c
    old new  
    639639{
    640640    PRInt32 rv, err;
    641641
    642     rv = socketpair(af, type, flags, osfd);
     642    rv = socketpair(af, type, flags, (int *)osfd);
    643643    if (rv < 0) {
    644644        err = _MD_ERRNO();
    645645        _PR_MD_MAP_SOCKETPAIR_ERROR(err);
  • \src\libs\xpcom18a4/nsprpub/pr/src/misc/prinit.c

    diff -urN vbox-trunk-bk\src\libs\xpcom18a4/nsprpub/pr/src/misc/prinit.c vbox-trunk\src\libs\xpcom18a4/nsprpub/pr/src/misc/prinit.c
    old new  
    748748#ifndef _PR_MD_CREATE_PROCESS_DETACHED
    749749    PRProcess *process;
    750750    PRStatus rv;
    751 s
     751
    752752#ifdef XP_OS2
    753753    process = _PR_CreateOS2ProcessEx(path, argv, envp, attr, PR_TRUE);
    754754#else
  • \src\libs\xpcom18a4/python/Makefile.kmk

    diff -urN vbox-trunk-bk\src\libs\xpcom18a4/python/Makefile.kmk vbox-trunk\src\libs\xpcom18a4/python/Makefile.kmk
    old new  
    5050 endif
    5151
    5252else
    53  # Use the script.
    54  $(eval $(subst |,$(NL),$(shell $(VBOX_BLD_PYTHON) \
    55         $(PATH_SUB_CURRENT)/gen_python_deps.py \
    56             $(KBUILD_TARGET) \
    57             $(KBUILD_TARGET_ARCH) \
    58             $(VBOX_MULTIPYTHON) )))
     53 ifeq ($(KBUILD_TARGET),os2)
     54  ifneq ($(VBOX_PATH_PYTHON_INC),)
     55    VBOX_PYTHON27_INC = $(VBOX_PATH_PYTHON_INC)
     56    VBOX_PYTHON27_LIB = $(VBOX_LIB_PYTHON)
     57  endif
     58 else
     59  # Use the script.
     60  $(eval $(subst |,$(NL),$(shell $(VBOX_BLD_PYTHON) \
     61         $(PATH_SUB_CURRENT)/gen_python_deps.py \
     62             $(KBUILD_TARGET) \
     63             $(KBUILD_TARGET_ARCH) \
     64             $(VBOX_MULTIPYTHON) )))
     65 endif
    5966endif
    6067
    6168ifndef VBOX_ONLY_SDK
     
    6673VBoxPythonBase_TEMPLATE = XPCOM
    6774VBoxPythonBase_CXXFLAGS = -Wno-write-strings
    6875VBoxPythonBase_DLLSUFF.darwin = .so
     76VBoxPythonBase_DLLSUFF.os2 = .dll
    6977VBoxPythonBase_DEFS     = \
    7078        _IMPL_NS_COM \
    7179        _IMPL_NS_BASE \
     
    102110        src/TypeObject.cpp \
    103111        src/VariantUtils.cpp
    104112VBoxPythonBase_LIBS     = \
    105         $(PATH_STAGE_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
    106         $(PATH_STAGE_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
     113        $(PATH_STAGE_LIB)/VBoxCOM$(VBOX_SUFF_LIB)
     114
     115ifn1of ($(KBUILD_TARGET),os2)
     116 VBoxPythonBase_LIBS    += $(PATH_STAGE_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
     117else
     118 VBoxPythonBase_LIBS    += $(PATH_STAGE_BIN)/VBoxXCOM$(VBOX_SUFF_DLL)
     119endif
    107120
    108121# 32-bit base.
    109122VBoxPythonBase_x86_TEMPLATE = XPCOM-x86
     
    124137VBoxPython2_3_TEMPLATE   = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX104,)
    125138VBoxPython2_3_INCS       = $(VBOX_PYTHON23_INC)
    126139VBoxPython2_3_LIBS       = $(VBOX_PYTHON23_LIB)
     140VBoxPython2_3_NAME.os2   = VBoxPy23
    127141
    128142 ifdef VBOX_WITH_32_ON_64_MAIN_API
    129143DLLS += VBoxPython2_3_x86
     
    144158VBoxPython2_4_EXTENDS_BY = appending
    145159VBoxPython2_4_INCS       = $(VBOX_PYTHON24_INC)
    146160VBoxPython2_4_LIBS       = $(VBOX_PYTHON24_LIB)
     161VBoxPython2_4_NAME.os2   = VBoxPy24
    147162
    148163 ifdef VBOX_WITH_32_ON_64_MAIN_API
    149164DLLS += VBoxPython2_4_x86
     
    163178VBoxPython2_5_EXTENDS_BY = appending
    164179VBoxPython2_5_INCS       = $(VBOX_PYTHON25_INC)
    165180VBoxPython2_5_LIBS       = $(VBOX_PYTHON25_LIB)
     181VBoxPython2_5_NAME.os2   = VBoxPy25
    166182
    167183 ifdef VBOX_WITH_32_ON_64_MAIN_API
    168184DLLS += VBoxPython2_5_x86
     
    183199VBoxPython2_6_TEMPLATE   = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin" && "$(VBOX_DEF_MACOSX_VERSION_MIN)" <= "10.6",OSX106,)
    184200VBoxPython2_6_INCS       = $(VBOX_PYTHON26_INC)
    185201VBoxPython2_6_LIBS       = $(VBOX_PYTHON26_LIB)
     202VBoxPython2_6_NAME.os2   = VBoxPy26
    186203
    187204 ifdef VBOX_WITH_32_ON_64_MAIN_API
    188205DLLS += VBoxPython2_6_x86
     
    204221VBoxPython2_7_TEMPLATE   = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin" && "$(VBOX_DEF_MACOSX_VERSION_MIN)" <= "10.7",OSX107,)
    205222VBoxPython2_7_INCS       = $(VBOX_PYTHON27_INC)
    206223VBoxPython2_7_LIBS       = $(VBOX_PYTHON27_LIB)
     224VBoxPython2_7_NAME.os2   = VBoxPy27
    207225
    208226 ifdef VBOX_WITH_32_ON_64_MAIN_API
    209227DLLS += VBoxPython2_7_x86
  • \src\libs\xpcom18a4/python/src/module/_xpcom.cpp

    diff -urN vbox-trunk-bk\src\libs\xpcom18a4/python/src/module/_xpcom.cpp vbox-trunk\src\libs\xpcom18a4/python/src/module/_xpcom.cpp
    old new  
    8383#  define MANGLE_MODULE_INIT(a_Name)    RT_CONCAT(a_Name, MODULE_NAME_SUFFIX)
    8484# endif
    8585# ifdef VBOX_PYXPCOM_VERSIONED
    86 #  if   PY_VERSION_HEX >= 0x02080000
    87 #   define MODULE_NAME    MANGLE_MODULE_NAME("VBoxPython2_8")
    88 #   define initVBoxPython MANGLE_MODULE_INIT(initVBoxPython2_8)
    89 
    90 #  elif PY_VERSION_HEX >= 0x02070000
    91 #   define MODULE_NAME    MANGLE_MODULE_NAME("VBoxPython2_7")
    92 #   define initVBoxPython MANGLE_MODULE_INIT(initVBoxPython2_7)
    93 
    94 #  elif PY_VERSION_HEX >= 0x02060000
    95 #   define MODULE_NAME    MANGLE_MODULE_NAME("VBoxPython2_6")
    96 #   define initVBoxPython MANGLE_MODULE_INIT(initVBoxPython2_6)
    97 
    98 #  elif PY_VERSION_HEX >= 0x02050000
    99 #   define MODULE_NAME    MANGLE_MODULE_NAME("VBoxPython2_5")
    100 #   define initVBoxPython MANGLE_MODULE_INIT(initVBoxPython2_5)
    101 
    102 #  elif PY_VERSION_HEX >= 0x02040000
    103 #   define MODULE_NAME    MANGLE_MODULE_NAME("VBoxPython2_4")
    104 #   define initVBoxPython MANGLE_MODULE_INIT(initVBoxPython2_4)
    105 
    106 #  elif PY_VERSION_HEX >= 0x02030000
    107 #   define MODULE_NAME    MANGLE_MODULE_NAME("VBoxPython2_3")
    108 #   define initVBoxPython MANGLE_MODULE_INIT(initVBoxPython2_3)
     86#  ifndef XP_OS2
     87#   if   PY_VERSION_HEX >= 0x02080000
     88#    define MODULE_NAME    MANGLE_MODULE_NAME("VBoxPython2_8")
     89#    define initVBoxPython MANGLE_MODULE_INIT(initVBoxPython2_8)
     90
     91#   elif PY_VERSION_HEX >= 0x02070000
     92#    define MODULE_NAME    MANGLE_MODULE_NAME("VBoxPython2_7")
     93#    define initVBoxPython MANGLE_MODULE_INIT(initVBoxPython2_7)
     94
     95#   elif PY_VERSION_HEX >= 0x02060000
     96#    define MODULE_NAME    MANGLE_MODULE_NAME("VBoxPython2_6")
     97#    define initVBoxPython MANGLE_MODULE_INIT(initVBoxPython2_6)
     98
     99#   elif PY_VERSION_HEX >= 0x02050000
     100#    define MODULE_NAME           MANGLE_MODULE_NAME("VBoxPython2_5")
     101#    define initVBoxPython MANGLE_MODULE_INIT(initVBoxPython2_5)
     102
     103#   elif PY_VERSION_HEX >= 0x02040000
     104#    define MODULE_NAME    MANGLE_MODULE_NAME("VBoxPython2_4")
     105#    define initVBoxPython MANGLE_MODULE_INIT(initVBoxPython2_4)
     106
     107#   elif PY_VERSION_HEX >= 0x02030000
     108#    define MODULE_NAME    MANGLE_MODULE_NAME("VBoxPython2_3")
     109#    define initVBoxPython MANGLE_MODULE_INIT(initVBoxPython2_3)
     110#   else
     111#    error "Fix module versioning."
     112#   endif
    109113#  else
    110 #   error "Fix module versioning."
     114#   if   PY_VERSION_HEX >= 0x02080000
     115#    define MODULE_NAME    MANGLE_MODULE_NAME("VBoxPy28")
     116#    define initVBoxPython MANGLE_MODULE_INIT(initVBoxPy28)
     117
     118#   elif PY_VERSION_HEX >= 0x02070000
     119#    define MODULE_NAME    MANGLE_MODULE_NAME("VBoxPy27")
     120#    define initVBoxPython MANGLE_MODULE_INIT(initVBoxPy27)
     121
     122#   elif PY_VERSION_HEX >= 0x02060000
     123#    define MODULE_NAME    MANGLE_MODULE_NAME("VBoxPy26")
     124#    define initVBoxPython MANGLE_MODULE_INIT(initVBoxPy26)
     125
     126#   elif PY_VERSION_HEX >= 0x02050000
     127#    define MODULE_NAME    MANGLE_MODULE_NAME("VBoxPy25")
     128#    define initVBoxPython MANGLE_MODULE_INIT(initVBoxPy25)
     129
     130#   elif PY_VERSION_HEX >= 0x02040000
     131#    define MODULE_NAME    MANGLE_MODULE_NAME("VBoxPy24")
     132#    define initVBoxPython MANGLE_MODULE_INIT(initVBoxPy24)
     133
     134#   elif PY_VERSION_HEX >= 0x02030000
     135#    define MODULE_NAME    MANGLE_MODULE_NAME("VBoxPy23")
     136#    define initVBoxPython MANGLE_MODULE_INIT(initVBoxPy23)
     137#   else
     138#    error "Fix module versioning."
     139#   endif
    111140#  endif
    112141# else
    113142#  define MODULE_NAME     MANGLE_MODULE_NAME("VBoxPython")
  • \src\libs\xpcom18a4/xpcom/threads/plevent.c

    diff -urN vbox-trunk-bk\src\libs\xpcom18a4/xpcom/threads/plevent.c vbox-trunk\src\libs\xpcom18a4/xpcom/threads/plevent.c
    old new  
    3939#include <windows.h>
    4040#endif
    4141
    42 #if defined(XP_OS2)
     42#if defined(XP_OS2) && !defined(QT_CORE_LIB)
    4343#define INCL_DOS
    4444#define INCL_DOSERRORS
     45#if defined(OS2_PM_EVENT_QUEUES)
    4546#define INCL_WIN
     47#endif
    4648#include <os2.h>
     49#if defined(OS2_PM_EVENT_QUEUES)
    4750#define DefWindowProc WinDefWindowProc
     51#endif
     52#elif defined(XP_OS2) && defined(QT_CORE_LIB)
     53#include <prtypes.h>
    4854#endif /* XP_OS2 */
    4955
    5056#include "nspr.h"
     
    5359#if !defined(WIN32)
    5460#include <errno.h>
    5561#include <stddef.h>
    56 #if !defined(XP_OS2)
     62//#if !defined(XP_OS2)
    5763#include <unistd.h>
    58 #endif /* !XP_OS2 */
     64//#endif /* !XP_OS2 */
    5965#endif /* !Win32 */
    6066
    61 #if defined(XP_UNIX)
     67#if defined(XP_UNIX) || ( defined(XP_OS2) && !defined(OS2_PM_EVENT_QUEUES) )
    6268/* for fcntl */
    6369#include <sys/types.h>
    6470#include <fcntl.h>
     
    153159    PRPackedBool        timerSet;
    154160#endif
    155161
    156 #if defined(XP_UNIX) && !defined(XP_MACOSX)
     162#if ( defined(XP_UNIX) && !defined(XP_MACOSX) ) || ( defined(XP_OS2) && !defined(OS2_PM_EVENT_QUEUES) )
    157163#if defined(VMS)
    158164    int                 efn;
    159165#else
     
    161167#endif
    162168    PLGetEventIDFunc    idFunc;
    163169    void*               idFuncClosure;
    164 #elif defined(_WIN32) || defined(XP_OS2)
     170#elif defined(_WIN32) || ( defined(XP_OS2) && defined(OS2_PM_EVENT_QUEUES) )
    165171    HWND                eventReceiverWindow;
    166172    PRBool              removeMsg;
    167173#elif defined(XP_BEOS)
     
    189195static PRInt32     _pl_GetEventCount(PLEventQueue* self);
    190196
    191197
    192 #if defined(_WIN32) || defined(XP_OS2)
     198#if defined(_WIN32) || ( defined(XP_OS2) && defined(OS2_PM_EVENT_QUEUES) )
    193199#if defined(XP_OS2)
    194200ULONG _pr_PostEventMsgId;
    195201#else
     
    255261#if defined(_WIN32)
    256262    self->timerSet = PR_FALSE;
    257263#endif
    258 #if defined(_WIN32) || defined(XP_OS2)
     264#if defined(_WIN32) || ( defined(XP_OS2) && defined(OS2_PM_EVENT_QUEUES) )
    259265    self->removeMsg = PR_TRUE;
    260266#endif
    261267
     
    337343    mon = self->monitor;
    338344    PR_EnterMonitor(mon);
    339345
    340 #if defined(XP_UNIX) && !defined(XP_MACOSX)
     346#if ( defined(XP_UNIX) && !defined(XP_MACOSX) ) || ( defined(XP_OS2) && !defined(OS2_PM_EVENT_QUEUES) )
    341347    if (self->idFunc && event)
    342348        event->id = self->idFunc(self->idFuncClosure);
    343349#endif
     
    662668    self->handled = PR_FALSE;
    663669    self->lock = NULL;
    664670    self->condVar = NULL;
    665 #if defined(XP_UNIX) && !defined(XP_MACOSX)
     671#if ( defined(XP_UNIX) && !defined(XP_MACOSX) ) || ( defined(XP_OS2) && !defined(OS2_PM_EVENT_QUEUES) )
    666672    self->id = 0;
    667673#endif
    668674}
     
    851857    PR_LOG(event_lm, PR_LOG_DEBUG,
    852858           ("$$$ Allocated event flag %d", self->efn));
    853859    return PR_SUCCESS;
    854 #elif defined(XP_UNIX) && !defined(XP_MACOSX)
     860#elif ( defined(XP_UNIX) && !defined(XP_MACOSX) ) || ( defined(XP_OS2) && !defined(OS2_PM_EVENT_QUEUES) )
    855861    int err;
    856862    int flags;
    857863
    858864    self->idFunc = 0;
    859865    self->idFuncClosure = 0;
    860866
     867#ifndef XP_OS2
    861868    err = pipe(self->eventPipe);
     869#else
     870    /* use a pair for local sockets for non-blocking case,
     871     * and for use with select(), instead of a pipe
     872     */
     873    err = socketpair(AF_LOCAL, SOCK_STREAM, 0, (int *)self->eventPipe);
     874#endif
    862875    if (err != 0) {
    863876        return PR_FAILURE;
    864877    }
     
    867880    fcntl(self->eventPipe[1], F_SETFD, FD_CLOEXEC);
    868881#endif
    869882
     883#ifndef XP_OS2
    870884    /* make the pipe nonblocking */
    871885    flags = fcntl(self->eventPipe[0], F_GETFL, 0);
    872886    if (flags == -1) {
     
    884898    if (err == -1) {
    885899        goto failed;
    886900    }
     901#else
     902    int val;
     903    /* make the pipe nonblocking */
     904    val = 1;
     905    err = os2_ioctl(self->eventPipe[0], FIONBIO, (char *)&val, sizeof(val));
     906    if (err == -1) {
     907        goto failed;
     908    }
     909    val = 1;
     910    err = os2_ioctl(self->eventPipe[1], FIONBIO, (char *)&val, sizeof(val));
     911    if (err == -1) {
     912        goto failed;
     913    }
     914#endif
    887915    return PR_SUCCESS;
    888916
    889917failed:
     
    929957           ("$$$ Freeing event flag %d", self->efn));
    930958        status = LIB$FREE_EF(&self->efn);
    931959    }
    932 #elif defined(XP_UNIX) && !defined(XP_MACOSX)
     960#elif ( defined(XP_UNIX) && !defined(XP_MACOSX) ) || ( defined(XP_OS2) && !defined(OS2_PM_EVENT_QUEUES) )
    933961    close(self->eventPipe[0]);
    934962    close(self->eventPipe[1]);
    935963#elif defined(_WIN32)
     
    945973     */
    946974    SendMessage(self->eventReceiverWindow, WM_CLOSE, 0, 0);
    947975
    948 #elif defined(XP_OS2)
     976#elif defined(XP_OS2) && defined(OS2_PM_EVENT_QUEUES)
    949977    WinDestroyWindow(self->eventReceiverWindow);
    950978#elif defined(MAC_USE_CFRUNLOOPSOURCE)
    951979
     
    11911219#endif
    11921220
    11931221
    1194 #if defined(XP_OS2)
     1222#if defined(XP_OS2) && defined(OS2_PM_EVENT_QUEUES)
    11951223static PRStatus
    11961224_pl_NativeNotify(PLEventQueue* self)
    11971225{
     
    12131241    status = SYS$SETEF(self->efn);
    12141242    return ($VMS_STATUS_SUCCESS(status)) ? PR_SUCCESS : PR_FAILURE;
    12151243}/* --- end _pl_NativeNotify() --- */
    1216 #elif defined(XP_UNIX) && !defined(XP_MACOSX)
     1244#elif ( defined(XP_UNIX) && !defined(XP_MACOSX) ) || ( defined(XP_OS2) && !defined(OS2_PM_EVENT_QUEUES) )
    12171245
    12181246static PRStatus
    12191247_pl_NativeNotify(PLEventQueue* self)
     
    12891317static PRStatus
    12901318_pl_AcknowledgeNativeNotify(PLEventQueue* self)
    12911319{
    1292 #if defined(_WIN32) || defined(XP_OS2)
     1320#if defined(_WIN32) || ( defined(XP_OS2) && defined(OS2_PM_EVENT_QUEUES) )
    12931321#ifdef XP_OS2
    12941322    QMSG aMsg;
    12951323#else
     
    13271355    */
    13281356    sys$clref(self->efn);
    13291357    return PR_SUCCESS;
    1330 #elif defined(XP_UNIX) && !defined(XP_MACOSX)
     1358#elif ( defined(XP_UNIX) && !defined(XP_MACOSX) ) || ( defined(XP_OS2) && !defined(OS2_PM_EVENT_QUEUES) )
    13311359
    13321360    PRInt32 count;
    13331361    unsigned char c;
     
    13601388
    13611389#if defined(VMS)
    13621390    return -(self->efn);
    1363 #elif defined(XP_UNIX) && !defined(XP_MACOSX)
     1391#elif ( defined(XP_UNIX) && !defined(XP_MACOSX) ) || ( defined(XP_OS2) && !defined(OS2_PM_EVENT_QUEUES) )
    13641392    return self->eventPipe[0];
    13651393#else
    13661394    return -1;    /* other platforms don't handle this (yet) */
     
    14201448#endif
    14211449
    14221450
    1423 #if defined(_WIN32) || defined(XP_OS2)
     1451#if defined(_WIN32) || ( defined(XP_OS2) && defined(OS2_PM_EVENT_QUEUES) )
    14241452#ifdef XP_OS2
    14251453MRESULT EXPENTRY
    14261454_md_EventReceiverProc(HWND hwnd, ULONG uMsg, MPARAM wParam, MPARAM lParam)
     
    15161544} /* end _md_CreateEventQueue() */
    15171545#endif /* Winxx */
    15181546
    1519 #if defined(XP_OS2)
     1547#if defined(XP_OS2) && defined(OS2_PM_EVENT_QUEUES)
    15201548/*
    15211549** _md_CreateEventQueue() -- ModelDependent initializer
    15221550*/
     
    15651593} /* end _md_CreateEventQueue() */
    15661594#endif /* XP_OS2 */
    15671595
    1568 #if (defined(XP_UNIX) && !defined(XP_MACOSX)) || defined(XP_BEOS)
     1596#if ( defined(XP_UNIX) && !defined(XP_MACOSX) ) || defined(XP_BEOS) || \
     1597    ( defined(XP_OS2) && !defined(OS2_PM_EVENT_QUEUES) )
    15691598/*
    15701599** _md_CreateEventQueue() -- ModelDependent initializer
    15711600*/
     
    16781707
    16791708/* extra functions for unix */
    16801709
    1681 #if defined(XP_UNIX) && !defined(XP_MACOSX)
     1710#if ( defined(XP_UNIX) && !defined(XP_MACOSX) ) || ( defined(XP_OS2) && !defined(OS2_PM_EVENT_QUEUES) )
    16821711
    16831712PR_IMPLEMENT(PRInt32)
    16841713PL_ProcessEventsBeforeID(PLEventQueue *aSelf, unsigned long aID)
  • \src\libs\xpcom18a4/xpcom/threads/plevent.h

    diff -urN vbox-trunk-bk\src\libs\xpcom18a4/xpcom/threads/plevent.h vbox-trunk\src\libs\xpcom18a4/xpcom/threads/plevent.h
    old new  
    194194/* For HWND */
    195195#if defined(XP_WIN32)
    196196#include <windef.h>
    197 #elif defined(XP_OS2)
     197#elif defined(XP_OS2) && !defined(QT_CORE_LIB)
    198198#define INCL_DOSMISC
    199199#define INCL_DOSPROCESS
    200200#define INCL_DOSERRORS
    201201#include <os2.h>
     202#elif defined(XP_OS2) && defined(QT_CORE_LIB)
     203#include <prtypes.h>
    202204#endif
    203205
    204206#ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
     
    541543#ifdef PL_POST_TIMINGS
    542544    PRIntervalTime      postTime;
    543545#endif
    544 #ifdef XP_UNIX
     546#if defined(XP_UNIX) || ( defined(XP_OS2) && !defined(OS2_PM_EVENT_QUEUES) )
    545547    unsigned long       id;
    546548#endif /* XP_UNIX */
    547549    /* other fields follow... */
     
    553555** Returns the event queue associated with the main thread.
    554556**
    555557*/
    556 #if defined(XP_WIN) || defined(XP_OS2)
     558#if defined(XP_WIN) || ( defined(XP_OS2) && defined(OS2_PM_EVENT_QUEUES) )
    557559/* -----------------------------------------------------------------------
    558560** FUNCTION: PL_GetNativeEventReceiverWindow()
    559561**
     
    577579    );
    578580#endif /* XP_WIN || XP_OS2 */
    579581
    580 #ifdef XP_UNIX
     582#if defined(XP_UNIX) || ( defined(XP_OS2) && !defined(OS2_PM_EVENT_QUEUES) )
    581583/* -----------------------------------------------------------------------
    582584** FUNCTION: PL_ProcessEventsBeforeID()
    583585**