This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

next surprise


The next thing in the standard draft which causes problems is that the
getnetbyaddr function takes an uint32_t value for the first parameter.
We currently use unsigned long (why?).  This is not much of a problem
but we are also using unsigned long in the struct netent definition.

I've committed some changes to remove this difference from the
standard.  On 32 bit platforms we should have no problems.  On 64 bit
platforms the struct netent definition should be changed.  I've
currently only created a Linux/Alpha version as I don't think breaking
the other 64 bit APIs is a problem (SPARC64, MIPS64, IA-64).

IA-64 people: note that this is an incmopatible change if you are
using a glibc 2.1 based version.  There will be more of these changes
and I've warned everybody in advance.


One thing which probably should be done is to change the Alpha
definition.  It is currently


struct netent
{
  char *n_name;			/* Official name of network.  */
  char **n_aliases;		/* Alias list.  */
  int n_addrtype;		/* Net address type.  */
  unsigned long	int n_net;	/* Network number.  */
};


It should probably be


struct netent
{
  char *n_name;			/* Official name of network.  */
  char **n_aliases;		/* Alias list.  */
  int n_addrtype;		/* Net address type.  */
  int __dummy1;
  uint32_t n_net;		/* Network number.  */
  int __dummy2;
};


or whatever is appropriate for the padding.  There will be no binary
compatibilities.  Rth, can you take a look?

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

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