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

Bug#222878: Header incompatibilities



I was asking elsewhere and got directed here. FWIW, here's
what I tracked down:

I've used source both from upstream and via apt-get. The
only thing that changes is in which .c the error shows
up first. The below is from upstream sourceL

cc -pipe -O2 -mcpu=i486 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototype\
s -Wstrict-prototypes -DNCH=1
+-D_FILE_OFFSET_BITS=64 -DSBINDIR=\"/sbin\" -DUSRSBINDIR=\"/usr/sbin\" -DLOGDIR\
=\"/var/log\" -DVARPATH=\"/var\"
+-DLOCALEDIR=\"/usr/share/locale\" -O2  -s  blockdev.c   -o blockdev
blockdev.c:70: error: parse error before '[' token
blockdev.c:70: error: initializer element is not constant
blockdev.c:70: error: (near initialization for `bdcms[4].ioc')
blockdev.c:70: error: initializer element is not constant
blockdev.c:70: error: (near initialization for `bdcms[4]')
blockdev.c:73: error: parse error before '[' token
blockdev.c:73: error: initializer element is not constant
blockdev.c:73: error: (near initialization for `bdcms[5].ioc')
blockdev.c:73: error: initializer element is not constant
blockdev.c:73: error: (near initialization for `bdcms[5]')
blockdev.c:76: error: initializer element is not constant
blockdev.c:76: error: (near initialization for `bdcms[6]')
blockdev.c:79: error: initializer element is not constant
blockdev.c:79: error: (near initialization for `bdcms[7]')
blockdev.c:82: error: initializer element is not constant
blockdev.c:82: error: (near initialization for `bdcms[8]')
blockdev.c:85: error: initializer element is not constant
blockdev.c:85: error: (near initialization for `bdcms[9]')
blockdev.c:89: error: initializer element is not constant
blockdev.c:89: error: (near initialization for `bdcms[10]')
blockdev.c: In function `report_device':
blockdev.c:331: error: parse error before '[' token
make[1]: *** [blockdev] Error 1
make[1]: Leaving directory `/dma/Sbuilder2/Obj-mourne/util-linux-2.12/disk-utils'
make: *** [all] Error 1


There are actually only 3 errors; the rest are just
caused by them:

        blockdev.c:70: error: parse error before '[' token
        blockdev.c:73: error: parse error before '[' token
        blockdev.c:331: error: parse error before '[' token

I narrowed things down by doing a macro expansion. blockdev.c
line 70 contains this:

#ifdef BLKSSZGET
        { "--getss", "BLKSSZGET", BLKSSZGET, ARGINTG, -1, NULL, N_("get sectors\
ize") },
#endif

which macro expands to this:
        { "--getbsz", "BLKBSZGET", (((2U) << (((0 +8)+8)+14)) | (((0x12)) << (0\
 +8)) | (((112)) << 0) |
+(((((sizeof(sizeof(int)) == sizeof(sizeof(int)[1]) && sizeof(sizeof(int)) < (1\
 << 14)) ? sizeof(sizeof(int)) :
+__invalid_size_argument_for_IOC))) << ((0 +8)+8))), 4, -1, ((void *)0), ("get \
blocksize") },

If you look closely you will see sizeoff(int)[1]. That
is the error which occurs in all three lines here (and
also once in get_blocks.c.

Appears to happen in _IOR and _IOW macros.

-- 
------------------------------------------------------
   Dale Amon     amon@islandone.org    +44-7802-188325
       International linux systems consultancy
     Hardware & software system design, security
    and networking, systems programming and Admin
	      "Have Laptop, Will Travel"
------------------------------------------------------



Reply to: