[devel] glibc-kernheaders TCGETS2

Alexey Tourbin =?iso-8859-1?q?at_=CE=C1_altlinux=2Eru?=
Ср Мар 19 01:58:50 MSK 2008


У меня перестал собираться перл, не может вычислить некоторые константы
для ioctl в сгенерированном сишном коде.

$ cat /tmp/.private/at/bhap6ejYVA.c
#include <stdio.h>
#include <sys/ioctl.h>
int main() {
printf("TCGETS %ld\n", (long)(TCGETS));
printf("TCGETS2 %ld\n", (long)(TCGETS2));
return 0;
}
$ gcc /tmp/.private/at/bhap6ejYVA.c
/tmp/.private/at/bhap6ejYVA.c: In function 'main':
/tmp/.private/at/bhap6ejYVA.c:5: error: invalid application of 'sizeof' to incomplete type 'struct termios2' 
/tmp/.private/at/bhap6ejYVA.c:5: error: array type has incomplete element type
/tmp/.private/at/bhap6ejYVA.c:5: error: invalid application of 'sizeof' to incomplete type 'struct termios2' 
/tmp/.private/at/bhap6ejYVA.c:5: error: invalid application of 'sizeof' to incomplete type 'struct termios2' 
$

Воспроизводится это так:

$ pwd
/home/at/git.alt/perl/ext/ph
$ diff -u h2ph.pl{-,}
--- h2ph.pl-    2008-03-18 21:06:25 +0300
+++ h2ph.pl     2008-03-19 01:55:18 +0300
@@ -24,7 +24,7 @@
 sub get_values ($$) {
     my @include = @{ +shift };
     my @names = @{ +shift };
-    my $src = File::Temp->new(SUFFIX=>'.c');
+    my $src = File::Temp->new(SUFFIX=>'.c',UNLINK=>0);
     print $src "#include <stdio.h>\n";
     for (@include) {
        print $src "#include <$_>\n";
$ perl ioctl_ph.PL 
/tmp/.private/at/S5LyD2gyrT.c: In function 'main':
/tmp/.private/at/S5LyD2gyrT.c:67: error: invalid application of 'sizeof' to incomplete type 'struct termios2' 
/tmp/.private/at/S5LyD2gyrT.c:67: error: array type has incomplete element type
/tmp/.private/at/S5LyD2gyrT.c:67: error: invalid application of 'sizeof' to incomplete type 'struct termios2' 
/tmp/.private/at/S5LyD2gyrT.c:67: error: invalid application of 'sizeof' to incomplete type 'struct termios2' 
/tmp/.private/at/S5LyD2gyrT.c:74: error: invalid application of 'sizeof' to incomplete type 'struct termios2' 
/tmp/.private/at/S5LyD2gyrT.c:74: error: array type has incomplete element type
/tmp/.private/at/S5LyD2gyrT.c:74: error: invalid application of 'sizeof' to incomplete type 'struct termios2' 
/tmp/.private/at/S5LyD2gyrT.c:74: error: invalid application of 'sizeof' to incomplete type 'struct termios2' 
/tmp/.private/at/S5LyD2gyrT.c:76: error: invalid application of 'sizeof' to incomplete type 'struct termios2' 
/tmp/.private/at/S5LyD2gyrT.c:76: error: array type has incomplete element type
/tmp/.private/at/S5LyD2gyrT.c:76: error: invalid application of 'sizeof' to incomplete type 'struct termios2' 
/tmp/.private/at/S5LyD2gyrT.c:76: error: invalid application of 'sizeof' to incomplete type 'struct termios2' 
/tmp/.private/at/S5LyD2gyrT.c:78: error: invalid application of 'sizeof' to incomplete type 'struct termios2' 
/tmp/.private/at/S5LyD2gyrT.c:78: error: array type has incomplete element type
/tmp/.private/at/S5LyD2gyrT.c:78: error: invalid application of 'sizeof' to incomplete type 'struct termios2' 
/tmp/.private/at/S5LyD2gyrT.c:78: error: invalid application of 'sizeof' to incomplete type 'struct termios2' 
failed: gcc -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm -o /tmp/.private/at/2jww_OC3PH /tmp/.private/at/S5LyD2gyrT.c -Wl,-O1 -L/usr/local/lib -ldl -lm -lpthread -lc -lcrypt at ./h2ph.pl line 39.
$ sed -n -e 67p -e 74p -e 76p -e 78p /tmp/.private/at/S5LyD2gyrT.c
printf("TCGETS2 %ld\n", (long)(TCGETS2));
printf("TCSETS2 %ld\n", (long)(TCSETS2));
printf("TCSETSF2 %ld\n", (long)(TCSETSF2));
printf("TCSETSW2 %ld\n", (long)(TCSETSW2));
$
----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя     : =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Тип     : application/pgp-signature
Размер  : 197 байтов
Описание: =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Url     : <http://lists.altlinux.org/pipermail/devel/attachments/20080319/b3de50b2/attachment-0002.bin>


Подробная информация о списке рассылки Devel