summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/common/getdnnm.c
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-07-09 16:37:21 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-07-09 16:37:21 +0000
commitef250238dc1572caf859c2b64652f9cdfb0d9e42 (patch)
tree6e5abb5cb2606977ff02de681b3279247972d05c /libc/sysdeps/linux/common/getdnnm.c
parenteab99f7d1624ff5ca2c251351760d48da573328f (diff)
downloaduClibc-alpine-ef250238dc1572caf859c2b64652f9cdfb0d9e42.tar.bz2
uClibc-alpine-ef250238dc1572caf859c2b64652f9cdfb0d9e42.tar.xz
Synch with trunk: remove obsolete files
Diffstat (limited to 'libc/sysdeps/linux/common/getdnnm.c')
-rw-r--r--libc/sysdeps/linux/common/getdnnm.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/libc/sysdeps/linux/common/getdnnm.c b/libc/sysdeps/linux/common/getdnnm.c
deleted file mode 100644
index ee1b012c4..000000000
--- a/libc/sysdeps/linux/common/getdnnm.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- *
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
-#include <features.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sys/utsname.h>
-
-#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
-libc_hidden_proto(strlen)
-libc_hidden_proto(strcpy)
-libc_hidden_proto(uname)
-
-libc_hidden_proto(getdomainname)
-int getdomainname(char *name, size_t len)
-{
- struct utsname uts;
-
- if (name == NULL) {
- __set_errno(EINVAL);
- return -1;
- }
-
- if (uname(&uts) == -1) return -1;
-
-#ifdef __USE_GNU
- if (strlen(uts.domainname)+1 > len) {
-#else
- if (strlen(uts.__domainname)+1 > len) {
-#endif
- __set_errno(EINVAL);
- return -1;
- }
-#ifdef __USE_GNU
- strcpy(name, uts.domainname);
-#else
- strcpy(name, uts.__domainname);
-#endif
- return 0;
-}
-libc_hidden_def(getdomainname)
-#endif