summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-02 09:55:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:18 -0500
commitfe3c2456e22b69c1b146b490e2338a065ec402ea (patch)
treee2eddb12ab2c716186a121f60d795de22014ff04 /source4/lib
parentc051779a0a34a9c40a5425fb1eb821983b8dc852 (diff)
downloadsamba-fe3c2456e22b69c1b146b490e2338a065ec402ea.tar.gz
samba-fe3c2456e22b69c1b146b490e2338a065ec402ea.tar.bz2
samba-fe3c2456e22b69c1b146b490e2338a065ec402ea.zip
r3470: removed some unused functions (should fix the build on IRIX 6.4)
(This used to be commit b4c727a8dd74c9603a58c019d4be8b423209e04d)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/system.c126
1 files changed, 15 insertions, 111 deletions
diff --git a/source4/lib/system.c b/source4/lib/system.c
index 46490bb17e..1e986497e4 100644
--- a/source4/lib/system.c
+++ b/source4/lib/system.c
@@ -75,6 +75,21 @@ int sys_usleep(long usecs)
#endif /* HAVE_USLEEP */
}
+
+/*******************************************************************
+ 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.
********************************************************************/
@@ -103,63 +118,7 @@ ssize_t sys_write(int fd, const void *buf, size_t count)
return ret;
}
-/*******************************************************************
-A send wrapper that will deal with EINTR.
-********************************************************************/
-
-ssize_t sys_send(int s, const void *msg, size_t len, int flags)
-{
- ssize_t ret;
- do {
- ret = send(s, msg, len, flags);
- } while (ret == -1 && errno == EINTR);
- return ret;
-}
-
-/*******************************************************************
-A sendto wrapper that will deal with EINTR.
-********************************************************************/
-
-ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen)
-{
- ssize_t ret;
-
- do {
- ret = sendto(s, msg, len, flags, to, tolen);
- } while (ret == -1 && errno == EINTR);
- return ret;
-}
-
-
-/*******************************************************************
- 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;
-}
-
-/*******************************************************************
-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
-}
/*******************************************************************
os/2 also doesn't have chroot
@@ -335,41 +294,6 @@ void sys_srandom(uint_t seed)
#endif
}
-struct passwd *sys_getpwent(void)
-{
- return getpwent();
-}
-
-void sys_endpwent(void)
-{
- endpwent();
-}
-
-/**************************************************************************
- Wrappers for getpwnam(), getpwuid(), getgrnam(), getgrgid()
-****************************************************************************/
-
-struct passwd *sys_getpwnam(const char *name)
-{
- return getpwnam(name);
-}
-
-struct passwd *sys_getpwuid(uid_t uid)
-{
- return getpwuid(uid);
-}
-
-struct group *sys_getgrnam(const char *name)
-{
- return getgrnam(name);
-}
-
-struct group *sys_getgrgid(gid_t gid)
-{
- return getgrgid(gid);
-}
-
-
/**************************************************************************
Wrappers for dlopen, dlsym, dlclose.
****************************************************************************/
@@ -392,15 +316,6 @@ void *sys_dlsym(void *handle, const char *symbol)
#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)
@@ -410,17 +325,6 @@ const char *sys_dlerror(void)
#endif
}
-int sys_dup2(int oldfd, int newfd)
-{
-#if defined(HAVE_DUP2)
- return dup2(oldfd, newfd);
-#else
- errno = ENOSYS;
- return -1;
-#endif
-}
-
-
const char *sys_inet_ntoa(struct ipv4_addr in)
{
struct in_addr in2;