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

Bug#25334: marked as done (C declaration "struct fd_set my_fd_set;" doesn't work)



Your message dated Mon, 15 Feb 1999 07:29:46 -0800
with message-id <v04104435b2ededbaaab4@[206.163.71.146]>
and subject line User error.
has caused the attached bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I'm
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Ian Jackson
(administrator, Debian bugs database)

Received: (at submit) by bugs.debian.org; 2 Aug 1998 23:51:54 +0000
Received: (qmail 2729 invoked from network); 2 Aug 1998 23:51:53 -0000
Received: from unknown (HELO www.rega.net) (195.242.64.110)
  by debian.novare.net with SMTP; 2 Aug 1998 23:51:53 -0000
Received: from rega.net (promail [195.242.64.109])
	by www.rega.net (8.8.7/8.8.7) with SMTP id BAA23678
	for <submit@bugs.debian.org>; Mon, 3 Aug 1998 01:43:29 +0200 (MET DST)
From: VoiD <void@pipo.com>
Subject: C declaration "struct fd_set my_fd_set;" doesn't work
Date: Mon, 3 Aug 1998 01:52:40 +0200 (CET)
To: submit@bugs.debian.org
Reply-To: VoiD <void@pipo.com>
Message-ID: <Pine.LNX.3.96.980803014224.683A-100000@blackhole>
MIME-Version: 1.0
X-Sender: void@blackhole
Content-Type: TEXT/PLAIN; charset=US-ASCII

Package: libc6-dev
Version: 2.0.7t-1

There are some error in files associated with /usr/include/sys/select.h

following are 2 simple example files showing the problem:
test_bug.c & test_fix.c

When I use (without pointer):
        struct fd_set my_fd_set;
I get:

blackhole:~/src> gcc test_bug.c
test_bug.c: In function `main':
test_bug.c:12: storage size of `my_fd_set' isn't known
blackhole:~/src> 

I was expecting... this to work without error! :)

it's easily fixed by using the existing typedef fd_set:
        fd_set my_fd_set;

I suggest that the includes files should be fixed so the struct line
works, but I don't have any clue on how doing this.
I compiled exactly the same program (test_bug.c)  on AIX and Solaris
without any error.
I found this bug when trying to add the --enable-realtime option on the
amp package, which wasn't enabled (surely because of this bug) so I'll
report something about this there too.

thanks to add this bug to the report list and to transmit it to the right
persons (GNU?)

I'm using gcc version 2.7.2.3

Adel Belhouane.

-------------------------------------------------------------------------------
/* test_bug.c */
#include <sys/select.h>

int main(int argc,char *argv[])
{
/* since the pointer doesn't need the size of the object, the next 
 * declaration doesn't produce errors
 */
        struct fd_set *my_fd_set_pointer;
/* the compiler can't figure out the fd_set size and makes an error
 */
        struct fd_set my_fd_set;

        return 0;
}
-------------------------------------------------------------------------------
/* test_fix.c */
#include <sys/select.h>

int main(int argc,char *argv[])
{
        fd_set *my_fd_set_pointer;
/* the fd_set typedef is working fine but it would be better both kind of
 * declaration work.
 */
        fd_set my_fd_set;

        return 0;
}
-------------------------------------------------------------------------------


Reply to: