summaryrefslogtreecommitdiff
path: root/indra/llvfs
diff options
context:
space:
mode:
authorNyx Linden <nyx@lindenlab.com>2013-01-24 16:22:49 -0500
committerNyx Linden <nyx@lindenlab.com>2013-01-24 16:22:49 -0500
commit11fe124ae96721b0d0f960732e8628fe0e2f84c4 (patch)
treea8525988388de004be72251c0d7783a61d314888 /indra/llvfs
parentcebde0a32b4a8163010d9cbf5e6b3036865ed943 (diff)
parentb40fad02de170b5da179cacc22f32f5f25ffd7cb (diff)
merging in viewer-beta.
Most of the merge was clean, a couple conflicts. Brought over a couple patches manually for llpolymesh.
Diffstat (limited to 'indra/llvfs')
-rwxr-xr-x[-rw-r--r--]indra/llvfs/CMakeLists.txt6
-rw-r--r--indra/llvfs/llvfile.cpp7
2 files changed, 8 insertions, 5 deletions
diff --git a/indra/llvfs/CMakeLists.txt b/indra/llvfs/CMakeLists.txt
index 3c68b279f7..67dce8c073 100644..100755
--- a/indra/llvfs/CMakeLists.txt
+++ b/indra/llvfs/CMakeLists.txt
@@ -8,6 +8,7 @@ include(UnixInstall)
include_directories(
${LLCOMMON_INCLUDE_DIRS}
+ ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
)
set(llvfs_SOURCE_FILES
@@ -44,12 +45,12 @@ if (LINUX)
LIST(APPEND llvfs_SOURCE_FILES lldir_linux.cpp)
LIST(APPEND llvfs_HEADER_FILES lldir_linux.h)
- if (VIEWER AND INSTALL)
+ if (INSTALL)
set_source_files_properties(lldir_linux.cpp
PROPERTIES COMPILE_FLAGS
"-DAPP_RO_DATA_DIR=\\\"${APP_SHARE_DIR}\\\""
)
- endif (VIEWER AND INSTALL)
+ endif (INSTALL)
endif (LINUX)
if (WINDOWS)
@@ -70,6 +71,7 @@ set(vfs_BOOST_LIBRARIES
)
target_link_libraries(llvfs
+ ${LLCOMMON_LIBRARIES}
${vfs_BOOST_LIBRARIES}
)
diff --git a/indra/llvfs/llvfile.cpp b/indra/llvfs/llvfile.cpp
index ca749c5eaf..03d2cc25e3 100644
--- a/indra/llvfs/llvfile.cpp
+++ b/indra/llvfs/llvfile.cpp
@@ -32,6 +32,7 @@
#include "llthread.h"
#include "llstat.h"
#include "llvfs.h"
+#include "llmemory.h"
const S32 LLVFile::READ = 0x00000001;
const S32 LLVFile::WRITE = 0x00000002;
@@ -134,13 +135,13 @@ U8* LLVFile::readFile(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, S
data = NULL;
}
else
- {
- data = new U8[file_size];
+ {
+ data = (U8*) ll_aligned_malloc_16(file_size);
file.read(data, file_size); /* Flawfinder: ignore */
if (file.getLastBytesRead() != (S32)file_size)
{
- delete[] data;
+ ll_aligned_free(data);
data = NULL;
file_size = 0;
}