asir
asir

Reputation: 13351

Difference between uint32_t and u_int32_t

What is the difference between u_int32_t and uint32_t?

Upvotes: 16

Views: 9886

Answers (4)

larryang
larryang

Reputation: 41

As others have mentioned, uint32_t is a standard C99 type.

Anyway, the takeaway is that if you're writing portable C code or C header files meant to be shared between different devices/architectures, you can use stdint.h.

Upvotes: 4

metastack
metastack

Reputation: 11

The variable type uint32_t is an unsigned 32-bit integer data type defined according to the so-called C99 standard. Not all compilers comply with the standard. And u_int32_t is used for some internally implementations.

Upvotes: 0

Unsigned
Unsigned

Reputation: 9916

uint32_t is standard C99, while u_int32_t is used on certain Unix platforms.

Upvotes: 1

Šimon Tóth
Šimon Tóth

Reputation: 36433

uint32_t is a standard C99 type u_int32_t is used internally in some POSIX implementations.

Upvotes: 15

Related Questions