aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-18 22:02:04 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-18 22:02:04 +0000
commit176575e280779acceb70eca4b1c61839f06380bf (patch)
tree1a49b97d23c4f7231b5a2141c3df0f463118caac
parentd8e2b105047b369f7e4f681da52033da4467a1b2 (diff)
u_intXX_t is silly
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43236 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--formats/format_g723.c4
-rw-r--r--formats/format_pcm.c22
-rw-r--r--include/asterisk/frame.h10
3 files changed, 18 insertions, 18 deletions
diff --git a/formats/format_g723.c b/formats/format_g723.c
index 615e20052..dd5a1e6af 100644
--- a/formats/format_g723.c
+++ b/formats/format_g723.c
@@ -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)
{
- u_int32_t delay;
- u_int16_t size;
+ uint32_t delay;
+ uint16_t size;
int res;
/* XXX there used to be a check s->fr means a read stream */
if (f->frametype != AST_FRAME_VOICE) {
diff --git a/formats/format_pcm.c b/formats/format_pcm.c
index 67a54eb48..9ae1398e6 100644
--- a/formats/format_pcm.c
+++ b/formats/format_pcm.c
@@ -229,7 +229,7 @@ static int pcm_write(struct ast_filestream *fs, struct ast_frame *f)
/* SUN .au support routines */
#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_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)
{
AU_HEADER(header);
- u_int32_t magic;
- u_int32_t hdr_size;
- u_int32_t data_size;
- u_int32_t encoding;
- u_int32_t sample_rate;
- u_int32_t channels;
+ uint32_t magic;
+ uint32_t hdr_size;
+ uint32_t data_size;
+ uint32_t encoding;
+ uint32_t sample_rate;
+ uint32_t channels;
if (fread(header, 1, AU_HEADER_SIZE, f) != AU_HEADER_SIZE) {
ast_log(LOG_WARNING, "Read failed (header)\n");
return -1;
}
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);
}
/* 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)
{
off_t cur, end;
- u_int32_t datalen;
+ uint32_t datalen;
int bytes;
cur = ftell(f);
@@ -327,7 +327,7 @@ static int update_header(FILE *f)
ast_log(LOG_WARNING, "Unable to find our position\n");
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");
return -1;
}
@@ -346,7 +346,7 @@ static int write_header(FILE *f)
{
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_DATA_SIZE_OFF] = 0;
header[AU_HDR_ENCODING_OFF] = htoll(AU_ENC_8BIT_ULAW);
diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h
index dc8884cfa..0160e3b95 100644
--- a/include/asterisk/frame.h
+++ b/include/asterisk/frame.h
@@ -333,17 +333,17 @@ struct oprmode {
struct ast_option_header {
/* Always keep in network byte order */
#if __BYTE_ORDER == __BIG_ENDIAN
- u_int16_t flag:3;
- u_int16_t option:13;
+ uint16_t flag:3;
+ uint16_t option:13;
#else
#if __BYTE_ORDER == __LITTLE_ENDIAN
- u_int16_t option:13;
- u_int16_t flag:3;
+ uint16_t option:13;
+ uint16_t flag:3;
#else
#error Byte order not defined
#endif
#endif
- u_int8_t data[0];
+ uint8_t data[0];
};
/*! \brief Requests a frame to be allocated