changeset 7475:08ce2a94d9c7

[gaim-migrate @ 8088] I made Gaim compile with -ansi in my CFLAGS... I don't really know why. I had to set HAVE_GETADDRINFO and HAVE_SIGNAL_H to 0 committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 11 Nov 2003 07:08:13 +0000
parents 2bdacd38528c
children b7b1d416ff44
files src/idle.c src/main.c src/protocols/msn/msg.c src/protocols/msn/msnslp.c src/protocols/msn/switchboard.c src/protocols/oscar/oscar.c src/protocols/yahoo/yahoo.c src/protocols/zephyr/ZAsyncLocate.c src/protocols/zephyr/ZLocations.c src/protocols/zephyr/ZOpenPort.c src/protocols/zephyr/ZParseNot.c src/protocols/zephyr/ZRetSubs.c src/protocols/zephyr/ZSendPkt.c src/protocols/zephyr/Zinternal.c src/protocols/zephyr/zephyr.c src/protocols/zephyr/zephyr.h src/proxy.c src/server.c
diffstat 18 files changed, 55 insertions(+), 55 deletions(-) [+]
line wrap: on
line diff
--- a/src/idle.c	Tue Nov 11 05:57:24 2003 +0000
+++ b/src/idle.c	Tue Nov 11 07:08:13 2003 +0000
@@ -155,12 +155,12 @@
 				   gaim_account_get_username(account), idle_time);
 		serv_set_idle(gc, idle_time);
 		gc->is_idle = 1;
-		// LOG	system_log(log_idle, gc, NULL, OPT_LOG_BUDDY_IDLE | OPT_LOG_MY_SIGNON);
+		/* LOG	system_log(log_idle, gc, NULL, OPT_LOG_BUDDY_IDLE | OPT_LOG_MY_SIGNON); */
 	} else if (idle_time < IDLEMARK && gc->is_idle) {
 		gaim_debug(GAIM_DEBUG_INFO, "idle", "Setting %s unidle\n",
 				   gaim_account_get_username(account));
 		serv_touch_idle(gc);
-		// LOG	system_log(log_unidle, gc, NULL, OPT_LOG_BUDDY_IDLE | OPT_LOG_MY_SIGNON);
+		/* LOG	system_log(log_unidle, gc, NULL, OPT_LOG_BUDDY_IDLE | OPT_LOG_MY_SIGNON); */
 	}
 
 	return TRUE;
--- a/src/main.c	Tue Nov 11 05:57:24 2003 +0000
+++ b/src/main.c	Tue Nov 11 07:08:13 2003 +0000
@@ -517,7 +517,7 @@
 	/* XXX? */
 
 	/* captain's log, stardate... */
-	//LOG system_log(log_quit, NULL, NULL, OPT_LOG_BUDDY_SIGNON | OPT_LOG_MY_SIGNON);
+	/* LOG system_log(log_quit, NULL, NULL, OPT_LOG_BUDDY_SIGNON | OPT_LOG_MY_SIGNON); */
 
 #ifdef USE_SM
 	/* unplug */
--- a/src/protocols/msn/msg.c	Tue Nov 11 05:57:24 2003 +0000
+++ b/src/protocols/msn/msg.c	Tue Nov 11 07:08:13 2003 +0000
@@ -38,15 +38,15 @@
 
 
 #define msn_put16(buf, data) ( \
-		(*(buf) = (u_char)((data)>>8)&0xff), \
-		(*((buf)+1) = (u_char)(data)&0xff),  \
+		(*(buf) = (unsigned char)((data)>>8)&0xff), \
+		(*((buf)+1) = (unsigned char)(data)&0xff),  \
 		2)
 #define msn_get16(buf) ((((*(buf))<<8)&0xff00) + ((*((buf)+1)) & 0xff))
 #define msn_put32(buf, data) ( \
-		(*((buf)) = (u_char)((data)>>24)&0xff), \
-		(*((buf)+1) = (u_char)((data)>>16)&0xff), \
-		(*((buf)+2) = (u_char)((data)>>8)&0xff), \
-		(*((buf)+3) = (u_char)(data)&0xff), \
+		(*((buf)) = (unsigned char)((data)>>24)&0xff), \
+		(*((buf)+1) = (unsigned char)((data)>>16)&0xff), \
+		(*((buf)+2) = (unsigned char)((data)>>8)&0xff), \
+		(*((buf)+3) = (unsigned char)(data)&0xff), \
 		4)
 #define msn_get32(buf) ((((*(buf))<<24)&0xff000000) + \
 		(((*((buf)+1))<<16)&0x00ff0000) + \
--- a/src/protocols/msn/msnslp.c	Tue Nov 11 05:57:24 2003 +0000
+++ b/src/protocols/msn/msnslp.c	Tue Nov 11 07:08:13 2003 +0000
@@ -143,7 +143,7 @@
 		slpsession->prev_msg_id = ++slpsession->base_id;
 
 	msg->msnslp_header.id = slpsession->prev_msg_id;
-//	msg->msnslp_header.ack_session_id = rand() % 0xFFFFFF00;
+	/*msg->msnslp_header.ack_session_id = rand() % 0xFFFFFF00;*/
 	msg->msnslp_header.ack_session_id = 0x1407C7DE;
 
 	msn_message_set_charset(msg, NULL);
--- a/src/protocols/msn/switchboard.c	Tue Nov 11 05:57:24 2003 +0000
+++ b/src/protocols/msn/switchboard.c	Tue Nov 11 07:08:13 2003 +0000
@@ -89,7 +89,7 @@
 	MsnSwitchBoard *swboard = servconn->data;
 	MsnSession *session = servconn->session;
 
-	//send_clientcaps(swboard);
+	/*send_clientcaps(swboard);*/
 
 	if (0 && session->protocol_ver >= 9)
 	{
--- a/src/protocols/oscar/oscar.c	Tue Nov 11 05:57:24 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Tue Nov 11 07:08:13 2003 +0000
@@ -1846,7 +1846,7 @@
 			while (cur && aim_sncmp((char *)cur->data, info->sn))
 				cur = cur->next;
 			if (!cur) {
-				od->requesticon = g_slist_append(od->requesticon, strdup(gaim_normalize(gc->account, info->sn)));
+				od->requesticon = g_slist_append(od->requesticon, g_strdup(gaim_normalize(gc->account, info->sn)));
 				if (od->icontimer)
 					g_source_remove(od->icontimer);
 				od->icontimer = g_timeout_add(500, gaim_icon_timerfunc, gc);
@@ -2161,7 +2161,7 @@
 static int incomingim_chan1(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_t *userinfo, struct aim_incomingim_ch1_args *args) {
 	GaimConnection *gc = sess->aux_data;
 	OscarData *od = gc->proto_data;
-	char *tmp;
+	gchar *tmp;
 	GaimConvImFlags flags = 0;
 	gsize convlen;
 	GError *err = NULL;
@@ -2238,7 +2238,7 @@
 		if (err) {
 			gaim_debug(GAIM_DEBUG_INFO, "oscar",
 					   "Unicode IM conversion: %s\n", err->message);
-			tmp = strdup(_("(There was an error receiving this message)"));
+			tmp = g_strdup(_("(There was an error receiving this message)"));
 			g_error_free(err);
 		}
 	} else {
@@ -2260,7 +2260,7 @@
 		if (err) {
 			gaim_debug(GAIM_DEBUG_INFO, "oscar",
 					   "ISO-8859-1 IM conversion: %s\n", err->message);
-			tmp = strdup(_("(There was an error receiving this message)"));
+			tmp = g_strdup(_("(There was an error receiving this message)"));
 			g_error_free(err);
 		}
 	}
--- a/src/protocols/yahoo/yahoo.c	Tue Nov 11 05:57:24 2003 +0000
+++ b/src/protocols/yahoo/yahoo.c	Tue Nov 11 07:08:13 2003 +0000
@@ -131,15 +131,15 @@
 /* sometimes i wish prpls could #include things from other prpls. then i could just
  * use the routines from libfaim and not have to admit to knowing how they work. */
 #define yahoo_put16(buf, data) ( \
-		(*(buf) = (u_char)((data)>>8)&0xff), \
-		(*((buf)+1) = (u_char)(data)&0xff),  \
+		(*(buf) = (unsigned char)((data)>>8)&0xff), \
+		(*((buf)+1) = (unsigned char)(data)&0xff),  \
 		2)
 #define yahoo_get16(buf) ((((*(buf))<<8)&0xff00) + ((*((buf)+1)) & 0xff))
 #define yahoo_put32(buf, data) ( \
-		(*((buf)) = (u_char)((data)>>24)&0xff), \
-		(*((buf)+1) = (u_char)((data)>>16)&0xff), \
-		(*((buf)+2) = (u_char)((data)>>8)&0xff), \
-		(*((buf)+3) = (u_char)(data)&0xff), \
+		(*((buf)) = (unsigned char)((data)>>24)&0xff), \
+		(*((buf)+1) = (unsigned char)((data)>>16)&0xff), \
+		(*((buf)+2) = (unsigned char)((data)>>8)&0xff), \
+		(*((buf)+3) = (unsigned char)(data)&0xff), \
 		4)
 #define yahoo_get32(buf) ((((*(buf))<<24)&0xff000000) + \
 		(((*((buf)+1))<<16)&0x00ff0000) + \
--- a/src/protocols/zephyr/ZAsyncLocate.c	Tue Nov 11 05:57:24 2003 +0000
+++ b/src/protocols/zephyr/ZAsyncLocate.c	Tue Nov 11 07:08:13 2003 +0000
@@ -4,7 +4,7 @@
  *	Created by:	Marc Horowitz
  *
  *	$Source$
- *	$Author: faceprint $
+ *	$Author: thekingant $
  *
  *	Copyright (c) 1990,1991 by the Massachusetts Institute of Technology.
  *	For copying and distribution information, see the file
@@ -15,7 +15,7 @@
 #include <internal.h>
 
 #ifndef lint
-static const char rcsid_ZAsyncLocate_c[] = "$Id: ZAsyncLocate.c 7838 2003-10-14 05:07:39Z faceprint $";
+static const char rcsid_ZAsyncLocate_c[] = "$Id: ZAsyncLocate.c 8088 2003-11-11 07:08:13Z thekingant $";
 #endif
 
 Code_t ZRequestLocations(user, zald, kind, auth)
@@ -28,7 +28,7 @@
     ZNotice_t notice;
 
     if (ZGetFD() < 0)
-	if ((retval = ZOpenPort((u_short *)0)) != ZERR_NONE)
+	if ((retval = ZOpenPort((unsigned short *)0)) != ZERR_NONE)
 	    return (retval);
 
     (void) memset((char *)&notice, 0, sizeof(notice));
--- a/src/protocols/zephyr/ZLocations.c	Tue Nov 11 05:57:24 2003 +0000
+++ b/src/protocols/zephyr/ZLocations.c	Tue Nov 11 07:08:13 2003 +0000
@@ -5,7 +5,7 @@
  *	Created by:	Robert French
  *
  *	$Source$
- *	$Author: warmenhoven $
+ *	$Author: thekingant $
  *
  *	Copyright (c) 1987,1988,1991 by the Massachusetts Institute of Technology.
  *	For copying and distribution information, see the file
@@ -65,7 +65,7 @@
 
     (void) memset((char *)&notice, 0, sizeof(notice));
     notice.z_kind = ACKED;
-    notice.z_port = (u_short) ((wg_port == -1) ? 0 : wg_port);
+    notice.z_port = (unsigned short) ((wg_port == -1) ? 0 : wg_port);
     notice.z_class = class;
     notice.z_class_inst = ZGetSender();
     notice.z_opcode = opcode;
--- a/src/protocols/zephyr/ZOpenPort.c	Tue Nov 11 05:57:24 2003 +0000
+++ b/src/protocols/zephyr/ZOpenPort.c	Tue Nov 11 07:08:13 2003 +0000
@@ -4,7 +4,7 @@
  *	Created by:	Robert French
  *
  *	$Source$
- *	$Author: warmenhoven $
+ *	$Author: thekingant $
  *
  *	Copyright (c) 1987 by the Massachusetts Institute of Technology.
  *	For copying and distribution information, see the file
@@ -20,7 +20,7 @@
 #include <sys/socket.h>
 
 Code_t ZOpenPort(port)
-    u_short *port;
+    unsigned short *port;
 {
     struct sockaddr_in bindin;
     int len;
--- a/src/protocols/zephyr/ZParseNot.c	Tue Nov 11 05:57:24 2003 +0000
+++ b/src/protocols/zephyr/ZParseNot.c	Tue Nov 11 07:08:13 2003 +0000
@@ -4,7 +4,7 @@
  *	Created by:	Robert French
  *
  *	$Source$
- *	$Author: warmenhoven $
+ *	$Author: thekingant $
  *
  *	Copyright (c) 1987,1991 by the Massachusetts Institute of Technology.
  *	For copying and distribution information, see the file
@@ -155,8 +155,8 @@
 	if (ZReadAscii(ptr, end-ptr, (unsigned char *)&notice->z_uid,
 		       sizeof(ZUnique_Id_t)) == ZERR_BADFIELD)
 	    BAD_PACKET;
-	notice->z_time.tv_sec = ntohl((u_long) notice->z_uid.tv.tv_sec);
-	notice->z_time.tv_usec = ntohl((u_long) notice->z_uid.tv.tv_usec);
+	notice->z_time.tv_sec = ntohl((unsigned long) notice->z_uid.tv.tv_sec);
+	notice->z_time.tv_usec = ntohl((unsigned long) notice->z_uid.tv.tv_usec);
 	numfields--;
 	next_field (ptr);
     }
@@ -269,8 +269,8 @@
 	if (ZReadAscii(ptr, end-ptr, (unsigned char *)&notice->z_multiuid,
 		       sizeof(ZUnique_Id_t)) == ZERR_BADFIELD)
 	    BAD_PACKET;
-	notice->z_time.tv_sec = ntohl((u_long) notice->z_multiuid.tv.tv_sec);
-	notice->z_time.tv_usec = ntohl((u_long) notice->z_multiuid.tv.tv_usec);
+	notice->z_time.tv_sec = ntohl((unsigned long) notice->z_multiuid.tv.tv_sec);
+	notice->z_time.tv_usec = ntohl((unsigned long) notice->z_multiuid.tv.tv_usec);
 	numfields--;
 	next_field (ptr);
     }
@@ -286,7 +286,7 @@
     for (i=0;i<numfields;i++)
 	next_field (ptr);
 	
-    notice->z_message = (caddr_t) ptr;
+    notice->z_message = (void *)ptr;
     notice->z_message_len = len-(ptr-buffer);
 
     return (ZERR_NONE);
--- a/src/protocols/zephyr/ZRetSubs.c	Tue Nov 11 05:57:24 2003 +0000
+++ b/src/protocols/zephyr/ZRetSubs.c	Tue Nov 11 07:08:13 2003 +0000
@@ -5,7 +5,7 @@
  *	Created by:	Robert French
  *
  *	$Source$
- *	$Author: warmenhoven $
+ *	$Author: thekingant $
  *
  *	Copyright (c) 1987,1988,1991 by the Massachusetts Institute of Technology.
  *	For copying and distribution information, see the file
@@ -17,7 +17,7 @@
 
 #ifndef lint
 static const char rcsid_ZRetrieveSubscriptions_c[] =
-    "$Id: ZRetSubs.c 2096 2001-07-31 01:00:39Z warmenhoven $";
+    "$Id: ZRetSubs.c 8088 2003-11-11 07:08:13Z thekingant $";
 #endif
 
 static Code_t Z_RetSubs ();
@@ -80,7 +80,7 @@
 		return (retval);
 
 	if (ZGetFD() < 0)
-		if ((retval = ZOpenPort((u_short *)0)) != ZERR_NONE)
+		if ((retval = ZOpenPort((unsigned short *)0)) != ZERR_NONE)
 			return (retval);
 
 	notice->z_kind = ACKED;
--- a/src/protocols/zephyr/ZSendPkt.c	Tue Nov 11 05:57:24 2003 +0000
+++ b/src/protocols/zephyr/ZSendPkt.c	Tue Nov 11 07:08:13 2003 +0000
@@ -4,7 +4,7 @@
  *	Created by:	Robert French
  *
  *	$Source$
- *	$Author: warmenhoven $
+ *	$Author: thekingant $
  *
  *	Copyright (c) 1987,1991 by the Massachusetts Institute of Technology.
  *	For copying and distribution information, see the file
@@ -38,7 +38,7 @@
 	return (ZERR_PKTLEN);
     
     if (ZGetFD() < 0)
-	if ((retval = ZOpenPort((u_short *)0)) != ZERR_NONE)
+	if ((retval = ZOpenPort((unsigned short *)0)) != ZERR_NONE)
 	    return (retval);
 
     dest = ZGetDestAddr();
--- a/src/protocols/zephyr/Zinternal.c	Tue Nov 11 05:57:24 2003 +0000
+++ b/src/protocols/zephyr/Zinternal.c	Tue Nov 11 07:08:13 2003 +0000
@@ -4,7 +4,7 @@
  *	Created by:	Robert French
  *
  *	$Source$
- *	$Author: faceprint $
+ *	$Author: thekingant $
  *
  *	Copyright (c) 1987,1988,1991 by the Massachusetts Institute of
  *	Technology.
@@ -20,7 +20,7 @@
 
 #ifndef lint
 static const char rcsid_Zinternal_c[] =
-  "$Id: Zinternal.c 5500 2003-04-15 04:18:00Z faceprint $";
+  "$Id: Zinternal.c 8088 2003-11-11 07:08:13Z thekingant $";
 static const char copyright[] =
   "Copyright (c) 1987,1988,1991 by the Massachusetts Institute of Technology.";
 #endif
@@ -594,7 +594,7 @@
 
     if (notice->z_port == 0) {
 	if (ZGetFD() < 0) {
-	    retval = ZOpenPort((u_short *)0);
+	    retval = ZOpenPort((unsigned short *)0);
 	    if (retval != ZERR_NONE)
 		return (retval);
 	}
@@ -607,8 +607,8 @@
     notice->z_multinotice = "";
     
     (void) gettimeofday(&notice->z_uid.tv, (struct timezone *)0);
-    notice->z_uid.tv.tv_sec = htonl((u_long) notice->z_uid.tv.tv_sec);
-    notice->z_uid.tv.tv_usec = htonl((u_long) notice->z_uid.tv.tv_usec);
+    notice->z_uid.tv.tv_sec = htonl((unsigned long) notice->z_uid.tv.tv_sec);
+    notice->z_uid.tv.tv_usec = htonl((unsigned long) notice->z_uid.tv.tv_usec);
     
     (void) memcpy(&notice->z_uid.zuid_addr, &__My_addr, sizeof(__My_addr));
 
@@ -877,9 +877,9 @@
 	    (void) gettimeofday(&partnotice.z_uid.tv,
 				(struct timezone *)0);
 	    partnotice.z_uid.tv.tv_sec =
-		htonl((u_long) partnotice.z_uid.tv.tv_sec);
+		htonl((unsigned long) partnotice.z_uid.tv.tv_sec);
 	    partnotice.z_uid.tv.tv_usec =
-		htonl((u_long) partnotice.z_uid.tv.tv_usec);
+		htonl((unsigned long) partnotice.z_uid.tv.tv_usec);
 	    (void) memcpy((char *)&partnotice.z_uid.zuid_addr, &__My_addr, 
 			  sizeof(__My_addr));
 	}
--- a/src/protocols/zephyr/zephyr.c	Tue Nov 11 05:57:24 2003 +0000
+++ b/src/protocols/zephyr/zephyr.c	Tue Nov 11 07:08:13 2003 +0000
@@ -366,7 +366,7 @@
 		char *realmptr;
 		char *sendertmp;
 		char *ptr = notice.z_message + strlen(notice.z_message) + 1;
-		int len = notice.z_message_len - (ptr - notice.z_message);
+		int len = notice.z_message_len - ((int)ptr - (int)notice.z_message);
 		GaimConvImFlags flags = 0;
 		if (len > 0) {
 			buf = g_malloc(len + 1);
--- a/src/protocols/zephyr/zephyr.h	Tue Nov 11 05:57:24 2003 +0000
+++ b/src/protocols/zephyr/zephyr.h	Tue Nov 11 07:08:13 2003 +0000
@@ -4,8 +4,8 @@
  *	Created by:	Robert French
  *
  *	$Source$
- *	$Author: faceprint $
- *	$Id: zephyr.h 7838 2003-10-14 05:07:39Z faceprint $
+ *	$Author: thekingant $
+ *	$Id: zephyr.h 8088 2003-11-11 07:08:13Z thekingant $
  *
  *	Copyright (c) 1987,1988,1991 by the Massachusetts Institute of
  *	Technology. For copying and distribution information, see the
@@ -99,7 +99,7 @@
     ZChecksum_t		z_checksum;
     int			z_num_other_fields;
     char		*z_other_fields[Z_MAXOTHERFIELDS];
-    caddr_t		z_message;
+    void		*z_message;
     int			z_message_len;
 } ZNotice_t;
 
--- a/src/proxy.c	Tue Nov 11 05:57:24 2003 +0000
+++ b/src/proxy.c	Tue Nov 11 07:08:13 2003 +0000
@@ -384,7 +384,7 @@
 	if((rc==4) && (err!=0)) {
 		char message[1024];
 		g_snprintf(message, sizeof(message), "DNS error: %s (pid=%d)",
-#ifdef HAVE_GETADDRINFO
+#if HAVE_GETADDRINFO
 			gai_strerror(err),
 #else
 			hstrerror(err),
@@ -535,7 +535,7 @@
 			const int zero = 0;
 			int rc;
 
-#ifdef HAVE_GETADDRINFO
+#if HAVE_GETADDRINFO
 			struct addrinfo hints, *res, *tmp;
 			char servname[20];
 #else
@@ -585,7 +585,7 @@
 					write(child_out[1], &Y, 1);
 				}
 
-#ifdef HAVE_GETADDRINFO
+#if HAVE_GETADDRINFO
 				g_snprintf(servname, sizeof(servname), "%d", dns_params.port);
 				memset(&hints,0,sizeof(hints));
 				
--- a/src/server.c	Tue Nov 11 05:57:24 2003 +0000
+++ b/src/server.c	Tue Nov 11 07:08:13 2003 +0000
@@ -1158,7 +1158,7 @@
 				}
 			}
 			gaim_sound_play_event(GAIM_SOUND_BUDDY_ARRIVE);
-			// LOG system_log(log_signon, gc, b, OPT_LOG_BUDDY_SIGNON);
+			/* LOG system_log(log_signon, gc, b, OPT_LOG_BUDDY_SIGNON); */
 		}
 	} else {
 		if (GAIM_BUDDY_IS_ONLINE(b)) {
@@ -1184,7 +1184,7 @@
 			}
 			serv_got_typing_stopped(gc, name); /* obviously not typing */
 			gaim_sound_play_event(GAIM_SOUND_BUDDY_LEAVE);
-			// LOG system_log(log_signoff, gc, b, OPT_LOG_BUDDY_SIGNON);
+			/* LOG system_log(log_signoff, gc, b, OPT_LOG_BUDDY_SIGNON); */
 		}
 	}