diff options
Diffstat (limited to 'src/libs/xpcom18a4/xpcom')
9 files changed, 151 insertions, 745 deletions
diff --git a/src/libs/xpcom18a4/xpcom/components/nsComponentManager.cpp b/src/libs/xpcom18a4/xpcom/components/nsComponentManager.cpp index 681030a0..ec3cb3f5 100644 --- a/src/libs/xpcom18a4/xpcom/components/nsComponentManager.cpp +++ b/src/libs/xpcom18a4/xpcom/components/nsComponentManager.cpp @@ -2375,7 +2375,7 @@ nsComponentManagerImpl::GetServiceByContractID(const char* aContractID, mon.Enter(); -#ifdef XPCOM_CHECK_PENDING_CIDS +#ifdef XPCOM_CHECK_PENDING_CIDS if (entry) RemovePendingCID(entry->mCid); #endif @@ -3722,8 +3722,21 @@ NS_GetServiceManager(nsIServiceManager* *result) if (nsComponentManagerImpl::gComponentManager == nsnull) { +#ifdef VBOX + // While XPCOM might need initialization, we're not in a position + // to pass the right values to this call. This is actually triggered + // on object destruction, so there is no point in re-initializing, + // and actually the attempt would lead to nested calls to + // xptiInterfaceInfoManager::BuildFileSearchPath, which it detects + // as unsafe in debug builds. Just fail, no real problem. +#ifdef DEBUG + printf("NS_GetServiceManager: no current instance, suppressed XPCOM initialization!\n"); +#endif + rv = NS_ERROR_SERVICE_NOT_AVAILABLE; +#else /* !VBOX */ // XPCOM needs initialization. rv = NS_InitXPCOM2(nsnull, nsnull, nsnull); +#endif /* !VBOX */ } if (NS_FAILED(rv)) diff --git a/src/libs/xpcom18a4/xpcom/components/nsNativeComponentLoader.cpp b/src/libs/xpcom18a4/xpcom/components/nsNativeComponentLoader.cpp index 1ccd862c..a3fd5df8 100644 --- a/src/libs/xpcom18a4/xpcom/components/nsNativeComponentLoader.cpp +++ b/src/libs/xpcom18a4/xpcom/components/nsNativeComponentLoader.cpp @@ -674,6 +674,7 @@ nsNativeComponentLoader::AutoRegisterComponent(PRInt32 when, *registered = PR_FALSE; +#ifndef VBOX /* this should be a pref or registry entry, or something */ static const char *ValidDllExtensions[] = { ".dll", /* Windows */ @@ -749,6 +750,53 @@ nsNativeComponentLoader::AutoRegisterComponent(PRInt32 when, // Skip invalid extensions return NS_OK; +#else /* VBOX */ + /* VBox: Only one valid suffix exist, so dispense with the the list. */ +# ifdef RT_OS_DARWIN +# ifdef VBOX_IN_32_ON_64_MAIN_API + static const char s_szSuff[] = "-x86.dylib"; +# else + static const char s_szSuff[] = ".dylib"; + static const char s_szSuffInvalid[] = "-x86.dylib"; +# endif +# elif defined(RT_OS_OS2) || defined(RT_OS_WINDOWS) +# ifdef VBOX_IN_32_ON_64_MAIN_API + static const char s_szSuff[] = "-x86.dll"; +#else + static const char s_szSuff[] = ".dll"; + static const char s_szSuffInvalid[] = "-x86.dll"; +# endif +# else +# ifdef VBOX_IN_32_ON_64_MAIN_API + static const char s_szSuff[] = "-x86.so"; +#else + static const char s_szSuff[] = ".so"; + static const char s_szSuffInvalid[] = "-x86.so"; +# endif +# endif + + nsCAutoString strLeafName; + rv = component->GetNativeLeafName(strLeafName); + if (NS_FAILED(rv)) + return rv; + size_t cchLeafName = strLeafName.Length(); + if ( cchLeafName <= sizeof(s_szSuff) + || PL_strcasecmp(strLeafName.get() + cchLeafName - sizeof(s_szSuff) + 1, s_szSuff)) + { + PR_LOG(nsComponentManagerLog, PR_LOG_DEBUG, ("Skipping '%s'...", strLeafName.get())); + return NS_OK; /* skip */ + } +# ifndef VBOX_IN_32_ON_64_MAIN_API + if ( cchLeafName >= sizeof(s_szSuffInvalid) + && !PL_strcasecmp(strLeafName.get() + cchLeafName - sizeof(s_szSuffInvalid) + 1, s_szSuffInvalid)) + { + PR_LOG(nsComponentManagerLog, PR_LOG_DEBUG, ("Skipping '%s' (#2)...", strLeafName.get())); + return NS_OK; /* skip */ + } +# endif + PR_LOG(nsComponentManagerLog, PR_LOG_DEBUG, ("... '%s'", strLeafName.get())); +#endif /* VBOX */ + nsXPIDLCString persistentDescriptor; // what I want to do here is QI for a Component Registration Manager. Since this // has not been invented yet, QI to the obsolete manager. Kids, don't do this at home. diff --git a/src/libs/xpcom18a4/xpcom/io/nsAppFileLocationProvider.cpp b/src/libs/xpcom18a4/xpcom/io/nsAppFileLocationProvider.cpp index c67b182f..eb144c55 100644 --- a/src/libs/xpcom18a4/xpcom/io/nsAppFileLocationProvider.cpp +++ b/src/libs/xpcom18a4/xpcom/io/nsAppFileLocationProvider.cpp @@ -378,10 +378,6 @@ NS_METHOD nsAppFileLocationProvider::GetProductDirectory(nsILocalFile **aLocalFi rv = directoryService->Get(NS_WIN_WINDOWS_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(localDir)); } if (NS_FAILED(rv)) return rv; -#elif defined(L4ENV) - /* Major hack attack, should sort out the environment stuff!!! */ - rv = NS_NewNativeLocalFile(nsDependentCString("."), PR_TRUE, getter_AddRefs(localDir)); - if (NS_FAILED(rv)) return rv; #elif defined(XP_UNIX) rv = NS_NewNativeLocalFile(nsDependentCString(PR_GetEnv("HOME")), PR_TRUE, getter_AddRefs(localDir)); if (NS_FAILED(rv)) return rv; diff --git a/src/libs/xpcom18a4/xpcom/io/nsDirectoryService.cpp b/src/libs/xpcom18a4/xpcom/io/nsDirectoryService.cpp index e5cc844c..4e650721 100644 --- a/src/libs/xpcom18a4/xpcom/io/nsDirectoryService.cpp +++ b/src/libs/xpcom18a4/xpcom/io/nsDirectoryService.cpp @@ -92,7 +92,7 @@ #else #define COMPONENT_REGISTRY_NAME NS_LITERAL_CSTRING("compreg.dat") #define COMPONENT_DIRECTORY NS_LITERAL_CSTRING("components") -#endif +#endif #define XPTI_REGISTRY_NAME NS_LITERAL_CSTRING("xpti.dat") @@ -111,22 +111,22 @@ #endif //---------------------------------------------------------------------------------------- -nsresult +nsresult nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile) //---------------------------------------------------------------------------------------- { NS_ENSURE_ARG_POINTER(aFile); *aFile = nsnull; - + // Set the component registry location: if (!mService) return NS_ERROR_FAILURE; - nsresult rv; - + nsresult rv; + nsCOMPtr<nsIProperties> dirService; - rv = nsDirectoryService::Create(nsnull, - NS_GET_IID(nsIProperties), + rv = nsDirectoryService::Create(nsnull, + NS_GET_IID(nsIProperties), getter_AddRefs(dirService)); // needs to be around for life of product if (dirService) @@ -156,7 +156,7 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile) char* lastSlash = PL_strrchr(buf, '\\'); if (lastSlash) *(lastSlash + 1) = '\0'; - + localFile->InitWithNativePath(nsDependentCString(buf)); *aFile = localFile; return NS_OK; @@ -182,9 +182,9 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile) // create an FSSpec from the volume and dirid of the app. FSSpec appFSSpec; ::FSMakeFSSpec(pInfo.processAppSpec->vRefNum, pInfo.processAppSpec->parID, 0, &appFSSpec); - + nsCOMPtr<nsILocalFileMac> localFileMac = do_QueryInterface((nsIFile*)localFile); - if (localFileMac) + if (localFileMac) { localFileMac->InitWithFSSpec(&appFSSpec); *aFile = localFile; @@ -192,6 +192,11 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile) } } #elif defined(XP_MACOSX) +# ifdef MOZ_DEFAULT_VBOX_XPCOM_HOME + rv = localFile->InitWithNativePath(nsDependentCString(MOZ_DEFAULT_VBOX_XPCOM_HOME)); + if (NS_SUCCEEDED(rv)) + *aFile = localFile; +# else // Works even if we're not bundled. CFBundleRef appBundle = CFBundleGetMainBundle(); if (appBundle != nsnull) @@ -220,8 +225,9 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile) CFRelease(bundleURL); } } - - NS_ASSERTION(*aFile, "nsDirectoryService - Could not determine CurrentProcessDir.\n"); +#endif + + NS_ASSERTION(*aFile, "nsDirectoryService - Could not determine CurrentProcessDir.\n"); if (*aFile) return NS_OK; @@ -242,7 +248,7 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile) char buf2[MAXPATHLEN + 3]; buf2[0] = '\0'; - /* + /* * Env.var. VBOX_XPCOM_HOME first. */ char *psz = PR_GetEnv("VBOX_XPCOM_HOME"); @@ -250,7 +256,7 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile) { if (strlen(psz) < MAXPATHLEN) { - if (!realpath(psz, buf2)) + if (!realpath(psz, buf2)) strcpy(buf2, psz); strcat(buf2, "/x"); /* for the filename stripping */ } @@ -277,7 +283,7 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile) { char buf[MAXPATHLEN]; int cchLink = readlink("/proc/self/exe", buf, sizeof(buf) - 1); - if (cchLink > 0 || cchLink != sizeof(buf) - 1) + if (cchLink > 0 || cchLink != sizeof(buf) - 1) { buf[cchLink] = '\0'; if (!realpath(buf, buf2)) @@ -296,7 +302,7 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile) p[p == buf2] = '\0'; #ifdef DEBUG printf("debug: (1) VBOX_XPCOM_HOME=%s\n", buf2); - #endif + #endif strcpy(szPath, buf2); fPathSet = true; } @@ -312,12 +318,12 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile) #endif - // The MOZ_DEFAULT_VBOX_XPCOMHOME variable can be set at configure time with + // The MOZ_DEFAULT_VBOX_XPCOM_HOME variable can be set at configure time with // a --with-default-mozilla-five-home=foo autoconf flag. - // + // // The idea here is to allow for builds that have a default VBOX_XPCOM_HOME // regardless of the environment. This makes it easier to write apps that - // embed mozilla without having to worry about setting up the environment + // embed mozilla without having to worry about setting up the environment // // We do this py putenv()ing the default value into the environment. Note that // we only do this if it is not already set. @@ -398,7 +404,7 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile) } #endif - + NS_RELEASE(localFile); NS_ERROR("unable to get current process directory"); @@ -448,7 +454,7 @@ nsIAtom* nsDirectoryService::sPictureDocumentsDirectory = nsnull; nsIAtom* nsDirectoryService::sMovieDocumentsDirectory = nsnull; nsIAtom* nsDirectoryService::sMusicDocumentsDirectory = nsnull; nsIAtom* nsDirectoryService::sInternetSitesDirectory = nsnull; -#elif defined (XP_WIN) +#elif defined (XP_WIN) nsIAtom* nsDirectoryService::sSystemDirectory = nsnull; nsIAtom* nsDirectoryService::sWindowsDirectory = nsnull; nsIAtom* nsDirectoryService::sHomeDirectory = nsnull; @@ -557,7 +563,7 @@ static const nsStaticAtom directory_atoms[] = { { NS_OSX_MOVIE_DOCUMENTS_DIR, &nsDirectoryService::sMovieDocumentsDirectory }, { NS_OSX_MUSIC_DOCUMENTS_DIR, &nsDirectoryService::sMusicDocumentsDirectory }, { NS_OSX_INTERNET_SITES_DIR, &nsDirectoryService::sInternetSitesDirectory }, -#elif defined (XP_WIN) +#elif defined (XP_WIN) { NS_OS_SYSTEM_DIR, &nsDirectoryService::sSystemDirectory }, { NS_WIN_WINDOWS_DIR, &nsDirectoryService::sWindowsDirectory }, { NS_WIN_HOME_DIR, &nsDirectoryService::sHomeDirectory }, @@ -600,18 +606,18 @@ static const nsStaticAtom directory_atoms[] = { { NS_BEOS_HOME_DIR, &nsDirectoryService::sHomeDirectory }, { NS_BEOS_DESKTOP_DIR, &nsDirectoryService::sDesktopDirectory }, #endif -}; +}; nsresult nsDirectoryService::Init() { nsresult rv; - + rv = NS_NewISupportsArray(getter_AddRefs(mProviders)); if (NS_FAILED(rv)) return rv; NS_RegisterStaticAtoms(directory_atoms, NS_ARRAY_LENGTH(directory_atoms)); - + // Let the list hold the only reference to the provider. nsAppFileLocationProvider *defaultProvider = new nsAppFileLocationProvider; if (!defaultProvider) @@ -665,7 +671,7 @@ struct FileData data(nsnull), persistent(PR_TRUE), uuid(aUUID) {} - + const char* property; nsISupports* data; PRBool persistent; @@ -706,9 +712,9 @@ NS_IMETHODIMP nsDirectoryService::Get(const char* prop, const nsIID & uuid, void* *result) { nsCStringKey key(prop); - + nsCOMPtr<nsISupports> value = dont_AddRef(mHashtable.Get(&key)); - + if (value) { nsCOMPtr<nsIFile> cloneFile; @@ -767,7 +773,7 @@ nsDirectoryService::Set(const char* prop, nsISupports* value) return NS_OK; } - return NS_ERROR_FAILURE; + return NS_ERROR_FAILURE; } NS_IMETHODIMP @@ -776,14 +782,14 @@ nsDirectoryService::Has(const char *prop, PRBool *_retval) *_retval = PR_FALSE; nsCOMPtr<nsIFile> value; nsresult rv = Get(prop, NS_GET_IID(nsIFile), getter_AddRefs(value)); - if (NS_FAILED(rv)) + if (NS_FAILED(rv)) return rv; - + if (value) { *_retval = PR_TRUE; } - + return rv; } @@ -822,7 +828,7 @@ nsDirectoryService::UnregisterProvider(nsIDirectoryServiceProvider *prov) // DO NOT ADD ANY LOCATIONS TO THIS FUNCTION UNTIL YOU TALK TO: dougt@netscape.com. // This is meant to be a place of xpcom or system specific file locations, not // application specific locations. If you need the later, register a callback for -// your application. +// your application. NS_IMETHODIMP nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_retval) @@ -836,8 +842,8 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret nsIAtom* inAtom = NS_NewAtom(prop); // check to see if it is one of our defaults - - if (inAtom == nsDirectoryService::sCurrentProcess || + + if (inAtom == nsDirectoryService::sCurrentProcess || inAtom == nsDirectoryService::sOS_CurrentProcessDirectory ) { rv = GetCurrentProcessDirectory(getter_AddRefs(localFile)); @@ -848,8 +854,8 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret if (!localFile) return NS_ERROR_FAILURE; - localFile->AppendNative(COMPONENT_DIRECTORY); - localFile->AppendNative(COMPONENT_REGISTRY_NAME); + localFile->AppendNative(COMPONENT_DIRECTORY); + localFile->AppendNative(COMPONENT_REGISTRY_NAME); } else if (inAtom == nsDirectoryService::sXPTIRegistry) { @@ -857,10 +863,10 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret if (!localFile) return NS_ERROR_FAILURE; - localFile->AppendNative(COMPONENT_DIRECTORY); - localFile->AppendNative(XPTI_REGISTRY_NAME); + localFile->AppendNative(COMPONENT_DIRECTORY); + localFile->AppendNative(XPTI_REGISTRY_NAME); } - + // Unless otherwise set, the core pieces of the GRE exist // in the current process directory. else if (inAtom == nsDirectoryService::sGRE_Directory) @@ -880,7 +886,7 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret { rv = GetCurrentProcessDirectory(getter_AddRefs(localFile)); if (localFile) - localFile->AppendNative(COMPONENT_DIRECTORY); + localFile->AppendNative(COMPONENT_DIRECTORY); } else if (inAtom == nsDirectoryService::sOS_DriveDirectory) { @@ -892,13 +898,13 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret } else if (inAtom == nsDirectoryService::sOS_CurrentProcessDirectory) { - rv = GetSpecialSystemDirectory(OS_CurrentProcessDirectory, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(OS_CurrentProcessDirectory, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sOS_CurrentWorkingDirectory) { - rv = GetSpecialSystemDirectory(OS_CurrentWorkingDirectory, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(OS_CurrentWorkingDirectory, getter_AddRefs(localFile)); } - + #if defined(XP_MACOSX) else if (inAtom == nsDirectoryService::sDirectory) { @@ -947,7 +953,7 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret else if (inAtom == nsDirectoryService::sInternetSearchDirectory) { rv = GetOSXFolderType(kClassicDomain, kInternetSearchSitesFolderType, getter_AddRefs(localFile)); - } + } else if (inAtom == nsDirectoryService::sUserLibDirectory) { rv = GetOSXFolderType(kUserDomain, kDomainLibraryFolderType, getter_AddRefs(localFile)); @@ -979,14 +985,14 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret } ::ICStop(icInstance); } - + if NS_FAILED(rv) - { + { // We got an error getting the DL folder from IC so try finding the user's Desktop folder rv = GetOSXFolderType(kUserDomain, kDesktopFolderType, getter_AddRefs(localFile)); } } - + // Don't cache the DL directory as the user may change it while we're running. // Negligible perf hit as this directory is only requested for downloads *persistent = PR_FALSE; @@ -1058,39 +1064,39 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret #elif defined (XP_WIN) else if (inAtom == nsDirectoryService::sSystemDirectory) { - rv = GetSpecialSystemDirectory(Win_SystemDirectory, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_SystemDirectory, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sWindowsDirectory) { - rv = GetSpecialSystemDirectory(Win_WindowsDirectory, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_WindowsDirectory, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sHomeDirectory) { - rv = GetSpecialSystemDirectory(Win_HomeDirectory, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_HomeDirectory, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sDesktop) { - rv = GetSpecialSystemDirectory(Win_Desktop, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Desktop, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sPrograms) { - rv = GetSpecialSystemDirectory(Win_Programs, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Programs, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sControls) { - rv = GetSpecialSystemDirectory(Win_Controls, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Controls, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sPrinters) { - rv = GetSpecialSystemDirectory(Win_Printers, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Printers, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sPersonal) { - rv = GetSpecialSystemDirectory(Win_Personal, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Personal, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sFavorites) { - rv = GetSpecialSystemDirectory(Win_Favorites, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Favorites, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sStartup) { @@ -1098,23 +1104,23 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret } else if (inAtom == nsDirectoryService::sRecent) { - rv = GetSpecialSystemDirectory(Win_Recent, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Recent, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sSendto) { - rv = GetSpecialSystemDirectory(Win_Sendto, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Sendto, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sBitbucket) { - rv = GetSpecialSystemDirectory(Win_Bitbucket, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Bitbucket, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sStartmenu) { - rv = GetSpecialSystemDirectory(Win_Startmenu, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Startmenu, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sDesktopdirectory) { - rv = GetSpecialSystemDirectory(Win_Desktopdirectory, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Desktopdirectory, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sDrives) { @@ -1122,11 +1128,11 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret } else if (inAtom == nsDirectoryService::sNetwork) { - rv = GetSpecialSystemDirectory(Win_Network, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Network, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sNethood) { - rv = GetSpecialSystemDirectory(Win_Nethood, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Nethood, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sFonts) { @@ -1134,41 +1140,41 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret } else if (inAtom == nsDirectoryService::sTemplates) { - rv = GetSpecialSystemDirectory(Win_Templates, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Templates, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sCommon_Startmenu) { - rv = GetSpecialSystemDirectory(Win_Common_Startmenu, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Common_Startmenu, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sCommon_Programs) { - rv = GetSpecialSystemDirectory(Win_Common_Programs, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Common_Programs, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sCommon_Startup) { - rv = GetSpecialSystemDirectory(Win_Common_Startup, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Common_Startup, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sCommon_Desktopdirectory) { - rv = GetSpecialSystemDirectory(Win_Common_Desktopdirectory, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Common_Desktopdirectory, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sAppdata) { - rv = GetSpecialSystemDirectory(Win_Appdata, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Appdata, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sPrinthood) { - rv = GetSpecialSystemDirectory(Win_Printhood, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Printhood, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sWinCookiesDirectory) { - rv = GetSpecialSystemDirectory(Win_Cookies, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Win_Cookies, getter_AddRefs(localFile)); } #elif defined (XP_UNIX) else if (inAtom == nsDirectoryService::sLocalDirectory) { - rv = GetSpecialSystemDirectory(Unix_LocalDirectory, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Unix_LocalDirectory, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sLibDirectory) { @@ -1176,29 +1182,29 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret } else if (inAtom == nsDirectoryService::sHomeDirectory) { - rv = GetSpecialSystemDirectory(Unix_HomeDirectory, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(Unix_HomeDirectory, getter_AddRefs(localFile)); } #elif defined (XP_OS2) else if (inAtom == nsDirectoryService::sSystemDirectory) { - rv = GetSpecialSystemDirectory(OS2_SystemDirectory, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(OS2_SystemDirectory, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sOS2Directory) { - rv = GetSpecialSystemDirectory(OS2_OS2Directory, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(OS2_OS2Directory, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sHomeDirectory) { - rv = GetSpecialSystemDirectory(OS2_HomeDirectory, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(OS2_HomeDirectory, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sDesktopDirectory) { - rv = GetSpecialSystemDirectory(OS2_DesktopDirectory, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(OS2_DesktopDirectory, getter_AddRefs(localFile)); } #elif defined (XP_BEOS) else if (inAtom == nsDirectoryService::sSettingsDirectory) { - rv = GetSpecialSystemDirectory(BeOS_SettingsDirectory, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(BeOS_SettingsDirectory, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sHomeDirectory) { @@ -1206,11 +1212,11 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret } else if (inAtom == nsDirectoryService::sDesktopDirectory) { - rv = GetSpecialSystemDirectory(BeOS_DesktopDirectory, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(BeOS_DesktopDirectory, getter_AddRefs(localFile)); } else if (inAtom == nsDirectoryService::sSystemDirectory) { - rv = GetSpecialSystemDirectory(BeOS_SystemDirectory, getter_AddRefs(localFile)); + rv = GetSpecialSystemDirectory(BeOS_SystemDirectory, getter_AddRefs(localFile)); } #endif @@ -1230,6 +1236,6 @@ nsDirectoryService::GetFiles(const char *prop, nsISimpleEnumerator **_retval) { NS_ENSURE_ARG_POINTER(_retval); *_retval = nsnull; - + return NS_ERROR_FAILURE; } diff --git a/src/libs/xpcom18a4/xpcom/io/nsLocalFile.h b/src/libs/xpcom18a4/xpcom/io/nsLocalFile.h index 4ab859aa..8201affb 100644 --- a/src/libs/xpcom18a4/xpcom/io/nsLocalFile.h +++ b/src/libs/xpcom18a4/xpcom/io/nsLocalFile.h @@ -74,9 +74,6 @@ #include "nsLocalFileOSX.h" #elif defined(XP_MAC) #include "nsLocalFileMac.h" -#elif defined(L4ENV) - /* Major hack attack!!! */ -#include "nsLocalFileL4.h" #elif defined(XP_UNIX) || defined(XP_BEOS) #include "nsLocalFileUnix.h" #elif defined(XP_OS2) diff --git a/src/libs/xpcom18a4/xpcom/io/nsLocalFileL4.cpp b/src/libs/xpcom18a4/xpcom/io/nsLocalFileL4.cpp deleted file mode 100644 index 1a3c974f..00000000 --- a/src/libs/xpcom18a4/xpcom/io/nsLocalFileL4.cpp +++ /dev/null @@ -1,549 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-1999 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Mike Shaver <shaver@mozilla.org> - * Christopher Blizzard <blizzard@mozilla.org> - * Jason Eager <jce2@po.cwru.edu> - * Stuart Parmenter <pavlov@netscape.com> - * Brendan Eich <brendan@mozilla.org> - * Pete Collins <petejc@mozdev.org> - * Paul Ashford <arougthopher@lizardland.net> - * - * Alternatively, the contents of this file may be used under the terms of - * either of the GNU General Public License Version 2 or later (the "GPL"), - * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -/** - * Implementation of nsIFile for L4 systems. - * - * Notes to all those who have something to do with this file again: I have told almost - * all functions to return NS_ERROR_FAILURE. A good starting point if you need to - * implement any of it would be to search/replace those with standard assertions. - */ - -#include "nsDirectoryServiceDefs.h" -#include "nsCRT.h" -#include "nsCOMPtr.h" -#include "nsMemory.h" -#include "nsIFile.h" -#include "nsString.h" -#include "nsReadableUtils.h" -#include "nsLocalFile.h" -#include "nsIComponentManager.h" -#include "nsXPIDLString.h" -#include "prproces.h" -#include "nsISimpleEnumerator.h" -#include "nsITimelineService.h" - -#include "nsNativeCharsetUtils.h" - -#if 0 -/* directory enumerator */ -class NS_COM -nsDirEnumeratorL4 : public nsISimpleEnumerator -{ - public: - nsDirEnumeratorL4(); - - // nsISupports interface - NS_DECL_ISUPPORTS - - // nsISimpleEnumerator interface - NS_DECL_NSISIMPLEENUMERATOR - - NS_IMETHOD Init(nsLocalFile *parent, PRBool ignored); - - private: - ~nsDirEnumeratorL4(); - - protected: - NS_IMETHOD GetNextEntry(); - -}; - -nsDirEnumeratorL4::nsDirEnumeratorL4() : - mDir(nsnull), - mEntry(nsnull) -{ - NS_ASSERTION(0, "nsDirEnumeratorL4 created!"); -} - -nsDirEnumeratorL4::~nsDirEnumeratorL4() -{ -} - -NS_IMPL_ISUPPORTS1(nsDirEnumeratorL4, nsISimpleEnumerator) - -NS_IMETHODIMP -nsDirEnumeratorL4::Init(nsLocalFile *parent, PRBool resolveSymlinks /*ignored*/) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsDirEnumeratorL4::HasMoreElements(PRBool *result) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsDirEnumeratorL4::GetNext(nsISupports **_retval) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsDirEnumeratorL4::GetNextEntry() -{ - return NS_ERROR_FAILURE; -} -#endif /* 0 */ - -nsLocalFile::nsLocalFile() -{ - NS_ASSERTION(0, "nsLocalFile created!"); -} - -nsLocalFile::nsLocalFile(const nsLocalFile& other) -{ - NS_ASSERTION(0, "nsLocalFile created!"); -} - -NS_IMPL_THREADSAFE_ISUPPORTS2(nsLocalFile, - nsIFile, - nsILocalFile) - -nsresult -nsLocalFile::nsLocalFileConstructor(nsISupports *outer, - const nsIID &aIID, - void **aInstancePtr) -{ - NS_ASSERTION(0, "nsLocalFile::nsLocalFileConstructor called!"); - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::Clone(nsIFile **file) -{ - // Just copy-construct ourselves - *file = new nsLocalFile(*this); - if (!*file) - return NS_ERROR_OUT_OF_MEMORY; - - NS_ADDREF(*file); - - return NS_OK; -} - -NS_IMETHODIMP -nsLocalFile::InitWithNativePath(const nsACString &filePath) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::OpenNSPRFileDesc(PRInt32 flags, PRInt32 mode, PRFileDesc **_retval) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::OpenANSIFileDesc(const char *mode, FILE **_retval) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::Create(PRUint32 type, PRUint32 permissions) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::AppendNative(const nsACString &fragment) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::AppendRelativeNativePath(const nsACString &fragment) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::Normalize() -{ - return NS_ERROR_FAILURE; -} - -void -nsLocalFile::LocateNativeLeafName(nsACString::const_iterator &begin, - nsACString::const_iterator &end) -{ -} - -NS_IMETHODIMP -nsLocalFile::GetNativeLeafName(nsACString &aLeafName) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::SetNativeLeafName(const nsACString &aLeafName) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::GetNativePath(nsACString &_retval) -{ - return NS_ERROR_FAILURE; -} - -nsresult -nsLocalFile::GetNativeTargetPathName(nsIFile *newParent, - const nsACString &newName, - nsACString &_retval) -{ - return NS_ERROR_FAILURE; -} - -nsresult -nsLocalFile::CopyDirectoryTo(nsIFile *newParent) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::CopyToNative(nsIFile *newParent, const nsACString &newName) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::CopyToFollowingLinksNative(nsIFile *newParent, const nsACString &newName) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::MoveToNative(nsIFile *newParent, const nsACString &newName) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::Remove(PRBool recursive) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::GetLastModifiedTime(PRInt64 *aLastModTime) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::SetLastModifiedTime(PRInt64 aLastModTime) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::GetLastModifiedTimeOfLink(PRInt64 *aLastModTimeOfLink) -{ - return NS_ERROR_FAILURE; -} - -/* - * utime(2) may or may not dereference symlinks, joy. - */ -NS_IMETHODIMP -nsLocalFile::SetLastModifiedTimeOfLink(PRInt64 aLastModTimeOfLink) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::GetPermissions(PRUint32 *aPermissions) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::GetPermissionsOfLink(PRUint32 *aPermissionsOfLink) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::SetPermissions(PRUint32 aPermissions) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::SetPermissionsOfLink(PRUint32 aPermissions) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::GetFileSize(PRInt64 *aFileSize) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::SetFileSize(PRInt64 aFileSize) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::GetFileSizeOfLink(PRInt64 *aFileSize) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::GetParent(nsIFile **aParent) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::Exists(PRBool *_retval) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::IsWritable(PRBool *_retval) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::IsReadable(PRBool *_retval) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::IsExecutable(PRBool *_retval) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::IsDirectory(PRBool *_retval) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::IsFile(PRBool *_retval) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::IsHidden(PRBool *_retval) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::IsSymlink(PRBool *_retval) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::IsSpecial(PRBool *_retval) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::Equals(nsIFile *inFile, PRBool *_retval) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::Contains(nsIFile *inFile, PRBool recur, PRBool *_retval) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::GetNativeTarget(nsACString &_retval) -{ - return NS_ERROR_FAILURE; -} - -/* attribute PRBool followLinks; */ -NS_IMETHODIMP -nsLocalFile::GetFollowLinks(PRBool *aFollowLinks) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::SetFollowLinks(PRBool aFollowLinks) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::GetDirectoryEntries(nsISimpleEnumerator **entries) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::Load(PRLibrary **_retval) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::GetPersistentDescriptor(nsACString &aPersistentDescriptor) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::SetPersistentDescriptor(const nsACString &aPersistentDescriptor) -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::Reveal() -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsLocalFile::Launch() -{ - return NS_ERROR_FAILURE; -} - -nsresult -NS_NewNativeLocalFile(const nsACString &path, PRBool followSymlinks, nsILocalFile **result) -{ - return NS_ERROR_FAILURE; -} - -// Unicode interface Wrapper -nsresult -nsLocalFile::InitWithPath(const nsAString &filePath) -{ - return NS_ERROR_FAILURE; -} -nsresult -nsLocalFile::Append(const nsAString &node) -{ - return NS_ERROR_FAILURE; -} -nsresult -nsLocalFile::AppendRelativePath(const nsAString &node) -{ - return NS_ERROR_FAILURE; -} -nsresult -nsLocalFile::GetLeafName(nsAString &aLeafName) -{ - return NS_ERROR_FAILURE; -} -nsresult -nsLocalFile::SetLeafName(const nsAString &aLeafName) -{ - return NS_ERROR_FAILURE; -} -nsresult -nsLocalFile::GetPath(nsAString &_retval) -{ - return NS_ERROR_FAILURE; -} -nsresult -nsLocalFile::CopyTo(nsIFile *newParentDir, const nsAString &newName) -{ - return NS_ERROR_FAILURE; -} -nsresult -nsLocalFile::CopyToFollowingLinks(nsIFile *newParentDir, const nsAString &newName) -{ - return NS_ERROR_FAILURE; -} -nsresult -nsLocalFile::MoveTo(nsIFile *newParentDir, const nsAString &newName) -{ - return NS_ERROR_FAILURE; -} -nsresult -nsLocalFile::GetTarget(nsAString &_retval) -{ - return NS_ERROR_FAILURE; -} -nsresult -NS_NewLocalFile(const nsAString &path, PRBool followLinks, nsILocalFile* *result) -{ - return NS_ERROR_FAILURE; -} - -//----------------------------------------------------------------------------- -// global init/shutdown -//----------------------------------------------------------------------------- - -void -nsLocalFile::GlobalInit() -{ -} - -void -nsLocalFile::GlobalShutdown() -{ -} diff --git a/src/libs/xpcom18a4/xpcom/io/nsLocalFileL4.h b/src/libs/xpcom18a4/xpcom/io/nsLocalFileL4.h deleted file mode 100644 index 80af548c..00000000 --- a/src/libs/xpcom18a4/xpcom/io/nsLocalFileL4.h +++ /dev/null @@ -1,94 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is Mozilla Communicator client code, released - * March 31, 1998. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-1999 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Mike Shaver <shaver@mozilla.org> - * - * Alternatively, the contents of this file may be used under the terms of - * either of the GNU General Public License Version 2 or later (the "GPL"), - * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -/* - * Implementation of nsIFile for L4 systems. - */ - -#ifndef _nsLocalFileL4_H_ -#define _nsLocalFileL4_H_ - -#include "nscore.h" -#include "nsString.h" -#include "nsReadableUtils.h" - -class NS_COM nsLocalFile : public nsILocalFile -{ -public: - NS_DEFINE_STATIC_CID_ACCESSOR(NS_LOCAL_FILE_CID) - - nsLocalFile(); - - static NS_METHOD nsLocalFileConstructor(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr); - - // nsISupports - NS_DECL_ISUPPORTS - - // nsIFile - NS_DECL_NSIFILE - - // nsILocalFile - NS_DECL_NSILOCALFILE - -public: - static void GlobalInit(); - static void GlobalShutdown(); - -private: - nsLocalFile(const nsLocalFile& other); - ~nsLocalFile() {} - -protected: - void LocateNativeLeafName(nsACString::const_iterator &, - nsACString::const_iterator &); - - nsresult CopyDirectoryTo(nsIFile *newParent); - nsresult CreateAllAncestors(PRUint32 permissions); - nsresult GetNativeTargetPathName(nsIFile *newParent, - const nsACString &newName, - nsACString &_retval); - - void InvalidateCache() { } - nsresult FillStatCache(); - - nsresult CreateAndKeepOpen(PRUint32 type, PRIntn flags, - PRUint32 permissions, PRFileDesc **_retval); -}; - -#endif /* _nsLocalFileL4_H_ */ diff --git a/src/libs/xpcom18a4/xpcom/io/nsNativeCharsetUtils.cpp b/src/libs/xpcom18a4/xpcom/io/nsNativeCharsetUtils.cpp index a9cc2101..55b5c63c 100644 --- a/src/libs/xpcom18a4/xpcom/io/nsNativeCharsetUtils.cpp +++ b/src/libs/xpcom18a4/xpcom/io/nsNativeCharsetUtils.cpp @@ -642,13 +642,9 @@ nsNativeCharsetConverter::GlobalInit() char a = 'a'; unsigned int w = 0; -#ifndef L4ENV int res = mbtowc((wchar_t *) &w, &a, 1); gWCharIsUnicode = (res != -1 && w == 'a'); -#else - gWCharIsUnicode = 0; -#endif #ifdef DEBUG if (!gWCharIsUnicode) @@ -663,8 +659,6 @@ nsNativeCharsetConverter::NativeToUnicode(const char **input, PRUint32 *outputLeft) { if (gWCharIsUnicode) { -#ifndef L4ENV - /* We don't have any wchar support built into uclibc just now */ int incr; // cannot use wchar_t here since it may have been redefined (e.g., @@ -689,7 +683,6 @@ nsNativeCharsetConverter::NativeToUnicode(const char **input, (*output)++; (*outputLeft)--; } -#endif /* not defined L4ENV */ } else { // wchar_t isn't unicode, so the best we can do is treat the @@ -707,8 +700,6 @@ nsNativeCharsetConverter::UnicodeToNative(const PRUnichar **input, PRUint32 *outputLeft) { if (gWCharIsUnicode) { -#ifndef L4ENV - /* We don't have any wchar support built into uclibc just now */ int incr; while (*inputLeft && *outputLeft >= MB_CUR_MAX) { @@ -730,7 +721,6 @@ nsNativeCharsetConverter::UnicodeToNative(const PRUnichar **input, (*input)++; (*inputLeft)--; } -#endif /* not defined L4ENV */ } else { // wchar_t isn't unicode, so the best we can do is treat the diff --git a/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h b/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h index 688533de..23eb23ee 100644 --- a/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h +++ b/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h @@ -67,8 +67,7 @@ * */ -#if defined(LINUX) || defined(L4) -/* I am assuming that since we are using the Linux compiler for L4, the same will hold true... */ +#if defined(LINUX) #if (__GNUC__ == 2) && (__GNUC_MINOR__ <= 7) /* Old gcc 2.7.x.x. What does gcc 2.8.x do?? */ |