From 02e6723fc37e4d0f35b1e8d9453ff2f09c13dc56 Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Fri, 21 Mar 2003 21:36:11 +0000 Subject: [PATCH] #188249 r=me, sr=blizzard (platform specific) Start landing GCC support for OS/2 - mainly cleanup to start --- xpinstall/wizard/os2/nsinstall/Makefile.in | 2 +- xpinstall/wizard/os2/setup/Makefile.in | 2 +- xpinstall/wizard/os2/setup/dialogs.c | 4 ++-- xpinstall/wizard/os2/setup/nsINIParser.cpp | 2 +- xpinstall/wizard/os2/setup/setup.h | 2 ++ xpinstall/wizard/os2/setup/xpi.c | 2 +- xpinstall/wizard/os2/setup/zipfile.h | 14 +++++++------- xpinstall/wizard/os2/uninstall/Makefile.in | 2 +- xpinstall/wizard/os2/uninstall/ifuncns.c | 3 ++- xpinstall/wizard/os2/uninstall/nsINIParser.cpp | 2 +- xpinstall/wizard/os2/uninstall/parser.c | 4 ++-- xpinstall/wizard/os2/uninstall/rdi.c | 4 ++-- xpinstall/wizard/os2/uninstall/uninstall.h | 2 -- 13 files changed, 23 insertions(+), 22 deletions(-) diff --git a/xpinstall/wizard/os2/nsinstall/Makefile.in b/xpinstall/wizard/os2/nsinstall/Makefile.in index a512758b9493..e01334ac9601 100644 --- a/xpinstall/wizard/os2/nsinstall/Makefile.in +++ b/xpinstall/wizard/os2/nsinstall/Makefile.in @@ -47,7 +47,7 @@ include $(topsrcdir)/config/rules.mk ifeq ($(MOZ_OS2_TOOLS),VACPP) LDFLAGS += /PM:PM else -LDFLAGS += -ZLinker /PM:PM +LDFLAGS += -Zlinker /PM:PM endif libs:: $(PROGRAM) diff --git a/xpinstall/wizard/os2/setup/Makefile.in b/xpinstall/wizard/os2/setup/Makefile.in index 7c813001fcff..da38d3ff0305 100644 --- a/xpinstall/wizard/os2/setup/Makefile.in +++ b/xpinstall/wizard/os2/setup/Makefile.in @@ -70,7 +70,7 @@ include $(topsrcdir)/config/rules.mk ifeq ($(MOZ_OS2_TOOLS),VACPP) LDFLAGS += /PM:PM else -LDFLAGS += -ZLinker /PM:PM +LDFLAGS += -Zlinker /PM:PM endif libs:: $(PROGRAM) diff --git a/xpinstall/wizard/os2/setup/dialogs.c b/xpinstall/wizard/os2/setup/dialogs.c index 8a5a56916d7a..b04b748fea21 100644 --- a/xpinstall/wizard/os2/setup/dialogs.c +++ b/xpinstall/wizard/os2/setup/dialogs.c @@ -1093,7 +1093,7 @@ MRESULT EXPENTRY DlgProcSelectComponents(HWND hDlg, ULONG msg, MPARAM mp1, MPARA /* update the disk space available info in the dialog. GetDiskSpaceAvailable() returns value in kbytes */ ulDSBuf = GetDiskSpaceAvailable(sgProduct.szPath); - itoa(ulDSBuf, tchBuffer, 10); + _itoa(ulDSBuf, tchBuffer, 10); ParsePath(sgProduct.szPath, szBuf, sizeof(szBuf), FALSE, PP_ROOT_ONLY); RemoveBackSlash(szBuf); strcat(szBuf, " "); @@ -1129,7 +1129,7 @@ MRESULT EXPENTRY DlgProcSelectComponents(HWND hDlg, ULONG msg, MPARAM mp1, MPARA /* update the disk space required info in the dialog. It is already in Kilobytes */ ulDSBuf = GetDiskSpaceRequired(DSR_DOWNLOAD_SIZE); - itoa(ulDSBuf, tchBuffer, 10); + _itoa(ulDSBuf, tchBuffer, 10); strcpy(szBuf, tchBuffer); strcat(szBuf, " KB"); diff --git a/xpinstall/wizard/os2/setup/nsINIParser.cpp b/xpinstall/wizard/os2/setup/nsINIParser.cpp index f59848636866..247215e2b7c8 100644 --- a/xpinstall/wizard/os2/setup/nsINIParser.cpp +++ b/xpinstall/wizard/os2/setup/nsINIParser.cpp @@ -514,7 +514,7 @@ find_end: strncpy(aVal, currLine, nextEq-currLine); aVal+= nextEq-currLine; - *aVal = \0; + *aVal = '\0'; aVal++; currLine = nextNL + 1; diff --git a/xpinstall/wizard/os2/setup/setup.h b/xpinstall/wizard/os2/setup/setup.h index 44be282dec9d..b2090990c99b 100644 --- a/xpinstall/wizard/os2/setup/setup.h +++ b/xpinstall/wizard/os2/setup/setup.h @@ -43,7 +43,9 @@ typedef int PRInt32; #include #include #include +#ifdef XP_OS2_VACPP #include +#endif #include #include "setuprsc.h" #include "resource.h" diff --git a/xpinstall/wizard/os2/setup/xpi.c b/xpinstall/wizard/os2/setup/xpi.c index a7554e3aac82..d98f5a189b7a 100644 --- a/xpinstall/wizard/os2/setup/xpi.c +++ b/xpinstall/wizard/os2/setup/xpi.c @@ -165,7 +165,7 @@ char *GetErrorString(DWORD dwError, char *szErrorString, DWORD dwErrorStringSize if(*XpErrorList[i] == '\0') break; - if(strcmpi(szErrorNumber, XpErrorList[i]) == 0) + if(stricmp(szErrorNumber, XpErrorList[i]) == 0) { if(*XpErrorList[i + 1] != '\0') strcpy(szErrorString, XpErrorList[i + 1]); diff --git a/xpinstall/wizard/os2/setup/zipfile.h b/xpinstall/wizard/os2/setup/zipfile.h index bfc13221bb27..010f9a196482 100644 --- a/xpinstall/wizard/os2/setup/zipfile.h +++ b/xpinstall/wizard/os2/setup/zipfile.h @@ -51,21 +51,21 @@ PR_BEGIN_EXTERN_C * If successful OpenArchive returns a handle in the hZip parameter * that must be passed to all subsequent operations on the archive */ -extern _declspec(dllexport)int ZIP_OpenArchive( const char * zipname, void** hZip ); -extern _declspec(dllexport)int ZIP_CloseArchive( void** hZip ); +PR_EXTERN(int) ZIP_OpenArchive( const char * zipname, void** hZip ); +PR_EXTERN(int) ZIP_CloseArchive( void** hZip ); /* Test the integrity of every item in this open archive * by verifying each item's checksum against the stored * CRC32 value. */ -extern _declspec(dllexport)int ZIP_TestArchive( void* hZip ); +PR_EXTERN(int) ZIP_TestArchive( void* hZip ); /* Extract the named file in the archive to disk. * This function will happily overwrite an existing Outfile if it can. * It's up to the caller to detect or move it out of the way if it's important. */ -extern _declspec(dllexport)int ZIP_ExtractFile( void* hZip, const char * filename, const char * outname ); +PR_EXTERN(int) ZIP_ExtractFile( void* hZip, const char * filename, const char * outname ); /* Functions to list the files contained in the archive @@ -82,9 +82,9 @@ extern _declspec(dllexport)int ZIP_ExtractFile( void* hZip, const char * filenam * will return ZIP_ERR_SMALLBUF. When no more matches can be found in * the archive it will return ZIP_ERR_FNF */ -extern _declspec(dllexport)void* ZIP_FindInit( void* hZip, const char * pattern ); -extern _declspec(dllexport)int ZIP_FindNext( void* hFind, char * outbuf, int bufsize ); -extern _declspec(dllexport)int ZIP_FindFree( void* hFind ); +PR_EXTERN(void*) ZIP_FindInit( void* hZip, const char * pattern ); +PR_EXTERN(int) ZIP_FindNext( void* hFind, char * outbuf, int bufsize ); +PR_EXTERN(int) ZIP_FindFree( void* hFind ); PR_END_EXTERN_C diff --git a/xpinstall/wizard/os2/uninstall/Makefile.in b/xpinstall/wizard/os2/uninstall/Makefile.in index 323007718ec1..56597db9ef22 100644 --- a/xpinstall/wizard/os2/uninstall/Makefile.in +++ b/xpinstall/wizard/os2/uninstall/Makefile.in @@ -57,7 +57,7 @@ include $(topsrcdir)/config/rules.mk ifeq ($(MOZ_OS2_TOOLS),VACPP) LDFLAGS += /PM:PM else -LDFLAGS += -ZLinker /PM:PM +LDFLAGS += -Zlinker /PM:PM endif libs:: $(PROGRAM) diff --git a/xpinstall/wizard/os2/uninstall/ifuncns.c b/xpinstall/wizard/os2/uninstall/ifuncns.c index 0d66531a9abe..10521425f496 100644 --- a/xpinstall/wizard/os2/uninstall/ifuncns.c +++ b/xpinstall/wizard/os2/uninstall/ifuncns.c @@ -22,8 +22,9 @@ * Sean Su */ -#include "ifuncns.h" +#include "uninstall.h" #include "extra.h" +#include "ifuncns.h" BOOL SearchForUninstallKeys(char *szStringToMatch) { diff --git a/xpinstall/wizard/os2/uninstall/nsINIParser.cpp b/xpinstall/wizard/os2/uninstall/nsINIParser.cpp index f59848636866..247215e2b7c8 100644 --- a/xpinstall/wizard/os2/uninstall/nsINIParser.cpp +++ b/xpinstall/wizard/os2/uninstall/nsINIParser.cpp @@ -514,7 +514,7 @@ find_end: strncpy(aVal, currLine, nextEq-currLine); aVal+= nextEq-currLine; - *aVal = \0; + *aVal = '\0'; aVal++; currLine = nextNL + 1; diff --git a/xpinstall/wizard/os2/uninstall/parser.c b/xpinstall/wizard/os2/uninstall/parser.c index be48e55848bc..265a1af6dc8d 100644 --- a/xpinstall/wizard/os2/uninstall/parser.c +++ b/xpinstall/wizard/os2/uninstall/parser.c @@ -24,8 +24,8 @@ #include "extern.h" #include "logkeys.h" -#include "parser.h" #include "extra.h" +#include "parser.h" #include "ifuncns.h" #include "dialogs.h" @@ -361,7 +361,7 @@ ULONG GetLogFile(PSZ szTargetPath, PSZ szInFilename, PSZ szOutBuf, ULONG dwOutBu while(bFound) { memset(szNumber, 0, sizeof(szNumber)); - if((strcmpi(fdFile.achName, ".") != 0) && (strcmpi(fdFile.achName, "..") != 0)) + if((stricmp(fdFile.achName, ".") != 0) && (strcmpi(fdFile.achName, "..") != 0)) { strcpy(szNumber, &fdFile.achName[iFilenameOnlyLen]); ulNumber = atoi(szNumber); diff --git a/xpinstall/wizard/os2/uninstall/rdi.c b/xpinstall/wizard/os2/uninstall/rdi.c index bae273b20db3..a3d59d4e938a 100644 --- a/xpinstall/wizard/os2/uninstall/rdi.c +++ b/xpinstall/wizard/os2/uninstall/rdi.c @@ -22,8 +22,8 @@ */ #include "extern.h" -#include "parser.h" #include "extra.h" +#include "parser.h" #include "ifuncns.h" char szUnreadMailKey[] = "Software\\Microsoft\\Windows\\CurrentVersion\\UnreadMail"; @@ -109,7 +109,7 @@ BOOL UndoDesktopIntegration(void) /* Check to see if uninstall.ini has indicated to restore * the destktop integration performed by the browser/mail */ GetPrivateProfileString(szRDISection, "Enabled", "", szBuf, sizeof(szBuf), szFileIniUninstall); - if(strcmpi(szBuf, "TRUE") == 0) + if(stricmp(szBuf, "TRUE") == 0) { RestoreDesktopIntegration(); diff --git a/xpinstall/wizard/os2/uninstall/uninstall.h b/xpinstall/wizard/os2/uninstall/uninstall.h index ce00396c4122..f40dd95e8f42 100644 --- a/xpinstall/wizard/os2/uninstall/uninstall.h +++ b/xpinstall/wizard/os2/uninstall/uninstall.h @@ -44,8 +44,6 @@ typedef int PRInt32; #include #include "nsINIParser.h" -typedef long HRESULT; - #include #include #include