cleanup: Use uint*_t instead of u_int*_t everythwere

Use the standard uint{8,16,32,64}_t everywhere instead of the
non-standard u_int{8,16,32,64}_t.

This changes the types in the public headers and removes the u_int*_t
defines. This may break things. However, indentifiers ending with _t are
reserved by POSIX[1]; defining those can lead to undefined behavior.

So if you rely on alsa-lib defining those for you, then you want the
compiler to error so things can be fixed properly.

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_02_02

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Natanael Copa 2017-07-14 16:18:11 +02:00 committed by Takashi Iwai
parent 885c64bcc4
commit adab355f35
11 changed files with 146 additions and 156 deletions

View file

@ -26,7 +26,7 @@
#include <limits.h>
#include "pcm_local.h"
static inline void div64_32(u_int64_t *n, u_int32_t d, u_int32_t *rem)
static inline void div64_32(uint64_t *n, uint32_t d, uint32_t *rem)
{
*rem = *n % d;
*n /= d;
@ -88,7 +88,7 @@ static inline unsigned int sub(unsigned int a, unsigned int b)
static inline unsigned int muldiv32(unsigned int a, unsigned int b,
unsigned int c, unsigned int *r)
{
u_int64_t n = (u_int64_t) a * b;
uint64_t n = (uint64_t) a * b;
if (c == 0) {
assert(n > 0);
*r = 0;