On Friday 10 August 2007, Samuel Thibault wrote: > - #include <linux/types.h> is turned into #include <stdint.h>, much more > portable, and __uxy were turned into uintxy_t. sounds good regardless ... uintxy_t types are a standard, __uxy are a hack ;) > - #include <termio.h> turned into #include <termios.h>: termio.h is > deprecated since a lot time, we should really use termios.h instead. > - ioctl(0, TCFLSH, x) is turned into tcflush(0, x). These are really > equivalents (see the glibc implementation of tcflush). TCSA &such > ioctls should most probably also be replaced by tcsetattr & such, but > since glibc's implementation is not that straightforward and according > to comments there are some kludges, I preferred to do this change for > GNU/Hurd only. 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. > util-linux-2.13~rc3/configure.ac > +case "${host_os}" in frivileous quoting > + linux*) breaks for uclinux targets ... so you either want: *linux*) or: uclinux*|linux*) the former seems sane to me > 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 > util-linux-2.13~rc3/fdisk/fdisksunlabel.c > +#ifdef __linux__ > #include <linux/major.h> /* FLOPPY_MAJOR */ > +#endif AC_CHECK_HEADER please > 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) > +#ifdef __GNU__ > +#define termio termios > +#endif > ... > +#ifdef __GNU__ > + if (tcgetattr(0, tp) < 0) > +#else > if (ioctl(0, TCGETA, tp) < 0) > +#endif > ... > <snip similar termios stuff> ugh to say the least ... termios should be perfectly functional in linux with glibc, so working around bugs that may have existed many many years ago is no long an excuse to stick with the ioctl() stuff i dont think > util-linux-2.13~rc3/login-utils/checktty.c > +#ifdef __linux__ > #include <linux/major.h> > +#endif AC_CHECK_HEADER > 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
Attachment:
signature.asc
Description: This is a digitally signed message part.