delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/03/12/07:14:59

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
X-Mailer: 21.2 (beta45) "Thelxepeia" XEmacs Lucid (via feedmail 8 I)
To: Piotr Gardy <pogar AT pik-net DOT pl>
Cc: cygwin AT cygwin DOT com
Subject: Re: res_init
References: <0103121035380A DOT 29883 AT trejsrut DOT silesia DOT pik-net DOT pl>
X-Face: I-*}xvwusAv%MlABo'jVNP7TDXf5bb*L[q,r{DnsR1GoL07^Wf)sAu%>!LjXAFlZZN+`OQu
}?#du]C)[*%ERKR#+l#sX'EoNbSO~|.x AT ogoS5|"-u?<s5ViLslvYMlj7_n!Tq1m AT xt2Bhj4[Zg+e?
/Yy\SE`V?%v~kRU3GoS1f&U]}
From: "Dr. Volker Zell" <Dr DOT Volker DOT Zell AT oracle DOT com>
Date: 12 Mar 2001 13:17:53 +0100
In-Reply-To: <0103121035380A.29883@trejsrut.silesia.pik-net.pl>
Message-ID: <kv8zmbp4em.fsf@vzell.de.oracle.com>
Lines: 88
User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.2 (Thelxepeia)
MIME-Version: 1.0

>>>>> "Piotr" == Piotr Gardy <pogar AT pik-net DOT pl> writes:

    Piotr> Hello!
    Piotr> I'm new on the list so - Hi everybody! :)

    Piotr> I've a question - for last few days i try do compile mtr (0.42) under cygwin 
    Piotr> (cygwin_98-4.10). Cofigure scripts of mtr says, that it couldn't find a 
    Piotr> res_init. Confugure looks for it in system., next in libbind and libresolv. 
    Piotr> So I decided to compile BIND. After that I've got a libbind.a, copied it to 
    Piotr> /lib, but still configure says that res_init is not supporrrted by my system.

    Piotr> It checks for it by:
    Piotr> ###conttest.c##
    Piotr> #include <conftest.h> (nothing special in this file)

    Piotr> int res_init ();

    Piotr> main {
    Piotr> res_init();
    Piotr> return 0;
    Piotr> } 
    Piotr> ############
    Piotr> Compilation of this file says: "unresolved reference: res_init"., even with 
    Piotr> -L/lib -lbind options.

    Piotr> Could you help me? 


If you use

o bind-8.2.2p7 - ftp://ftp.isc.org/isc/bind/src/8.2.2-P7/

or later, you have to change configure to autodetect res_init(). I also
call configure like this

CPPFLAGS="-I/usr/local/bind/include" LIBS="-L/usr/local/bind/lib -lbind" ./configure  >> CONFIGURE-LOG 2>&1

because that's where I have my bind stuff installed.


diff -upr /gnu/mtr-0.42/configure mtr-0.42/configure
--- /gnu/mtr-0.42/configure	Sat Mar  4 09:07:39 2000
+++ mtr-0.42/configure	Mon Mar 12 12:58:38 2001
@@ -2211,9 +2211,9 @@ cat > conftest.$ac_ext <<EOF
 #line 2212 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char res_init();
+#include <arpa/nameser.h>
+#include <netdb.h>
+#include <resolv.h>
 
 int main() {
 res_init()


The following patch lets mtr at least compile (with or without gtk support
depends if you have the gtk stuff installed).


diff -upr /gnu/mtr-0.42/mtr.c mtr-0.42/mtr.c
--- /gnu/mtr-0.42/mtr.c	Sat Mar  4 09:22:32 2000
+++ mtr-0.42/mtr.c	Mon Mar 12 13:07:09 2001
@@ -159,6 +159,7 @@ int main(int argc, char **argv) {
   net_preopen_result = net_preopen ();
 
   /*  Now drop to user permissions  */
+#ifndef __CYGWIN__  
   if(setuid(getuid())) {
     printf("mtr: Unable to drop permissions.\n");
     exit(1);
@@ -169,6 +170,7 @@ int main(int argc, char **argv) {
     printf("mtr: Unable to drop permissions.\n");
     exit(1);
   }
+#endif
   
   display_detect(&argc, &argv);
 


Anyway my compiled version doesn't work. It starts up fine in both the ncurses and gtk version
but nothing happens. maybe you have more luck.

Ciao
  Volker


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019