tech-pkg archive

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

Re: u_intX_t vs. uintX_t

Steven Drake <> writes:

> This is to let everyone know about this issue I've just come across, to 
> do with the u_intX_t and uintX_t type groups (where X is 8, 16, 32, or 64).
> Different OS's define the two groups (strangely) in different places:
> + Linux and NetBSD have (since before C99) made available the u_intX_t
>   group from <sys/types.h>
> After C99:
> + NetBSD has made uintX_t group available from both <sys/types.h> and 
>   <stdint.h>.
> + Linux has made the uintX_t group available from <stdint.h> (but _not_
>   <sys/types.h>).
> + SunOS have made the uintX_t group available from <sys/types.h> 
>   and <stdint.h>. (well I'm assuming it does.)
> If you can't see the problem, may developers include <sys/types.h> and use
> the u_intX_t group, which doesn't means a package won't build on SunOS,
> simply changing them to uintX_t types means it now build on SunOS but 
> not on Linux anymore!

So a program is broken unless:

  it uses uintX_t, and
  include stdint.h

Is that what you mean?   This seems  to be in the category of "common
upstream bug" - are you proposing to have some accomodation in pkgsrc?
I'm guessing that this bug is common in linuxy programs...

Attachment: pgpp_oRU0dfu4.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index