Package: zephyr
Severity: important
Tags: patch

Hello,

zephyr currently FTBFS on hurd-i386, because it unconditionnaly uses
MAXHOSTNAMELEN and MAXPATHLEN in a lot of places.  The attached patch
defaults them to 4096.  A proper fix would be to turn loops into dynamic
loops, but that would be a much more intrusive fix.

Samuel

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.27 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

-- 
Samuel
After watching my newly-retired dad spend two weeks learning how to make a new
folder, it became obvious that "intuitive" mostly means "what the writer or
speaker of intuitive likes".
(Bruce Ediger, bedi...@teal.csn.org, in comp.os.linux.misc, on X the
intuitiveness of a Mac interface.)
Author: Munteanu Alexandru <io_alex_2...@yahoo.fr>

diff -urp ./original/zephyr-2.1.20010518.SNAPSHOT/clients/zctl/zctl.c 
./zephyr-2.1.20010518.SNAPSHOTmodificat/clients/zctl/zctl.c
--- ./original/zephyr-2.1.20010518.SNAPSHOT/clients/zctl/zctl.c 1999-08-13 
02:19:38.000000000 +0200
+++ ./zephyr-2.1.20010518.SNAPSHOTmodificat/clients/zctl/zctl.c 2005-01-23 
23:21:22.000000000 +0100
@@ -37,6 +37,10 @@ static const char *rcsid_zctl_c = "$Id: 
 #define        UNSUBONLY       1
 #define        SUBONLY         2
 
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 4096
+#endif
+
 #define        ERR             (-1)
 #define        NOT_REMOVED     0
 #define        REMOVED         1
diff -urp 
./original/zephyr-2.1.20010518.SNAPSHOT/clients/zpopnotify/zpopnotify.c 
./zephyr-2.1.20010518.SNAPSHOTmodificat/clients/zpopnotify/zpopnotify.c
--- ./original/zephyr-2.1.20010518.SNAPSHOT/clients/zpopnotify/zpopnotify.c     
1999-08-13 02:19:41.000000000 +0200
+++ ./zephyr-2.1.20010518.SNAPSHOTmodificat/clients/zpopnotify/zpopnotify.c     
2005-01-23 23:21:22.000000000 +0100
@@ -28,6 +28,10 @@ static char rcsid_zpopnotify_c[] = "$Id:
 #define MAIL_CLASS "MAIL"
 #define MAIL_INSTANCE "POP"
 
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 4096
+#endif
+
 void usage();
 
 main(argc,argv)
diff -urp 
./original/zephyr-2.1.20010518.SNAPSHOT/clients/zshutdown_notify/zshutdown_notify.c
 
./zephyr-2.1.20010518.SNAPSHOTmodificat/clients/zshutdown_notify/zshutdown_notify.c
--- 
./original/zephyr-2.1.20010518.SNAPSHOT/clients/zshutdown_notify/zshutdown_notify.c
 1997-10-25 23:47:15.000000000 +0200
+++ 
./zephyr-2.1.20010518.SNAPSHOTmodificat/clients/zshutdown_notify/zshutdown_notify.c
 2005-01-23 23:21:23.000000000 +0100
@@ -33,6 +33,14 @@ static const char *rcsid_zshutdown_notif
 #define SVC_NAME       "rcmd"
 #endif
 
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 4096
+#endif
+
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 4096
+#endif
+
 /*
  * Standard warning strings appended as extra fields to
  * the message body.
diff -urp ./original/zephyr-2.1.20010518.SNAPSHOT/clients/zstat/zstat.c 
./zephyr-2.1.20010518.SNAPSHOTmodificat/clients/zstat/zstat.c
--- ./original/zephyr-2.1.20010518.SNAPSHOT/clients/zstat/zstat.c       
1999-08-13 02:18:50.000000000 +0200
+++ ./zephyr-2.1.20010518.SNAPSHOTmodificat/clients/zstat/zstat.c       
2005-01-23 23:21:23.000000000 +0100
@@ -17,6 +17,10 @@
 #include <sys/socket.h>
 #include "zserver.h"
 
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 4096
+#endif
+
 #if !defined(lint) && !defined(SABER)
 static const char rcsid_zstat_c[] = "$Id: zstat.c,v 1.21 1999/08/13 00:18:50 
danw Exp $";
 #endif
diff -urp ./original/zephyr-2.1.20010518.SNAPSHOT/lib/ZInit.c 
./zephyr-2.1.20010518.SNAPSHOTmodificat/lib/ZInit.c
--- ./original/zephyr-2.1.20010518.SNAPSHOT/lib/ZInit.c 1999-01-23 
00:19:14.000000000 +0100
+++ ./zephyr-2.1.20010518.SNAPSHOTmodificat/lib/ZInit.c 2005-01-23 
23:21:23.000000000 +0100
@@ -26,6 +26,10 @@ static char rcsid_ZInitialize_c[] =
 #define INADDR_NONE 0xffffffff
 #endif
 
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 4096
+#endif
+
 Code_t ZInitialize()
 {
     struct servent *hmserv;
diff -urp ./original/zephyr-2.1.20010518.SNAPSHOT/lib/ZLocations.c 
./zephyr-2.1.20010518.SNAPSHOTmodificat/lib/ZLocations.c
--- ./original/zephyr-2.1.20010518.SNAPSHOT/lib/ZLocations.c    1999-01-23 
00:19:15.000000000 +0100
+++ ./zephyr-2.1.20010518.SNAPSHOTmodificat/lib/ZLocations.c    2005-01-23 
23:21:23.000000000 +0100
@@ -20,6 +20,14 @@ static char rcsid_ZLocations_c[] =
 
 #include <pwd.h>
 
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 4096
+#endif
+
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 4096
+#endif
+
 static char host[MAXHOSTNAMELEN], mytty[MAXPATHLEN];
 static int location_info_set = 0;
 
diff -urp ./original/zephyr-2.1.20010518.SNAPSHOT/lib/Zinternal.c 
./zephyr-2.1.20010518.SNAPSHOTmodificat/lib/Zinternal.c
--- ./original/zephyr-2.1.20010518.SNAPSHOT/lib/Zinternal.c     2005-01-23 
23:17:07.000000000 +0100
+++ ./zephyr-2.1.20010518.SNAPSHOTmodificat/lib/Zinternal.c     2005-01-23 
23:21:23.000000000 +0100
@@ -16,6 +16,10 @@
 #include <sys/socket.h>
 #include <utmp.h>
 
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 4096
+#endif
+
 #ifndef lint
 static const char rcsid_Zinternal_c[] =
   "$Id: Zinternal.c,v 1.41 2000/01/27 03:48:53 ghudson Exp $";
diff -urp ./original/zephyr-2.1.20010518.SNAPSHOT/server/access.c 
./zephyr-2.1.20010518.SNAPSHOTmodificat/server/access.c
--- ./original/zephyr-2.1.20010518.SNAPSHOT/server/access.c     1999-01-23 
00:19:36.000000000 +0100
+++ ./zephyr-2.1.20010518.SNAPSHOTmodificat/server/access.c     2005-01-23 
23:21:24.000000000 +0100
@@ -19,6 +19,10 @@ static const char rcsid_access_c[] =
     "$Id: access.c,v 1.18 1999/01/22 23:19:36 ghudson Exp $";
 #endif
 
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 4096
+#endif
+
 /*
  *
  * External routines:
diff -urp ./original/zephyr-2.1.20010518.SNAPSHOT/server/main.c 
./zephyr-2.1.20010518.SNAPSHOTmodificat/server/main.c
--- ./original/zephyr-2.1.20010518.SNAPSHOT/server/main.c       2005-01-23 
23:17:07.000000000 +0100
+++ ./zephyr-2.1.20010518.SNAPSHOTmodificat/server/main.c       2005-01-23 
23:21:24.000000000 +0100
@@ -23,6 +23,10 @@ static const char rcsid_main_c[] =
 #endif
 #endif
 
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 4096
+#endif
+ 
 /*
  * Server loop for Zephyr.
  */
diff -urp ./original/zephyr-2.1.20010518.SNAPSHOT/server/realm.c 
./zephyr-2.1.20010518.SNAPSHOTmodificat/server/realm.c
--- ./original/zephyr-2.1.20010518.SNAPSHOT/server/realm.c      2005-01-23 
23:17:07.000000000 +0100
+++ ./zephyr-2.1.20010518.SNAPSHOTmodificat/server/realm.c      2005-01-23 
23:21:24.000000000 +0100
@@ -7,6 +7,10 @@ Realm *otherrealms;             /* point
                                    servers */
 int nrealms = 0;                /* number of other realms */
 
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 4096
+#endif
+
 /*
  * External Routines:
  *
diff -urp ./original/zephyr-2.1.20010518.SNAPSHOT/server/server.c 
./zephyr-2.1.20010518.SNAPSHOTmodificat/server/server.c
--- ./original/zephyr-2.1.20010518.SNAPSHOT/server/server.c     2005-01-23 
23:17:07.000000000 +0100
+++ ./zephyr-2.1.20010518.SNAPSHOTmodificat/server/server.c     2005-01-23 
23:21:24.000000000 +0100
@@ -25,6 +25,11 @@ static const char rcsid_server_c[] = "$I
 #define SRV_NACKTAB_HASHVAL(which, uid)        (((which) ^ 
(uid).zuid_addr.s_addr ^ \
                                          (uid).tv.tv_sec ^ (uid).tv.tv_usec) \
                                         % SRV_NACKTAB_HASHSIZE)
+
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 4096
+#endif
+
 /*
  * Server manager.  Deal with  traffic to and from other servers.
  *
diff -urp ./original/zephyr-2.1.20010518.SNAPSHOT/server/zserver.h 
./zephyr-2.1.20010518.SNAPSHOTmodificat/server/zserver.h
--- ./original/zephyr-2.1.20010518.SNAPSHOT/server/zserver.h    2005-01-23 
23:17:07.000000000 +0100
+++ ./zephyr-2.1.20010518.SNAPSHOTmodificat/server/zserver.h    2005-01-23 
23:21:24.000000000 +0100
@@ -28,6 +28,10 @@
 #include "access.h"
 #include "acl.h"
 
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 4096
+#endif
+
 #ifdef HAVE_KRB4
 /* Kerberos-specific library interfaces used only by the server. */
 extern C_Block __Zephyr_session;
diff -urp ./original/zephyr-2.1.20010518.SNAPSHOT/zhm/zhm.c 
./zephyr-2.1.20010518.SNAPSHOTmodificat/zhm/zhm.c
--- ./original/zephyr-2.1.20010518.SNAPSHOT/zhm/zhm.c   2005-01-23 
23:17:07.000000000 +0100
+++ ./zephyr-2.1.20010518.SNAPSHOTmodificat/zhm/zhm.c   2005-01-23 
23:21:24.000000000 +0100
@@ -22,6 +22,10 @@ int use_hesiod = 0;
 #define srandom srand48
 #endif
 
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 4096
+#endif
+
 #define PIDDIR "/var/run/"
 
 int hmdebug, rebootflag, noflushflag, errflg, dieflag, inetd, oldpid, nofork;
diff -urp ./original/zephyr-2.1.20010518.SNAPSHOT/zhm/zhm_server.c 
./zephyr-2.1.20010518.SNAPSHOTmodificat/zhm/zhm_server.c
--- ./original/zephyr-2.1.20010518.SNAPSHOT/zhm/zhm_server.c    2000-05-08 
18:00:08.000000000 +0200
+++ ./zephyr-2.1.20010518.SNAPSHOTmodificat/zhm/zhm_server.c    2005-01-23 
23:21:24.000000000 +0100
@@ -12,6 +12,10 @@
 
 #include "zhm.h"
 
+#ifndef MAXHOSTNAMELEN 
+# define MAXHOSTNAMELEN 4096
+#endif 
+
 #ifndef lint
 #ifndef SABER
 static char rcsid_hm_server_c[] = "$Id: zhm_server.c,v 1.18 2000/05/08 
16:00:08 ghudson Exp $";
diff -urp ./original/zephyr-2.1.20010518.SNAPSHOT/zwgc/subscriptions.c 
./zephyr-2.1.20010518.SNAPSHOTmodificat/zwgc/subscriptions.c
--- ./original/zephyr-2.1.20010518.SNAPSHOT/zwgc/subscriptions.c        
1999-06-01 21:01:19.000000000 +0200
+++ ./zephyr-2.1.20010518.SNAPSHOTmodificat/zwgc/subscriptions.c        
2005-01-23 23:21:25.000000000 +0100
@@ -33,6 +33,10 @@ static char rcsid_subscriptions_c[] = "$
 #include "file.h"
 #include "main.h"
 
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 4096
+#endif
+
 /****************************************************************************/
 /*                                                                          */
 /*                  Code to implement punting of notices:                   */

Reply via email to