u_intXX_t is silly

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jason Parker
2006-09-18 22:02:04 +00:00
parent 998ac5cab1
commit 31d25ac6f3
3 changed files with 18 additions and 18 deletions

View File

@@ -87,8 +87,8 @@ static struct ast_frame *g723_read(struct ast_filestream *s, int *whennext)
static int g723_write(struct ast_filestream *s, struct ast_frame *f) static int g723_write(struct ast_filestream *s, struct ast_frame *f)
{ {
u_int32_t delay; uint32_t delay;
u_int16_t size; uint16_t size;
int res; int res;
/* XXX there used to be a check s->fr means a read stream */ /* XXX there used to be a check s->fr means a read stream */
if (f->frametype != AST_FRAME_VOICE) { if (f->frametype != AST_FRAME_VOICE) {

View File

@@ -229,7 +229,7 @@ static int pcm_write(struct ast_filestream *fs, struct ast_frame *f)
/* SUN .au support routines */ /* SUN .au support routines */
#define AU_HEADER_SIZE 24 #define AU_HEADER_SIZE 24
#define AU_HEADER(var) u_int32_t var[6] #define AU_HEADER(var) uint32_t var[6]
#define AU_HDR_MAGIC_OFF 0 #define AU_HDR_MAGIC_OFF 0
#define AU_HDR_HDR_SIZE_OFF 1 #define AU_HDR_HDR_SIZE_OFF 1
@@ -266,19 +266,19 @@ static int pcm_write(struct ast_filestream *fs, struct ast_frame *f)
static int check_header(FILE *f) static int check_header(FILE *f)
{ {
AU_HEADER(header); AU_HEADER(header);
u_int32_t magic; uint32_t magic;
u_int32_t hdr_size; uint32_t hdr_size;
u_int32_t data_size; uint32_t data_size;
u_int32_t encoding; uint32_t encoding;
u_int32_t sample_rate; uint32_t sample_rate;
u_int32_t channels; uint32_t channels;
if (fread(header, 1, AU_HEADER_SIZE, f) != AU_HEADER_SIZE) { if (fread(header, 1, AU_HEADER_SIZE, f) != AU_HEADER_SIZE) {
ast_log(LOG_WARNING, "Read failed (header)\n"); ast_log(LOG_WARNING, "Read failed (header)\n");
return -1; return -1;
} }
magic = ltohl(header[AU_HDR_MAGIC_OFF]); magic = ltohl(header[AU_HDR_MAGIC_OFF]);
if (magic != (u_int32_t) AU_MAGIC) { if (magic != (uint32_t) AU_MAGIC) {
ast_log(LOG_WARNING, "Bad magic: 0x%x\n", magic); ast_log(LOG_WARNING, "Bad magic: 0x%x\n", magic);
} }
/* hdr_size = ltohl(header[AU_HDR_HDR_SIZE_OFF]); /* hdr_size = ltohl(header[AU_HDR_HDR_SIZE_OFF]);
@@ -313,7 +313,7 @@ static int check_header(FILE *f)
static int update_header(FILE *f) static int update_header(FILE *f)
{ {
off_t cur, end; off_t cur, end;
u_int32_t datalen; uint32_t datalen;
int bytes; int bytes;
cur = ftell(f); cur = ftell(f);
@@ -327,7 +327,7 @@ static int update_header(FILE *f)
ast_log(LOG_WARNING, "Unable to find our position\n"); ast_log(LOG_WARNING, "Unable to find our position\n");
return -1; return -1;
} }
if (fseek(f, AU_HDR_DATA_SIZE_OFF * sizeof(u_int32_t), SEEK_SET)) { if (fseek(f, AU_HDR_DATA_SIZE_OFF * sizeof(uint32_t), SEEK_SET)) {
ast_log(LOG_WARNING, "Unable to set our position\n"); ast_log(LOG_WARNING, "Unable to set our position\n");
return -1; return -1;
} }
@@ -346,7 +346,7 @@ static int write_header(FILE *f)
{ {
AU_HEADER(header); AU_HEADER(header);
header[AU_HDR_MAGIC_OFF] = htoll((u_int32_t) AU_MAGIC); header[AU_HDR_MAGIC_OFF] = htoll((uint32_t) AU_MAGIC);
header[AU_HDR_HDR_SIZE_OFF] = htoll(AU_HEADER_SIZE); header[AU_HDR_HDR_SIZE_OFF] = htoll(AU_HEADER_SIZE);
header[AU_HDR_DATA_SIZE_OFF] = 0; header[AU_HDR_DATA_SIZE_OFF] = 0;
header[AU_HDR_ENCODING_OFF] = htoll(AU_ENC_8BIT_ULAW); header[AU_HDR_ENCODING_OFF] = htoll(AU_ENC_8BIT_ULAW);

View File

@@ -333,17 +333,17 @@ struct oprmode {
struct ast_option_header { struct ast_option_header {
/* Always keep in network byte order */ /* Always keep in network byte order */
#if __BYTE_ORDER == __BIG_ENDIAN #if __BYTE_ORDER == __BIG_ENDIAN
u_int16_t flag:3; uint16_t flag:3;
u_int16_t option:13; uint16_t option:13;
#else #else
#if __BYTE_ORDER == __LITTLE_ENDIAN #if __BYTE_ORDER == __LITTLE_ENDIAN
u_int16_t option:13; uint16_t option:13;
u_int16_t flag:3; uint16_t flag:3;
#else #else
#error Byte order not defined #error Byte order not defined
#endif #endif
#endif #endif
u_int8_t data[0]; uint8_t data[0];
}; };
/*! \brief Requests a frame to be allocated /*! \brief Requests a frame to be allocated