Module: wine Branch: master Commit: 0fbd55696c44ed50dcc3f96978e85e26a7f8be1f URL: http://source.winehq.org/git/wine.git/?a=commit;h=0fbd55696c44ed50dcc3f96978...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Dec 22 10:47:16 2008 +0100
libport: Add a stub replacement for symlink().
---
configure | 2 ++ configure.ac | 1 + include/config.h.in | 3 +++ include/wine/port.h | 4 ++++ libs/port/Makefile.in | 1 + libs/port/symlink.c | 38 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 49 insertions(+), 0 deletions(-)
diff --git a/configure b/configure index 710a174..b31a842 100755 --- a/configure +++ b/configure @@ -17787,6 +17787,7 @@ esac
+ for ac_func in \ _pclose \ _popen \ @@ -17851,6 +17852,7 @@ for ac_func in \ strtold \ strtoll \ strtoull \ + symlink \ tcgetattr \ thr_kill2 \ timegm \ diff --git a/configure.ac b/configure.ac index c22b4eb..137aea5 100644 --- a/configure.ac +++ b/configure.ac @@ -1417,6 +1417,7 @@ AC_CHECK_FUNCS(\ strtold \ strtoll \ strtoull \ + symlink \ tcgetattr \ thr_kill2 \ timegm \ diff --git a/include/config.h.in b/include/config.h.in index ec24fe2..cee1997 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -765,6 +765,9 @@ /* Define to 1 if `st_mtim' is member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_MTIM
+/* Define to 1 if you have the `symlink' function. */ +#undef HAVE_SYMLINK + /* Define to 1 if you have the <syscall.h> header file. */ #undef HAVE_SYSCALL_H
diff --git a/include/wine/port.h b/include/wine/port.h index 6e1e454..4080444 100644 --- a/include/wine/port.h +++ b/include/wine/port.h @@ -341,6 +341,10 @@ int strcasecmp(const char *str1, const char *str2); # endif #endif /* !defined(HAVE_STRCASECMP) */
+#ifndef HAVE_SYMLINK +int symlink(const char *from, const char *to); +#endif + #ifndef HAVE_USLEEP int usleep (unsigned int useconds); #endif /* !defined(HAVE_USLEEP) */ diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in index 68dc8f1..da0b708 100644 --- a/libs/port/Makefile.in +++ b/libs/port/Makefile.in @@ -29,6 +29,7 @@ C_SRCS = \ strcasecmp.c \ strerror.c \ strncasecmp.c \ + symlink.c \ usleep.c
all: $(MODULE) diff --git a/libs/port/symlink.c b/libs/port/symlink.c new file mode 100644 index 0000000..efb44ec --- /dev/null +++ b/libs/port/symlink.c @@ -0,0 +1,38 @@ +/* + * 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 <errno.h> +#include <stdio.h> +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif + +#ifndef HAVE_SYMLINK + +int symlink( const char *from, const char *to ) +{ + errno = ENOSYS; + return -1; +} + +#endif /* HAVE_SYMLINK */