bug-enscript
[Top][All Lists]
Advanced

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

[bug-enscript] enscript 1.6.6 PATH_MAX issues


From: Svante Signell
Subject: [bug-enscript] enscript 1.6.6 PATH_MAX issues
Date: Thu, 22 Aug 2013 17:42:21 +0200

Hello,

Looking at the build of enscript 1.6.5.90 in Debian the build fails for
GNU/Hurd due to PATH_MAX issues, where it is not defined. The same
problem is present in the latest release 1.6.6. Since a number of Debian
packages depend on enscript, it would be nice to have it built also for
Hurd.

Especially in the file src/psgen.c a union and structs are defined with
fixed character string lengths. Normally porting packages to Hurd
includes dynamically allocating strings with malloc/free. Taking
alignment into account, dynamic allocation might be a little tricky and
not worth the effort?

In the file intl/dcigettext.c the following construct is used:
#ifndef PATH_MAX
# define PATH_MAX _POSIX_PATH_MAX
#endif

_POSIX_PATH_MAX is defined in /usr/include/i386-gnu/bits/posix1_lim.h:
#define     _POSIX_PATH_MAX            256

Maybe something similar could be used in psgen.c:
#ifndef PATH_MAX
# define PATH_MAX 16*_POSIX_PATH_MAX
#endif
instead of going through the hassle to dynamically allocate the strings
and free them.

I'm CC:ing Tim Reout, since you seem to be both upstream and Debian
package maintainer.

Thanks,
Svante Signell




reply via email to

[Prev in Thread] Current Thread [Next in Thread]