diff options
Diffstat (limited to 'xpcom/glue')
-rw-r--r-- | xpcom/glue/FileUtils.cpp | 12 | ||||
-rw-r--r-- | xpcom/glue/nsCRTGlue.cpp | 19 | ||||
-rw-r--r-- | xpcom/glue/standalone/nsXPCOMGlue.cpp | 2 |
3 files changed, 7 insertions, 26 deletions
diff --git a/xpcom/glue/FileUtils.cpp b/xpcom/glue/FileUtils.cpp index 53fe68708..65a6c1e82 100644 --- a/xpcom/glue/FileUtils.cpp +++ b/xpcom/glue/FileUtils.cpp @@ -226,7 +226,7 @@ mozilla::ReadAheadLib(nsIFile* aFile) return; } ReadAheadLib(path.get()); -#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX) +#elif defined(LINUX) || defined(XP_MACOSX) nsAutoCString nativePath; if (!aFile || NS_FAILED(aFile->GetNativePath(nativePath))) { return; @@ -245,7 +245,7 @@ mozilla::ReadAheadFile(nsIFile* aFile, const size_t aOffset, return; } ReadAheadFile(path.get(), aOffset, aCount, aOutFd); -#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX) +#elif defined(LINUX) || defined(XP_MACOSX) nsAutoCString nativePath; if (!aFile || NS_FAILED(aFile->GetNativePath(nativePath))) { return; @@ -256,7 +256,7 @@ mozilla::ReadAheadFile(nsIFile* aFile, const size_t aOffset, #endif // !defined(XPCOM_GLUE) -#if defined(LINUX) && !defined(ANDROID) +#if defined(LINUX) static const unsigned int bufsize = 4096; @@ -382,7 +382,7 @@ mozilla::ReadAhead(mozilla::filedesc_t aFd, const size_t aOffset, // Restore the file pointer SetFilePointerEx(aFd, fpOriginal, nullptr, FILE_BEGIN); -#elif defined(LINUX) && !defined(ANDROID) +#elif defined(LINUX) readahead(aFd, aOffset, aCount); @@ -405,7 +405,7 @@ mozilla::ReadAheadLib(mozilla::pathstr_t aFilePath) } #if defined(XP_WIN) ReadAheadFile(aFilePath); -#elif defined(LINUX) && !defined(ANDROID) +#elif defined(LINUX) int fd = open(aFilePath, O_RDONLY); if (fd < 0) { return; @@ -532,7 +532,7 @@ mozilla::ReadAheadFile(mozilla::pathstr_t aFilePath, const size_t aOffset, if (!aOutFd) { CloseHandle(fd); } -#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX) || defined(XP_SOLARIS) +#elif defined(LINUX) || defined(XP_MACOSX) || defined(XP_SOLARIS) if (!aFilePath) { if (aOutFd) { *aOutFd = -1; diff --git a/xpcom/glue/nsCRTGlue.cpp b/xpcom/glue/nsCRTGlue.cpp index 03c77da2b..4cf68df2e 100644 --- a/xpcom/glue/nsCRTGlue.cpp +++ b/xpcom/glue/nsCRTGlue.cpp @@ -22,11 +22,6 @@ #include "mozilla/UniquePtr.h" #endif -#ifdef ANDROID -#include <android/log.h> -#include <unistd.h> -#endif - using namespace mozilla; const char* @@ -365,20 +360,6 @@ vprintf_stderr(const char* aFmt, va_list aArgs) fclose(fp); } - -#elif defined(ANDROID) -void -vprintf_stderr(const char* aFmt, va_list aArgs) -{ - if (sStderrCallback) { - va_list argsCpy; - VARARGS_ASSIGN(argsCpy, aArgs); - sStderrCallback(aFmt, aArgs); - va_end(argsCpy); - } - - __android_log_vprint(ANDROID_LOG_INFO, "Gecko", aFmt, aArgs); -} #else void vprintf_stderr(const char* aFmt, va_list aArgs) diff --git a/xpcom/glue/standalone/nsXPCOMGlue.cpp b/xpcom/glue/standalone/nsXPCOMGlue.cpp index b657d7050..73cbc179e 100644 --- a/xpcom/glue/standalone/nsXPCOMGlue.cpp +++ b/xpcom/glue/standalone/nsXPCOMGlue.cpp @@ -80,7 +80,7 @@ CloseLibHandle(LibHandleType aLibHandle) #else #include <dlfcn.h> -#if defined(MOZ_LINKER) && !defined(ANDROID) +#ifdef MOZ_LINKER extern "C" { NS_HIDDEN __typeof(dlopen) __wrap_dlopen; NS_HIDDEN __typeof(dlsym) __wrap_dlsym; |