glibc hell

rafael on 2004-06-11T12:26:11

Recently, in the glibc headers, some inline functions appeared. For example, on my system, sys/sysmacros.h contains the following stuff: (glibc 2.3.3)

__extension__ extern __inline unsigned int
gnu_dev_major (unsigned long long int __dev) __THROW
{
  return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
}

# define major(dev) gnu_dev_major (dev)
Of course, h2ph doesn't grok this at all. And things breaks. That's why I added a ugly hack to h2ph to try to parse the __inline functions that mostly look like C macros (change #22925 to bleadperl.) The old caveat applies more than ever : It's only intended as a rough tool. You may need to dicker with the files produced. (from the h2ph(1) manpage, section BUGS.)