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

Bug#175025: dev_t problems with non-gcc compilers



On Thu, Jan 02, 2003 at 03:56:14PM +0200, Timo Sirainen wrote:
> On Thu, 2003-01-02 at 15:49, Ben Collins wrote:
> > > sys/sysmacros.h seems to use different method to determine if dev_t is
> > > unsigned long long or an array type than the actual dev_t declaration.
> > > Here's a test program that fails with tcc (included with Debian):
> > > 
> > > #include <stdio.h>
> > > #include <sys/types.h>
> > > #include <sys/sysmacros.h>
> > > 
> > > int main(int argc, char *argv[])
> > > {
> > >         dev_t x = 0;
> > > 
> > >         printf("%d %d\n", major(x), minor(x));
> > >         return 0;
> > > }
> > > 
> > > Results as:
> > 
> > Shouldn't "dev_t x = 0" be:
> > 
> > 	dev_t x = makedev(0,0);
> > 
> > ? I think that's your problem, not a header bug. Of course, it all
> > depends on what line is line 9.
> 
> Well, the = 0 wasn't important, major() and minor() were. Using
> makedev() also fails:

The only way I can see that as possible is if tcc defines __GNUC__. Can
you get the preprocessed output before tcc gets it and see what dev_t is
typedef'd to?

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
Deqo       - http://www.deqo.com/



Reply to: