Re: builtin hostname

Jörg Sommer <[email protected]>
Newsgroups gmane.network.slrn.user
Message-ID <[email protected]>
Hallo John,

"John E. Davis" <[email protected]> wrote:
> Jörg Sommer <[email protected]> wrote:
>> anywhere. Is it still possible the hostname gets hardcoded into the
>> binary?
>
> I see nothing in the code supporting this.

Then can you remove this check from configure?

#v+
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index b25908f..a46900c 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -301,22 +301,6 @@ AC_TRY_LINK([#include <time.h>],
 	[AC_DEFINE(HAVE_TM_GMTOFF) AC_MSG_RESULT(yes)],
 	AC_MSG_RESULT(no))
 
-AC_CACHE_CHECK(for domain in /etc/resolv.conf, slrn_cv_domain,
-[if test -f /etc/resolv.conf; then
-	slrn_cv_domain=`(grep "^domain" /etc/resolv.conf ||
-	                 grep "^search" /etc/resolv.conf) |
-			awk '{ print [$]2 }' | head -1`
- fi
- if test -z "$slrn_cv_domain"; then
-	slrn_cv_domain=no
- fi
-])
-
-if test "$slrn_cv_domain" != no; then
-	AC_DEFINE(USE_DOMAIN_NAME)
-	AC_DEFINE_UNQUOTED(MY_DOMAIN_NAME, "${slrn_cv_domain}")
-fi
-
 AC_DEFUN(CF_VA_COPY,
 [
  dnl# va_copy checks taken from glib 1.2.8
diff --git a/src/config.hin b/src/config.hin
index 82eb047..6d24f29 100644
--- a/src/config.hin
+++ b/src/config.hin
@@ -7,12 +7,6 @@
 #ifndef SLRN_CONFIG_H
 #define SLRN_CONFIG_H
 
-/* define if you want to hard-code the domain */
-#undef USE_DOMAIN_NAME
- 
-/* set your domain here */
-#undef MY_DOMAIN_NAME
-
 /* Define to 1 if translation of program messages to the user's native
  * language is requested. 
  */
#v-

Schöne Grüße, Jörg.
-- 
Fazit: „Schießen Sie nicht mit dem Geiger!“
<news:[email protected]>

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.