summaryrefslogtreecommitdiffstats
path: root/sal/inc
diff options
context:
space:
mode:
Diffstat (limited to 'sal/inc')
-rw-r--r--sal/inc/backtraceasstring.hxx21
-rw-r--r--sal/inc/oslmemory.h29
-rw-r--r--sal/inc/oslrandom.h27
-rw-r--r--sal/inc/oslsocket.hxx24
-rw-r--r--sal/inc/pch/precompiled_sal.cxx12
-rw-r--r--sal/inc/pch/precompiled_sal.hxx113
-rw-r--r--sal/inc/rtllifecycle.h41
-rw-r--r--sal/inc/salusesyslog.hxx20
-rw-r--r--sal/inc/signalshared.hxx36
-rw-r--r--sal/inc/thread_internal.hxx18
-rw-r--r--sal/inc/uri_internal.hxx40
11 files changed, 381 insertions, 0 deletions
diff --git a/sal/inc/backtraceasstring.hxx b/sal/inc/backtraceasstring.hxx
new file mode 100644
index 0000000000..49bca65f40
--- /dev/null
+++ b/sal/inc/backtraceasstring.hxx
@@ -0,0 +1,21 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include <sal/config.h>
+
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+
+namespace osl::detail
+{
+/// Build a debugging backtrace from current PC location.
+OUString backtraceAsString(sal_uInt32 maxDepth);
+}
diff --git a/sal/inc/oslmemory.h b/sal/inc/oslmemory.h
new file mode 100644
index 0000000000..fa102d6b02
--- /dev/null
+++ b/sal/inc/oslmemory.h
@@ -0,0 +1,29 @@
+/* -*- 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/.
+ */
+
+#ifndef INCLUDED_SAL_INC_INTERNAL_OSLMEMORY_H
+#define INCLUDED_SAL_INC_INTERNAL_OSLMEMORY_H
+
+#include <sal/types.h>
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+void* osl_aligned_alloc(sal_Size align, sal_Size size);
+
+void osl_aligned_free(void* p);
+
+#if defined __cplusplus
+}
+#endif
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/inc/oslrandom.h b/sal/inc/oslrandom.h
new file mode 100644
index 0000000000..b658784332
--- /dev/null
+++ b/sal/inc/oslrandom.h
@@ -0,0 +1,27 @@
+/* -*- 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/.
+ */
+
+#ifndef INCLUDED_SAL_INC_INTERNAL_OSLRANDOM_H
+#define INCLUDED_SAL_INC_INTERNAL_OSLRANDOM_H
+
+#include <cstddef>
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+int osl_get_system_random_data(char* buffer, size_t desired_len);
+
+#if defined __cplusplus
+}
+#endif
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/inc/oslsocket.hxx b/sal/inc/oslsocket.hxx
new file mode 100644
index 0000000000..52260c2631
--- /dev/null
+++ b/sal/inc/oslsocket.hxx
@@ -0,0 +1,24 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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/.
+ */
+
+#pragma once
+
+#include <rtl/ustring.h>
+#include <osl/socket.h>
+
+/** Retrieve this machines hostname as fully qualified domain name (FQDN).
+ Note that this might be slower than calling osl_getLocalHostname
+ since DNS needs to be queried to determine the FQDN.
+ @param strLocalHostname out-parameter. The string that receives the local host name.
+ @retval sal_True upon success
+ @retval sal_False
+*/
+oslSocketResult osl_getLocalHostnameFQDN(rtl_uString** strLocalHostname);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ \ No newline at end of file
diff --git a/sal/inc/pch/precompiled_sal.cxx b/sal/inc/pch/precompiled_sal.cxx
new file mode 100644
index 0000000000..5386a69d77
--- /dev/null
+++ b/sal/inc/pch/precompiled_sal.cxx
@@ -0,0 +1,12 @@
+/* -*- 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/.
+ */
+
+#include "precompiled_sal.hxx"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/inc/pch/precompiled_sal.hxx b/sal/inc/pch/precompiled_sal.hxx
new file mode 100644
index 0000000000..006c691a31
--- /dev/null
+++ b/sal/inc/pch/precompiled_sal.hxx
@@ -0,0 +1,113 @@
+/* -*- 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 has been autogenerated by update_pch.sh. It is possible to edit it
+ manually (such as when an include file has been moved/renamed/removed). All such
+ manual changes will be rewritten by the next run of update_pch.sh (which presumably
+ also fixes all possible problems, so it's usually better to use it).
+
+ Generated on 2021-03-08 13:14:16 using:
+ ./bin/update_pch sal sal --cutoff=2 --exclude:system --exclude:module --include:local
+
+ If after updating build fails, use the following command to locate conflicting headers:
+ ./bin/update_pch_bisect ./sal/inc/pch/precompiled_sal.hxx "make sal.build" --find-conflicts
+*/
+
+#if defined(_WIN32)
+#define _CRT_RAND_S
+#endif
+
+#include <sal/config.h>
+#if PCH_LEVEL >= 1
+#include <algorithm>
+#include <assert.h>
+#include <cassert>
+#include <cstddef>
+#include <cstdlib>
+#include <cstring>
+#include <limits>
+#include <math.h>
+#include <memory>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unordered_map>
+#include <vector>
+#endif // PCH_LEVEL >= 1
+#if PCH_LEVEL >= 2
+#endif // PCH_LEVEL >= 2
+#if PCH_LEVEL >= 3
+#include <o3tl/safeint.hxx>
+#endif // PCH_LEVEL >= 3
+#if PCH_LEVEL >= 4
+#include <osl/diagnose.h>
+#include <osl/diagnose.hxx>
+#include <osl/endian.h>
+#include <osl/file.h>
+#include <osl/file.hxx>
+#include <osl/interlck.h>
+#include <osl/module.h>
+#include <osl/module.hxx>
+#include <osl/mutex.h>
+#include <osl/mutex.hxx>
+#include <osl/pipe.h>
+#include <osl/process.h>
+#include <osl/profile.hxx>
+#include <osl/security.hxx>
+#include <osl/signal.h>
+#include <osl/socket.h>
+#include <osl/thread.h>
+#include <osl/thread.hxx>
+#include <osl/time.h>
+#include <oslmemory.h>
+#include <oslrandom.h>
+#include <rtl/alloc.h>
+#include <rtl/bootstrap.h>
+#include <rtl/bootstrap.hxx>
+#include <rtl/byteseq.h>
+#include <rtl/byteseq.hxx>
+#include <rtl/character.hxx>
+#include <rtl/cipher.h>
+#include <rtl/crc.h>
+#include <rtl/digest.h>
+#include <rtl/instance.hxx>
+#include <rtl/locale.h>
+#include <rtl/malformeduriexception.hxx>
+#include <rtl/math.h>
+#include <rtl/math.hxx>
+#include <rtl/process.h>
+#include <rtl/random.h>
+#include <rtl/strbuf.h>
+#include <rtl/strbuf.hxx>
+#include <rtl/string.h>
+#include <rtl/string.hxx>
+#include <rtl/tencinfo.h>
+#include <rtl/textcvt.h>
+#include <rtl/textenc.h>
+#include <rtl/unload.h>
+#include <rtl/uri.h>
+#include <rtl/uri.hxx>
+#include <rtl/ustrbuf.h>
+#include <rtl/ustrbuf.hxx>
+#include <rtl/ustring.h>
+#include <rtl/ustring.hxx>
+#include <rtl/uuid.h>
+#include <rtllifecycle.h>
+#include <sal/alloca.h>
+#include <sal/detail/log.h>
+#include <sal/log.hxx>
+#include <sal/macros.h>
+#include <sal/mathconf.h>
+#include <sal/saldllapi.h>
+#include <sal/types.h>
+#include <salusesyslog.hxx>
+#endif // PCH_LEVEL >= 4
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/inc/rtllifecycle.h b/sal/inc/rtllifecycle.h
new file mode 100644
index 0000000000..44af09e58c
--- /dev/null
+++ b/sal/inc/rtllifecycle.h
@@ -0,0 +1,41 @@
+/* -*- 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/.
+ */
+
+#ifndef INCLUDED_SAL_INC_INTERNAL_RTLLIFECYCLE_H
+#define INCLUDED_SAL_INC_INTERNAL_RTLLIFECYCLE_H
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+void rtl_arena_init(void);
+
+void rtl_arena_fini(void);
+
+void ensureArenaSingleton(void);
+
+void rtl_cache_init(void);
+
+void rtl_cache_fini(void);
+
+void ensureCacheSingleton(void);
+
+void rtl_locale_init(void);
+
+void rtl_locale_fini(void);
+
+void ensureLocaleSingleton(void);
+
+#if defined __cplusplus
+}
+#endif
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/inc/salusesyslog.hxx b/sal/inc/salusesyslog.hxx
new file mode 100644
index 0000000000..0ff5c93e07
--- /dev/null
+++ b/sal/inc/salusesyslog.hxx
@@ -0,0 +1,20 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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/.
+ */
+
+#pragma once
+
+#include <sal/config.h>
+
+#include <config_global.h>
+
+#if HAVE_SYSLOG_H
+extern bool sal_use_syslog;
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/sal/inc/signalshared.hxx b/sal/inc/signalshared.hxx
new file mode 100644
index 0000000000..feee2bed27
--- /dev/null
+++ b/sal/inc/signalshared.hxx
@@ -0,0 +1,36 @@
+/* -*- 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 .
+ */
+#pragma once
+
+#include <sal/config.h>
+#include <osl/signal.h>
+
+struct oslSignalHandlerImpl
+{
+ oslSignalHandlerFunction Handler;
+ void* pData;
+ oslSignalHandlerImpl* pNext;
+};
+
+oslSignalAction callSignalHandler(oslSignalInfo* pInfo);
+
+// platform-specific functions that need to be implemented
+bool onInitSignal();
+bool onDeInitSignal();
+
diff --git a/sal/inc/thread_internal.hxx b/sal/inc/thread_internal.hxx
new file mode 100644
index 0000000000..09c60a5d3e
--- /dev/null
+++ b/sal/inc/thread_internal.hxx
@@ -0,0 +1,18 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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/.
+ */
+
+#pragma once
+
+#include <sal/config.h>
+
+#include <rtl/textenc.h>
+
+rtl_TextEncoding getThreadTextEncodingForInitialization();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/sal/inc/uri_internal.hxx b/sal/inc/uri_internal.hxx
new file mode 100644
index 0000000000..dd64a52410
--- /dev/null
+++ b/sal/inc/uri_internal.hxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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 .
+ */
+
+#pragma once
+
+#include <sal/config.h>
+
+#include <sal/types.h>
+#include <rtl/textenc.h>
+
+namespace rtl::uri::detail
+{
+enum EscapeType
+{
+ EscapeNo,
+ EscapeChar,
+ EscapeOctet
+};
+
+sal_uInt32 readUcs4(sal_Unicode const** pBegin, sal_Unicode const* pEnd, bool bEncoded,
+ rtl_TextEncoding eCharset, EscapeType* pType);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */