This is the mail archive of the glibc-bugs@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/252] New: hsearch_data is not usable with sizeof() as


hsearch_data in search.h should be defined as this:

 typedef struct hsearch_data
  {
    struct _ENTRY *table;
    unsigned int size;
    unsigned int filled;
  } hash_table;

in order to be used in a program like that:

struct hsearch_data htab_ports; /* hash table for ports */

memset (&htab_ports, 0, sizeof (hash_table)); /* must be filled with 0 */

i didn't find any other way for gcc to compile my program when using
hsearch_data as actually defined in search.h :

struct hsearch_data
  {
    struct _ENTRY *table;
    unsigned int size;
    unsigned int filled;
  };

-- 
           Summary: hsearch_data is not usable with sizeof() as
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: minor
          Priority: P2
         Component: libc
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: damien_mattei at yahoo dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sources.redhat.com/bugzilla/show_bug.cgi?id=252

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]