Re: Is super *supposed* to be slooooow?
Vociferous Mole wrote:
:
: On my home machine (486-66, 16M), super takes *forever*
: to start up - like 30 seconds. My super.tab is the
: default, plus one command.
... no, it isn't.
I'll append a patch, made by a collegue ... it's not tested too much,
but seems to work.
(The change is related to the parameters passed to gethostbyname()).
Heiko
--
email : heiko@lotte.sax.de heiko@debian.org heiko@sax.de
pgp : A1 7D F6 7B 69 73 48 35 E1 DE 21 A7 A8 9A 77 92
finger: heiko@sax.sax.de heiko@master.debian.org
diff -bru super-3.9.7/debian.rules super-3.9.7-2happ/debian.rules
--- super-3.9.7/debian.rules Sun May 26 23:13:59 1996
+++ super-3.9.7-2happ/debian.rules Fri Sep 27 10:48:17 1996
@@ -22,7 +22,7 @@
# The version of the package
version = 3.9.7
# The Debian revision of the package
-revision = 2
+revision = 2happ
# The architecture of this build
arch = $(shell dpkg --print-architecture)
diff -bru super-3.9.7/utils.c super-3.9.7-2happ/utils.c
--- super-3.9.7/utils.c Sun May 26 23:12:05 1996
+++ super-3.9.7-2happ/utils.c Fri Sep 27 10:38:44 1996
@@ -1084,7 +1084,7 @@
int l;
#ifdef USE_GETHOSTBYNAME
struct hostent *he, *he_nodot, *he_dot;
- char dot_name[80] = "", nodot_name[80] = "";
+ char nodot_name[80] = "";
#endif
if (gethostname(buf, len) < 0)
@@ -1098,31 +1098,20 @@
* dot will cause match failure. So we try both forms, and take the
* longer match.
*/
+ /* This is incorrect according to the manualpage of gethostbyname().
+ * The full hostname is only searched and return if there is no
+ * dot on the end of the name
+ */
he_nodot = gethostbyname(buf);
- if (he_nodot && he_nodot->h_name)
+ if (he_nodot && he_nodot->h_name) {
strcpy(nodot_name, he_nodot->h_name);
- strcat(buf, ".");
- he_dot = gethostbyname(buf);
- if (he_dot && he_dot->h_name)
- strcpy(dot_name, he_dot->h_name);
- if (strlen(dot_name) && strlen(nodot_name)) {
- if ((strlen(dot_name) > len - 1) || (strlen(nodot_name) > len - 1))
- return Error(0, 0,
- "gethostbyname() returns `%s' which is too long for our buffer!\n",
- buf);
- strcpy(buf, strlen(dot_name) > strlen(nodot_name) ?dot_name : nodot_name);
- } else if (strlen(dot_name)) {
- if (strlen(dot_name) > len - 1)
- return Error(0, 0,
- "gethostbyname() returns `%s' which is too long for our buffer!\n",
- buf);
- strcpy(buf, dot_name);
- } else if (strlen(nodot_name)) {
+ }
+ if (strlen(nodot_name) ) {
if (strlen(nodot_name) > len - 1)
return Error(0, 0,
"gethostbyname() returns `%s' which is too long for our buffer!\n",
buf);
- strcpy(buf, nodot_name);
+ strcpy(buf, nodot_name );
} else {
return Error(0, 0,
"host `%s' not recognized by gethostbyname().\n", buf);
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com
Reply to: