Kaydet (Commit) baf97f3c authored tarafından Jan Holesovsky's avatar Jan Holesovsky

Merge branch 'master' of git://anongit.freedesktop.org/libreoffice/ure

Conflicts:
	sal/osl/unx/nlsupport.c
......@@ -59,10 +59,10 @@ SHL1TARGET= $(UNOCOMPONENT1)
SHL1STDLIBS= \
$(CPPULIB) \
$(CPPUHELPER) \
$(SALLIB) \
$(SALHELPERLIB)
$(CPPULIB) \
$(SALHELPERLIB) \
$(SALLIB)
.IF "$(GUI)" == "WNT"
......
......@@ -39,6 +39,7 @@
#include "rtl/byteseq.hxx"
#include "rtl/ustrbuf.hxx"
#include "rtl/instance.hxx"
#include <salhelper/linkhelper.hxx>
#include "boost/scoped_array.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include <utility>
......@@ -59,6 +60,7 @@
#include "sunjre.hxx"
#include "vendorlist.hxx"
#include "diagnostics.h"
using namespace osl;
using namespace std;
......@@ -821,32 +823,20 @@ bool getJREInfoByPath(const rtl::OUString& path,
OUString resolveDirPath(const OUString & path)
{
OUString ret;
OUString sResolved;
//getAbsoluteFileURL also resolves links
if (File::getAbsoluteFileURL(
OUSTR("file:///"), path, sResolved) != File::E_None)
return OUString();
//check if this is a valid path and if it is a directory
DirectoryItem item;
if (DirectoryItem::get(sResolved, item) == File::E_None)
salhelper::LinkResolver aResolver(osl_FileStatus_Mask_Type |
osl_FileStatus_Mask_FileURL);
if (aResolver.fetchFileStatus(path) == osl::FileBase::E_None)
{
FileStatus status(osl_FileStatus_Mask_Type |
osl_FileStatus_Mask_LinkTargetURL |
osl_FileStatus_Mask_FileURL);
if (item.getFileStatus(status) == File::E_None
&& status.getFileType() == FileStatus::Directory)
//check if this is a directory
if (aResolver.m_aStatus.getFileType() == FileStatus::Directory)
{
#ifndef JVM_ONE_PATH_CHECK
ret = sResolved;
ret = aResolver.m_aStatus.getFileURL();
#else
ret = path;
#endif
}
}
else
return OUString();
return ret;
}
/** Checks if the path is a file. If it is a link to a file than
......@@ -855,32 +845,20 @@ OUString resolveDirPath(const OUString & path)
OUString resolveFilePath(const OUString & path)
{
OUString ret;
OUString sResolved;
if (File::getAbsoluteFileURL(
OUSTR("file:///"), path, sResolved) != File::E_None)
return OUString();
//check if this is a valid path to a file or and if it is a link
DirectoryItem item;
if (DirectoryItem::get(sResolved, item) == File::E_None)
salhelper::LinkResolver aResolver(osl_FileStatus_Mask_Type |
osl_FileStatus_Mask_FileURL);
if (aResolver.fetchFileStatus(path) == osl::FileBase::E_None)
{
FileStatus status(osl_FileStatus_Mask_Type |
osl_FileStatus_Mask_LinkTargetURL |
osl_FileStatus_Mask_FileURL);
if (item.getFileStatus(status) == File::E_None
&& status.getFileType() == FileStatus::Regular)
//check if this is a file
if (aResolver.m_aStatus.getFileType() == FileStatus::Regular)
{
#ifndef JVM_ONE_PATH_CHECK
ret = sResolved;
ret = aResolver.m_aStatus.getFileURL();
#else
ret = path;
#endif
}
}
else
return OUString();
return ret;
}
......
jvmf jvmfwk : cppu cppuhelper sal LIBXML2:libxml2 NULL
jvmf jvmfwk : cppu cppuhelper sal comphelper LIBXML2:libxml2 NULL
jvmf jvmfwk\inc nmake - all jvmf_inc NULL
jvmf jvmfwk\source nmake - all jvmf_framework jvmf_inc NULL
jvmf jvmfwk\plugins\sunmajor\pluginlib nmake - all jvmf_sunmajorlib jvmf_inc NULL
......
......@@ -39,6 +39,8 @@ ENABLE_EXCEPTIONS := TRUE
.INCLUDE : ..$/version.mk
.IF "$(OS)"!="IOS"
# --- Files --------------------------------------------------------
CDEFS += -DDLL_VERSION=$(EMQ)"$(DLLPOSTFIX)$(EMQ)"
......@@ -85,4 +87,6 @@ APP5STDLIBS=\
OBJFILES = $(APP1OBJS) $(APP2OBJS) $(APP3OBJS) $(APP4OBJS) $(APP5OBJS)
.ENDIF
.INCLUDE : target.mk
......@@ -466,7 +466,7 @@ public:
/** Constructor.
@param nMask
Set of flaggs decribing the demanded information.
Set of flags decribing the demanded information.
*/
VolumeInfo( sal_uInt32 nMask ): _nMask( nMask )
......@@ -714,7 +714,7 @@ public:
/** Constructor.
@param nMask
Set of flaggs decribing the demanded information.
Set of flags decribing the demanded information.
*/
FileStatus( sal_uInt32 nMask ): _nMask( nMask )
......
......@@ -1114,11 +1114,11 @@ osl_isFloppyMounted (oslVolumeDeviceHandleImpl* pDevice)
/******************************************************************************
*
* MAC OS X FLOPPY FUNCTIONS
* MAC OS X AND IOS FLOPPY FUNCTIONS: NO FLOPPIES
*
*****************************************************************************/
#if (defined(MACOSX) || defined(NETBSD) || defined(FREEBSD) || \
#if (defined(MACOSX) || defined(IOS) || defined(NETBSD) || defined(FREEBSD) || \
defined(AIX) || defined(OPENBSD) || defined(DRAGONFLY))
static oslVolumeDeviceHandle osl_isFloppyDrive(const sal_Char* pszPath)
{
......@@ -1127,7 +1127,7 @@ static oslVolumeDeviceHandle osl_isFloppyDrive(const sal_Char* pszPath)
}
#endif /* MACOSX */
#if ( defined(MACOSX) || defined(NETBSD) || defined(FREEBSD) || \
#if ( defined(MACOSX) || defined(IOS) || defined(NETBSD) || defined(FREEBSD) || \
defined(AIX) || defined(OPENBSD) || defined(DRAGONFLY))
static oslFileError osl_mountFloppy(oslVolumeDeviceHandle hFloppy)
{
......@@ -1136,7 +1136,7 @@ static oslFileError osl_mountFloppy(oslVolumeDeviceHandle hFloppy)
}
#endif /* MACOSX */
#if ( defined(MACOSX) || defined(NETBSD) || defined(FREEBSD) || \
#if ( defined(MACOSX) || defined(IOS) || defined(NETBSD) || defined(FREEBSD) || \
defined(AIX) || defined(OPENBSD) || defined(DRAGONFLY))
static oslFileError osl_unmountFloppy(oslVolumeDeviceHandle hFloppy)
{
......@@ -1145,14 +1145,14 @@ static oslFileError osl_unmountFloppy(oslVolumeDeviceHandle hFloppy)
}
#endif /* MACOSX */
#if ( defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD) || defined(DRAGONFLY) )
#if ( defined(NETBSD) || defined(IOS) || defined(FREEBSD) || defined(OPENBSD) || defined(DRAGONFLY) )
static sal_Bool osl_getFloppyMountEntry(const sal_Char* pszPath, oslVolumeDeviceHandleImpl* pItem)
{
return sal_False;
}
#endif /* NETBSD || FREEBSD || OPENBSD */
#if ( defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD) || defined(DRAGONFLY) )
#if ( defined(NETBSD) || defined(IOS) || defined(FREEBSD) || defined(OPENBSD) || defined(DRAGONFLY) )
static sal_Bool osl_isFloppyMounted(oslVolumeDeviceHandleImpl* pDevice)
{
return sal_False;
......
......@@ -134,6 +134,10 @@ APP1STDLIBS+=-lC
CFLAGS+=-DSAL_ENABLE_CRASH_REPORT
.ENDIF
.IF "$(OS)" == "IOS"
CFLAGS+=-DNO_DL_FUNCTIONS -DNO_CHILD_PROCESSES
.ENDIF
.INCLUDE : target.mk
.IF "$(OS)$(CPU)"=="SOLARISU" || "$(OS)$(CPU)"=="SOLARISS" || "$(OS)$(CPU)"=="NETBSDS" || "$(OS)$(CPU)"=="LINUXS"
......
......@@ -112,7 +112,11 @@ sal_Bool SAL_CALL
osl_getModuleHandle(rtl_uString *pModuleName, oslModule *pResult)
{
(void) pModuleName; /* avoid warning about unused parameter */
#ifndef NO_DL_FUNCTIONS
*pResult = (oslModule) RTLD_DEFAULT;
#else
*pResult = NULL;
#endif
return sal_True;
}
......@@ -204,6 +208,7 @@ osl_getFunctionSymbol(oslModule module, rtl_uString *puFunctionSymbolName)
sal_Bool SAL_CALL osl_getModuleURLFromAddress(void * addr, rtl_uString ** ppLibraryUrl)
{
sal_Bool result = sal_False;
#ifndef NO_DL_FUNCTIONS
#if defined(AIX)
int i;
int size = 4 * 1024;
......@@ -294,6 +299,7 @@ sal_Bool SAL_CALL osl_getModuleURLFromAddress(void * addr, rtl_uString ** ppLibr
result = sal_False;
}
}
#endif
#endif
return result;
}
......
......@@ -32,7 +32,7 @@
#include <rtl/memory.h>
#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || \
defined(FREEBSD) || defined(MACOSX) || defined(OPENBSD) || \
defined(FREEBSD) || defined(MACOSX) || defined(IOS) || defined(OPENBSD) || \
defined(DRAGONFLY)
#include <pthread.h>
#ifndef MACOSX
......@@ -42,7 +42,7 @@
#include <osl/module.h>
#include <osl/thread.h>
#endif /* !MACOSX */
#endif /* LINUX || SOLARIS || NETBSD || MACOSX */
#endif /* LINUX || SOLARIS || NETBSD || MACOSX || IOS */
#include <string.h>
......
......@@ -72,7 +72,7 @@
#define MAX_ARGS 255
#define MAX_ENVS 255
#if defined(MACOSX) || defined(IORESOURCE_TRANSFER_BSD) || defined(AIX)
#if defined(MACOSX) || defined(IOS) || defined(IORESOURCE_TRANSFER_BSD) || defined(AIX)
#define CONTROLLEN (sizeof(struct cmsghdr) + sizeof(int))
#endif
......@@ -455,6 +455,9 @@ static void ChildStatusProc(void *pData)
in our child process */
memcpy(&data, pData, sizeof(data));
#ifdef NO_CHILD_PROCESSES
#define fork() (errno = EINVAL, -1)
#endif
if (socketpair(AF_UNIX, SOCK_STREAM, 0, channel) == -1)
status = errno;
......
......@@ -127,6 +127,12 @@ static sal_uInt16 const aImplDoubleByteIdentifierTab[1] = { 0 };
ImplTextEncodingData const *
Impl_getTextEncodingData(rtl_TextEncoding nEncoding)
#ifdef IOS
// Dunno if the g++ for iOS is just pickier, or why other g++
// versions don't complain about the lack of throw to match the
// one in the declaration in gettextencodingdata.h.o
SAL_THROW_EXTERN_C()
#endif
{
static ImplTextEncodingData const * const aData[]
= { NULL, /* DONTKNOW */
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* Version: MPL 1.1 / GPLv3+ / LGPLv3+
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Initial Developer of the Original Code is
* Caolán McNamara <caolanm@redhat.com> (Red Hat, Inc.)
* Portions created by the Initial Developer are Copyright (C) 2011 the
* Initial Developer. All Rights Reserved.
*
* Contributor(s): Caolán McNamara <caolanm@redhat.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 3 or later (the "GPLv3+"), or
* the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
* in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
* instead of those above.
*/
#ifndef _SALHELPER_LINKHELPER_HXX
#define _SALHELPER_LINKHELPER_HXX
#include <rtl/ustring.hxx>
#include <osl/file.hxx>
namespace salhelper
{
class LinkResolver
{
public:
osl::FileStatus m_aStatus;
LinkResolver(sal_uInt32 nMask)
: m_aStatus(nMask |
osl_FileStatus_Mask_FileURL |
osl_FileStatus_Mask_Type |
osl_FileStatus_Mask_LinkTargetURL)
{
}
/** Resolve a file url if its a symbolic link, to a maximum depth of
* nDepth and fill in m_aStatus with the requested ctor flags
*
* @return osl::FileBase::E_None on success
*
* @see DirectoryItem::getFileStatus
*/
osl::FileBase::RC fetchFileStatus(const rtl::OUString &rURL,
int nDepth = 128)
{
//In an ideal world this wouldn't be inline, but I want to use this
//in jvmfwk hence salhelper, but salhelper is .map controlled and
//getting all the mangled names right is a misery, moving it over
//to visibility markup would drop per-symbol versioning
osl::FileBase::RC eReturn;
osl::DirectoryItem item;
rtl::OUString sURL(rURL);
while ((eReturn = osl::DirectoryItem::get(sURL, item))
== osl::File::E_None)
{
if (--nDepth == 0)
{
eReturn = osl::FileBase::E_MULTIHOP;
break;
}
eReturn = item.getFileStatus(m_aStatus);
if (eReturn != osl::File::E_None)
break;
if (m_aStatus.getFileType() != osl::FileStatus::Link)
{
eReturn = osl::FileBase::E_None;
break;
}
sURL = m_aStatus.getLinkTargetURL();
}
return eReturn;
}
};
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -6,6 +6,7 @@ mkdir: %_DEST%\inc%_EXT%\salhelper
..\inc\salhelper\futurequeue.hxx %_DEST%\inc%_EXT%\salhelper\futurequeue.hxx
..\inc\salhelper\monitor.hxx %_DEST%\inc%_EXT%\salhelper\monitor.hxx
..\inc\salhelper\queue.hxx %_DEST%\inc%_EXT%\salhelper\queue.hxx
..\inc\salhelper\linkhelper.hxx %_DEST%\inc%_EXT%\salhelper\linkhelper.hxx
..\inc\salhelper\refobj.hxx %_DEST%\inc%_EXT%\salhelper\refobj.hxx
..\inc\salhelper\simplereferenceobject.hxx %_DEST%\inc%_EXT%\salhelper\simplereferenceobject.hxx
..\inc\salhelper\singletonref.hxx %_DEST%\inc%_EXT%\salhelper\singletonref.hxx
......@@ -14,7 +15,7 @@ mkdir: %_DEST%\inc%_EXT%\salhelper
..\%__SRC%\bin\salhelp*.dll %_DEST%\bin%_EXT%\salhelp*.dll
..\%__SRC%\lib\*salhelper*.lib %_DEST%\lib%_EXT%\*
..\%__SRC%\lib\libuno_salhelper*.*.* %_DEST%\lib%_EXT%\*
..\%__SRC%\lib\libuno_salhelper*.* %_DEST%\lib%_EXT%\*
..\%__SRC%\lib\libsalhelper*.a %_DEST%\lib%_EXT%\*
..\%__SRC%\lib\salhelper*.lib %_DEST%\lib%_EXT%\*
......
......@@ -49,16 +49,17 @@ SLOFILES= \
$(SLO)$/simplereferenceobject.obj \
$(SLO)$/timer.obj
.IF "$(GUI)" == "WNT"
.IF "$(COM)" == "MSC"
SHL1TARGET= $(TARGET)$(UDK_MAJOR)$(COMID)
SHL1IMPLIB= i$(TARGET)
.ELSE
SHL1TARGET= uno_$(TARGET)$(COMID)
SHL1IMPLIB= $(SHL1TARGET)
.ENDIF
SHL1STDLIBS=$(SALLIB)
SHL1DEPN=
SHL1IMPLIB= i$(TARGET)
SHL1LIBS= $(SLB)$/$(TARGET).lib
SHL1DEF= $(MISC)$/$(SHL1TARGET).def
SHL1RPATH= URELIB
......
......@@ -5,6 +5,7 @@ mkdir: %_DEST%\inc%_EXT%\store
..\util\store.xml %_DEST%\xml%_EXT%\store.xml
..\%__SRC%\lib\istore.lib %_DEST%\lib%_EXT%\istore.lib
..\%__SRC%\lib\libstore*.dll.a %_DEST%\lib%_EXT%\libstore*.dll.a
..\%__SRC%\lib\libstore.*.* %_DEST%\lib%_EXT%\*
..\%__SRC%\bin\sto*.dll %_DEST%\bin%_EXT%\sto*.dll
......
......@@ -56,7 +56,11 @@ LIB1FILES= $(LB)$/store.lib
# --- Shared-Library ---
SHL1TARGET= $(TARGET)
.IF "$(COM)" == "MSC"
SHL1IMPLIB= istore
.ELSE
SHL1IMPLIB= store$(UDK_MAJOR)
.ENDIF
SHL1VERSIONMAP= $(TARGET).map
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment