1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-04 08:22:08 +03:00

Merge branch 'master' of /home/jelmer/samba3

Conflicts:
	lib/replace/README
	lib/replace/libreplace.m4
	lib/replace/replace.c
	source3/include/proto.h
	source3/lib/system.c
This commit is contained in:
Jelmer Vernooij
2008-11-01 04:02:47 +01:00
32 changed files with 302 additions and 427 deletions

View File

@ -537,21 +537,6 @@ int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev)
#endif
}
/*******************************************************************
Wrapper for realpath.
********************************************************************/
char *sys_realpath(const char *path, char *resolved_path)
{
#if defined(HAVE_REALPATH)
return realpath(path, resolved_path);
#else
/* As realpath is not a system call we can't return ENOSYS. */
errno = EINVAL;
return NULL;
#endif
}
/*******************************************************************
The wait() calls vary between systems
********************************************************************/
@ -580,104 +565,6 @@ char *sys_getwd(char *s)
return wd;
}
/*******************************************************************
system wrapper for symlink
********************************************************************/
int sys_symlink(const char *oldpath, const char *newpath)
{
#ifndef HAVE_SYMLINK
errno = ENOSYS;
return -1;
#else
return symlink(oldpath, newpath);
#endif
}
/*******************************************************************
system wrapper for readlink
********************************************************************/
int sys_readlink(const char *path, char *buf, size_t bufsiz)
{
#ifndef HAVE_READLINK
errno = ENOSYS;
return -1;
#else
return readlink(path, buf, bufsiz);
#endif
}
/*******************************************************************
system wrapper for link
********************************************************************/
int sys_link(const char *oldpath, const char *newpath)
{
#ifndef HAVE_LINK
errno = ENOSYS;
return -1;
#else
return link(oldpath, newpath);
#endif
}
/*******************************************************************
chown isn't used much but OS/2 doesn't have it
********************************************************************/
int sys_chown(const char *fname,uid_t uid,gid_t gid)
{
#ifndef HAVE_CHOWN
static int done;
if (!done) {
DEBUG(1,("WARNING: no chown!\n"));
done=1;
}
errno = ENOSYS;
return -1;
#else
return(chown(fname,uid,gid));
#endif
}
/*******************************************************************
Wrapper for lchown.
********************************************************************/
int sys_lchown(const char *fname,uid_t uid,gid_t gid)
{
#ifndef HAVE_LCHOWN
static int done;
if (!done) {
DEBUG(1,("WARNING: no lchown!\n"));
done=1;
}
errno = ENOSYS;
return -1;
#else
return(lchown(fname,uid,gid));
#endif
}
/*******************************************************************
os/2 also doesn't have chroot
********************************************************************/
int sys_chroot(const char *dname)
{
#ifndef HAVE_CHROOT
static int done;
if (!done) {
DEBUG(1,("WARNING: no chroot!\n"));
done=1;
}
errno = ENOSYS;
return -1;
#else
return(chroot(dname));
#endif
}
#if defined(HAVE_POSIX_CAPABILITIES)
/**************************************************************************
@ -1303,46 +1190,6 @@ int sys_pclose(int fd)
return wstatus;
}
/**************************************************************************
Wrappers for dlopen, dlsym, dlclose.
****************************************************************************/
void *sys_dlopen(const char *name, int flags)
{
#if defined(HAVE_DLOPEN)
return dlopen(name, flags);
#else
return NULL;
#endif
}
void *sys_dlsym(void *handle, const char *symbol)
{
#if defined(HAVE_DLSYM)
return dlsym(handle, symbol);
#else
return NULL;
#endif
}
int sys_dlclose (void *handle)
{
#if defined(HAVE_DLCLOSE)
return dlclose(handle);
#else
return 0;
#endif
}
const char *sys_dlerror(void)
{
#if defined(HAVE_DLERROR)
return dlerror();
#else
return NULL;
#endif
}
/**************************************************************************
Wrapper for Admin Logs.
****************************************************************************/