[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#46750: dpkg: [hurd] main/help.c: Don't use PATH_MAX

Package: dpkg
Severity: important


this is one of the many things that needs to be fixed for the Hurd. It is of
course not release critical for Linux.

PATH_MAX is not defined on the Hurd, there is no arbitrary limit.

I suggest changing the code in main/help.c to use appropriate combinations
of strdup or malloc/realloc with strlen. This shouldn't be too hard, but I
leave it to you to implement this properly (as the exact way to do this is
mostly personal preference).

Alternatively, as a quick hack, you can simply put

#ifndef PATH_MAX
#define PATH_MAX 4096

at the top of the file. (The use of PATH_MAX is not overly important here)

Or you use sysconf to query a limit if it exists, and if not, you use one of
the above methods.


-- System Information
Debian Release: potato
Kernel Version: Linux ulysses 2.2.12 #7 Mon Sep 27 01:09:52 CEST 1999 i586 unknown

Versions of the packages dpkg depends on:
hi  libc6           2.1.2-0pre11   GNU C Library: Shared libraries and timezone
hi  libstdc++2.10   2.95.2-0pre2   The GNU stdc++ library
ii  libncurses4     4.2-3.3        Shared libraries for terminal handling

Reply to: