Changes in / [5be87b2:1a57b893]


Ignore:
Files:
5 added
14 edited

Legend:

Unmodified
Added
Removed
  • .bzrignore

    r5be87b2 r1a57b893  
    22config.h
    33bitlbee
     4Debug
     5Debugx
     6deps
     7admin/Debug
     8admin/admin.plg
     9bitlbee.plg
     10*.plg
     11*.aps
     12*.clw
    413user-guide.txt
    514user-guide.html
     
    1726*.gcno
    1827*.o
     28coverage
     29bitlbee.info
  • Makefile

    r5be87b2 r1a57b893  
    1010
    1111# Program variables
    12 objects = account.o bitlbee.o conf.o crypting.o help.o ipc.o irc.o irc_commands.o log.o nick.o query.o root_commands.o set.o storage.o $(STORAGE_OBJS) unix.o user.o
     12objects = account.o bitlbee.o crypting.o help.o ipc.o irc.o irc_commands.o nick.o query.o root_commands.o set.o storage.o $(STORAGE_OBJS) user.o
    1313headers = account.h bitlbee.h commands.h conf.h config.h crypting.h help.h ipc.h irc.h log.h nick.h query.h set.h sock.h storage.h user.h lib/events.h lib/http_client.h lib/ini.h lib/md5.h lib/misc.h lib/proxy.h lib/sha1.h lib/ssl_client.h lib/url.h protocols/nogaim.h
    1414subdirs = lib protocols
     15
     16ifeq ($(ARCH),Windows)
     17objects += win32.o
     18else
     19objects += unix.o conf.o log.o
     20endif
    1521
    1622# Expansion of variables
  • bitlbee.c

    r5be87b2 r1a57b893  
    123123                ipc_master_listen_socket();
    124124       
     125#ifndef _WIN32
    125126        if( ( fp = fopen( global.conf->pidfile, "w" ) ) )
    126127        {
     
    132133                log_message( LOGLVL_WARNING, "Warning: Couldn't write PID to `%s'", global.conf->pidfile );
    133134        }
     135#endif
    134136       
    135137        return( 0 );
     
    140142        if( !irc_new( 0 ) )
    141143                return( 1 );
    142        
    143         log_link( LOGLVL_ERROR, LOGOUTPUT_IRC );
    144         log_link( LOGLVL_WARNING, LOGOUTPUT_IRC );
    145144       
    146145        return( 0 );
     
    250249        struct sockaddr_in conn_info;
    251250        int new_socket = accept( global.listen_socket, (struct sockaddr *) &conn_info, &size );
    252         pid_t client_pid = 0;
    253251       
    254252        if( new_socket == -1 )
     
    258256        }
    259257       
     258#ifndef _WIN32
    260259        if( global.conf->runmode == RUNMODE_FORKDAEMON )
    261260        {
     261                pid_t client_pid = 0;
    262262                int fds[2];
    263263               
     
    316316        }
    317317        else
     318#endif
    318319        {
    319320                log_message( LOGLVL_INFO, "Creating new connection with fd %d.", new_socket );
  • bitlbee.h

    r5be87b2 r1a57b893  
    4848#include <stdio.h>
    4949#include <ctype.h>
     50#include <errno.h>
     51
    5052#ifndef _WIN32
    5153#include <syslog.h>
    52 #include <errno.h>
    5354#endif
    5455
     
    9495#undef g_main_quit
    9596#define g_main_quit             __PLEASE_USE_B_MAIN_QUIT__
    96 
    97 #ifndef F_OK
    98 #define F_OK 0
    99 #endif
    10097
    10198#ifndef G_GNUC_MALLOC
  • configure

    r5be87b2 r1a57b893  
    7474--ssl=...       SSL library to use (gnutls, nss, openssl, bogus, auto)
    7575                                                        $ssl
     76--arch=...  Override target architecture $arch
     77
    7678EOF
    7779                exit;
     
    213215detect_gnutls()
    214216{
    215         if libgnutls-config --version > /dev/null 2> /dev/null; then
     217        if $PKG_CONFIG --exists gnutls; then
     218                cat <<EOF>>Makefile.settings
     219EFLAGS+=`$PKG_CONFIG --libs gnutls`
     220CFLAGS+=`$PKG_CONFIG --cflags gnutls`
     221EOF
     222                ssl=gnutls
     223                ret=1
     224        elif libgnutls-config --version > /dev/null 2> /dev/null; then
    216225                cat <<EOF>>Makefile.settings
    217226EFLAGS+=`libgnutls-config --libs`
     
    267276elif [ "$ssl" = "nss" ]; then
    268277        detect_nss
     278elif [ "$ssl" = "sspi" ]; then
     279        echo
    269280elif [ "$ssl" = "openssl" ]; then
    270281        echo
     
    375386
    376387if [ "$gcov" = "1" ]; then
    377         echo "CFLAGS+=-ftest-coverage -fprofile-arcs" >> Makefile.settings
    378         echo "EFLAGS+=-lgcov" >> Makefile.settings
     388        echo "CFLAGS+=--coverage" >> Makefile.settings
     389        echo "EFLAGS+=--coverage" >> Makefile.settings
    379390fi
    380391
     
    483494        echo 'Cygwin is not officially supported.'
    484495;;
     496Windows )
     497        echo OUTFILE=bitlbee.exe >> Makefile.settings
     498        echo LFLAGS+=-lwsock32 >> Makefile.settings
     499        echo EFLAGS+=-lsecur32 >> Makefile.settings
     500;;
    485501* )
    486502        echo 'We haven'\''t tested BitlBee on many platforms yet, yours is untested. YMMV.'
  • ipc.c

    r5be87b2 r1a57b893  
    439439}
    440440
     441#ifndef _WIN32
    441442char *ipc_master_save_state()
    442443{
     
    504505}
    505506
    506 #ifndef _WIN32
    507507int ipc_master_listen_socket()
    508508{
     
    541541}
    542542#else
     543int ipc_master_listen_socket()
     544{
    543545        /* FIXME: Open named pipe \\.\BITLBEE */
     546        return 0;
     547}
    544548#endif
    545549
  • protocols/nogaim.h

    r5be87b2 r1a57b893  
    130130        struct im_connection *ic; /* the connection it belongs to */
    131131};
     132
     133struct ft
     134{
     135        const char *filename;
     136       
     137        /* Total number of bytes in file */
     138        size_t total_bytes;
     139       
     140        /* Current number of bytes received */
     141        size_t cur_bytes;
     142};
     143
     144struct ft_request
     145{
     146        const char *filename;
     147        struct gaim_connection *gc;
     148};
     149
     150typedef void (*ft_recv_handler) (struct ft *, void *data, size_t len);
    132151
    133152struct prpl {
  • protocols/oscar/AUTHORS

    r5be87b2 r1a57b893  
    2828E: awwaiid@auk.cx
    2929D: Figured out original password roasting
    30 
    31 
  • protocols/yahoo/libyahoo2.c

    r5be87b2 r1a57b893  
    6969#ifdef __MINGW32__
    7070# include <winsock2.h>
    71 # define write(a,b,c) send(a,b,c,0)
    72 # define read(a,b,c)  recv(a,b,c,0)
    7371#endif
    7472
  • protocols/yahoo/yahoo_httplib.c

    r5be87b2 r1a57b893  
    5151#ifdef __MINGW32__
    5252# include <winsock2.h>
    53 # define write(a,b,c) send(a,b,c,0)
    54 # define read(a,b,c)  recv(a,b,c,0)
    5553# define snprintf _snprintf
    5654#endif
  • sock.h

    r5be87b2 r1a57b893  
    1616#else
    1717# include <winsock2.h>
    18 # ifndef _MSC_VER
    19 #  include <ws2tcpip.h>
    20 # endif
     18# include <ws2tcpip.h>
    2119# if !defined(BITLBEE_CORE) && defined(_MSC_VER)
    2220#   pragma comment(lib,"bitlbee.lib")
    2321# endif
    2422# include <io.h>
    25 # define read(a,b,c) recv(a,b,c,0)
    26 # define write(a,b,c) send(a,b,c,0)
    27 # define umask _umask
    28 # define mode_t int
    2923# define sock_make_nonblocking(fd) { int non_block = 1; ioctlsocket(fd, FIONBIO, &non_block); }
    3024# define sock_make_blocking(fd) { int non_block = 0; ioctlsocket(fd, FIONBIO, &non_block); }
  • storage_text.c

    r5be87b2 r1a57b893  
    2727#include "bitlbee.h"
    2828#include "crypting.h"
     29#ifdef _WIN32
     30# define umask _umask
     31# define mode_t int
     32#endif
     33
     34#ifndef F_OK
     35#define F_OK 0
     36#endif
    2937
    3038static void text_init (void)
  • storage_xml.c

    r5be87b2 r1a57b893  
    2929#include "arc.h"
    3030#include "md5.h"
     31#include <glib/gstdio.h>
    3132
    3233typedef enum
     
    243244static void xml_init( void )
    244245{
    245         if( access( global.conf->configdir, F_OK ) != 0 )
     246        if( ! g_file_test( global.conf->configdir, G_FILE_TEST_EXISTS ) )
    246247                log_message( LOGLVL_WARNING, "The configuration directory `%s' does not exist. Configuration won't be saved.", global.conf->configdir );
    247         else if( access( global.conf->configdir, R_OK ) != 0 || access( global.conf->configdir, W_OK ) != 0 )
     248        else if( ! g_file_test( global.conf->configdir, G_FILE_TEST_EXISTS ) || g_access( global.conf->configdir, W_OK ) != 0 )
    248249                log_message( LOGLVL_WARNING, "Permission problem: Can't read/write from/to `%s'.", global.conf->configdir );
    249250}
     
    372373        g_free( path2 );
    373374       
    374         if( !overwrite && access( path, F_OK ) != -1 )
     375        if( !overwrite && g_file_test( path, G_FILE_TEST_EXISTS ) )
    375376                return STORAGE_ALREADY_EXISTS;
    376377       
  • unix.c

    r5be87b2 r1a57b893  
    6060        if( global.conf->runmode == RUNMODE_INETD )
    6161        {
     62                log_link( LOGLVL_ERROR, LOGOUTPUT_IRC );
     63                log_link( LOGLVL_WARNING, LOGOUTPUT_IRC );
     64       
    6265                i = bitlbee_inetd_init();
    6366                log_message( LOGLVL_INFO, "Bitlbee %s starting in inetd mode.", BITLBEE_VERSION );
     
    6669        else if( global.conf->runmode == RUNMODE_DAEMON )
    6770        {
     71                log_link( LOGLVL_ERROR, LOGOUTPUT_SYSLOG );
     72                log_link( LOGLVL_WARNING, LOGOUTPUT_SYSLOG );
     73
    6874                i = bitlbee_daemon_init();
    6975                log_message( LOGLVL_INFO, "Bitlbee %s starting in daemon mode.", BITLBEE_VERSION );
Note: See TracChangeset for help on using the changeset viewer.