Changes in / [f329dfc:e01ff50]


Ignore:
Files:
3 added
21 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    rf329dfc re01ff50  
    1010
    1111# Program variables
    12 objects = bitlbee.o dcc.o help.o ipc.o irc.o irc_im.o irc_channel.o irc_commands.o irc_send.o irc_user.o irc_util.o nick.o $(OTR_BI) query.o root_commands.o set.o storage.o $(STORAGE_OBJS) unix.o conf.o log.o
    13 headers = $(wildcard *.h lib/*.h protocols/*.h)
     12objects = bitlbee.o dcc.o help.o ipc.o irc.o irc_im.o irc_channel.o irc_commands.o irc_send.o irc_user.o irc_util.o nick.o $(OTR_BI) query.o root_commands.o set.o storage.o $(STORAGE_OBJS)
     13headers = bitlbee.h commands.h conf.h config.h help.h ipc.h irc.h log.h nick.h query.h set.h sock.h storage.h lib/events.h lib/ftutil.h lib/http_client.h lib/ini.h lib/json.h lib/json_util.h lib/md5.h lib/misc.h lib/proxy.h lib/sha1.h lib/ssl_client.h lib/url.h protocols/account.h protocols/bee.h protocols/ft.h protocols/nogaim.h
    1414subdirs = lib protocols
    1515
    16 OUTFILE = bitlbee
     16ifeq ($(TARGET),i586-mingw32msvc)
     17objects += win32.o
     18LDFLAGS+=-lws2_32
     19EFLAGS+=-lsecur32
     20OUTFILE=bitlbee.exe
     21else
     22objects += unix.o conf.o log.o
     23OUTFILE=bitlbee
     24endif
    1725
    1826# Expansion of variables
  • bitlbee.c

    rf329dfc re01ff50  
    127127        global.listen_watch_source_id = b_input_add( global.listen_socket, B_EV_IO_READ, bitlbee_io_new_client, NULL );
    128128       
     129#ifndef _WIN32
    129130        if( !global.conf->nofork )
    130131        {
     
    150151                                }
    151152        }
     153#endif
    152154       
    153155        if( global.conf->runmode == RUNMODE_FORKDAEMON )
     
    157159                ipc_master_listen_socket();
    158160       
     161#ifndef _WIN32
    159162        if( ( fp = fopen( global.conf->pidfile, "w" ) ) )
    160163        {
     
    166169                log_message( LOGLVL_WARNING, "Warning: Couldn't write PID to `%s'", global.conf->pidfile );
    167170        }
     171#endif
    168172       
    169173        if( !global.conf->nofork )
     
    291295        }
    292296       
     297#ifndef _WIN32
    293298        if( global.conf->runmode == RUNMODE_FORKDAEMON )
    294299        {
     
    352357        }
    353358        else
     359#endif
    354360        {
    355361                log_message( LOGLVL_INFO, "Creating new connection with fd %d.", new_socket );
  • bitlbee.h

    rf329dfc re01ff50  
    3535#endif
    3636
     37/* Depend on Windows 2000 for now since we need getaddrinfo() */
     38#define _WIN32_WINNT 0x0501
     39
    3740#define PACKAGE "BitlBee"
    3841#define BITLBEE_VERSION "3.2.2"
     
    5760#include <ctype.h>
    5861#include <errno.h>
     62
     63#ifndef _WIN32
    5964#include <syslog.h>
     65#endif
     66
    6067#include <glib.h>
    6168#include <gmodule.h>
  • configure

    rf329dfc re01ff50  
    484484elif [ "$ssl" = "nss" ]; then
    485485        detect_nss
     486elif [ "$ssl" = "sspi" ]; then
     487        echo
    486488elif [ "$ssl" = "openssl" ]; then
    487489        echo
     
    606608        # BI == built-in
    607609        echo '#define OTR_BI' >> config.h
    608         echo "EFLAGS+=-L${otrprefix}/lib -lotr -lgcrypt" >> Makefile.settings
     610        echo "EFLAGS+=-L${otrprefix}/lib -lotr" >> Makefile.settings
    609611        echo "CFLAGS+=-I${otrprefix}/include" >> Makefile.settings
    610612        echo 'OTR_BI=otr.o' >> Makefile.settings
     
    804806;;
    805807CYGWIN* )
     808        echo 'Cygwin is not officially supported.'
    806809;;
    807810Windows )
    808         echo 'Native windows compilation is not supported anymore, use cygwin instead.'
    809811;;
    810812* )
  • help.c

    rf329dfc re01ff50  
    4242        *help = h = g_new0 ( help_t, 1 );
    4343       
    44         h->fd = open( helpfile, O_RDONLY );
     44        h->fd = open( helpfile, O_RDONLY
     45#ifdef _WIN32
     46                                  | O_BINARY
     47#endif
     48                                  );
    4549       
    4650        if( h->fd == -1 )
  • ipc.c

    rf329dfc re01ff50  
    2828#include "ipc.h"
    2929#include "commands.h"
     30#ifndef _WIN32
    3031#include <sys/uio.h>
    3132#include <sys/un.h>
     33#endif
    3234
    3335GSList *child_list = NULL;
     
    841843}
    842844
     845#ifndef _WIN32
    843846char *ipc_master_save_state()
    844847{
     
    939942        return 1;
    940943}
     944#else
     945int ipc_master_listen_socket()
     946{
     947        /* FIXME: Open named pipe \\.\BITLBEE */
     948        return 0;
     949}
     950#endif
    941951
    942952int ipc_master_load_state( char *statefile )
  • lib/events.h

    rf329dfc re01ff50  
    3737
    3838#include <sys/types.h>
     39#ifndef _WIN32
    3940#include <sys/socket.h>
    4041#include <netdb.h>
    4142#include <netinet/in.h>
     43#endif
    4244#include <glib.h>
    4345#include <gmodule.h>
  • lib/events_glib.c

    rf329dfc re01ff50  
    3131#include <string.h>
    3232#include <sys/types.h>
     33#ifndef _WIN32
    3334#include <sys/socket.h>
    3435#include <netdb.h>
     
    3637#include <arpa/inet.h>
    3738#include <unistd.h>
     39#else
     40#include "sock.h"
     41#define ETIMEDOUT WSAETIMEDOUT
     42#define EINPROGRESS WSAEINPROGRESS
     43#endif
    3844#include <fcntl.h>
    3945#include <errno.h>
  • lib/http_client.c

    rf329dfc re01ff50  
    292292
    293293cleanup:
    294         /* Avoid g_source_remove warnings */
    295         req->inpa = 0;
    296 
    297294        if( req->ssl )
    298295                ssl_disconnect( req->ssl );
  • lib/misc.c

    rf329dfc re01ff50  
    420420void random_bytes( unsigned char *buf, int count )
    421421{
     422#ifndef _WIN32
    422423        static int use_dev = -1;
    423424       
     
    469470       
    470471        if( !use_dev )
     472#endif
    471473        {
    472474                int i;
  • lib/proxy.c

    rf329dfc re01ff50  
    2626#include <string.h>
    2727#include <sys/types.h>
     28#ifndef _WIN32
    2829#include <sys/socket.h>
    2930#include <netdb.h>
     
    3132#include <arpa/inet.h>
    3233#include <unistd.h>
     34#else
     35#include "sock.h"
     36#define ETIMEDOUT WSAETIMEDOUT
     37#define EINPROGRESS WSAEINPROGRESS
     38#endif
    3339#include <fcntl.h>
    3440#include <errno.h>
     
    7076        len = sizeof(error);
    7177       
     78#ifndef _WIN32
    7279        if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0 || error) {
    7380                if ((phb->gai_cur = phb->gai_cur->ai_next)) {
     
    94101                return FALSE;
    95102        }
     103#endif
    96104        freeaddrinfo(phb->gai);
    97105        sock_make_blocking(source);
  • lib/proxy.h

    rf329dfc re01ff50  
    2828
    2929#include <sys/types.h>
     30#ifndef _WIN32
    3031#include <sys/socket.h>
    3132#include <netdb.h>
    3233#include <netinet/in.h>
     34#endif
    3335#include <glib.h>
    3436#include <gmodule.h>
  • lib/ssl_gnutls.c

    rf329dfc re01ff50  
    236236static void ssl_cache_add( struct scd *conn )
    237237{
    238         size_t data_size = 0;
     238        size_t data_size;
    239239        struct ssl_session *data;
    240240        char *hostname;
     
    245245       
    246246        data = g_malloc( sizeof( struct ssl_session ) + data_size );
    247         if( gnutls_session_get_data( conn->session, data->data, &data_size ) != 0 )
     247        if( gnutls_session_get_data( conn->session, data->data, &data->size ) != 0 )
    248248        {
    249249                g_free( data );
     
    335335        int st, stver;
    336336       
    337         /* This function returns false, so avoid calling b_event_remove again */
    338         conn->inpa = -1;
    339        
    340337        if( ( st = gnutls_handshake( conn->session ) ) < 0 )
    341338        {
  • protocols/msn/soap.h

    rf329dfc re01ff50  
    3636#include <string.h>
    3737#include <sys/types.h>
     38#ifndef _WIN32
    3839#include <sys/socket.h>
    3940#include <netinet/in.h>
    4041#include <arpa/inet.h>
    4142#include <unistd.h>
     43#endif
    4244#include "nogaim.h"
    4345
  • protocols/oscar/rxqueue.c

    rf329dfc re01ff50  
    99#include <aim.h>
    1010
     11#ifndef _WIN32
    1112#include <sys/socket.h>
     13#endif
    1214
    1315/*
  • protocols/oscar/txqueue.c

    rf329dfc re01ff50  
    99#include "im.h"
    1010
     11#ifndef _WIN32
    1112#include <sys/socket.h>
     13#endif
    1214
    1315/*
  • protocols/twitter/twitter.c

    rf329dfc re01ff50  
    323323        s = set_add(&acc->set, "show_ids", "true", set_eval_bool, acc);
    324324
    325         s = set_add(&acc->set, "show_old_mentions", "0", set_eval_int, acc);
     325        s = set_add(&acc->set, "show_old_mentions", "20", set_eval_int, acc);
    326326
    327327        s = set_add(&acc->set, "strip_newlines", "false", set_eval_bool, acc);
     
    617617
    618618                goto eof;
    619         } else if ((g_strcasecmp(cmd[0], "favourite") == 0 ||
    620                     g_strcasecmp(cmd[0], "favorite") == 0 ||
    621                     g_strcasecmp(cmd[0], "fav") == 0) && cmd[1]) {
     619        } else if (g_strcasecmp(cmd[0], "favourite") == 0 && cmd[1]) {
    622620                if ((id = twitter_message_id_from_command_arg(ic, cmd[1], NULL))) {
    623621                        twitter_favourite_tweet(ic, id);
  • protocols/yahoo/libyahoo2.c

    rf329dfc re01ff50  
    4848 */
    4949
     50#ifndef _WIN32
    5051#include <unistd.h>
     52#endif
    5153#include <errno.h>
    5254#include <stdio.h>
  • protocols/yahoo/yahoo_httplib.c

    rf329dfc re01ff50  
    3838
    3939#include <errno.h>
     40#ifndef _WIN32
    4041#include <unistd.h>
     42#endif
    4143#include <ctype.h>
    4244#include "yahoo2.h"
  • protocols/yahoo/yahoo_util.h

    rf329dfc re01ff50  
    6565void y_strfreev(char **vector);
    6666
     67#ifndef _WIN32
    6768int strncasecmp(const char *s1, const char *s2, size_t n);
    6869int strcasecmp(const char *s1, const char *s2);
     
    7273int snprintf(char *str, size_t size, const char *format, ...);
    7374int vsnprintf(char *str, size_t size, const char *format, va_list ap);
     75#endif
    7476
    7577#endif
  • sock.h

    rf329dfc re01ff50  
    22#include <fcntl.h>
    33
     4#ifndef _WIN32
    45#include <unistd.h>
    56#include <sys/socket.h>
     
    1112#define sockerr_again() (errno == EINPROGRESS || errno == EINTR)
    1213void closesocket( int fd );
     14#else
     15# include <winsock2.h>
     16# include <ws2tcpip.h>
     17# if !defined(BITLBEE_CORE) && defined(_MSC_VER)
     18#   pragma comment(lib,"bitlbee.lib")
     19# endif
     20# include <io.h>
     21# define sock_make_nonblocking(fd) { int non_block = 1; ioctlsocket(fd, FIONBIO, &non_block); }
     22# define sock_make_blocking(fd) { int non_block = 0; ioctlsocket(fd, FIONBIO, &non_block); }
     23# define sockerr_again() (WSAGetLastError() == WSAEINTR || WSAGetLastError() == WSAEINPROGRESS || WSAGetLastError() == WSAEWOULDBLOCK)
     24# define ETIMEDOUT WSAETIMEDOUT
     25# define sleep(a) Sleep(a*1000)
     26#endif
Note: See TracChangeset for help on using the changeset viewer.