summaryrefslogtreecommitdiffstats
path: root/sal
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-01-19 12:23:23 +0000
committerMichael Meeks <michael.meeks@suse.com>2012-01-19 12:25:02 +0000
commit4a086fca7b0a77c20bc9f1c97507966e2861f3da (patch)
treea065ccbf7fd0adb66c4e335d181056f27f52512a /sal
parentC++ is a nicely standardized language (diff)
downloadcore-4a086fca7b0a77c20bc9f1c97507966e2861f3da.tar.gz
core-4a086fca7b0a77c20bc9f1c97507966e2861f3da.zip
fix SvStream to not require a custom open or lstat method.
Diffstat (limited to 'sal')
-rw-r--r--sal/inc/osl/detail/file.h12
-rw-r--r--sal/inc/osl/file.h1
-rw-r--r--sal/osl/unx/file.cxx2
-rw-r--r--sal/osl/unx/file_stat.cxx12
-rw-r--r--sal/util/sal.map2
5 files changed, 2 insertions, 27 deletions
diff --git a/sal/inc/osl/detail/file.h b/sal/inc/osl/detail/file.h
index 108d2306b36d..065c3551b108 100644
--- a/sal/inc/osl/detail/file.h
+++ b/sal/inc/osl/detail/file.h
@@ -49,25 +49,13 @@ extern "C" {
#define osl_File_OpenFlag_Trunc 0x00000010L
#define osl_File_OpenFlag_NoExcl 0x00000020L
-/* Variant of osl_openFile that takes the file pathname directly as a
- char*
-*/
-
-SAL_DLLPUBLIC oslFileError SAL_CALL osl_openFilePath(
- const char *cpFilePath,
- oslFileHandle *pHandle,
- sal_uInt32 uFlags );
-
/* Compare directory items for being the same underlying file
* this unwinds unix hard-links and symlinks etc.
*/
SAL_DLLPUBLIC sal_Bool SAL_CALL osl_identicalDirectoryItem(oslDirectory a, oslDirectory b);
-SAL_DLLPUBLIC oslFileError SAL_CALL osl_lstatFilePath( const char *cpFilePath, struct stat *statb );
-
/* Get the OS specific "handle" of an open file. */
-
SAL_DLLPUBLIC oslFileError SAL_CALL osl_getFileOSHandle(
oslFileHandle Handle,
sal_IntPtr *piFileHandle );
diff --git a/sal/inc/osl/file.h b/sal/inc/osl/file.h
index 2a8cf378330b..0e0d7657679c 100644
--- a/sal/inc/osl/file.h
+++ b/sal/inc/osl/file.h
@@ -664,6 +664,7 @@ typedef void *oslFileHandle;
#define osl_File_OpenFlag_Write 0x00000002L
#define osl_File_OpenFlag_Create 0x00000004L
#define osl_File_OpenFlag_NoLock 0x00000008L
+/* larger bit-fields reserved for internal use cf. detail/file.h */
/** Open a regular file.
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 64ce977d960e..7bb6bae051f1 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -892,7 +892,7 @@ SAL_CALL osl_openMemoryAsFile( void *address, size_t size, oslFileHandle *pHandl
#define OPEN_CREATE_FLAGS ( O_CREAT | O_RDWR )
#endif
-oslFileError
+static oslFileError
SAL_CALL osl_openFilePath( const char *cpFilePath, oslFileHandle* pHandle, sal_uInt32 uFlags )
{
oslFileError eRet;
diff --git a/sal/osl/unx/file_stat.cxx b/sal/osl/unx/file_stat.cxx
index 0477a52e555a..320744fc0357 100644
--- a/sal/osl/unx/file_stat.cxx
+++ b/sal/osl/unx/file_stat.cxx
@@ -462,7 +462,6 @@ SAL_CALL osl_identicalDirectoryItem( oslDirectoryItem a, oslDirectoryItem b)
return sal_True;
fprintf (stderr, "We have to do an inode compare !\n");
-
/*
int rc = stat_c( cpFilePath, statb );
@@ -475,15 +474,4 @@ SAL_CALL osl_identicalDirectoryItem( oslDirectoryItem a, oslDirectoryItem b)
return sal_False;
}
-oslFileError
-SAL_CALL osl_lstatFilePath( const char *cpFilePath, struct stat *statb )
-{
- int rc = lstat_c( cpFilePath, statb );
-
- if (rc == -1)
- return oslTranslateFileError(OSL_FET_ERROR, errno);
- else
- return osl_File_E_None;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/util/sal.map b/sal/util/sal.map
index 26c30fc03191..02610f554bd2 100644
--- a/sal/util/sal.map
+++ b/sal/util/sal.map
@@ -647,9 +647,7 @@ PRIVATE_textenc.1 { # LibreOffice 3.6
PRIVATE_file.1 { # LibreOffice 3.6
global:
- osl_openFilePath;
osl_identicalDirectoryItem;
- osl_lstatFilePath;
osl_getFileOSHandle;
};