Hi, Mike Frysinger, le Sat 11 Aug 2007 22:48:43 -0400, a écrit : > i think everything should use termios functions. these are a POSIX standard > and the underlying hacks and what not are the libc's problem, not util-linux. Well, I do agree with that, but doing the switch blindly might bring breakage: we don't necessarily know which hacks already done in libc then needs to be dropped. The duplication that would remain can be a problem. That's why I preferred to keep a conservative approach for this patch. But we can indeed move forward of course. > > util-linux-2.13~rc3/configure.ac > > +case "${host_os}" in > > frivileous quoting Right :) > > + linux*) > > breaks for uclinux targets ... Ah, I didn't know uclinux was using another host_os name. > so you either want: > *linux*) should be fine, yes. > > util-linux-2.13~rc3/fdisk/fdiskbsdlabel.c > > util-linux-2.13~rc3/misc-utils/namei.c > > util-linux-2.13~rc3/sys-utils/rdev.c > > +#ifndef MAXPATHLEN > > +#define MAXPATHLEN 4096 > > +#endif > > everything should use the POSIX PATH_MAX define from limits.h and if that > doesnt exist, your system sucks and needs to be fixed, not util-linux Not, my system doesn't suck, it just doesn't have such fixed hard limit, and thsu, as POSIX allows, doesn't have the macro that would express it. The above patch is just to avoid the risky exercice which is rewriting of code into length-unlimited loop. But MAXPATHLEN & such should really used as "oops, the system is limited to this", not as "how much memory should I allocate for my path?". Some system may very well define MAXPATHLEN to MAXINT... > > util-linux-2.13~rc3/fdisk/fdisksunlabel.c > > +#ifdef __linux__ > > #include <linux/major.h> /* FLOPPY_MAJOR */ > > +#endif > > AC_CHECK_HEADER please Ok. I was just mimicing other #ifdefs in other parts of the code, but AC_CHECK_HEADERS is probably the way forward. > > util-linux-2.13~rc3/login-utils/agetty.c > > +#elif defined(__GNU__) > > +#define _PATH_LOGIN "/bin/login" > > #endif > > i think it'd make sense for it to read !defined(_PATH_LOGIN) Ok > > util-linux-2.13~rc3/login-utils/wall.c > > +#ifndef MAXHOSTNAMELEN > > +#define MAXHOSTNAMELEN 64 > > +#endif > > everything should be using the POSIX HOST_NAME_MAX from limits.h > -mike Same story: my system doesn't have such hard limit, and hence doesn't define the macro, which should be seen as "how maximum can it be?" rather that "how much should I alloc?" Thanks for reviewing! Samuel - To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html