diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-11-19 13:01:08 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-11-19 13:01:38 +0100 |
commit | 9a038e5e7b89822fb39064f63367be292999f8ea (patch) | |
tree | 906ffd0658c021645e128608bcb43b47b9912d9a /sal | |
parent | 7b778239473f5f5eb033296828fce85c696b856b (diff) |
Fold uunxapi.h into uunxapi.hxx
Change-Id: Ic16758e436da13684320e7e3bf07b80d8d8c7c5d
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/file.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/process_impl.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/uunxapi.cxx | 8 | ||||
-rw-r--r-- | sal/osl/unx/uunxapi.h | 70 | ||||
-rw-r--r-- | sal/osl/unx/uunxapi.hxx | 36 |
5 files changed, 41 insertions, 77 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx index 545c318d6e7d..a8b004bec863 100644 --- a/sal/osl/unx/file.cxx +++ b/sal/osl/unx/file.cxx @@ -35,7 +35,7 @@ #include "file_error_transl.hxx" #include "file_impl.hxx" #include "file_url.hxx" -#include "uunxapi.h" +#include "uunxapi.hxx" #include <algorithm> #include <limits> diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx index b632d440dc15..749bfc0f693f 100644 --- a/sal/osl/unx/process_impl.cxx +++ b/sal/osl/unx/process_impl.cxx @@ -33,7 +33,7 @@ #include "file_path_helper.h" -#include "uunxapi.h" +#include "uunxapi.hxx" #include "getexecutablefile.hxx" #include "nlsupport.hxx" diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx index 995b9360b6c1..c28491ce519b 100644 --- a/sal/osl/unx/uunxapi.cxx +++ b/sal/osl/unx/uunxapi.cxx @@ -19,7 +19,7 @@ #include <config_features.h> -#include "uunxapi.h" +#include "uunxapi.hxx" #include "system.h" #include <limits.h> #include <rtl/ustring.hxx> @@ -186,19 +186,19 @@ int access_u(const rtl_uString* pustrPath, int mode) return result; } -sal_Bool realpath_u(const rtl_uString* pustrFileName, rtl_uString** ppustrResolvedName) +bool realpath_u(const rtl_uString* pustrFileName, rtl_uString** ppustrResolvedName) { rtl::OString fn = OUStringToOString(pustrFileName); #ifdef ANDROID if (fn == "/assets" || fn.startsWith("/assets/")) { if (access_u(pustrFileName, F_OK) == -1) - return sal_False; + return false; rtl_uString silly(*pustrFileName); rtl_uString_assign(ppustrResolvedName, &silly); - return sal_True; + return true; } #endif diff --git a/sal/osl/unx/uunxapi.h b/sal/osl/unx/uunxapi.h deleted file mode 100644 index 76b5e4146dfd..000000000000 --- a/sal/osl/unx/uunxapi.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SAL_OSL_UNX_UUNXAPI_H -#define INCLUDED_SAL_OSL_UNX_UUNXAPI_H - -#include <unistd.h> -#include <stdlib.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <rtl/ustring.h> - -#ifdef __cplusplus -extern "C" -{ -#endif - -int access_u(const rtl_uString* pustrPath, int mode); - -/*********************************** - @descr - The return value differs from the - realpath function - - @returns sal_True on success else - sal_False - - @see realpath - **********************************/ -sal_Bool realpath_u( - const rtl_uString* pustrFileName, - rtl_uString** ppustrResolvedName); - -int stat_c(const char *cpPath, struct stat* buf); - -int lstat_c(const char *cpPath, struct stat* buf); - -int lstat_u(const rtl_uString* pustrPath, struct stat* buf); - -int mkdir_u(const rtl_uString* path, mode_t mode); - -int open_c(const char *cpPath, int oflag, int mode); - -int utime_c(const char *cpPath, struct utimbuf *times); - -int ftruncate_with_name(int fd, sal_uInt64 uSize, rtl_String* path); - -#ifdef __cplusplus -} -#endif - -#endif // INCLUDED_SAL_OSL_UNX_UUNXAPI_H - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/osl/unx/uunxapi.hxx b/sal/osl/unx/uunxapi.hxx index fbacb83ef69c..4be4fbb28748 100644 --- a/sal/osl/unx/uunxapi.hxx +++ b/sal/osl/unx/uunxapi.hxx @@ -20,10 +20,44 @@ #ifndef INCLUDED_SAL_OSL_UNX_UUNXAPI_HXX #define INCLUDED_SAL_OSL_UNX_UUNXAPI_HXX -#include "uunxapi.h" +#include <unistd.h> +#include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <rtl/ustring.h> #include <rtl/ustring.hxx> +int access_u(const rtl_uString* pustrPath, int mode); + +/*********************************** + @descr + The return value differs from the + realpath function + + @returns sal_True on success else + sal_False + + @see realpath + **********************************/ +bool realpath_u( + const rtl_uString* pustrFileName, + rtl_uString** ppustrResolvedName); + +int stat_c(const char *cpPath, struct stat* buf); + +int lstat_c(const char *cpPath, struct stat* buf); + +int lstat_u(const rtl_uString* pustrPath, struct stat* buf); + +int mkdir_u(const rtl_uString* path, mode_t mode); + +int open_c(const char *cpPath, int oflag, int mode); + +int utime_c(const char *cpPath, struct utimbuf *times); + +int ftruncate_with_name(int fd, sal_uInt64 uSize, rtl_String* path); + namespace osl { inline int access(const rtl::OUString& ustrPath, int mode) |