From 16e912ab31cc7c0bd7bd7ea7cb0dd8fdbeb19f89 Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Wed, 5 Apr 2000 02:32:07 +0000 Subject: [PATCH] # 34082 r= warren@netscape.com OS/2 Visual Age build - Adding PR_CALLBACK to some functoins for linkage --- caps/include/nsScriptSecurityManager.h | 16 ++++++++++++++-- netwerk/cache/mgr/nsCachedNetData.h | 15 ++++++++++++++- netwerk/mime/src/nsMIMEService.cpp | 18 +++++++++++++++--- .../protocol/ftp/src/nsFtpProtocolHandler.cpp | 15 ++++++++++++++- .../protocol/res/src/nsResProtocolHandler.cpp | 18 +++++++++++++++++- .../src/nsStreamConverterService.cpp | 19 ++++++++++++++++--- 6 files changed, 90 insertions(+), 11 deletions(-) diff --git a/caps/include/nsScriptSecurityManager.h b/caps/include/nsScriptSecurityManager.h index 3fee2db83401..927538214f7c 100644 --- a/caps/include/nsScriptSecurityManager.h +++ b/caps/include/nsScriptSecurityManager.h @@ -18,7 +18,19 @@ * Rights Reserved. * * Contributor(s): - * Norris Boyd + * Norris Boyd + * + * This Original Code has been modified by IBM Corporation. + * Modifications made by IBM described herein are + * Copyright (c) International Business Machines + * Corporation, 2000 + * + * Modifications to Mozilla code or documentation + * identified per MPL Section 3.3 + * + * Date Modified by Description of modification + * 03/27/2000 IBM Corp. Added PR_CALLBACK for Optlink + * use in OS2 */ #ifndef _NS_SCRIPT_SECURITY_MANAGER_H_ @@ -122,7 +134,7 @@ private: static void EnumeratePrincipalsCallback(const char *prefName, void *data); - static int + static int PR_CALLBACK JSEnabledPrefChanged(const char *pref, void *data); static int diff --git a/netwerk/cache/mgr/nsCachedNetData.h b/netwerk/cache/mgr/nsCachedNetData.h index 88e332bc686c..3c05d26bcc41 100644 --- a/netwerk/cache/mgr/nsCachedNetData.h +++ b/netwerk/cache/mgr/nsCachedNetData.h @@ -20,6 +20,19 @@ * * Contributor(s): * Scott Furman, fur@netscape.com + * + * + * This Original Code has been modified by IBM Corporation. + * Modifications made by IBM described herein are + * Copyright (c) International Business Machines + * Corporation, 2000 + * + * Modifications to Mozilla code or documentation + * identified per MPL Section 3.3 + * + * Date Modified by Description of modification + * 03/27/2000 IBM Corp. Added PR_CALLBACK for Optlink + * use in OS2 */ #ifndef _nsCachedNetData_h_ @@ -105,7 +118,7 @@ protected: nsresult ClearFlag(Flag aFlag) { return SetFlag(PR_FALSE, aFlag); } void ComputeProfit(PRUint32 aCurrentTime); - static int Compare(const void *a, const void *b, void *unused); + static int PR_CALLBACK Compare(const void *a, const void *b, void *unused); void NoteAccess(); void NoteUpdate(); diff --git a/netwerk/mime/src/nsMIMEService.cpp b/netwerk/mime/src/nsMIMEService.cpp index 93556cd7f226..7e04bfe3361d 100644 --- a/netwerk/mime/src/nsMIMEService.cpp +++ b/netwerk/mime/src/nsMIMEService.cpp @@ -17,7 +17,20 @@ * Copyright (C) 1998 Netscape Communications Corporation. All * Rights Reserved. * - * Contributor(s): Judson Valeski + * Contributor(s): + * Judson Valeski + * + * This Original Code has been modified by IBM Corporation. + * Modifications made by IBM described herein are + * Copyright (c) International Business Machines + * Corporation, 2000 + * + * Modifications to Mozilla code or documentation + * identified per MPL Section 3.3 + * + * Date Modified by Description of modification + * 03/27/2000 IBM Corp. Added PR_CALLBACK for Optlink + * use in OS2 */ #include "nsMIMEService.h" @@ -29,8 +42,7 @@ #include "nsXPIDLString.h" #include "nsMimeTypes.h" -// Hash table helper functions -PRBool DeleteEntry(nsHashKey *aKey, void *aData, void* closure) { +PRBool PR_CALLBACK DeleteEntry(nsHashKey *aKey, void *aData, void* closure) { nsMIMEInfoImpl *entry = (nsMIMEInfoImpl*)aData; NS_ASSERTION(entry, "mapping problem"); NS_RELEASE(entry); diff --git a/netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp b/netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp index 014ba3303e23..c9c09ecca64e 100644 --- a/netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp +++ b/netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp @@ -18,6 +18,19 @@ * Rights Reserved. * * Contributor(s): + * + * + * This Original Code has been modified by IBM Corporation. + * Modifications made by IBM described herein are + * Copyright (c) International Business Machines + * Corporation, 2000 + * + * Modifications to Mozilla code or documentation + * identified per MPL Section 3.3 + * + * Date Modified by Description of modification + * 03/27/2000 IBM Corp. Added PR_CALLBACK for Optlink + * use in OS2 */ #include "nsFtpProtocolHandler.h" @@ -243,7 +256,7 @@ nsFtpProtocolHandler::InsertConn(const char *aKey, nsConnectionCacheObj *aConn) } // cleans up a connection list entry -PRBool CleanupConnEntry(nsHashKey *aKey, void *aData, void *closure) { +PRBool PR_CALLBACK CleanupConnEntry(nsHashKey *aKey, void *aData, void *closure) { delete (nsConnectionCacheObj*)aData; return PR_TRUE; } diff --git a/netwerk/protocol/res/src/nsResProtocolHandler.cpp b/netwerk/protocol/res/src/nsResProtocolHandler.cpp index be543af5933c..c53f0015988d 100644 --- a/netwerk/protocol/res/src/nsResProtocolHandler.cpp +++ b/netwerk/protocol/res/src/nsResProtocolHandler.cpp @@ -18,6 +18,20 @@ * Rights Reserved. * * Contributor(s): + * + * + * This Original Code has been modified by IBM Corporation. + * Modifications made by IBM described herein are + * Copyright (c) International Business Machines + * Corporation, 2000 + * + * Modifications to Mozilla code or documentation + * identified per MPL Section 3.3 + * + * Date Modified by Description of modification + * 03/23/2000 IBM Corp. Fixed bug with OS2_SystemDirectory. + * 03/27/2000 IBM Corp. Added PR_CALLBACK for Optlink + * use in OS2 */ #include "nsResProtocolHandler.h" @@ -80,6 +94,8 @@ nsResProtocolHandler::Init() rv = SetSpecialDir("SystemDir", #ifdef XP_MAC nsSpecialSystemDirectory::Mac_SystemDirectory +#elif XP_OS2 + nsSpecialSystemDirectory::OS2_SystemDirectory #elif XP_PC nsSpecialSystemDirectory::Win_SystemDirectory #elif XP_BEOS @@ -151,7 +167,7 @@ nsResProtocolHandler::Init() return rv; } -static PR_CALLBACK PRBool +static PRBool PR_CALLBACK DeleteCStringArray(nsHashKey *aKey, void *aData, void* closure) { nsCStringArray* array = NS_STATIC_CAST(nsCStringArray*, aData); diff --git a/netwerk/streamconv/src/nsStreamConverterService.cpp b/netwerk/streamconv/src/nsStreamConverterService.cpp index f33ca5614107..7d2509e7bea1 100644 --- a/netwerk/streamconv/src/nsStreamConverterService.cpp +++ b/netwerk/streamconv/src/nsStreamConverterService.cpp @@ -18,6 +18,19 @@ * Rights Reserved. * * Contributor(s): + * + * + * This Original Code has been modified by IBM Corporation. + * Modifications made by IBM described herein are + * Copyright (c) International Business Machines + * Corporation, 2000 + * + * Modifications to Mozilla code or documentation + * identified per MPL Section 3.3 + * + * Date Modified by Description of modification + * 03/27/2000 IBM Corp. Added PR_CALLBACK for Optlink + * use in OS2 */ #include "nsStreamConverterService.h" @@ -49,7 +62,7 @@ nsStreamConverterService::nsStreamConverterService() { } // Delete all the entries in the adjacency list -PRBool DeleteAdjacencyEntry(nsHashKey *aKey, void *aData, void* closure) { +PRBool PR_CALLBACK DeleteAdjacencyEntry(nsHashKey *aKey, void *aData, void* closure) { SCTableData *entry = (SCTableData*)aData; NS_ASSERTION(entry->key && entry->keyString && entry->data, "malformed adjacency list entry"); delete entry->key; @@ -278,7 +291,7 @@ nsStreamConverterService::ParseFromTo(const char *aProgID, nsCString &aFromRes, // nsHashtable enumerator functions. // Initializes the BFS state table. -PRBool InitBFSTable(nsHashKey *aKey, void *aData, void* closure) { +PRBool PR_CALLBACK InitBFSTable(nsHashKey *aKey, void *aData, void* closure) { nsHashtable *BFSTable = (nsHashtable*)closure; if (!BFSTable) return PR_FALSE; @@ -303,7 +316,7 @@ PRBool InitBFSTable(nsHashKey *aKey, void *aData, void* closure) { }; // cleans up the BFS state table -PRBool DeleteBFSEntry(nsHashKey *aKey, void *aData, void *closure) { +PRBool PR_CALLBACK DeleteBFSEntry(nsHashKey *aKey, void *aData, void *closure) { SCTableData *data = (SCTableData*)aData; delete data->key; delete data->keyString;