Changeset 52744f8
- Timestamp:
- 2008-01-17T22:06:55Z (17 years ago)
- Branches:
- master
- Children:
- ac4adf9
- Parents:
- 13857c6
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
bitlbee.c
r13857c6 r52744f8 279 279 child_list = g_slist_append( child_list, child ); 280 280 281 log_message( LOGLVL_INFO, "Creating new subprocess with pid %d.", client_pid );281 log_message( LOGLVL_INFO, "Creating new subprocess with pid %d.", (int) client_pid ); 282 282 283 283 /* Close some things we don't need in the parent process. */ -
ipc.c
r13857c6 r52744f8 52 52 if( g_strcasecmp( cmd[0], "CLIENT" ) == 0 ) 53 53 ipc_to_children_str( "OPERMSG :Client connecting (PID=%d): %s@%s (%s)\r\n", 54 child ? child->pid : -1, cmd[2], cmd[1], cmd[3] );54 (int) ( child ? child->pid : -1 ), cmd[2], cmd[1], cmd[3] ); 55 55 } 56 56 … … 446 446 447 447 for( l = child_list; l; l = l->next ) 448 fprintf( fp, "%d %d\n", ( (struct bitlbee_child*)l->data)->pid,448 fprintf( fp, "%d %d\n", (int) ((struct bitlbee_child*)l->data)->pid, 449 449 ((struct bitlbee_child*)l->data)->ipc_fd ); 450 450 … … 551 551 child = g_new0( struct bitlbee_child, 1 ); 552 552 553 if( fscanf( fp, "%d %d", &child->pid, &child->ipc_fd ) != 2 )553 if( fscanf( fp, "%d %d", (int *) &child->pid, &child->ipc_fd ) != 2 ) 554 554 { 555 555 log_message( LOGLVL_WARNING, "Unexpected end of file: Only processed %d clients.", i ); -
lib/md5.c
r13857c6 r52744f8 26 26 #include "md5.h" 27 27 28 static void md5_transform(u _int32_t buf[4], u_int32_t const in[16]);28 static void md5_transform(uint32_t buf[4], uint32_t const in[16]); 29 29 30 30 /* … … 53 53 unsigned int len) 54 54 { 55 u _int32_t t;55 uint32_t t; 56 56 57 57 /* Update bitcount */ 58 58 59 59 t = ctx->bits[0]; 60 if ((ctx->bits[0] = t + ((u _int32_t) len << 3)) < t)60 if ((ctx->bits[0] = t + ((uint32_t) len << 3)) < t) 61 61 ctx->bits[1]++; /* Carry from low to high */ 62 62 ctx->bits[1] += len >> 29; … … 75 75 } 76 76 memcpy(p, buf, t); 77 md5_transform(ctx->buf, (u _int32_t *) ctx->in);77 md5_transform(ctx->buf, (uint32_t *) ctx->in); 78 78 buf += t; 79 79 len -= t; … … 83 83 while (len >= 64) { 84 84 memcpy(ctx->in, buf, 64); 85 md5_transform(ctx->buf, (u _int32_t *) ctx->in);85 md5_transform(ctx->buf, (uint32_t *) ctx->in); 86 86 buf += 64; 87 87 len -= 64; … … 117 117 /* Two lots of padding: Pad the first block to 64 bytes */ 118 118 memset(p, 0, count); 119 md5_transform(ctx->buf, (u _int32_t *) ctx->in);119 md5_transform(ctx->buf, (uint32_t *) ctx->in); 120 120 121 121 /* Now fill the next block with 56 bytes */ … … 127 127 128 128 /* Append length in bits and transform */ 129 ((u _int32_t *) ctx->in)[14] = ctx->bits[0];130 ((u _int32_t *) ctx->in)[15] = ctx->bits[1];131 132 md5_transform(ctx->buf, (u _int32_t *) ctx->in);129 ((uint32_t *) ctx->in)[14] = ctx->bits[0]; 130 ((uint32_t *) ctx->in)[15] = ctx->bits[1]; 131 132 md5_transform(ctx->buf, (uint32_t *) ctx->in); 133 133 memcpy(digest, ctx->buf, 16); 134 134 memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ … … 152 152 * the data and converts bytes into longwords for this routine. 153 153 */ 154 static void md5_transform(u _int32_t buf[4], u_int32_t const in[16])155 { 156 register u _int32_t a, b, c, d;154 static void md5_transform(uint32_t buf[4], uint32_t const in[16]) 155 { 156 register uint32_t a, b, c, d; 157 157 158 158 a = buf[0]; -
lib/md5.h
r13857c6 r52744f8 27 27 #include <sys/types.h> 28 28 #include <gmodule.h> 29 #include <stdint.h> 29 30 30 typedef u _int8_t md5_byte_t;31 typedef uint8_t md5_byte_t; 31 32 typedef struct MD5Context { 32 u _int32_t buf[4];33 u _int32_t bits[2];33 uint32_t buf[4]; 34 uint32_t bits[2]; 34 35 unsigned char in[64]; 35 36 } md5_state_t; -
protocols/nogaim.c
r13857c6 r52744f8 625 625 } 626 626 627 void imcb_buddy_msg( struct im_connection *ic, char *handle, char *msg, u _int32_t flags, time_t sent_at )627 void imcb_buddy_msg( struct im_connection *ic, char *handle, char *msg, uint32_t flags, time_t sent_at ) 628 628 { 629 629 irc_t *irc = ic->irc; … … 676 676 } 677 677 678 void imcb_buddy_typing( struct im_connection *ic, char *handle, u _int32_t flags )678 void imcb_buddy_typing( struct im_connection *ic, char *handle, uint32_t flags ) 679 679 { 680 680 user_t *u; … … 732 732 } 733 733 734 void imcb_chat_msg( struct groupchat *c, char *who, char *msg, u _int32_t flags, time_t sent_at )734 void imcb_chat_msg( struct groupchat *c, char *who, char *msg, uint32_t flags, time_t sent_at ) 735 735 { 736 736 struct im_connection *ic = c->ic; -
protocols/nogaim.h
r13857c6 r52744f8 68 68 { 69 69 account_t *acc; 70 u _int32_t flags;70 uint32_t flags; 71 71 72 72 /* each connection then can have its own protocol-specific data */ … … 282 282 /* Not implemented yet! */ G_MODULE_EXPORT void imcb_buddy_times( struct im_connection *ic, const char *handle, time_t login, time_t idle ); 283 283 /* Call when a handle says something. 'flags' and 'sent_at may be just 0. */ 284 G_MODULE_EXPORT void imcb_buddy_msg( struct im_connection *ic, char *handle, char *msg, u _int32_t flags, time_t sent_at );285 G_MODULE_EXPORT void imcb_buddy_typing( struct im_connection *ic, char *handle, u _int32_t flags );284 G_MODULE_EXPORT void imcb_buddy_msg( struct im_connection *ic, char *handle, char *msg, uint32_t flags, time_t sent_at ); 285 G_MODULE_EXPORT void imcb_buddy_typing( struct im_connection *ic, char *handle, uint32_t flags ); 286 286 G_MODULE_EXPORT void imcb_clean_handle( struct im_connection *ic, char *handle ); 287 287 … … 299 299 G_MODULE_EXPORT void imcb_chat_remove_buddy( struct groupchat *b, char *handle, char *reason ); 300 300 /* To tell BitlBee 'who' said 'msg' in 'c'. 'flags' and 'sent_at' can be 0. */ 301 G_MODULE_EXPORT void imcb_chat_msg( struct groupchat *c, char *who, char *msg, u _int32_t flags, time_t sent_at );301 G_MODULE_EXPORT void imcb_chat_msg( struct groupchat *c, char *who, char *msg, uint32_t flags, time_t sent_at ); 302 302 /* To tell BitlBee 'who' changed the topic of 'c' to 'topic'. */ 303 303 G_MODULE_EXPORT void imcb_chat_topic( struct groupchat *c, char *who, char *topic, time_t set_at ); -
unix.c
r13857c6 r52744f8 197 197 { 198 198 if( WIFSIGNALED( st ) ) 199 log_message( LOGLVL_INFO, "Client %d terminated normally. (status = %d)", pid, WEXITSTATUS( st ) );199 log_message( LOGLVL_INFO, "Client %d terminated normally. (status = %d)", (int) pid, WEXITSTATUS( st ) ); 200 200 else if( WIFEXITED( st ) ) 201 log_message( LOGLVL_INFO, "Client %d killed by signal %d.", pid, WTERMSIG( st ) );201 log_message( LOGLVL_INFO, "Client %d killed by signal %d.", (int) pid, WTERMSIG( st ) ); 202 202 } 203 203 }
Note: See TracChangeset
for help on using the changeset viewer.