svn commit: trunk/uClibc/libc/sysdeps/linux/common

aldot at uclibc.org aldot at uclibc.org
Thu May 22 16:21:03 UTC 2008


Author: aldot
Date: 2008-05-22 09:21:02 -0700 (Thu, 22 May 2008)
New Revision: 22047

Log:
- rename to match the set*() function's filename


Added:
   trunk/uClibc/libc/sysdeps/linux/common/gethostname.c

Removed:
   trunk/uClibc/libc/sysdeps/linux/common/gethstnm.c


Changeset:
Copied: trunk/uClibc/libc/sysdeps/linux/common/gethostname.c (from rev 22045, trunk/uClibc/libc/sysdeps/linux/common/gethstnm.c)
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/gethostname.c	                        (rev 0)
+++ trunk/uClibc/libc/sysdeps/linux/common/gethostname.c	2008-05-22 16:21:02 UTC (rev 22047)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#include <string.h>
+#include <unistd.h>
+#include <sys/utsname.h>
+#include <errno.h>
+
+libc_hidden_proto(gethostname)
+
+/* Experimentally off - libc_hidden_proto(strlen) */
+/* Experimentally off - libc_hidden_proto(strcpy) */
+libc_hidden_proto(uname)
+
+int
+gethostname(char *name, size_t len)
+{
+  struct utsname uts;
+
+  if (name == NULL) {
+    __set_errno(EINVAL);
+    return -1;
+  }
+
+  if (uname(&uts) == -1) return -1;
+
+  if (strlen(uts.nodename)+1 > len) {
+    __set_errno(EINVAL);
+    return -1;
+  }
+  strcpy(name, uts.nodename);
+  return 0;
+}
+libc_hidden_def(gethostname)

Deleted: trunk/uClibc/libc/sysdeps/linux/common/gethstnm.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/gethstnm.c	2008-05-22 16:09:48 UTC (rev 22046)
+++ trunk/uClibc/libc/sysdeps/linux/common/gethstnm.c	2008-05-22 16:21:02 UTC (rev 22047)
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
- *
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
-#include <string.h>
-#include <unistd.h>
-#include <sys/utsname.h>
-#include <errno.h>
-
-libc_hidden_proto(gethostname)
-
-/* Experimentally off - libc_hidden_proto(strlen) */
-/* Experimentally off - libc_hidden_proto(strcpy) */
-libc_hidden_proto(uname)
-
-int
-gethostname(char *name, size_t len)
-{
-  struct utsname uts;
-
-  if (name == NULL) {
-    __set_errno(EINVAL);
-    return -1;
-  }
-
-  if (uname(&uts) == -1) return -1;
-
-  if (strlen(uts.nodename)+1 > len) {
-    __set_errno(EINVAL);
-    return -1;
-  }
-  strcpy(name, uts.nodename);
-  return 0;
-}
-libc_hidden_def(gethostname)




More information about the uClibc-cvs mailing list