summaryrefslogtreecommitdiff
path: root/sal/osl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-04-02 10:36:04 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-04-02 10:43:21 +0200
commitd37e9645edbdabaaf16ce0f1f904405f3477dc41 (patch)
tree4c718dcb0732dab7e434aafd67affa6e224d20ef /sal/osl
parentd059866a38ca555050abea1554ceaf7da98edfac (diff)
sal/osl/unx/security.c -> .cxx
Change-Id: If8dbfa3e26a02ac3d5ee0077f730eeca4b59c4d7
Diffstat (limited to 'sal/osl')
-rw-r--r--sal/osl/unx/security.cxx (renamed from sal/osl/unx/security.c)10
1 files changed, 5 insertions, 5 deletions
diff --git a/sal/osl/unx/security.c b/sal/osl/unx/security.cxx
index 3806a0f96b2d..77764b5caed5 100644
--- a/sal/osl/unx/security.c
+++ b/sal/osl/unx/security.cxx
@@ -43,7 +43,7 @@
static oslSecurityError SAL_CALL
osl_psz_loginUser(const sal_Char* pszUserName, const sal_Char* pszPasswd,
oslSecurity* pSecurity);
-sal_Bool SAL_CALL osl_psz_getUserIdent(oslSecurity Security, sal_Char *pszIdent, sal_uInt32 nMax);
+extern "C" sal_Bool SAL_CALL osl_psz_getUserIdent(oslSecurity Security, sal_Char *pszIdent, sal_uInt32 nMax);
static sal_Bool SAL_CALL osl_psz_getUserName(oslSecurity Security, sal_Char* pszName, sal_uInt32 nMax);
static sal_Bool SAL_CALL osl_psz_getHomeDir(oslSecurity Security, sal_Char* pszDirectory, sal_uInt32 nMax);
static sal_Bool SAL_CALL osl_psz_getConfigDir(oslSecurity Security, sal_Char* pszDirectory, sal_uInt32 nMax);
@@ -91,7 +91,7 @@ static oslSecurityImpl * growSecurityImpl(
*bufSize = SIZE_MAX - offsetof(oslSecurityImpl, m_buffer);
n = SIZE_MAX;
}
- p = realloc(impl, n);
+ p = static_cast<oslSecurityImpl *>(realloc(impl, n));
memset (p, 0, n);
}
if (p == NULL) {
@@ -233,8 +233,8 @@ sal_Bool SAL_CALL osl_psz_getUserIdent(oslSecurity Security, sal_Char *pszIdent,
return sal_False;
nChr = snprintf(buffer, sizeof(buffer), "%u", pSecImpl->m_pPasswd.pw_uid);
- if ( nChr < 0 || SAL_INT_CAST(sal_uInt32, nChr) >= sizeof(buffer)
- || SAL_INT_CAST(sal_uInt32, nChr) >= nMax )
+ 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 */
memcpy(pszIdent, buffer, nChr+1);
@@ -483,7 +483,7 @@ sal_Bool SAL_CALL osl_isAdministrator(oslSecurity Security)
void SAL_CALL osl_freeSecurityHandle(oslSecurity Security)
{
- deleteSecurityImpl(Security);
+ deleteSecurityImpl(static_cast<oslSecurityImpl *>(Security));
}