From dd895f496ae1ff76f1726d5ce3b0bc0024a47f8a Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 6 Oct 2021 10:17:54 +0200 Subject: [PATCH] libport: Remove the symlink() implementation. Signed-off-by: Alexandre Julliard --- configure | 1 - configure.ac | 1 - include/config.h.in | 3 --- include/wine/port.h | 11 ++--------- libs/port/Makefile.in | 3 --- libs/port/symlink.c | 38 -------------------------------------- 6 files changed, 2 insertions(+), 55 deletions(-) delete mode 100644 libs/port/symlink.c diff --git a/configure b/configure index 6ca64c1fcfd..f1d9aeb24ef 100755 --- a/configure +++ b/configure @@ -17919,7 +17919,6 @@ for ac_func in \ setproctitle \ setprogname \ sigprocmask \ - symlink \ sysinfo \ tcdrain \ thr_kill2 diff --git a/configure.ac b/configure.ac index d1f23bcc9e9..3fff076470e 100644 --- a/configure.ac +++ b/configure.ac @@ -2150,7 +2150,6 @@ AC_CHECK_FUNCS(\ setproctitle \ setprogname \ sigprocmask \ - symlink \ sysinfo \ tcdrain \ thr_kill2 diff --git a/include/config.h.in b/include/config.h.in index 7d7393c19db..fc3749895a3 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -687,9 +687,6 @@ /* Define to 1 if `_u._ext.nscount6' is a member of `struct __res_state'. */ #undef HAVE_STRUCT___RES_STATE__U__EXT_NSCOUNT6 -/* Define to 1 if you have the `symlink' function. */ -#undef HAVE_SYMLINK - /* Define to 1 if you have the header file. */ #undef HAVE_SYSCALL_H diff --git a/include/wine/port.h b/include/wine/port.h index be8e5463a14..410fa670757 100644 --- a/include/wine/port.h +++ b/include/wine/port.h @@ -50,6 +50,7 @@ #if defined(_WIN32) && !defined(__CYGWIN__) #include +#include #include #include @@ -57,6 +58,7 @@ static inline void *dlopen(const char *name, int flags) { return NULL; } static inline void *dlsym(void *handle, const char *name) { return NULL; } static inline int dlclose(void *handle) { return 0; } static inline const char *dlerror(void) { return "No dlopen support on Windows"; } +static inline int symlink(const char *from, const char *to) { errno = ENOSYS; return -1; } #ifdef _MSC_VER /* The UCRT headers in the Windows SDK #error out if we #define snprintf. @@ -94,13 +96,4 @@ static inline const char *dlerror(void) { return "No dlopen support on Windows"; #define M_PI_2 1.570796326794896619 #endif - -/**************************************************************** - * Function definitions (only when using libwine_port) - */ - -#ifndef HAVE_SYMLINK -int symlink(const char *from, const char *to); -#endif - #endif /* !defined(__WINE_WINE_PORT_H) */ diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in index 7daaa9c845d..670b272cbf1 100644 --- a/libs/port/Makefile.in +++ b/libs/port/Makefile.in @@ -1,4 +1 @@ STATICLIB = libwine_port.a - -C_SRCS = \ - symlink.c diff --git a/libs/port/symlink.c b/libs/port/symlink.c deleted file mode 100644 index efb44eca1d9..00000000000 --- a/libs/port/symlink.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * symlink function - * - * Copyright 2008 Alexandre Julliard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#ifdef HAVE_UNISTD_H -# include -#endif - -#ifndef HAVE_SYMLINK - -int symlink( const char *from, const char *to ) -{ - errno = ENOSYS; - return -1; -} - -#endif /* HAVE_SYMLINK */