diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-05-08 18:41:20 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-05-08 18:41:20 +0000 |
commit | 63e7894148fdc7064b422bf65a0b75ffcf293496 (patch) | |
tree | 4cca89d9da518f264001e7cb4950f453647f2e5f /indra/llcommon | |
parent | a75b85112ffa4b7140561083c2e5de05fb510805 (diff) |
QAR-570 maint-render-4 merge
merge -r 87067:87077 svn+ssh://svn.lindenlab.com/svn/linden/branches/maint-render/maint-render-4-merge -> release. dataserver-is-deprecated.
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/llfile.cpp | 6 | ||||
-rw-r--r-- | indra/llcommon/llfile.h | 2 | ||||
-rw-r--r-- | indra/llcommon/llmemory.cpp | 2 | ||||
-rw-r--r-- | indra/llcommon/llprocessor.cpp | 2 | ||||
-rw-r--r-- | indra/llcommon/llsys.cpp | 14 |
5 files changed, 14 insertions, 12 deletions
diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp index 3c590a0d49..4e868eb5a1 100644 --- a/indra/llcommon/llfile.cpp +++ b/indra/llcommon/llfile.cpp @@ -160,7 +160,7 @@ LLFILE * LLFile::_Fiopen(const char *filename, std::ios::openmode mode,int) // p | ios_base::binary, 0}; - FILE *fp = 0; + LLFILE *fp = 0; int n; ios_base::openmode atendflag = mode & ios_base::ate; ios_base::openmode norepflag = mode & ios_base::_Noreplace; @@ -207,7 +207,7 @@ void llifstream::open(const char* _Filename, /* Flawfinder: ignore */ int _Prot) { // open a C stream with specified mode - FILE* filep = LLFile::_Fiopen(_Filename,_Mode | ios_base::in, _Prot); + LLFILE* filep = LLFile::_Fiopen(_Filename,_Mode | ios_base::in, _Prot); if(filep == NULL) { _Myios::setstate(ios_base::failbit); /*Flawfinder: ignore*/ @@ -258,7 +258,7 @@ void llofstream::open(const char* _Filename, /* Flawfinder: ignore */ int _Prot) { // open a C stream with specified mode - FILE* filep = LLFile::_Fiopen(_Filename,_Mode | ios_base::out, _Prot); + LLFILE* filep = LLFile::_Fiopen(_Filename,_Mode | ios_base::out, _Prot); if(filep == NULL) { _Myios::setstate(ios_base::failbit); /*Flawfinder: ignore*/ diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h index da1ad6a34e..a8a6965c0d 100644 --- a/indra/llcommon/llfile.h +++ b/indra/llcommon/llfile.h @@ -42,6 +42,8 @@ typedef FILE LLFILE; +#include <fstream> + #ifdef LL_WINDOWS #define USE_LLFILESTREAMS 1 #else diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp index e52a137254..079f2b3258 100644 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -387,7 +387,7 @@ U64 getCurrentRSS() U64 getCurrentRSS() { static const char statPath[] = "/proc/self/stat"; - FILE *fp = fopen(statPath, "r"); + LLFILE *fp = LLFile::fopen(statPath, "r"); U64 rss = 0; if (fp == NULL) diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index 4977ead91c..29a3cf32a8 100644 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -2230,7 +2230,7 @@ bool CProcessor::WriteInfoTextFile(const char *strFilename) return false; // Then we create a new file (CREATE_ALWAYS) - FILE *file = LLFile::fopen(strFilename, "w"); /* Flawfinder: ignore */ + LLFILE *file = LLFile::fopen(strFilename, "w"); /* Flawfinder: ignore */ if (!file) return false; diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 98393dacd1..8700d9681e 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -293,7 +293,7 @@ U32 LLOSInfo::getProcessVirtualSizeKB() #if LL_WINDOWS #endif #if LL_LINUX - FILE* status_filep = LLFile::fopen("/proc/self/status", "rb"); + LLFILE* status_filep = LLFile::fopen("/proc/self/status", "rb"); S32 numRead = 0; char buff[STATUS_SIZE]; /* Flawfinder: ignore */ @@ -336,7 +336,7 @@ U32 LLOSInfo::getProcessResidentSizeKB() #if LL_WINDOWS #endif #if LL_LINUX - FILE* status_filep = LLFile::fopen("/proc/self/status", "rb"); + LLFILE* status_filep = LLFile::fopen("/proc/self/status", "rb"); if (status_filep != NULL) { S32 numRead = 0; @@ -398,7 +398,7 @@ LLCPUInfo::LLCPUInfo() #elif LL_LINUX std::map< LLString, LLString > cpuinfo; - FILE* cpuinfo_fp = LLFile::fopen(CPUINFO_FILE, "rb"); + LLFILE* cpuinfo_fp = LLFile::fopen(CPUINFO_FILE, "rb"); if(cpuinfo_fp) { char line[MAX_STRING]; @@ -486,7 +486,7 @@ void LLCPUInfo::stream(std::ostream& s) const } #else // *NOTE: This works on linux. What will it do on other systems? - FILE* cpuinfo = LLFile::fopen(CPUINFO_FILE, "rb"); + LLFILE* cpuinfo = LLFile::fopen(CPUINFO_FILE, "rb"); if(cpuinfo) { char line[MAX_STRING]; @@ -621,7 +621,7 @@ void LLMemoryInfo::stream(std::ostream& s) const s << "Total Physical KB: " << phys << std::endl; #else // *NOTE: This works on linux. What will it do on other systems? - FILE* meminfo = LLFile::fopen(MEMINFO_FILE,"rb"); + LLFILE* meminfo = LLFile::fopen(MEMINFO_FILE,"rb"); if(meminfo) { char line[MAX_STRING]; /* Flawfinder: ignore */ @@ -665,7 +665,7 @@ BOOL gunzip_file(const char *srcfile, const char *dstfile) BOOL retval = FALSE; gzFile src = NULL; U8 buffer[UNCOMPRESS_BUFFER_SIZE]; - FILE *dst = NULL; + LLFILE *dst = NULL; S32 bytes = 0; (void *) strcpy(tmpfile, dstfile); /* Flawfinder: ignore */ (void *) strncat(tmpfile, ".t", sizeof(tmpfile) - strlen(tmpfile) -1); /* Flawfinder: ignore */ @@ -700,7 +700,7 @@ BOOL gzip_file(const char *srcfile, const char *dstfile) BOOL retval = FALSE; U8 buffer[COMPRESS_BUFFER_SIZE]; gzFile dst = NULL; - FILE *src = NULL; + LLFILE *src = NULL; S32 bytes = 0; (void *) strcpy(tmpfile, dstfile); /* Flawfinder: ignore */ (void *) strncat(tmpfile, ".t", sizeof(tmpfile) - strlen(tmpfile) -1); /* Flawfinder: ignore */ |