Landing static build changes for OS2

Thanks to Javier Pedemonte <pedemont@us.ibm.com> for the patch.
Bug #85283 r=mkaply r=waterson
This commit is contained in:
cls%seawood.org 2001-07-01 12:11:13 +00:00
parent eb0e9664d4
commit 66d937045b
30 changed files with 483 additions and 471 deletions

View File

@ -232,7 +232,7 @@ else
ALL_TRASH = \
$(GARBAGE) $(TARGETS) $(OBJS) $(PROGOBJS) LOGS TAGS a.out \
$(HOST_PROGOBJS) $(HOST_OBJS) $(IMPORT_LIBRARY) $(DEF_FILE)\
so_locations _gen _stubs $(wildcard *.res) \
$(EXE_DEF_FILE) so_locations _gen _stubs $(wildcard *.res) \
$(wildcard gts_tmp_*) $(LIBRARY:%.a=.%.timestamp)
ALL_TRASH_DIRS = \
$(GARBAGE_DIRS)
@ -641,9 +641,9 @@ alltags:
# PROGRAM = Foo
# creates OBJS, links with LIBS to create Foo
#
$(PROGRAM): $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in
$(PROGRAM): $(PROGOBJS) $(EXTRA_DEPS) $(EXE_DEF_FILE) Makefile Makefile.in
ifeq ($(MOZ_OS2_TOOLS),VACPP)
$(LD) -OUT:$@ $(LDFLAGS) $(OS_LFLAGS) $(PROGOBJS) $(LIBS) $(EXTRA_LIBS) -MAP:$(@:.exe=.map) $(OS_LIBS) /ST:0x1000000
$(LD) -OUT:$@ $(LDFLAGS) $(OS_LFLAGS) $(PROGOBJS) $(LIBS) $(EXTRA_LIBS) -MAP:$(@:.exe=.map) $(OS_LIBS) $(EXE_DEF_FILE) /ST:0x1000000
else
ifeq ($(CPP_PROG_LINK),1)
$(CCC) -o $@ $(CXXFLAGS) $(WRAP_MALLOC_CFLAGS) $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS)
@ -743,7 +743,10 @@ endif
@rm -f foodummyfilefoo $(SUB_LOBJS)
else # OS2
ifdef SHARED_LIBRARY
ifdef SHARED_LIBRARY_LIBS
SUB_LOBJS = $(SHARED_LIBRARY_LIBS)
endif
$(DEF_FILE): $(DEF_OBJS)
rm -f $@
@cmd /C "echo LIBRARY $(LIBRARY_NAME) INITINSTANCE TERMINSTANCE >$(DEF_FILE)"
@ -761,18 +764,18 @@ else
$(FILTER) $(DEF_OBJS) >> $(DEF_FILE)
endif
$(ADD_TO_DEF_FILE)
$(IMPORT_LIBRARY): $(OBJS) $(DEF_FILE)
rm -f $@
$(MAKE_DEF_FILE)
$(IMPLIB) $@ $(DEF_FILE)
$(RANLIB) $@
else
$(LIBRARY): $(OBJS)
$(LIBRARY): $(OBJS) $(LOBJS) $(SHARED_LIBRARY_LIBS) Makefile Makefile.in
rm -f $@
$(AR) $(AR_FLAGS) $(LIBOBJS)
$(AR) $(AR_FLAGS) $(OBJS) $(LOBJS) $(SUB_LOBJS)
$(RANLIB) $@
endif
endif
$(HOST_LIBRARY): $(HOST_OBJS) Makefile
rm -f $@

688
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -874,11 +874,6 @@ case "$target" in
LD='$(CC)'
DSO_CFLAGS=''
DSO_PIC_CFLAGS=''
MOZ_JPEG_LIBS='$(DIST)/lib/mozjpeg.$(LIB_SUFFIX)'
MOZ_ZLIB_LIBS='$(DIST)/lib/mozz.$(LIB_SUFFIX)'
MOZ_PNG_LIBS='$(DIST)/lib/mozpng.$(LIB_SUFFIX)'
MOZ_MNG_LIBS='$(DIST)/lib/mozmng.$(LIB_SUFFIX)'
MOZ_JS_LIBS='$(DIST)/lib/mozjs.lib'
OS_ARCH=OS2
OS_TARGET=OS2
@ -924,8 +919,6 @@ case "$target" in
AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES)
AC_DEFINE(STDC_HEADERS)
MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)'
MOZ_COMPONENT_XPCOM_LIBS='$(DIST)/lib/xpcom.lib'
XPCOM_LIBS='$(DIST)/lib/xpcom.lib'
MKSHLIB='$(LD) $(DSO_LDOPTS)'
MKCSHLIB='$(LD) $(DSO_LDOPTS)'
;;
@ -4055,6 +4048,27 @@ case "$target" in
fi
AC_SUBST(AIX_SHLIB_BIN)
;;
*-os2*)
if test "${NO_STATIC_LIB}" = "1"; then
MOZ_JS_LIBS='$(DIST)/lib/mozjs.lib'
MOZ_COMPONENT_XPCOM_LIBS='$(DIST)/lib/xpcom.lib'
XPCOM_LIBS='$(DIST)/lib/xpcom.lib'
MOZ_JPEG_LIBS='$(DIST)/lib/mozjpeg.$(LIB_SUFFIX)'
MOZ_ZLIB_LIBS='$(DIST)/lib/mozz.$(LIB_SUFFIX)'
MOZ_PNG_LIBS='$(DIST)/lib/mozpng.$(LIB_SUFFIX)'
MOZ_MNG_LIBS='$(DIST)/lib/mozmng.$(LIB_SUFFIX)'
else
MOZ_JS_LIBS='$(DIST)/lib/libmozjs.lib'
MOZ_COMPONENT_XPCOM_LIBS='$(DIST)/lib/libxpcom.lib'
XPCOM_LIBS='$(DIST)/lib/libxpcom.lib'
MOZ_JPEG_LIBS='$(DIST)/lib/libmozjpeg.$(LIB_SUFFIX)'
MOZ_ZLIB_LIBS='$(DIST)/lib/libmozz.$(LIB_SUFFIX)'
MOZ_PNG_LIBS='$(DIST)/lib/libmozpng.$(LIB_SUFFIX)'
MOZ_MNG_LIBS='$(DIST)/lib/libmozmng.$(LIB_SUFFIX)'
fi
;;
esac
dnl ========================================================

View File

@ -33,21 +33,6 @@ REQUIRES = js xpcom string windowwatcher jsconsole find embed_base dom txtsvc
CPPSRCS = nsModule.cpp
ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
EXTRA_DSO_LIBS = \
windowwatcher_s \
jsconsole_s \
appstartupnotifier_s \
find_s \
$(NULL)
ifdef MOZ_PERF_METRICS
EXTRA_DSO_LIBS += mozutil_s
endif
else
SHARED_LIBRARY_LIBS = \
$(DIST)/lib/libwindowwatcher_s.$(LIB_SUFFIX) \
$(DIST)/lib/libappstartupnotifier_s.$(LIB_SUFFIX) \
@ -59,8 +44,6 @@ ifdef MOZ_PERF_METRICS
SHARED_LIBRARY_LIBS += $(DIST)/lib/libmozutil_s.$(LIB_SUFFIX)
endif
endif
LOCAL_INCLUDES = \
-I$(srcdir)/../windowwatcher/src \
-I$(srcdir)/../appstartup/src \

View File

@ -71,8 +71,8 @@ nsDeviceContextOS2 :: nsDeviceContextOS2()
#ifdef XP_OS2 // OS2TODO - GET RID OF THIS!
// Init module if necessary
if( !gModuleData.hpsScreen)
gModuleData.Init();
if( !gGfxModuleData.hpsScreen)
gGfxModuleData.Init();
#endif
// The first time in we initialize gIsWarp4 flag

View File

@ -810,7 +810,7 @@ HDC ps = NULL;
} /* endif */
} /* endif */
} /* endfor */
// fh->fattrs.usCodePage = gModuleData.ulCodepage;
// fh->fattrs.usCodePage = gGfxModuleData.ulCodepage;
// 7) Find the point size for the font, and set up the charbox too
float app2dev, app2twip, twip2dev;

View File

@ -198,7 +198,7 @@ nsGfxModuleData::~nsGfxModuleData()
::WinReleasePS( hpsScreen);
}
nsGfxModuleData gModuleData;
nsGfxModuleData gGfxModuleData;
int WideCharToMultiByte( int CodePage, const PRUnichar *pText, ULONG ulLength, char* szBuffer, ULONG ulSize )
{

View File

@ -119,7 +119,7 @@ BOOL ExtTextOut(HPS aPS, int X, int Y, UINT fuOptions, const RECTL* lprc,
BOOL IsDBCS();
extern nsGfxModuleData gModuleData;
extern nsGfxModuleData gGfxModuleData;
#ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b))

View File

@ -34,14 +34,6 @@ MODULE_NAME = nsParserModule
SHORT_LIBNAME = gkparser
REQUIRES = xpcom string necko util uconv expat layout dom unicharutil pref nkcache
ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
EXTRA_DSO_LIBS = expat_s xmltok_s
ifdef MOZ_PERF_METRICS
EXTRA_DSO_LIBS += mozutil_s
endif
else
SHARED_LIBRARY_LIBS = \
$(DIST)/lib/libexpat_s.$(LIB_SUFFIX) \
$(DIST)/lib/libxmltok_s.$(LIB_SUFFIX) \
@ -51,9 +43,6 @@ ifdef MOZ_PERF_METRICS
SHARED_LIBRARY_LIBS += $(DIST)/lib/libmozutil_s.$(LIB_SUFFIX)
endif
endif
CPPSRCS = \
nsDTDUtils.cpp \
nsHTMLTokenizer.cpp \

View File

@ -28,7 +28,7 @@ LIBRARY_NAME = nslocale
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
MODULE_NAME = nsLocaleModule
EXTRA_DSO_LIBS = nslocale_s
REQUIRES = xpcom string unicharutil pref uconv
CPPSRCS = \
@ -40,14 +40,15 @@ CPPSRCS = \
nsLocaleModule.cpp \
$(NULL)
EXTRA_DSO_LDOPTS = $(EXTRA_DSO_LIBS) \
EXTRA_DSO_LDOPTS += \
$(MOZ_COMPONENT_LIBS) \
$(NULL)
ifeq ($(MOZ_OS2_TOOLS),VACPP)
EXTRA_DSO_LDOPTS += libuls.$(LIB_SUFFIX) ../libnslocale_s.$(LIB_SUFFIX)
EXTRA_DSO_LDOPTS += libuls.lib
SHARED_LIBRARY_LIBS += ../libnslocale_s.lib
else
EXTRA_DSO_LDOPTS += -llibuni
SHARED_LIBRARY_LIBS += -llibuni -L.. -lnslocale_s
endif
include $(topsrcdir)/config/rules.mk

View File

@ -34,6 +34,7 @@
#include "nsString.h"
#include "nsCOMPtr.h"
#include "nsIModule.h"
#include "nsIGenericFactory.h"
#include "nsIComponentManager.h"
#include "nsIFactory.h"
@ -262,9 +263,10 @@ nsLocaleModule::RegisterSelf(nsIComponentManager *aCompMgr,
Components* cp = gComponents;
Components* end = cp + NUM_COMPONENTS;
while (cp < end) {
rv = aCompMgr->RegisterComponentSpec(*cp->mCID, cp->mDescription,
cp->mContractID, aPath, PR_TRUE,
PR_TRUE);
rv = aCompMgr->RegisterComponentWithType(*cp->mCID, cp->mDescription,
cp->mContractID, aPath,
registryLocation, PR_TRUE,
PR_TRUE, componentType);
if (NS_FAILED(rv)) {
#ifdef DEBUG
printf("nsLocaleModule: unable to register %s component => %x\n",
@ -316,9 +318,10 @@ nsLocaleModule::CanUnload(nsIComponentManager *aCompMgr, PRBool *okToUnload)
static nsLocaleModule *gModule = NULL;
extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager *servMgr,
nsIFile* location,
nsIModule** return_cobj)
extern "C" NS_EXPORT
nsresult NSGETMODULE_ENTRY_POINT(nsLocaleModule)(nsIComponentManager *servMgr,
nsIFile* location,
nsIModule** return_cobj)
{
nsresult rv = NS_OK;
@ -332,7 +335,7 @@ extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager *servMgr,
}
// Increase refcnt and store away nsIModule interface to m in return_cobj
rv = m->QueryInterface(nsIModule::GetIID(), (void**)return_cobj);
rv = m->QueryInterface(NS_GET_IID(nsIModule), (void**)return_cobj);
if (NS_FAILED(rv)) {
delete m;
m = nsnull;

View File

@ -136,7 +136,7 @@ include $(topsrcdir)/config/config.mk
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_NSPR_LIBS)
ifeq ($(OS_ARCH),OS2)
EXTRA_DSO_LDOPTS += $(FDLIBM_LIBRARY)
SHARED_LIBRARY_LIBS += $(FDLIBM_LIBRARY)
endif
# When using gcc the assembly is inlined in the C-file (see jslock.c)

View File

@ -34,14 +34,6 @@ MODULE_NAME = nsParserModule
SHORT_LIBNAME = gkparser
REQUIRES = xpcom string necko util uconv expat layout dom unicharutil pref nkcache
ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
EXTRA_DSO_LIBS = expat_s xmltok_s
ifdef MOZ_PERF_METRICS
EXTRA_DSO_LIBS += mozutil_s
endif
else
SHARED_LIBRARY_LIBS = \
$(DIST)/lib/libexpat_s.$(LIB_SUFFIX) \
$(DIST)/lib/libxmltok_s.$(LIB_SUFFIX) \
@ -51,9 +43,6 @@ ifdef MOZ_PERF_METRICS
SHARED_LIBRARY_LIBS += $(DIST)/lib/libmozutil_s.$(LIB_SUFFIX)
endif
endif
CPPSRCS = \
nsDTDUtils.cpp \
nsHTMLTokenizer.cpp \

View File

@ -299,10 +299,10 @@ extern "C" nsresult NS_CreateAppshell( nsIAppShell **aAppShell)
*aAppShell = pManager->GetAppshell();
// only do this the very first time
if (gModuleData == nsnull)
if (gWidgetModuleData == nsnull)
{
gModuleData = new nsWidgetModuleData();
gModuleData->Init(*aAppShell);
gWidgetModuleData = new nsWidgetModuleData();
gWidgetModuleData->Init(*aAppShell);
}
return NS_OK;

View File

@ -111,7 +111,7 @@ PRBool nsCanvas::OnReposition( PSWP pSwp)
if( mIsTLB)
{
if( pSwp->fl & SWP_MOVE && !(pSwp->fl & SWP_MINIMIZE))
rc = OnMove( pSwp->x, gModuleData->szScreen.cy - pSwp->y - pSwp->cy);
rc = OnMove( pSwp->x, gWidgetModuleData->szScreen.cy - pSwp->y - pSwp->cy);
if( pSwp->fl & SWP_SIZE && !(pSwp->fl & SWP_MINIMIZE))
rc = OnResize( pSwp->cx, pSwp->cy);
}

View File

@ -64,7 +64,7 @@ nsClipboard::nsClipboard() : nsBaseClipboard()
for (int cnt=0 ; cnt < sizeof(formatEntries) / sizeof(formatEntries[0]) ; cnt++)
{
if (formatEntries[cnt].ulClipboardFmt == 0) // Not yet registered
formatEntries[cnt].ulClipboardFmt = gModuleData->GetAtom( formatEntries[cnt].szFmtName );
formatEntries[cnt].ulClipboardFmt = gWidgetModuleData->GetAtom( formatEntries[cnt].szFmtName );
}
}
@ -141,7 +141,7 @@ PRBool nsClipboard::GetClipboardDataByID(ULONG ulFormatID, const char *aFlavor)
pTempBuf = nsMemory::Alloc( NumOfBytes + sizeof(UniChar) );
TempBufAllocated = PR_TRUE;
NumOfChars = gModuleData->ConvertToUcs( NS_STATIC_CAST(char*, pDataMem), NS_STATIC_CAST(PRUnichar*, pTempBuf), NumOfChars + 1 );
NumOfChars = gWidgetModuleData->ConvertToUcs( NS_STATIC_CAST(char*, pDataMem), NS_STATIC_CAST(PRUnichar*, pTempBuf), NumOfChars + 1 );
NumOfBytes = NumOfChars * sizeof(UniChar);
pDataMem = pTempBuf;
}
@ -260,7 +260,7 @@ void nsClipboard::SetClipboardData(const char *aFlavor)
if (DosAllocSharedMem( NS_REINTERPRET_CAST(PPVOID, &pByteMem), nsnull, NumOfBytes + 1,
PAG_WRITE | PAG_COMMIT | OBJ_GIVEABLE ) == NO_ERROR)
{
gModuleData->ConvertFromUcs( NS_STATIC_CAST(PRUnichar*, pMozData), pByteMem, NumOfBytes + 1 );
gWidgetModuleData->ConvertFromUcs( NS_STATIC_CAST(PRUnichar*, pMozData), pByteMem, NumOfBytes + 1 );
pByteMem [NumOfBytes] = '\0';
WinSetClipbrdData( 0, NS_REINTERPRET_CAST(ULONG, pByteMem), CF_TEXT, CFI_POINTER );
@ -352,7 +352,7 @@ ULONG nsClipboard::GetFormatID(const char *aMimeStr)
}
}
return gModuleData->GetAtom( aMimeStr ); // Unknown flavor. Register it in OS/2 atom table as is
return gWidgetModuleData->GetAtom( aMimeStr ); // Unknown flavor. Register it in OS/2 atom table as is
}
NS_IMETHODIMP nsClipboard::ForceDataToClipboard(PRInt32 aWhichClipboard)

View File

@ -91,7 +91,7 @@ static void GetTempFile( nsFileSpec &tempfile);
nsDragService::nsDragService() : mDragInfo(0), mDragItems(0)
{
// XXX temporary icon until xptoolkit realises it needs to give us one
mIcon = WinLoadPointer( HWND_DESKTOP, gModuleData->hModResources,
mIcon = WinLoadPointer( HWND_DESKTOP, gWidgetModuleData->hModResources,
ID_ICO_DRAGITEM);
// Window for doing things
@ -178,7 +178,7 @@ nsresult nsDragService::GetData( nsITransferable *aTransferable,
{
nsString *pFlavour = (nsString*) pFormats->ElementAt( i);
char buff[40];
gModuleData->ConvertFromUcs( *pFlavour, buff, 40);
gWidgetModuleData->ConvertFromUcs( *pFlavour, buff, 40);
const char *rf = MimeTypeToRF( buff);
if( rf && DrgVerifyRMF( pItem, 0, rf))
{
@ -330,7 +330,7 @@ nsresult nsDragService::IsDataFlavorSupported( nsString *aDataFlavour)
nsresult rc = NS_ERROR_FAILURE;
char buff[40];
gModuleData->ConvertFromUcs( *aDataFlavour, buff, 40);
gWidgetModuleData->ConvertFromUcs( *aDataFlavour, buff, 40);
const char *rf = MimeTypeToRF( buff);
@ -440,7 +440,7 @@ nsresult NS_GetDragService( nsISupports **aDragService)
if( !aDragService)
return NS_ERROR_NULL_POINTER;
*aDragService = (nsIDragService*)gModuleData->dragService;
*aDragService = (nsIDragService*)gWidgetModuleData->dragService;
NS_ADDREF(*aDragService);
return NS_OK;
@ -529,7 +529,7 @@ void nsDragService::FillDragItem( PDRAGITEM aItem, nsITransferable *aTransferabl
for( PRUint32 i = 0; i < cFormats; i++)
{
nsString *pFlavour = (nsString*) pFormats->ElementAt( i);
gModuleData->ConvertFromUcs( *pFlavour, buff, 40);
gWidgetModuleData->ConvertFromUcs( *pFlavour, buff, 40);
const char *rf = MimeTypeToRF( buff);
if( rf)
{
@ -637,8 +637,8 @@ MRESULT EXPENTRY fnwpDragSource( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
{
MRESULT mr;
if( gModuleData->dragService)
mr = gModuleData->dragService->HandleMessage( msg, mp1, mp2);
if( gWidgetModuleData->dragService)
mr = gWidgetModuleData->dragService->HandleMessage( msg, mp1, mp2);
else
mr = WinDefWindowProc( hwnd, msg, mp1, mp2);
@ -723,7 +723,7 @@ MRESULT nsDragService::HandleMessage( ULONG msg, MPARAM mp1, MPARAM mp2)
for( i = 0; i < cFormats; i++)
{
nsString *pFlavour = (nsString*) pFormats->ElementAt( i);
gModuleData->ConvertFromUcs( *pFlavour, buff, 40);
gWidgetModuleData->ConvertFromUcs( *pFlavour, buff, 40);
const char *this_rf = MimeTypeToRF( buff);
if( this_rf && !strcmp( this_rf, rf))
{

View File

@ -102,7 +102,7 @@ NS_IMETHODIMP nsFilePicker::Show(PRInt16 *retval)
DIRPICKER dp = { { 0 }, 0, TRUE, 0 }; // modal dialog
HWND ret = FS_PickDirectory(HWND_DESKTOP, mWnd,
gModuleData->hModResources, &dp);
gWidgetModuleData->hModResources, &dp);
if (ret && dp.lReturn == DID_OK) {
result = PR_TRUE;
@ -119,7 +119,7 @@ NS_IMETHODIMP nsFilePicker::Show(PRInt16 *retval)
PRInt32 l = (mFilterList.Length()+2)*2;
char *filterBuffer = (char*) nsMemory::Alloc(l);
int len = gModuleData->WideCharToMultiByte(0,
int len = gWidgetModuleData->WideCharToMultiByte(0,
mFilterList.get(),
mFilterList.Length(),
filterBuffer,
@ -155,7 +155,7 @@ NS_IMETHODIMP nsFilePicker::Show(PRInt16 *retval)
// Store the current directory in mDisplayDirectory
char* newCurrentDirectory = NS_STATIC_CAST( char*, nsMemory::Alloc( MAX_PATH+1 ) );
VERIFY(gModuleData->GetCurrentDirectory(MAX_PATH, newCurrentDirectory) > 0);
VERIFY(gWidgetModuleData->GetCurrentDirectory(MAX_PATH, newCurrentDirectory) > 0);
mDisplayDirectory->InitWithPath(newCurrentDirectory);
nsMemory::Free( newCurrentDirectory );

View File

@ -152,7 +152,7 @@ PRBool nsFileWidget::Show()
// Store the current directory in mDisplayDirectory
char* newCurrentDirectory = new char[MAX_PATH+1];
VERIFY(gModuleData->GetCurrentDirectory(MAX_PATH, newCurrentDirectory) > 0);
VERIFY(gWidgetModuleData->GetCurrentDirectory(MAX_PATH, newCurrentDirectory) > 0);
mDisplayDirectory = newCurrentDirectory;
delete[] newCurrentDirectory;
@ -312,10 +312,10 @@ nsFileDlgResults nsFileWidget::GetFolder(nsIWidget * aParent,
DIRPICKER dp = { { 0 }, 0, TRUE, 0 }; // modal dialog
gModuleData->ConvertFromUcs( promptString, dp.szFullFile, CCHMAXPATH);
gWidgetModuleData->ConvertFromUcs( promptString, dp.szFullFile, CCHMAXPATH);
HWND ret = FS_PickDirectory( HWND_DESKTOP, hwndOwner,
gModuleData->hModResources, &dp);
gWidgetModuleData->hModResources, &dp);
if( ret && dp.lReturn == DID_OK)
{

View File

@ -171,7 +171,7 @@ void nsFrameWindow::RealDoCreate( HWND hwndP, nsWindow *aParent,
fnwpDefFrame = WinSubclassWindow( hwndFrame, fnwpFrame);
WinSetWindowPtr( hwndFrame, QWL_USER, this);
BOOL brc = (BOOL) WinSendMsg( hwndFrame, WM_SETICON,
MPFROMLONG( gModuleData->GetFrameIcon()), 0);
MPFROMLONG( gWidgetModuleData->GetFrameIcon()), 0);
// make the client the client.
WinSetWindowUShort( mWnd, QWS_ID, FID_CLIENT);
@ -188,7 +188,7 @@ ULONG nsFrameWindow::GetFCFlags()
{
ULONG style = FCF_TITLEBAR | FCF_SYSMENU | FCF_TASKLIST |
FCF_CLOSEBUTTON | FCF_NOBYTEALIGN |
(gModuleData->bIsDBCS ? FCF_DBE_APPSTAT : 0);
(gWidgetModuleData->bIsDBCS ? FCF_DBE_APPSTAT : 0);
if (mWindowType == eWindowType_dialog) {
style |= FCF_DIALOGBOX;
@ -344,7 +344,7 @@ MRESULT nsFrameWindow::FrameMessage( ULONG msg, MPARAM mp1, MPARAM mp2)
{
// These commented-out `-1's cancel each other out.
POINTL ptl = { pSwp->x, pSwp->y + pSwp->cy /* - 1 */ };
ptl.y = gModuleData->szScreen.cy - ptl.y /* - 1*/ ;
ptl.y = gWidgetModuleData->szScreen.cy - ptl.y /* - 1*/ ;
mBounds.x = ptl.x;
mBounds.y = ptl.y;
OnMove( ptl.x, ptl.y);

View File

@ -545,4 +545,4 @@ int nsWidgetModuleData::WideCharToMultiByte( int CodePage, const PRUnichar *pTex
return ulSize - cplen;
}
nsWidgetModuleData *gModuleData = nsnull;
nsWidgetModuleData *gWidgetModuleData = nsnull;

View File

@ -124,7 +124,7 @@ class nsIFontRetrieverService;
class nsDragService;
class nsIAppShell;
extern nsWidgetModuleData *gModuleData;
extern nsWidgetModuleData *gWidgetModuleData;
// messages - here to avoid duplication
#define WMU_CALLMETHOD (WM_USER + 1)

View File

@ -147,9 +147,9 @@ static NS_IMETHODIMP nsWidgetModuleDataConstructor (nsISupports *aOuter, REFNSII
// pointer and call its init method. This object is only
// instantiated in the embedding case - for the retail
// browser this is done in NS_CreateAppshell
gModuleData = new nsWidgetModuleData();
gModuleData->Init(nsnull);
inst = (nsISupports*)gModuleData;
gWidgetModuleData = new nsWidgetModuleData();
gWidgetModuleData->Init(nsnull);
inst = (nsISupports*)gWidgetModuleData;
if (inst == NULL)
{

View File

@ -1384,7 +1384,7 @@ NS_METHOD nsWindow::SetFont(const nsFont &aFont)
{
if( mToolkit) // called from print-routine (XXX check)
{
const char *fontname = gModuleData->ConvertFromUcs( aFont.name);
const char *fontname = gWidgetModuleData->ConvertFromUcs( aFont.name);
// jump through hoops to convert the size in the font (in app units)
// into points.
@ -1475,7 +1475,7 @@ NS_METHOD nsWindow::SetCursor(nsCursor aCursor)
if( sptr)
mPointer = WinQuerySysPointer( HWND_DESKTOP, sptr, FALSE);
else
mPointer = gModuleData->GetPointer( aCursor);
mPointer = gWidgetModuleData->GetPointer( aCursor);
WinSetPointer( HWND_DESKTOP, mPointer);
mCursor = aCursor;
@ -1855,7 +1855,7 @@ PRBool nsWindow::OnKey( MPARAM mp1, MPARAM mp2)
inbuf[1] = '\0';
outbuf[0] = (UniChar)0;
gModuleData->ConvertToUcs( (char *)inbuf, (PRUnichar *)outbuf, 4);
gWidgetModuleData->ConvertToUcs( (char *)inbuf, (PRUnichar *)outbuf, 4);
event.charCode = outbuf[0];
@ -2659,7 +2659,7 @@ NS_METHOD nsWindow::SetTitle(const nsString& aTitle)
else if( mWnd)
{
WinSetWindowText( GetMainWindow(),
gModuleData->ConvertFromUcs( aTitle));
gWidgetModuleData->ConvertFromUcs( aTitle));
}
return NS_OK;
}
@ -2835,7 +2835,7 @@ PRBool nsWindow::OnDragOver( MPARAM mp1, MPARAM mp2, MRESULT &mr)
// somehow.
// Tell drag service about the drag
// gModuleData->dragService->InitDragOver( (PDRAGINFO) mp1);
// gWidgetModuleData->dragService->InitDragOver( (PDRAGINFO) mp1);
// Invoke gecko for enter if appropriate
// if( !mDragInside)
@ -2848,16 +2848,16 @@ PRBool nsWindow::OnDragOver( MPARAM mp1, MPARAM mp2, MRESULT &mr)
// DispatchDragDropEvent( NS_DRAGDROP_OVER);
// Get action back from drag service
// mr = gModuleData->dragService->TermDragOver();
// mr = gWidgetModuleData->dragService->TermDragOver();
return PR_TRUE;
}
PRBool nsWindow::OnDragLeave( MPARAM mp1, MPARAM mp2)
{
// gModuleData->dragService->InitDragExit( (PDRAGINFO) mp1);
// gWidgetModuleData->dragService->InitDragExit( (PDRAGINFO) mp1);
// DispatchDragDropEvent( NS_DRAGDROP_EXIT);
// gModuleData->dragService->TermDragExit();
// gWidgetModuleData->dragService->TermDragExit();
// mDragInside = FALSE;
@ -2866,9 +2866,9 @@ PRBool nsWindow::OnDragLeave( MPARAM mp1, MPARAM mp2)
PRBool nsWindow::OnDrop( MPARAM mp1, MPARAM mp2)
{
// gModuleData->dragService->InitDrop( (PDRAGINFO) mp1);
// gWidgetModuleData->dragService->InitDrop( (PDRAGINFO) mp1);
// DispatchDragDropEvent( NS_DRAGDROP_DROP);
// gModuleData->dragService->TermDrop();
// gWidgetModuleData->dragService->TermDrop();
mDragInside = FALSE;

View File

@ -59,11 +59,11 @@ interface nsIModule : nsISupports
// Exported Function from module dll to Create the nsIModule
#define NS_GET_MODULE_SYMBOL "NSGetModule"
extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager *aCompMgr,
extern "C" NS_EXPORT nsresult PR_CALLBACK NSGetModule(nsIComponentManager *aCompMgr,
nsIFile* location,
nsIModule** return_cobj);
typedef nsresult (*nsGetModuleProc)(nsIComponentManager *aCompMgr,
typedef nsresult (PR_CALLBACK *nsGetModuleProc)(nsIComponentManager *aCompMgr,
nsIFile* location,
nsIModule** return_cobj);
%}

View File

@ -25,7 +25,7 @@ struct nsStaticModuleInfo {
// Must be implemented by some part of the app, if we're building the
// static component loader.
extern "C" {
typedef nsresult (*NSGetStaticModuleInfoFunc)(nsStaticModuleInfo **info, PRUint32 *count);
typedef nsresult (PR_CALLBACK *NSGetStaticModuleInfoFunc)(nsStaticModuleInfo **info, PRUint32 *count);
extern NS_COM NSGetStaticModuleInfoFunc NSGetStaticModuleInfo;
};

View File

@ -38,9 +38,16 @@ PROGRAM = mozilla-bin
endif
ifdef BUILD_STATIC_LIBS
ifeq ($(OS_ARCH),OS2)
EXTRA_DSO_LIBS = $(addprefix lib,$(shell cat $(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS)))
EXTRA_DSO_LIBS += mpfilelocprovider_s
EXTRA_DSO_LDOPTS += libuls.lib libconv.lib unikbd.lib
_COMPONENT_LIST := $(shell cat $(FINAL_LINK_COMP_NAMES))
else
EXTRA_DSO_LDOPTS = -L$(DEPTH)/dist/lib/components
EXTRA_DSO_LIBS = $(shell cat $(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS))
_COMPONENT_LIST := $(shell cat $(FINAL_LINK_COMP_NAMES))
endif
else
EXTRA_DSO_LIBS = gkgfx mpfilelocprovider_s
endif
@ -83,10 +90,18 @@ XP_LIBS += \
endif
ifdef MOZ_LDAP_XPCOM
ifeq ($(OS_ARCH),OS2)
# link with import ldap libs on os/2
XP_LIBS += \
$(DIST)/lib/ldap40.lib \
$(DIST)/lib/lber40.lib \
$(NULL)
else
XP_LIBS += \
-lldap40 -llber40 \
$(NULL)
endif
endif
ifdef MOZ_ENABLE_GTK
XP_LIBS += $(XLDFLAGS) -lXt
@ -121,12 +136,8 @@ XP_LIBS += -ljprof
endif
ifdef MOZ_OJI
ifeq ($(MOZ_OS2_TOOLS),VACPP)
OJI_LIBS = $(DIST)/lib/jsj.lib
else
OJI_LIBS = -ljsj
endif
endif
LIBS = $(XP_LIBS)
@ -156,15 +167,19 @@ LIBS += $(MOZ_GTK_LDFLAGS)
XP_DIST_DEP_LIBS := $(filter-out -L$(DIST)/bin -L$(DIST)/lib, $(XP_DIST_LIBS))
ifneq ($(MOZ_WIDGET_TOOLKIT),os2)
ifeq ($(OS_ARCH),OS2)
ifdef BUILD_STATIC_LIBS
EXE_DEF_FILE = mozilla.def
endif
else
EXTRA_DEPS = \
$(addprefix $(DIST)/,$(patsubst -l%,bin/lib%$(DLL_SUFFIX),$(XP_DIST_DEP_LIBS:-l%_s=lib/lib%_s.a))) \
$(NULL)
endif
ifdef BUILD_STATIC_LIBS
EXTRA_DEPS += $(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(addsuffix .$(LIB_SUFFIX),$(addprefix $(DIST)/lib/components/lib,$(shell cat $(FINAL_LINK_COMPS)))) $(addsuffix .$(LIB_SUFFIX),$(addprefix $(DIST)/lib/lib,$(shell cat $(FINAL_LINK_LIBS))))
endif
endif
include $(topsrcdir)/config/rules.mk
@ -213,6 +228,19 @@ install:: $(srcdir)/splash.xpm
$(INSTALL) $< $(DIST)/bin
endif
ifeq ($(OS_ARCH),OS2)
ifdef BUILD_STATIC_LIBS
$(EXE_DEF_FILE):
rm -f $@
@echo NAME mozilla >$(EXE_DEF_FILE)
@echo IMPORTS >>$(EXE_DEF_FILE)
@echo WinQueryProperty = PMMERGE.5450 >>$(EXE_DEF_FILE)
@echo WinRemoveProperty = PMMERGE.5451 >>$(EXE_DEF_FILE)
@echo WinSetProperty = PMMERGE.5452 >>$(EXE_DEF_FILE)
@echo DaxOpenSave = PMCTLS.295 >>$(EXE_DEF_FILE)
endif
endif
ifeq ($(MOZ_REORDER),1)
LDSCRIPT = ldscript

View File

@ -117,7 +117,7 @@ extern "C" void ShowOSAlert(char* aMessage);
#ifdef _BUILD_STATIC_BIN
#include "nsStaticComponent.h"
nsresult
nsresult PR_CALLBACK
apprunner_getModuleInfo(nsStaticModuleInfo **info, PRUint32 *count);
#endif

View File

@ -41,7 +41,7 @@ static nsStaticModuleInfo StaticModuleInfo[] = {
@COMPONENT_LIST@
};
nsresult
nsresult PR_CALLBACK
apprunner_getModuleInfo(nsStaticModuleInfo **info, PRUint32 *count)
{
*info = StaticModuleInfo;

View File

@ -40,16 +40,6 @@ REQUIRES += mozldap
DEFINES += -DMOZ_LDAP_XPCOM
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
EXTRA_DSO_LIBS = autocomplete_s bookmarks_s directory_s history_s related_s \
search_s timebomb_s urlbarhistory_s
ifdef MOZ_PERF_METRICS
EXTRA_DSO_LIBS += mozutil_s
endif
else
SHARED_LIBRARY_LIBS = \
$(DIST)/lib/libautocomplete_s.$(LIB_SUFFIX) \
$(DIST)/lib/libbookmarks_s.$(LIB_SUFFIX) \
@ -65,8 +55,6 @@ ifdef MOZ_PERF_METRICS
SHARED_LIBRARY_LIBS += $(DIST)/lib/libmozutil_s.$(LIB_SUFFIX)
endif
endif
LOCAL_INCLUDES = \
-I$(srcdir)/../autocomplete/src \
-I$(srcdir)/../bookmarks/src \