Re: Bug#133640: some issues still left
Bouncing this back to debian-hurd because I don't have time today and I
don't really grok the code anyway. I've reinserted the patches.
On Sun, May 30, 2004 at 08:49:36PM -0300, Scott James Remnant wrote:
> On Mon, 2004-05-31 at 00:50 +0200, Michael Banck wrote:
>
> > I've just built a dpkg from a tarball provided by Scott.
> >
> > There are two-and-a-half issues:
> >
> > 1. We really need to pass -std=gnu99, otherwise this error appears:
> >
> > start-stop-daemon.c:775: error: 'for' loop intial declaration used
> > outside C99 mode
--- ../cvs/dpkg-1.10.21/utils/Makefile.in
+++ dpkg-1.10.21.ogi.2/utils/Makefile.in
@@ -71,6 +71,9 @@ endif
$(mkinstalldirs) $(DESTDIR)/$(man1dir)
$(INSTALL_DATA) $(srcdir)/$(MD5_MANPAGES) $(DESTDIR)/$(man1dir)
+# When compiled for the Hurd, start-stop-daemon.c should be compiled
+# with C99 features enabled.
+start-stop-daemon.o: CFLAGS += -std=gnu99
start-stop-daemon: $(SSD_OBJECTS) ../lib/libdpkg.a
$(CC) $(LDFLAGS) -o $@ $(SSD_OBJECTS) $(LIBS) $(SSD_LIBS)
> Ok, can we have this macro removed and replaced with a C90 equivalent
> then?
>
> > 2. One part of Neal's patch did not get applied yet, and I still get
> > segfaults without it (and it's fine after applying it):
(utils/start-stop-daemon.c)
@@ -722,6 +724,14 @@ check_all (void *ptr)
static void
do_procinit(void)
+{
+ /* Nothing to do. */
+}
+
+static void do_libpsinit(void) __attribute__ ((constructor));
+
+static void
+do_libpsinit(void)
{
struct ps_context *context;
error_t err;
> This bit is clearly crack; I'm not going to add a constructor function
> -- find a better way to do this.
> Scott
Michael
--
Michael Banck
Debian Developer
mbanck@debian.org
http://www.advogato.org/person/mbanck/diary.html
Reply to: