Changeset 79b6213
- Timestamp:
- 2006-05-28T23:07:00Z (19 years ago)
- Branches:
- master
- Children:
- 4ff0966, c38e965
- Parents:
- 42616d1 (diff), 574af7e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
configure
r42616d1 r79b6213 163 163 fi 164 164 165 GLIB=0166 167 165 if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG glib-2.0; then 168 166 cat<<EOF>>Makefile.settings … … 170 168 CFLAGS+=`$PKG_CONFIG --cflags glib-2.0 gmodule-2.0` 171 169 EOF 172 echo '#define GLIB2' >> config.h 173 GLIB=2 174 elif type glib-config > /dev/null 2> /dev/null; then 175 cat<<EOF>>Makefile.settings 176 EFLAGS+=`glib-config --libs` 177 CFLAGS+=`glib-config --cflags` 178 EOF 179 echo '#define GLIB1' >> config.h 180 GLIB=1 181 else 182 echo 'Cannot find glib development libraries, aborting. (Install libglib-dev?)' 170 else 171 echo 'Cannot find glib2 development libraries, aborting. (Install libglib2-dev?)' 183 172 exit 1; 184 173 fi 185 186 if [ GLIB = 1 -o -r /usr/include/iconv.h ]; then187 :;188 elif [ -r /usr/local/include/iconv.h ]; then189 echo CFLAGS+=-I/usr/local/include >> Makefile.settings;190 else191 echo192 echo 'Warning: Could not find iconv.h, you might have to install it and/or modify'193 echo 'Makefile.settings to tell where this file is.';194 fi195 196 174 197 175 detect_gnutls() … … 390 368 ;; 391 369 *BSD ) 392 echo 'EFLAGS+=-liconv' >> Makefile.settings; 370 ;; 371 Darwin ) 372 ;; 373 IRIX ) 393 374 ;; 394 375 SunOS ) 395 376 echo 'EFLAGS+=-lresolv -lnsl -lsocket' >> Makefile.settings 396 377 echo 'STRIP=\# skip strip' >> Makefile.settings 397 echo 'EFLAGS+=-liconv' >> Makefile.settings;398 ;;399 Darwin )400 echo 'EFLAGS+=-liconv' >> Makefile.settings;401 ;;402 IRIX )403 378 ;; 404 379 CYGWIN* ) -
doc/README
r42616d1 r79b6213 47 47 48 48 BitlBee's only real dependency is GLib. This is available on virtually every 49 platform. Any recent version of GLib ( including 1.x versions) will work.49 platform. Any recent version of GLib (2.0 or higher) will work. 50 50 51 51 These days, MSN Messenger clients have to connect to the MS Passport servers -
irc.c
r42616d1 r79b6213 55 55 irc->fd = fd; 56 56 irc->io_channel = g_io_channel_unix_new( fd ); 57 #ifdef GLIB258 57 g_io_channel_set_encoding (irc->io_channel, NULL, NULL); 59 58 g_io_channel_set_buffered (irc->io_channel, FALSE); 60 59 g_io_channel_set_flags( irc->io_channel, G_IO_FLAG_NONBLOCK, NULL ); 61 #else62 fcntl( irc->fd, F_SETFL, O_NONBLOCK);63 #endif64 60 irc->r_watch_source_id = g_io_add_watch( irc->io_channel, G_IO_IN | G_IO_ERR | G_IO_HUP, bitlbee_io_current_client_read, irc ); 65 61 -
util.c
r42616d1 r79b6213 39 39 #include <glib.h> 40 40 #include <time.h> 41 #ifdef GLIB242 #define iconv_t GIConv43 #define iconv_open g_iconv_open44 #define iconv_close g_iconv_close45 #define iconv g_iconv46 #else47 #include <iconv.h>48 #endif49 41 50 42 void strip_linefeed(gchar *text) … … 465 457 signed int do_iconv( char *from_cs, char *to_cs, char *src, char *dst, size_t size, size_t maxbuf ) 466 458 { 467 iconv_tcd;459 GIConv cd; 468 460 size_t res; 469 461 size_t inbytesleft, outbytesleft; … … 471 463 char *outbuf = dst; 472 464 473 cd = iconv_open( to_cs, from_cs );474 if( cd == ( iconv_t) -1 )465 cd = g_iconv_open( to_cs, from_cs ); 466 if( cd == (GIConv) -1 ) 475 467 return( -1 ); 476 468 477 469 inbytesleft = size ? size : strlen( src ); 478 470 outbytesleft = maxbuf - 1; 479 res = iconv( cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft );471 res = g_iconv( cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft ); 480 472 *outbuf = '\0'; 481 iconv_close( cd );473 g_iconv_close( cd ); 482 474 483 475 if( res == (size_t) -1 ) … … 489 481 char *set_eval_charset( irc_t *irc, set_t *set, char *value ) 490 482 { 491 iconv_tcd;483 GIConv cd; 492 484 493 485 if ( g_strncasecmp( value, "none", 4 ) == 0 ) 494 486 return( value ); 495 487 496 cd = iconv_open( "UTF-8", value );497 if( cd == ( iconv_t) -1 )488 cd = g_iconv_open( "UTF-8", value ); 489 if( cd == (GIConv) -1 ) 498 490 return( NULL ); 499 491 500 iconv_close( cd );492 g_iconv_close( cd ); 501 493 return( value ); 502 494 }
Note: See TracChangeset
for help on using the changeset viewer.