libport: Add a stub replacement for symlink().

oldstable
Alexandre Julliard 2008-12-22 10:47:16 +01:00
parent 921e6624ad
commit 0fbd55696c
6 changed files with 49 additions and 0 deletions

2
configure vendored
View File

@ -17785,6 +17785,7 @@ esac
for ac_func in \
@ -17851,6 +17852,7 @@ for ac_func in \
strtold \
strtoll \
strtoull \
symlink \
tcgetattr \
thr_kill2 \
timegm \

View File

@ -1417,6 +1417,7 @@ AC_CHECK_FUNCS(\
strtold \
strtoll \
strtoull \
symlink \
tcgetattr \
thr_kill2 \
timegm \

View File

@ -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

View File

@ -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) */

View File

@ -29,6 +29,7 @@ C_SRCS = \
strcasecmp.c \
strerror.c \
strncasecmp.c \
symlink.c \
usleep.c
all: $(MODULE)

View File

@ -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 */