aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-08-04 18:54:45 +0200
committerYang Tse <yangsita@gmail.com>2010-08-04 18:54:45 +0200
commit1cbe66fbc8e7d6c174c1919a905b768b9c48e1f8 (patch)
tree93850789197448125976542f2fc1b52e772d7e73 /tests/libtest
parentf8cf037ecf67d4dc490e0e54fb2c691211e859ba (diff)
build: remove unused file
Diffstat (limited to 'tests/libtest')
-rw-r--r--tests/libtest/hostname.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/tests/libtest/hostname.c b/tests/libtest/hostname.c
deleted file mode 100644
index ca7fccaf8..000000000
--- a/tests/libtest/hostname.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*****************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- */
-
-#include <string.h>
-#include <unistd.h>
-
-#define HOSTNAME "curlhost"
-#define HOSTNAME_LEN sizeof(HOSTNAME)
-
-/*
- * we force our own host name, in order to make some tests machine independent
- */
-int gethostname(char *name, size_t namelen) {
- char buff[HOSTNAME_LEN + /* terminating zero */ 1];
- size_t max = (namelen < HOSTNAME_LEN)
- ? namelen
- : HOSTNAME_LEN;
-
- if(!name || !namelen)
- return -1;
-
- strcpy(buff, HOSTNAME);
- buff[max - 1] = '\0';
- strcpy(name, buff);
- return 0;
-};