FS-7967 SmartOS compatibility

configure.ac: honor NetBSD and SmartOS in search for system lua
src/switch_utf8.c: remove switch_u8_vprintf and switch_u8_printf
replace u_int32_t with C99 standard uint32_t, and also the same for
  8,16,64 bit
This commit is contained in:
Stanislav Sinyagin committed 2015-09-09 21:39:41 +00:00
1 parent 4df2476564
commit 98a190a107
9 files changed
+29 -69

No files matched your search

@@ -540,7 +540,7 @@ static inline unsigned int mul(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 = (u_int64_t) a * b;
if (c == 0) {
snd_BUG_ON(!n);
*r = 0;
@@ -1094,7 +1094,7 @@ EXPORT_SYMBOL(snd_pcm_hw_rule_add);
* Apply the constraint of the given bitmap mask to a 32-bit mask parameter.
*/
int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
u_int32_t mask)
uint32_t mask)
{
struct snd_pcm_hw_constraints *constrs = &runtime->hw_constraints;
struct snd_mask *maskp = constrs_mask(constrs, var);
@@ -1114,12 +1114,12 @@ int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param
* Apply the constraint of the given bitmap mask to a 64-bit mask parameter.
*/
int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
u_int64_t mask)
uint64_t mask)
{
struct snd_pcm_hw_constraints *constrs = &runtime->hw_constraints;
struct snd_mask *maskp = constrs_mask(constrs, var);
maskp->bits[0] &= (u_int32_t)mask;
maskp->bits[1] &= (u_int32_t)(mask >> 32);
maskp->bits[0] &= (uint32_t)mask;
maskp->bits[1] &= (uint32_t)(mask >> 32);
memset(maskp->bits + 2, 0, (SNDRV_MASK_MAX-64) / 8); /* clear rest */
if (! maskp->bits[0] && ! maskp->bits[1])
return -EINVAL;
@@ -369,16 +369,16 @@ static int period_to_usecs(struct snd_pcm_runtime *runtime)
static int calc_boundary(struct snd_pcm_runtime *runtime)
{
u_int64_t boundary;
uint64_t boundary;
boundary = (u_int64_t)runtime->buffer_size *
(u_int64_t)runtime->period_size;
boundary = (uint64_t)runtime->buffer_size *
(uint64_t)runtime->period_size;
#if BITS_PER_LONG < 64
/* try to find lowest common multiple for buffer and period */
if (boundary > LONG_MAX - runtime->buffer_size) {
u_int32_t remainder = -1;
u_int32_t divident = runtime->buffer_size;
u_int32_t divisor = runtime->period_size;
uint32_t remainder = -1;
uint32_t divident = runtime->buffer_size;
uint32_t divisor = runtime->period_size;
while (remainder) {
remainder = divident % divisor;
if (remainder) {