2008-08-25 pmccurdy * Make all time values unsigned longs instead of a mix of signed and unsigned, to avoid compiler complaints. diff -rpuN --exclude .depend --exclude '*~' --exclude '*.orig' --exclude '*.rej' --exclude '*.l[oa]' --exclude '*.lai' --exclude '*.o' --exclude .deps --exclude .libs --exclude Makefile --exclude 'stamp-*' --exclude messagebus --exclude rc.messagebus --exclude session.conf --exclude system.conf --exclude config.h --exclude config.log --exclude config.status --exclude dbus-1.pc --exclude Doxyfile --exclude libtool --exclude data ../.build_orig/dbus/bus/connection.c dbus/bus/connection.c --- ../.build_orig/dbus/bus/connection.c 2008-05-08 10:17:25.000000000 -0400 +++ dbus/bus/connection.c 2008-08-24 22:57:12.000000000 -0400 @@ -78,8 +78,8 @@ typedef struct BusSELinuxID *selinux_id; - long connection_tv_sec; /**< Time when we connected (seconds component) */ - long connection_tv_usec; /**< Time when we connected (microsec component) */ + unsigned long connection_tv_sec; /**< Time when we connected (seconds component) */ + unsigned long connection_tv_usec; /**< Time when we connected (microsec component) */ int stamp; /**< connections->stamp last time we were traversed */ } BusConnectionData; @@ -719,7 +719,7 @@ bus_connections_expire_incomplete (BusCo if (connections->incomplete != NULL) { - long tv_sec, tv_usec; + unsigned long tv_sec, tv_usec; DBusList *link; int auth_timeout; diff -rpuN --exclude .depend --exclude '*~' --exclude '*.orig' --exclude '*.rej' --exclude '*.l[oa]' --exclude '*.lai' --exclude '*.o' --exclude .deps --exclude .libs --exclude Makefile --exclude 'stamp-*' --exclude messagebus --exclude rc.messagebus --exclude session.conf --exclude system.conf --exclude config.h --exclude config.log --exclude config.status --exclude dbus-1.pc --exclude Doxyfile --exclude libtool --exclude data ../.build_orig/dbus/bus/expirelist.c dbus/bus/expirelist.c --- ../.build_orig/dbus/bus/expirelist.c 2008-05-08 10:17:26.000000000 -0400 +++ dbus/bus/expirelist.c 2008-08-25 01:03:50.000000000 -0400 @@ -201,7 +201,7 @@ bus_expirelist_expire (BusExpireList *li if (list->items != NULL) { - long tv_sec, tv_usec; + unsigned long tv_sec, tv_usec; _dbus_get_current_time (&tv_sec, &tv_usec); diff -rpuN --exclude .depend --exclude '*~' --exclude '*.orig' --exclude '*.rej' --exclude '*.l[oa]' --exclude '*.lai' --exclude '*.o' --exclude .deps --exclude .libs --exclude Makefile --exclude 'stamp-*' --exclude messagebus --exclude rc.messagebus --exclude session.conf --exclude system.conf --exclude config.h --exclude config.log --exclude config.status --exclude dbus-1.pc --exclude Doxyfile --exclude libtool --exclude data ../.build_orig/dbus/bus/expirelist.h dbus/bus/expirelist.h --- ../.build_orig/dbus/bus/expirelist.h 2008-05-08 10:17:26.000000000 -0400 +++ dbus/bus/expirelist.h 2008-08-24 22:57:54.000000000 -0400 @@ -39,8 +39,8 @@ typedef dbus_bool_t (* BusExpireFunc) (B /* embed this in a child expire item struct */ struct BusExpireItem { - long added_tv_sec; /**< Time we were added (seconds component) */ - long added_tv_usec; /**< Time we were added (microsec component) */ + unsigned long added_tv_sec; /**< Time we were added (seconds component) */ + unsigned long added_tv_usec; /**< Time we were added (microsec component) */ }; BusExpireList* bus_expire_list_new (DBusLoop *loop, diff -rpuN --exclude .depend --exclude '*~' --exclude '*.orig' --exclude '*.rej' --exclude '*.l[oa]' --exclude '*.lai' --exclude '*.o' --exclude .deps --exclude .libs --exclude Makefile --exclude 'stamp-*' --exclude messagebus --exclude rc.messagebus --exclude session.conf --exclude system.conf --exclude config.h --exclude config.log --exclude config.status --exclude dbus-1.pc --exclude Doxyfile --exclude libtool --exclude data ../.build_orig/dbus/dbus/dbus-connection.c dbus/dbus/dbus-connection.c --- ../.build_orig/dbus/dbus/dbus-connection.c 2008-08-06 13:00:29.000000000 -0400 +++ dbus/dbus/dbus-connection.c 2008-08-24 22:38:47.000000000 -0400 @@ -2259,9 +2259,9 @@ check_for_reply_and_update_dispatch_unlo void _dbus_connection_block_pending_call (DBusPendingCall *pending) { - long start_tv_sec, start_tv_usec; - long end_tv_sec, end_tv_usec; - long tv_sec, tv_usec; + unsigned long start_tv_sec, start_tv_usec; + unsigned long end_tv_sec, end_tv_usec; + unsigned long tv_sec, tv_usec; DBusDispatchStatus status; DBusConnection *connection; dbus_uint32_t client_serial; diff -rpuN --exclude .depend --exclude '*~' --exclude '*.orig' --exclude '*.rej' --exclude '*.l[oa]' --exclude '*.lai' --exclude '*.o' --exclude .deps --exclude .libs --exclude Makefile --exclude 'stamp-*' --exclude messagebus --exclude rc.messagebus --exclude session.conf --exclude system.conf --exclude config.h --exclude config.log --exclude config.status --exclude dbus-1.pc --exclude Doxyfile --exclude libtool --exclude data ../.build_orig/dbus/dbus/dbus-internals.c dbus/dbus/dbus-internals.c --- ../.build_orig/dbus/dbus/dbus-internals.c 2008-05-08 10:17:26.000000000 -0400 +++ dbus/dbus/dbus-internals.c 2008-08-24 22:52:21.000000000 -0400 @@ -509,7 +509,7 @@ _dbus_string_array_contains (const char void _dbus_generate_uuid (DBusGUID *uuid) { - long now; + unsigned long now; _dbus_get_current_time (&now, NULL); diff -rpuN --exclude .depend --exclude '*~' --exclude '*.orig' --exclude '*.rej' --exclude '*.l[oa]' --exclude '*.lai' --exclude '*.o' --exclude .deps --exclude .libs --exclude Makefile --exclude 'stamp-*' --exclude messagebus --exclude rc.messagebus --exclude session.conf --exclude system.conf --exclude config.h --exclude config.log --exclude config.status --exclude dbus-1.pc --exclude Doxyfile --exclude libtool --exclude data ../.build_orig/dbus/dbus/dbus-keyring.c dbus/dbus/dbus-keyring.c --- ../.build_orig/dbus/dbus/dbus-keyring.c 2008-05-08 10:17:26.000000000 -0400 +++ dbus/dbus/dbus-keyring.c 2008-08-24 22:51:42.000000000 -0400 @@ -284,7 +284,7 @@ add_new_key (DBusKey **keys_p, DBusKey *new; DBusString bytes; int id; - long timestamp; + unsigned long timestamp; const unsigned char *s; dbus_bool_t retval; DBusKey *keys; @@ -403,7 +403,7 @@ _dbus_keyring_reload (DBusKeyring *keyri DBusKey *keys; int n_keys; int i; - long now; + unsigned long now; DBusError tmp_error; _DBUS_ASSERT_ERROR_IS_CLEAR (error); @@ -502,8 +502,8 @@ _dbus_keyring_reload (DBusKeyring *keyri } if (timestamp < 0 || - (now + MAX_TIME_TRAVEL_SECONDS) < timestamp || - (now - EXPIRE_KEYS_TIMEOUT_SECONDS) > timestamp) + (now + MAX_TIME_TRAVEL_SECONDS) < (unsigned long)timestamp || + (now - EXPIRE_KEYS_TIMEOUT_SECONDS) > (unsigned long)timestamp) { _dbus_verbose ("dropping/ignoring %ld-seconds old key with timestamp %ld as current time is %ld\n", now - timestamp, timestamp, now); @@ -907,7 +907,7 @@ static DBusKey* find_recent_key (DBusKeyring *keyring) { int i; - long tv_sec, tv_usec; + unsigned long tv_sec, tv_usec; _dbus_get_current_time (&tv_sec, &tv_usec); @@ -919,7 +919,8 @@ find_recent_key (DBusKeyring *keyring) _dbus_verbose ("Key %d is %ld seconds old\n", i, tv_sec - key->creation_time); - if ((tv_sec - NEW_KEY_TIMEOUT_SECONDS) < key->creation_time) + if (key->creation_time > 0 && + (tv_sec - NEW_KEY_TIMEOUT_SECONDS) < (unsigned long)key->creation_time) return key; ++i; diff -rpuN --exclude .depend --exclude '*~' --exclude '*.orig' --exclude '*.rej' --exclude '*.l[oa]' --exclude '*.lai' --exclude '*.o' --exclude .deps --exclude .libs --exclude Makefile --exclude 'stamp-*' --exclude messagebus --exclude rc.messagebus --exclude session.conf --exclude system.conf --exclude config.h --exclude config.log --exclude config.status --exclude dbus-1.pc --exclude Doxyfile --exclude libtool --exclude data ../.build_orig/dbus/dbus/dbus-sysdeps.c dbus/dbus/dbus-sysdeps.c --- ../.build_orig/dbus/dbus/dbus-sysdeps.c 2008-08-06 13:00:29.000000000 -0400 +++ dbus/dbus/dbus-sysdeps.c 2008-08-24 22:54:41.000000000 -0400 @@ -847,7 +846,7 @@ void _dbus_generate_pseudorandom_bytes_buffer (char *buffer, int n_bytes) { - long tv_usec; + unsigned long tv_usec; int i; /* fall back to pseudorandom */ diff -rpuN --exclude .depend --exclude '*~' --exclude '*.orig' --exclude '*.rej' --exclude '*.l[oa]' --exclude '*.lai' --exclude '*.o' --exclude .deps --exclude .libs --exclude Makefile --exclude 'stamp-*' --exclude messagebus --exclude rc.messagebus --exclude session.conf --exclude system.conf --exclude config.h --exclude config.log --exclude config.status --exclude dbus-1.pc --exclude Doxyfile --exclude libtool --exclude data ../.build_orig/dbus/dbus/dbus-sysdeps.h dbus/dbus/dbus-sysdeps.h --- ../.build_orig/dbus/dbus/dbus-sysdeps.h 2008-08-06 13:00:29.000000000 -0400 +++ dbus/dbus/dbus-sysdeps.h 2008-08-24 22:38:03.000000000 -0400 @@ -269,8 +269,8 @@ int _dbus_poll (DBusPollFD *fds, void _dbus_sleep_milliseconds (int milliseconds); -void _dbus_get_current_time (long *tv_sec, - long *tv_usec); +void _dbus_get_current_time (unsigned long *tv_sec, + unsigned long *tv_usec); /** * File/directory interface diff -rpuN --exclude .depend --exclude '*~' --exclude '*.orig' --exclude '*.rej' --exclude '*.l[oa]' --exclude '*.lai' --exclude '*.o' --exclude .deps --exclude .libs --exclude Makefile --exclude 'stamp-*' --exclude messagebus --exclude rc.messagebus --exclude session.conf --exclude system.conf --exclude config.h --exclude config.log --exclude config.status --exclude dbus-1.pc --exclude Doxyfile --exclude libtool --exclude data ../.build_orig/dbus/dbus/dbus-sysdeps-unix.c dbus/dbus/dbus-sysdeps-unix.c --- ../.build_orig/dbus/dbus/dbus-sysdeps-unix.c 2008-08-06 13:00:29.000000000 -0400 +++ dbus/dbus/dbus-sysdeps-unix.c 2008-08-24 22:36:56.000000000 -0400 @@ -2006,17 +2006,17 @@ _dbus_poll (DBusPollFD *fds, * @param tv_usec return location for number of microseconds (thousandths) */ void -_dbus_get_current_time (long *tv_sec, - long *tv_usec) +_dbus_get_current_time (unsigned long *tv_sec, + unsigned long *tv_usec) { struct timeval t; gettimeofday (&t, NULL); if (tv_sec) - *tv_sec = t.tv_sec; + *tv_sec = (unsigned long)t.tv_sec; if (tv_usec) - *tv_usec = t.tv_usec; + *tv_usec = (unsigned long)t.tv_usec; } /**