Changeset daae10f


Ignore:
Timestamp:
2010-08-07T16:33:02Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
7b87539
Parents:
289bd2d
Message:

OpenSolaris (non-gcc) fixes, patches from Dagobert Michelsen <dam@…>
with some changes.

Files:
23 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r289bd2d rdaae10f  
    2626# Expansion of variables
    2727subdirobjs = $(foreach dir,$(subdirs),$(dir)/$(dir).o)
    28 CFLAGS += -Wall
    2928
    3029all: $(OUTFILE)
  • conf.c

    r289bd2d rdaae10f  
    8282        }
    8383       
    84         while( argc > 0 && ( opt = getopt( argc, argv, "i:p:P:nvIDFc:d:hR:u:V" ) ) >= 0 )
     84        while( argc > 0 && ( opt = getopt( argc, argv, "i:p:P:nvIDFc:d:hu:V" ) ) >= 0 )
    8585        /*     ^^^^ Just to make sure we skip this step from the REHASH handler. */
    8686        {
     
    158158                        return NULL;
    159159                }
    160                 else if( opt == 'R' )
    161                 {
    162                         /* Backward compatibility; older BitlBees passed this
    163                            info using a command-line flag. Allow people to
    164                            upgrade from such a version for now. */
    165                         setenv( "_BITLBEE_RESTART_STATE", optarg, 0 );
    166                 }
    167160                else if( opt == 'u' )
    168161                {
  • configure

    r289bd2d rdaae10f  
    184184fi
    185185
    186 echo CFLAGS=$CFLAGS >> Makefile.settings
     186echo CFLAGS=$CFLAGS $CPPFLAGS >> Makefile.settings
    187187echo CFLAGS+=-I${srcdir} -I${srcdir}/lib -I${srcdir}/protocols -I. >> Makefile.settings
    188188
     
    201201
    202202echo "CC=$CC" >> Makefile.settings;
     203if echo $CC | grep -qw gcc; then
     204        # Apparently -Wall is gcc-specific?
     205        echo CFLAGS+=-Wall >> Makefile.settings
     206fi
    203207
    204208if [ -z "$LD" ]; then
  • irc_commands.c

    r289bd2d rdaae10f  
    3838                   out we don't require it, which will break this feature.)
    3939                   Try to identify using the given password. */
    40                 return root_command( irc, send_cmd );
     40                root_command( irc, send_cmd );
     41                return;
    4142        }
    4243        /* Handling in pre-logged-in state, first see if this server is
  • lib/Makefile

    r289bd2d rdaae10f  
    1515objects = arc.o base64.o $(EVENT_HANDLER) ftutil.o http_client.o ini.o md5.o misc.o oauth.o proxy.o sha1.o $(SSL_CLIENT) url.o xmltree.o
    1616
    17 CFLAGS += -Wall
    1817LFLAGS += -r
    1918
  • lib/md5.h

    r289bd2d rdaae10f  
    2727#include <sys/types.h>
    2828#include <gmodule.h>
     29#if(__sun)
     30#include <inttypes.h>
     31#else
    2932#include <stdint.h>
     33#endif
    3034
    3135typedef uint8_t md5_byte_t;
  • lib/oauth.c

    r289bd2d rdaae10f  
    6060        {
    6161                g_snprintf( (gchar*) key, HMAC_BLOCK_SIZE + 1, "%s&%s",
    62                             oi->sp->consumer_secret, oi->token_secret ? : "" );
     62                            oi->sp->consumer_secret, oi->token_secret ? oi->token_secret : "" );
    6363        }
    6464       
  • lib/sha1.h

    r289bd2d rdaae10f  
    2424#define _SHA1_H_
    2525
     26#if(__sun)
     27#include <inttypes.h>
     28#else
    2629#include <stdint.h>
     30#endif
    2731#include <gmodule.h>
    2832
  • lib/xmltree.c

    r289bd2d rdaae10f  
    215215       
    216216        if( node == NULL )
    217                 return xt_cleanup( xt, xt->root, depth );
     217        {
     218                xt_cleanup( xt, xt->root, depth );
     219                return;
     220        }
    218221       
    219222        if( node->flags & XT_SEEN && node == xt->root )
  • protocols/Makefile

    r289bd2d rdaae10f  
    2525# Expansion of variables
    2626subdirobjs := $(join $(subdirs),$(addprefix /,$(subdirobjs)))
    27 CFLAGS += -Wall
    2827LFLAGS += -r
    2928
  • protocols/jabber/Makefile

    r289bd2d rdaae10f  
    1515objects = conference.o io.o iq.o jabber.o jabber_util.o message.o presence.o s5bytestream.o sasl.o si.o
    1616
    17 CFLAGS += -Wall
    1817LFLAGS += -r
    1918
  • protocols/jabber/jabber.c

    r289bd2d rdaae10f  
    381381                if( bud->away_state )
    382382                        imcb_log( ic, "Away state: %s", bud->away_state->full_name );
    383                 imcb_log( ic, "Status message: %s", bud->away_message ? : "(none)" );
     383                imcb_log( ic, "Status message: %s", bud->away_message ? bud->away_message : "(none)" );
    384384               
    385385                bud = bud->next;
     
    395395        /* state_txt == NULL -> Not away.
    396396           Unknown state -> fall back to the first defined away state. */
    397         jd->away_state = state_txt ? jabber_away_state_by_name( state_txt )
    398                          ? : jabber_away_state_list : NULL;
     397        if( state_txt == NULL )
     398                jd->away_state = NULL;
     399        else if( ( jd->away_state = jabber_away_state_by_name( state_txt ) ) == NULL )
     400                jd->away_state = jabber_away_state_list;
    399401       
    400402        g_free( jd->away_message );
  • protocols/jabber/message.c

    r289bd2d rdaae10f  
    5959                        {
    6060                                room = from;
    61                                 from = xt_find_attr( inv, "from" ) ? : from;
     61                                if( ( from = xt_find_attr( inv, "from" ) ) == NULL )
     62                                        from = room;
    6263
    6364                                g_string_append_printf( fullmsg, "<< \002BitlBee\002 - Invitation to chatroom %s >>\n", room );
     
    7273                        {
    7374                                bud->last_msg = time( NULL );
    74                                 from = bud->ext_jid ? : bud->bare_jid;
     75                                from = bud->ext_jid ? bud->ext_jid : bud->bare_jid;
    7576                        }
    7677                        else
  • protocols/msn/Makefile

    r289bd2d rdaae10f  
    1515objects = msn.o msn_util.o ns.o passport.o sb.o tables.o
    1616
    17 CFLAGS += -Wall
    1817LFLAGS += -r
    1918
  • protocols/msn/msn.c

    r289bd2d rdaae10f  
    176176        struct msn_data *md = ic->proto_data;
    177177       
    178         if( state )
    179                 md->away_state = msn_away_state_by_name( state ) ? :
    180                                  msn_away_state_list + 1;
    181         else
     178        if( state == NULL )
    182179                md->away_state = msn_away_state_list;
     180        else if( ( md->away_state = msn_away_state_by_name( state ) ) == NULL )
     181                md->away_state = msn_away_state_list + 1;
    183182       
    184183        g_snprintf( buf, sizeof( buf ), "CHG %d %s\r\n", ++md->trId, md->away_state->code );
  • protocols/nogaim.c

    r289bd2d rdaae10f  
    468468       
    469469        s = g_strdup_printf( "The user %s%s wants to add you to his/her buddy list.",
    470                              handle, realname_ ?: "" );
     470                             handle, realname_ ? realname_ : "" );
    471471       
    472472        g_free( realname_ );
     
    491491        cbd->ic->acc->prpl->add_buddy( cbd->ic, cbd->handle, NULL );
    492492       
    493         return imcb_ask_add_cb_no( data );
     493        imcb_ask_add_cb_no( data );
    494494}
    495495
  • protocols/nogaim.h

    r289bd2d rdaae10f  
    3939#define _NOGAIM_H
    4040
     41#if(__sun)
     42#include <inttypes.h>
     43#else
    4144#include <stdint.h>
     45#endif
     46
     47#include "lib/events.h"
    4248
    4349#include "bitlbee.h"
  • protocols/oscar/Makefile

    r289bd2d rdaae10f  
    1616objects = admin.o auth.o bos.o buddylist.o chat.o chatnav.o conn.o icq.o im.o info.o misc.o msgcookie.o rxhandlers.o rxqueue.o search.o service.o snac.o ssi.o stats.o tlv.o txqueue.o oscar_util.o oscar.o
    1717
    18 CFLAGS += -Wall
    1918LFLAGS += -r
    2019
  • protocols/twitter/Makefile

    r289bd2d rdaae10f  
    1515objects = twitter.o twitter_http.o twitter_lib.o
    1616
    17 CFLAGS += -Wall
    1817LFLAGS += -r
    1918
  • protocols/twitter/twitter_lib.c

    r289bd2d rdaae10f  
    2323
    2424/* For strptime(): */
     25#if(__sun)
     26#else
    2527#define _XOPEN_SOURCE
     28#endif
    2629
    2730#include "twitter_http.h"
  • protocols/yahoo/Makefile

    r289bd2d rdaae10f  
    1515objects = yahoo.o crypt.o libyahoo2.o yahoo_fn.o yahoo_httplib.o yahoo_util.o
    1616
    17 CFLAGS += -Wall -DSTDC_HEADERS -DHAVE_STRING_H -DHAVE_STRCHR -DHAVE_MEMCPY -DHAVE_GLIB
     17CFLAGS += -DSTDC_HEADERS -DHAVE_STRING_H -DHAVE_STRCHR -DHAVE_MEMCPY -DHAVE_GLIB
    1818LFLAGS += -r
    1919
  • protocols/yahoo/libyahoo2.c

    r289bd2d rdaae10f  
    18591859        }
    18601860       
    1861         return yahoo_https_auth_init(had);
     1861        yahoo_https_auth_init(had);
     1862        return;
    18621863       
    18631864fail:
  • unix.c

    r289bd2d rdaae10f  
    159159        {
    160160                char *fn = ipc_master_save_state();
     161                char *env;
     162               
     163                env = g_strdup_printf( "_BITLBEE_RESTART_STATE=%s", fn );
     164                putenv( env );
     165                g_free( fn );
     166                /* Looks like env should *not* be freed here as putenv
     167                   doesn't make a copy. Odd. */
    161168               
    162169                chdir( old_cwd );
    163                
    164                 setenv( "_BITLBEE_RESTART_STATE", fn, 1 );
    165                 g_free( fn );
    166                
    167170                close( global.listen_socket );
    168171               
Note: See TracChangeset for help on using the changeset viewer.