Changes in / [e0f9170:178e2f8]
- Files:
-
- 3 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
.bzrignore
re0f9170 r178e2f8 19 19 coverage 20 20 bitlbee.info 21 bitlbee.exe -
Makefile
re0f9170 r178e2f8 10 10 11 11 # Program variables 12 objects = account.o bitlbee.o c onf.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.ouser.o12 objects = 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 13 13 headers = 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 14 14 subdirs = lib protocols 15 16 ifeq ($(TARGET),i586-mingw32msvc) 17 objects += win32.o 18 LFLAGS+=-lws2_32 19 EFLAGS+=-lsecur32 20 OUTFILE=bitlbee.exe 21 else 22 objects += unix.o conf.o log.o 23 OUTFILE=bitlbee 24 endif 15 25 16 26 # Expansion of variables -
bitlbee.c
re0f9170 r178e2f8 123 123 ipc_master_listen_socket(); 124 124 125 #ifndef _WIN32 125 126 if( ( fp = fopen( global.conf->pidfile, "w" ) ) ) 126 127 { … … 132 133 log_message( LOGLVL_WARNING, "Warning: Couldn't write PID to `%s'", global.conf->pidfile ); 133 134 } 135 #endif 134 136 135 137 return( 0 ); … … 140 142 if( !irc_new( 0 ) ) 141 143 return( 1 ); 142 143 log_link( LOGLVL_ERROR, LOGOUTPUT_IRC );144 log_link( LOGLVL_WARNING, LOGOUTPUT_IRC );145 144 146 145 return( 0 ); … … 254 253 struct sockaddr_in conn_info; 255 254 int new_socket = accept( global.listen_socket, (struct sockaddr *) &conn_info, &size ); 256 pid_t client_pid = 0;257 255 258 256 if( new_socket == -1 ) … … 262 260 } 263 261 262 #ifndef _WIN32 264 263 if( global.conf->runmode == RUNMODE_FORKDAEMON ) 265 264 { 265 pid_t client_pid = 0; 266 266 int fds[2]; 267 267 … … 320 320 } 321 321 else 322 #endif 322 323 { 323 324 log_message( LOGLVL_INFO, "Creating new connection with fd %d.", new_socket ); -
bitlbee.h
re0f9170 r178e2f8 29 29 #define _GNU_SOURCE /* Stupid GNU :-P */ 30 30 31 /* Depend on Windows 2000 for now since we need getaddrinfo() */ 32 #define _WIN32_WINNT 0x0501 33 31 34 #define PACKAGE "BitlBee" 32 35 #define BITLBEE_VERSION "1.2.1" … … 48 51 #include <stdio.h> 49 52 #include <ctype.h> 53 #include <errno.h> 54 50 55 #ifndef _WIN32 51 56 #include <syslog.h> 52 #include <errno.h>53 57 #endif 54 58 -
configure
re0f9170 r178e2f8 20 20 ipcsocket='/var/run/bitlbee.sock' 21 21 pcdir='$prefix/lib/pkgconfig' 22 systemlibdirs="/lib /usr/lib /usr/local/lib" 22 23 23 24 msn=1 … … 109 110 PCDIR=$pcdir 110 111 112 TARGET=$target 111 113 ARCH=$arch 112 114 CPU=$cpu 113 OUTFILE=bitlbee114 115 115 116 DESTDIR= … … 134 135 EOF 135 136 137 138 136 139 if [ -n "$target" ]; then 137 PKG_CONFIG_PATH=/usr/$target/lib/pkgconfig 140 PKG_CONFIG_LIBDIR=/usr/$target/lib/pkgconfig 141 export PKG_CONFIG_LIBDIR 138 142 PATH=/usr/$target/bin:$PATH 139 143 CC=$target-cc 140 144 LD=$target-ld 141 fi 145 systemlibdirs="/usr/$target/lib" 146 fi 147 142 148 143 149 if [ "$debug" = "1" ]; then … … 285 291 elif [ "$ssl" = "nss" ]; then 286 292 detect_nss 293 elif [ "$ssl" = "sspi" ]; then 294 echo 287 295 elif [ "$ssl" = "openssl" ]; then 288 296 echo … … 341 349 echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings 342 350 343 for i in /lib /usr/lib /usr/local/lib; do351 for i in $systemlibdirs; do 344 352 if [ -f $i/libresolv.a ]; then 345 353 echo '#define HAVE_RESOLV_A' >> config.h … … 501 509 echo 'Cygwin is not officially supported.' 502 510 ;; 511 Windows ) 512 ;; 503 513 * ) 504 514 echo 'We haven'\''t tested BitlBee on many platforms yet, yours is untested. YMMV.' -
ipc.c
re0f9170 r178e2f8 441 441 } 442 442 443 #ifndef _WIN32 443 444 char *ipc_master_save_state() 444 445 { … … 506 507 } 507 508 508 #ifndef _WIN32509 509 int ipc_master_listen_socket() 510 510 { … … 543 543 } 544 544 #else 545 int ipc_master_listen_socket() 546 { 545 547 /* FIXME: Open named pipe \\.\BITLBEE */ 548 return 0; 549 } 546 550 #endif 547 551 -
irc.c
re0f9170 r178e2f8 26 26 #define BITLBEE_CORE 27 27 #include "bitlbee.h" 28 #include "sock.h" 28 29 #include "crypting.h" 29 30 #include "ipc.h" -
lib/misc.c
re0f9170 r178e2f8 373 373 void random_bytes( unsigned char *buf, int count ) 374 374 { 375 #ifndef _WIN32 375 376 static int use_dev = -1; 376 377 … … 422 423 423 424 if( !use_dev ) 425 #endif 424 426 { 425 427 int i; -
lib/ssl_bogus.c
re0f9170 r178e2f8 61 61 return GAIM_INPUT_READ; 62 62 } 63 64 int ssl_pending( void *conn ) 65 { 66 return 0; 67 } -
protocols/yahoo/libyahoo2.c
re0f9170 r178e2f8 69 69 #ifdef __MINGW32__ 70 70 # 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)73 71 #endif 74 72 -
protocols/yahoo/yahoo_httplib.c
re0f9170 r178e2f8 51 51 #ifdef __MINGW32__ 52 52 # 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)55 53 # define snprintf _snprintf 56 54 #endif -
sock.h
re0f9170 r178e2f8 16 16 #else 17 17 # include <winsock2.h> 18 # ifndef _MSC_VER 19 # include <ws2tcpip.h> 20 # endif 18 # include <ws2tcpip.h> 21 19 # if !defined(BITLBEE_CORE) && defined(_MSC_VER) 22 20 # pragma comment(lib,"bitlbee.lib") 23 21 # endif 24 22 # 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 _umask28 # define mode_t int29 23 # define sock_make_nonblocking(fd) { int non_block = 1; ioctlsocket(fd, FIONBIO, &non_block); } 30 24 # define sock_make_blocking(fd) { int non_block = 0; ioctlsocket(fd, FIONBIO, &non_block); } -
storage_text.c
re0f9170 r178e2f8 27 27 #include "bitlbee.h" 28 28 #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 29 37 30 38 static void text_init (void) -
unix.c
re0f9170 r178e2f8 60 60 if( global.conf->runmode == RUNMODE_INETD ) 61 61 { 62 log_link( LOGLVL_ERROR, LOGOUTPUT_IRC ); 63 log_link( LOGLVL_WARNING, LOGOUTPUT_IRC ); 64 62 65 i = bitlbee_inetd_init(); 63 66 log_message( LOGLVL_INFO, "Bitlbee %s starting in inetd mode.", BITLBEE_VERSION ); … … 66 69 else if( global.conf->runmode == RUNMODE_DAEMON ) 67 70 { 71 log_link( LOGLVL_ERROR, LOGOUTPUT_SYSLOG ); 72 log_link( LOGLVL_WARNING, LOGOUTPUT_SYSLOG ); 73 68 74 i = bitlbee_daemon_init(); 69 75 log_message( LOGLVL_INFO, "Bitlbee %s starting in daemon mode.", BITLBEE_VERSION ); … … 219 225 return( (double) time->tv_sec + (double) time->tv_usec / 1000000 ); 220 226 } 227 228
Note: See TracChangeset
for help on using the changeset viewer.