summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-11-19 12:52:34 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-11-19 13:01:37 +0100
commit5ce93720374c26611fa4fcd11997ebd8536e4ce2 (patch)
treef282f09492a29e4de792efdcf1c9e1383906fd78 /sal
parent299a8a50d30465d6a93b0992aaf74944404da585 (diff)
secimpl.h -> secimpl.hxx
Change-Id: I0fb87c5658bd02e327df8fdf3e0aa79f20bbc111
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/pipe.cxx2
-rw-r--r--sal/osl/unx/process.cxx2
-rw-r--r--sal/osl/unx/secimpl.hxx (renamed from sal/osl/unx/secimpl.h)14
-rw-r--r--sal/osl/unx/security.cxx10
4 files changed, 10 insertions, 18 deletions
diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx
index ec78c2aee446..654038fedcbb 100644
--- a/sal/osl/unx/pipe.cxx
+++ b/sal/osl/unx/pipe.cxx
@@ -28,7 +28,7 @@
#include <rtl/bootstrap.h>
#include "sockimpl.h"
-#include "secimpl.h"
+#include "secimpl.hxx"
#define PIPEDEFAULTPATH "/tmp"
#define PIPEALTERNATEPATH "/var/tmp"
diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx
index c6b9d9cd4ab6..e4977e79f8fb 100644
--- a/sal/osl/unx/process.cxx
+++ b/sal/osl/unx/process.cxx
@@ -60,7 +60,7 @@
#include "file_url.hxx"
#include "readwrite_helper.hxx"
#include "sockimpl.h"
-#include "secimpl.h"
+#include "secimpl.hxx"
#define MAX_ARGS 255
#define MAX_ENVS 255
diff --git a/sal/osl/unx/secimpl.h b/sal/osl/unx/secimpl.hxx
index a7cadebb961e..7726d24b0ecd 100644
--- a/sal/osl/unx/secimpl.h
+++ b/sal/osl/unx/secimpl.hxx
@@ -17,25 +17,17 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef _OSL_SECURITYIMPL_H_
-#define _OSL_SECURITYIMPL_H_
+#ifndef INCLUDED_SAL_OSL_UNX_SECIMPL_HXX
+#define INCLUDED_SAL_OSL_UNX_SECIMPL_HXX
#include <pwd.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
typedef struct _oslSecurityImpl {
struct passwd m_pPasswd;
char m_buffer[1]; /* should be a C99 flexible array member */
} oslSecurityImpl;
-sal_Bool SAL_CALL osl_psz_getUserIdent(oslSecurity Security, sal_Char *pszIdent, sal_uInt32 nMax);
-
-#ifdef __cplusplus
-}
-#endif
+bool SAL_CALL osl_psz_getUserIdent(oslSecurity Security, sal_Char *pszIdent, sal_uInt32 nMax);
#endif
diff --git a/sal/osl/unx/security.cxx b/sal/osl/unx/security.cxx
index 3dff65426221..3e67de7f27d5 100644
--- a/sal/osl/unx/security.cxx
+++ b/sal/osl/unx/security.cxx
@@ -42,7 +42,7 @@
#include <crypt.h>
#endif
-#include "secimpl.h"
+#include "secimpl.hxx"
#ifdef ANDROID
#define getpwuid_r(uid, pwd, buf, buflen, result) (*(result) = getpwuid(uid), (*(result) ? (memcpy (buf, *(result), sizeof (struct passwd)), 0) : errno))
@@ -227,7 +227,7 @@ sal_Bool SAL_CALL osl_getUserIdent(oslSecurity Security, rtl_uString **ustrIdent
return bRet;
}
-sal_Bool SAL_CALL osl_psz_getUserIdent(oslSecurity Security, sal_Char *pszIdent, sal_uInt32 nMax)
+bool SAL_CALL osl_psz_getUserIdent(oslSecurity Security, sal_Char *pszIdent, sal_uInt32 nMax)
{
sal_Char buffer[32];
sal_Int32 nChr;
@@ -235,15 +235,15 @@ sal_Bool SAL_CALL osl_psz_getUserIdent(oslSecurity Security, sal_Char *pszIdent,
oslSecurityImpl *pSecImpl = (oslSecurityImpl *)Security;
if (pSecImpl == NULL)
- return sal_False;
+ return false;
nChr = snprintf(buffer, sizeof(buffer), "%u", pSecImpl->m_pPasswd.pw_uid);
if ( nChr < 0 || sal::static_int_cast<sal_uInt32>(nChr) >= sizeof(buffer)
|| sal::static_int_cast<sal_uInt32>(nChr) >= nMax )
- return sal_False; /* leave *pszIdent unmodified in case of failure */
+ return false; /* leave *pszIdent unmodified in case of failure */
memcpy(pszIdent, buffer, nChr+1);
- return sal_True;
+ return true;
}
sal_Bool SAL_CALL osl_getUserName(oslSecurity Security, rtl_uString **ustrName)