diff options
author | sb <sb@openoffice.org> | 2010-01-21 12:06:31 +0100 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-01-21 12:06:31 +0100 |
commit | 368990f054d6caf666374d23e230a2b5dc2e87b7 (patch) | |
tree | d5979e4872a45c1c43eda6df98116875dd30f88c /sal | |
parent | 9ce3f07dc735e37889c040c6064136de783ef54e (diff) | |
parent | a2cadf4bc167c9a5ad534af03f7960c6ef477c05 (diff) |
sb118: merged in DEV300_m70
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/file_misc.cxx | 18 | ||||
-rw-r--r-- | sal/util/makefile.mk | 6 | ||||
-rw-r--r-- | sal/util/salalloc.list | 7 |
3 files changed, 22 insertions, 9 deletions
diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx index b9b2b6a23c7d..0bde1616f6ae 100644 --- a/sal/osl/unx/file_misc.cxx +++ b/sal/osl/unx/file_misc.cxx @@ -1013,6 +1013,15 @@ static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszD return nRet; } + /* HACK: because memory mapping fails on various + platforms if the size of the source file is 0 byte */ + if (0 == nSourceSize) + { + close(SourceFileFD); + close(DestFileFD); + return 0; + } + // read and lseek are used to check the possibility to access the data // not a nice solution, but it allows to avoid a crash in case it is an opened samba file // generally, reading of one byte should not affect the performance @@ -1034,15 +1043,6 @@ static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszD return nRet; } - /* HACK: because memory mapping fails on various - platforms if the size of the source file is 0 byte */ - if (0 == nSourceSize) - { - close(SourceFileFD); - close(DestFileFD); - return 0; - } - size_t nWritten = 0; size_t nRemains = nSourceSize; diff --git a/sal/util/makefile.mk b/sal/util/makefile.mk index 795764b75b29..9cd1b0f9671a 100644 --- a/sal/util/makefile.mk +++ b/sal/util/makefile.mk @@ -160,6 +160,12 @@ SHL1STDLIBS+=-lcrypt .ENDIF .ENDIF +# #i105898# required for LD_PRELOAD libsalalloc_malloc.so +# if sal is linked with -Bsymbolic-functions +.IF "$(HAVE_LD_BSYMBOLIC_FUNCTIONS)" == "TRUE" +SHL1LINKFLAGS+=-Wl,--dynamic-list=salalloc.list +.ENDIF # .IF "$(HAVE_LD_BSYMBOLIC_FUNCTIONS)" == "TRUE" + SHL1LIBS+=$(SLB)$/$(TARGET).lib .IF "$(linkinc)" != "" diff --git a/sal/util/salalloc.list b/sal/util/salalloc.list new file mode 100644 index 000000000000..303d225dda7f --- /dev/null +++ b/sal/util/salalloc.list @@ -0,0 +1,7 @@ +{ + rtl_allocateMemory; + rtl_reallocateMemory; + rtl_freeMemory; + rtl_allocateZeroMemory; + rtl_freeZeroMemory; +}; |