summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Repository.mk1
-rw-r--r--compilerplugins/clang/reservedid.cxx4
-rw-r--r--compilerplugins/clang/store/constantfunction.cxx5
-rw-r--r--setup_native/Library_getuid.mk35
-rw-r--r--setup_native/Module_setup_native.mk1
-rw-r--r--setup_native/scripts/source/getuid.c163
-rw-r--r--solenv/clang-format/blacklist1
7 files changed, 1 insertions, 209 deletions
diff --git a/Repository.mk b/Repository.mk
index 8aeca4b18257..69bcdae4d396 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -530,7 +530,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,writer, \
# cli_cppuhelper is NONE even though it is actually in URE because it is CliNativeLibrary
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \
- getuid \
smoketest \
subsequenttest \
test \
diff --git a/compilerplugins/clang/reservedid.cxx b/compilerplugins/clang/reservedid.cxx
index 5fefb26c2589..cfb9a5b35818 100644
--- a/compilerplugins/clang/reservedid.cxx
+++ b/compilerplugins/clang/reservedid.cxx
@@ -167,9 +167,7 @@ bool ReservedId::VisitNamedDecl(NamedDecl const * decl) {
&& s != "__PK11_GetKeyData"
// xmlsecurity/source/xmlsec/nss/nssrenam.h
&& s != "__current_exception" // bridges/inc/except.hxx, Windows
- && s != "__data_start" // sal/osl/unx/system.cxx
- && s != "__lxstat64" // setup_native/scripts/source/getuid.c
- && s != "__lxstat") // setup_native/scripts/source/getuid.c
+ && s != "__data_start") // sal/osl/unx/system.cxx
{
report(
DiagnosticsEngine::Warning,
diff --git a/compilerplugins/clang/store/constantfunction.cxx b/compilerplugins/clang/store/constantfunction.cxx
index 343cdc6ffc14..19c28df00db5 100644
--- a/compilerplugins/clang/store/constantfunction.cxx
+++ b/compilerplugins/clang/store/constantfunction.cxx
@@ -84,11 +84,6 @@ bool ConstantFunction::VisitFunctionDecl(const FunctionDecl * pFunctionDecl) {
if (aFileName.startswith(SRCDIR "/basegfx/test/")) {
return true;
}
- // some stuff is just stubs under Linux, although this appears to be a SOLARIS-specific hack, so it
- // should probably not even be compiling under Linux.
- if (aFileName == SRCDIR "/setup_native/scripts/source/getuid.c") {
- return true;
- }
// bridges has some weird stuff in it....
if (aFileName.startswith(SRCDIR "/bridges/")) {
return true;
diff --git a/setup_native/Library_getuid.mk b/setup_native/Library_getuid.mk
deleted file mode 100644
index 4212e5f4b4d5..000000000000
--- a/setup_native/Library_getuid.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_Library_Library,getuid))
-
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Library_add_defs,getuid,\
- -D_GNU_SOURCE \
-))
-endif
-
-$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,getuid)) : gb_CC := $(filter-out -fsanitize%,$(gb_CC))
-
-# the library is used by LD_PRELOAD; make sure that we see the symbols ;-)
-ifeq ($(COM),GCC)
-$(eval $(call gb_Library_add_cflags,getuid,\
- -fvisibility=default \
-))
-endif
-
-$(eval $(call gb_Library_add_cobjects,getuid,\
- setup_native/scripts/source/getuid \
-))
-
-$(eval $(call gb_Library_add_libs,getuid,\
- -ldl \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/setup_native/Module_setup_native.mk b/setup_native/Module_setup_native.mk
index 43d1adb181ff..8e11f4d61425 100644
--- a/setup_native/Module_setup_native.mk
+++ b/setup_native/Module_setup_native.mk
@@ -10,7 +10,6 @@
$(eval $(call gb_Module_Module,setup_native))
$(eval $(call gb_Module_add_targets,setup_native,\
- $(if $(filter LINUX SOLARIS,$(OS)),Library_getuid) \
$(if $(filter MACOSX,$(OS)),CustomTarget_mac) \
CustomTarget_spell \
$(if $(filter WNT,$(OS)),Package_misc) \
diff --git a/setup_native/scripts/source/getuid.c b/setup_native/scripts/source/getuid.c
deleted file mode 100644
index 3f86817051de..000000000000
--- a/setup_native/scripts/source/getuid.c
+++ /dev/null
@@ -1,163 +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 .
- */
-
-#include <assert.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <dlfcn.h>
-
-#define UNUSED(x) (void)(x)
-
-#ifdef _cplusplus
-extern "C" {
-#endif
-
-#ifdef __sun
-
-#include <sys/systeminfo.h>
-#include <strings.h>
-
-int chown (const char *path, uid_t owner, gid_t group) {return 0;}
-int lchown (const char *path, uid_t owner, gid_t group) {return 0;}
-int fchown (int fildes, uid_t owner, gid_t group) {return 0;}
-
-uid_t getuid (void) {return 0;}
-int stat(const char *path, struct stat *buf);
-#ifdef __notdef__
-uid_t geteuid (void) {return 0;}
-gid_t getgid (void) {return 0;}
-gid_t getegid (void) {return 0;}
-#endif
-
-int setuid (uid_t p) {return 0;}
-int setgid (gid_t p) {return 0;}
-
-/* This is to fool cpio and pkgmk */
-int fstat(int fildes, struct stat *buf)
-{
- int ret = 0;
- static int (*p_fstat) (int fildes, struct stat *buf) = NULL;
- if (p_fstat == NULL)
- p_fstat = (int (*)(int fildes, struct stat *buf))
- dlsym (RTLD_NEXT, "fstat");
- ret = (*p_fstat)(fildes, buf);
- if (buf != NULL)
- {
- buf->st_uid = 0; /* root */
- buf->st_gid = 2; /* bin */
- }
-
- return ret;
-}
-
-/* this is to fool mkdir, don't allow to remove owner execute right from directories */
-int chmod(const char *path, mode_t mode)
-{
- int ret = 0;
- static int (*p_chmod) (const char *path, mode_t mode) = NULL;
- if (p_chmod == NULL)
- p_chmod = (int (*)(const char *path, mode_t mode))
- dlsym (RTLD_NEXT, "chmod");
-
- if ((mode & S_IXUSR) == 0)
- {
- struct stat statbuf;
- if (stat(path, &statbuf) == 0)
- {
- if ((statbuf.st_mode & S_IFDIR) != 0)
- mode = (mode | S_IXUSR);
- }
- }
-
- ret = (*p_chmod)(path, mode);
- return ret;
-}
-
-
-
-/* This is to fool tar */
-int fstatat64(int fildes, const char *path, struct stat64 *buf, int flag)
-{
- int ret = 0;
- static int (*p_fstatat) (int fildes, const char *path, struct stat64 *buf, int flag) = NULL;
- if (p_fstatat == NULL)
- p_fstatat = (int (*)(int fildes, const char *path, struct stat64 *buf, int flag))
- dlsym (RTLD_NEXT, "fstatat64");
- ret = (*p_fstatat)(fildes, path, buf, flag);
- if (buf != NULL)
- {
- buf->st_uid = 0; /* root */
- buf->st_gid = 2; /* bin */
- }
-
- return ret;
-}
-#elif defined LINUX
-
-uid_t getuid (void) {return 0;}
-uid_t geteuid (void) {return 0;}
-int setgid (gid_t p) { UNUSED(p); return 0; }
-
-/* This is to fool tar */
-#ifdef X86_64
-int __lxstat(int n, const char *path, struct stat *buf)
-{
- int ret = 0;
- static int (*p_lstat) (int n, const char *path, struct stat *buf) = NULL;
- if (p_lstat == NULL)
- p_lstat = (int (*)(int n, const char *path, struct stat *buf))
- dlsym (RTLD_NEXT, "__lxstat");
- ret = (*p_lstat)(n, path, buf);
-#if defined __GNUC__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wnonnull"
- // __lxstat may be declared in system headers as taking nonnull argument
-#endif
- assert(buf != NULL);
-#if defined __GNUC__
-#pragma GCC diagnostic pop
-#endif
- buf->st_uid = 0; /* root */
- buf->st_gid = 0; /* root */
- return ret;
-}
-#else
-int __lxstat64(int n, const char *path, struct stat64 *buf)
-{
- int ret = 0;
- static int (*p_lstat) (int n, const char *path, struct stat64 *buf) = NULL;
- if (p_lstat == NULL)
- p_lstat = (int (*)(int n, const char *path, struct stat64 *buf))
- dlsym (RTLD_NEXT, "__lxstat64");
- ret = (*p_lstat)(n, path, buf);
- assert(buf != NULL);
- buf->st_uid = 0;
- buf->st_gid = 0;
- return ret;
-}
-#endif
-#endif
-
-#ifdef _cplusplus
-}
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 7a6d702b9e97..6f5ddc7a7a1e 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -12802,7 +12802,6 @@ sdext/source/presenter/PresenterViewFactory.cxx
sdext/source/presenter/PresenterViewFactory.hxx
sdext/source/presenter/PresenterWindowManager.cxx
sdext/source/presenter/PresenterWindowManager.hxx
-setup_native/scripts/source/getuid.c
setup_native/source/win32/customactions/indexingfilter/restartindexingservice.cxx
setup_native/source/win32/customactions/quickstarter/quickstarter.cxx
setup_native/source/win32/customactions/quickstarter/quickstarter.hxx