summaryrefslogtreecommitdiff
path: root/source4/lib/system.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-09-23 00:38:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:38:45 -0500
commitf3b412fbd6dd94d64eb6a63d88baef2816891c29 (patch)
tree61b6086157d30cf1dd64c8cc720638cd484c78d1 /source4/lib/system.c
parent92d74c340843f52aaced18dcc243965387fcaedb (diff)
downloadsamba-f3b412fbd6dd94d64eb6a63d88baef2816891c29.tar.gz
samba-f3b412fbd6dd94d64eb6a63d88baef2816891c29.tar.bz2
samba-f3b412fbd6dd94d64eb6a63d88baef2816891c29.zip
r10438: Move portability functions to lib/replace/; replace now simply ensures
that a given set of (working) POSIX functions are available (without prefixes to their names, etc). See lib/replace/README for a list. Functions that behave different from their POSIX specification (such as sys_select, sys_read, etc) have kept the sys_ prefix. (This used to be commit 29919a71059b29fa27a49b1f5b84bb8881de65fc)
Diffstat (limited to 'source4/lib/system.c')
-rw-r--r--source4/lib/system.c71
1 files changed, 0 insertions, 71 deletions
diff --git a/source4/lib/system.c b/source4/lib/system.c
index eb3799c7ca..629b2b07ff 100644
--- a/source4/lib/system.c
+++ b/source4/lib/system.c
@@ -23,7 +23,6 @@
#include "system/network.h"
#include "system/wait.h"
#include "system/filesys.h"
-#include "pstring.h"
/*
The idea is that this file will eventually have wrappers around all
@@ -78,20 +77,6 @@ int sys_usleep(long usecs)
/*******************************************************************
- System wrapper for getwd
-********************************************************************/
-char *sys_getwd(char *s)
-{
- char *wd;
-#ifdef HAVE_GETCWD
- wd = (char *)getcwd(s, sizeof (pstring));
-#else
- wd = (char *)getwd(s);
-#endif
- return wd;
-}
-
-/*******************************************************************
A read wrapper that will deal with EINTR.
********************************************************************/
@@ -121,24 +106,6 @@ ssize_t sys_write(int fd, const void *buf, size_t count)
-/*******************************************************************
-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
-}
-
/**************************************************************************
A wrapper for gethostbyname() that tries avoids looking up hostnames
in the root domain, which can cause dial-on-demand links to come up for no
@@ -181,39 +148,6 @@ struct hostent *sys_gethostbyname(const char *name)
#endif /* REDUCE_ROOT_DNS_LOOKUPS */
}
-
-
-/**************************************************************************
- 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
-}
-
-const char *sys_dlerror(void)
-{
-#if defined(HAVE_DLERROR)
- return dlerror();
-#else
- return NULL;
-#endif
-}
-
const char *sys_inet_ntoa(struct ipv4_addr in)
{
struct in_addr in2;
@@ -221,11 +155,6 @@ const char *sys_inet_ntoa(struct ipv4_addr in)
return inet_ntoa(in2);
}
-uint32_t sys_inet_addr(const char *s)
-{
- return inet_addr(s);
-}
-
struct ipv4_addr sys_inet_makeaddr(int net, int host)
{
struct in_addr in;