Changeset 0b9daac for lib


Ignore:
Timestamp:
2015-02-20T23:16:08Z (9 years ago)
Author:
dequis <dx@…>
Parents:
5ebff60
git-author:
dequis <dx@…> (27-12-14 04:06:45)
git-committer:
dequis <dx@…> (20-02-15 23:16:08)
Message:

Reorganize include files to avoid conflicts with other libs

  • Change all header includes to be relative to the project root
  • Remove -I${includedir} from bitlbee.pc Cflags
  • Install lib and protocols headers to their own directories. So now it is:

/usr/include/bitlbee/*.h
/usr/include/bitlbee/lib/*.h
/usr/include/bitlbee/protocols/*.h

This breaks backwards compatibility of third party plugins, but now
they don't have to do ambiguous includes like #include <proxy.h>

This also fixes trac ticket 1170 - conflicts when libproxy and liboauth
are installed at the same time bitlbee is built, which the macports
project ran into several times.

Location:
lib
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • lib/arc.c

    r5ebff60 r0b9daac  
    4545#include <stdlib.h>
    4646#include <string.h>
    47 #include "misc.h"
    48 #include "arc.h"
     47#include "lib/misc.h"
     48#include "lib/arc.h"
    4949
    5050/* Add some seed to the password, to make sure we *never* use the same key.
  • lib/base64.c

    r5ebff60 r0b9daac  
    2525#include <glib.h>
    2626#include <string.h>
    27 #include "base64.h"
     27#include "lib/base64.h"
    2828
    2929char *tobase64(const char *text)
  • lib/events_glib.c

    r5ebff60 r0b9daac  
    3838#include <fcntl.h>
    3939#include <errno.h>
    40 #include "proxy.h"
     40#include "lib/proxy.h"
    4141
    4242typedef struct _GaimIOClosure {
  • lib/events_libevent.c

    r5ebff60 r0b9daac  
    3434#include <sys/time.h>
    3535#include <event.h>
    36 #include "proxy.h"
     36#include "lib/proxy.h"
    3737
    3838static void b_main_restart();
  • lib/http_client.c

    r5ebff60 r0b9daac  
    2727#include <stdio.h>
    2828
    29 #include "http_client.h"
    30 #include "url.h"
     29#include "lib/http_client.h"
     30#include "lib/url.h"
    3131#include "sock.h"
    3232
  • lib/http_client.h

    r5ebff60 r0b9daac  
    3434
    3535#include <glib.h>
    36 #include "ssl_client.h"
     36#include "lib/ssl_client.h"
    3737
    3838struct http_request;
  • lib/json.c

    r5ebff60 r0b9daac  
    3030#include <glib.h>
    3131
    32 #include "json.h"
     32#include "lib/json.h"
    3333
    3434#ifdef _MSC_VER
  • lib/json_util.c

    r5ebff60 r0b9daac  
    2626#include <glib.h>
    2727
    28 #include "json_util.h"
     28#include "lib/json_util.h"
    2929
    3030json_value *json_o_get(const json_value *obj, const json_char *name)
  • lib/json_util.h

    r5ebff60 r0b9daac  
    2222****************************************************************************/
    2323
    24 #include "json.h"
     24#include "lib/json.h"
    2525
    2626#define JSON_O_FOREACH(o, k, v) \
  • lib/md5.c

    r5ebff60 r0b9daac  
    1 #include "md5.h"
     1#include "lib/md5.h"
    22
    33/* Creates a new GChecksum in ctx */
  • lib/misc.c

    r5ebff60 r0b9daac  
    3232
    3333#define BITLBEE_CORE
    34 #include "nogaim.h"
    35 #include "base64.h"
    36 #include "md5.h"
     34#include "protocols/nogaim.h"
     35#include "lib/base64.h"
     36#include "lib/md5.h"
    3737#include <stdio.h>
    3838#include <stdlib.h>
     
    4747#endif
    4848
    49 #include "md5.h"
    50 #include "ssl_client.h"
     49#include "lib/md5.h"
     50#include "lib/ssl_client.h"
    5151
    5252void strip_linefeed(gchar *text)
  • lib/oauth.c

    r5ebff60 r0b9daac  
    2626#include <stdlib.h>
    2727#include <string.h>
    28 #include "http_client.h"
    29 #include "base64.h"
    30 #include "misc.h"
    31 #include "sha1.h"
    32 #include "url.h"
    33 #include "oauth.h"
     28#include "lib/http_client.h"
     29#include "lib/base64.h"
     30#include "lib/misc.h"
     31#include "lib/sha1.h"
     32#include "lib/url.h"
     33#include "lib/oauth.h"
    3434
    3535#define HMAC_BLOCK_SIZE 64
  • lib/oauth2.c

    r5ebff60 r0b9daac  
    3939
    4040#include <glib.h>
    41 #include "http_client.h"
    42 #include "oauth2.h"
    43 #include "oauth.h"
    44 #include "json.h"
    45 #include "json_util.h"
    46 #include "url.h"
     41#include "lib/http_client.h"
     42#include "lib/oauth2.h"
     43#include "lib/oauth.h"
     44#include "lib/json.h"
     45#include "lib/json_util.h"
     46#include "lib/url.h"
    4747
    4848char *oauth2_url(const struct oauth2_service *sp)
  • lib/proxy.c

    r5ebff60 r0b9daac  
    3333#include <fcntl.h>
    3434#include <errno.h>
    35 #include "nogaim.h"
    36 #include "proxy.h"
    37 #include "base64.h"
     35#include "protocols/nogaim.h"
     36#include "lib/proxy.h"
     37#include "lib/base64.h"
    3838
    3939char proxyhost[128] = "";
  • lib/proxy.h

    r5ebff60 r0b9daac  
    3434#include <gmodule.h>
    3535
    36 #include "events.h"
     36#include "lib/events.h"
    3737
    3838#define PROXY_NONE 0
  • lib/sha1.c

    r5ebff60 r0b9daac  
    1 #include "sha1.h"
     1#include "lib/sha1.h"
    22#include <string.h>
    33#include <stdio.h>
     4
    45
    56
  • lib/ssl_client.h

    r5ebff60 r0b9daac  
    3333
    3434#include <glib.h>
    35 #include "proxy.h"
     35#include "lib/proxy.h"
    3636
    3737/* Some generic error codes. Especially SSL_AGAIN is important if you
  • lib/ssl_gnutls.c

    r5ebff60 r0b9daac  
    2929#include <fcntl.h>
    3030#include <unistd.h>
    31 #include "proxy.h"
    32 #include "ssl_client.h"
     31#include "lib/proxy.h"
     32#include "lib/ssl_client.h"
    3333#include "sock.h"
    3434#include "stdlib.h"
  • lib/ssl_nss.c

    r5ebff60 r0b9daac  
    2727
    2828#include "bitlbee.h"
    29 #include "proxy.h"
    30 #include "ssl_client.h"
     29#include "lib/proxy.h"
     30#include "lib/ssl_client.h"
    3131#include "sock.h"
    3232#include <nspr.h>
  • lib/ssl_openssl.c

    r5ebff60 r0b9daac  
    3232
    3333#include "bitlbee.h"
    34 #include "proxy.h"
    35 #include "ssl_client.h"
     34#include "lib/proxy.h"
     35#include "lib/ssl_client.h"
    3636#include "sock.h"
    3737
  • lib/url.c

    r5ebff60 r0b9daac  
    2424*/
    2525
    26 #include "url.h"
     26#include "lib/url.h"
    2727
    2828/* Convert an URL to a url_t structure */
  • lib/xmltree.c

    r5ebff60 r0b9daac  
    2828#include <stdio.h>
    2929
    30 #include "xmltree.h"
     30#include "lib/xmltree.h"
    3131
    3232#define g_strcasecmp g_ascii_strcasecmp
Note: See TracChangeset for help on using the changeset viewer.