summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-05-13 08:47:30 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-05-13 08:47:30 +0200
commit3f72ad159c881d0a11e638c84064172f48f75026 (patch)
tree579c920b7b49d28f20bac636cb067ddd58e17437 /sal
parenta5b93782a18a2ddb6dee4033a578d919b10b6964 (diff)
osl_openMemoryAsFile is internal, Android-only functionality
Change-Id: I36734b0e5e1c0b15ed4f0845450b444b23579ffe
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/file.cxx12
-rw-r--r--sal/qa/osl/file/osl_File.cxx29
-rw-r--r--sal/util/sal.map1
3 files changed, 5 insertions, 37 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 792345da0882..99fee40c956d 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -780,10 +780,12 @@ static bool osl_file_queryLocking (sal_uInt32 uFlags)
return false;
}
-#ifdef UNX
+#if defined ANDROID
+
+namespace {
static oslFileError
-osl_openMemoryAsFile( void *address, size_t size, oslFileHandle *pHandle, const char *path )
+openMemoryAsFile( void *address, size_t size, oslFileHandle *pHandle, const char *path )
{
oslFileError eRet;
FileHandle_Impl * pImpl = new FileHandle_Impl (-1, FileHandle_Impl::KIND_MEM, path);
@@ -805,10 +807,6 @@ osl_openMemoryAsFile( void *address, size_t size, oslFileHandle *pHandle, const
return osl_File_E_None;
}
-oslFileError
-SAL_CALL osl_openMemoryAsFile( void *address, size_t size, oslFileHandle *pHandle )
-{
- return osl_openMemoryAsFile( address, size, pHandle, "<anon>" );
}
#endif
@@ -848,7 +846,7 @@ SAL_CALL osl_openFilePath( const char *cpFilePath, oslFileHandle* pHandle, sal_u
errno = ENOENT;
return osl_File_E_NOENT;
}
- return osl_openMemoryAsFile(address, size, pHandle, cpFilePath);
+ return openMemoryAsFile(address, size, pHandle, cpFilePath);
}
#endif
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index a403d339a9b3..0a387e8803d3 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -2942,38 +2942,9 @@ namespace osl_File
*pEOF &&
( 0 == strncmp( ( const char * )aSequence.getArray(), &pBuffer_Char[26], 26 ) ) );
}
-#ifdef UNX
- void readLine_android()
- {
- static const char buffer[] =
- "Hello\n\r\n\a\n"
- "Fun=Badness\n"
- "Some=Somethingelse\n\r";
- sal_Int32 aHash = rtl_str_hashCode( buffer );
- for (size_t i = 0; i < sizeof (buffer); i += 7)
- {
- oslFileHandle pFile( 0 );
- CPPUNIT_ASSERT( osl_openMemoryAsFile( (void *)buffer,
- sizeof( buffer ) - i, &pFile )
- == osl_File_E_None );
- for (;;)
- {
- sal_Sequence *pSequence( 0 );
- if (osl_readLine( pFile, &pSequence ) != osl_File_E_None)
- break;
- rtl_byte_sequence_release (pSequence);
- }
- CPPUNIT_ASSERT( osl_closeFile( pFile ) == osl_File_E_None );
- }
- CPPUNIT_ASSERT( aHash == rtl_str_hashCode( buffer ) );
- }
-#endif
CPPUNIT_TEST_SUITE( readLine );
CPPUNIT_TEST( readLine_001 );
CPPUNIT_TEST( readLine_002 );
-#ifdef UNX
- CPPUNIT_TEST( readLine_android );
-#endif
CPPUNIT_TEST_SUITE_END();
};// class readLine
diff --git a/sal/util/sal.map b/sal/util/sal.map
index 900d07760d36..8380e7e4786b 100644
--- a/sal/util/sal.map
+++ b/sal/util/sal.map
@@ -709,7 +709,6 @@ PRIVATE_textenc.1 { # LibreOffice 3.6
PRIVATE_file.1 { # LibreOffice 3.6
global:
osl_getFileOSHandle;
- osl_openMemoryAsFile;
};
# Unique libstdc++ symbols: