X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fxcb_auth.c;h=46c85fd70e1ecafc4610ff7f452525c30ab2311e;hb=e6132aff2fdcd0ab1ef5d7ac84a3c597dc07d370;hp=1b5651b2beeaa7553d317390dafe9869864da09c;hpb=d8de2c7c2a9b8bf59c8f1fcece5faed0b6cbf6f4;p=free-sw%2Fxcb%2Flibxcb diff --git a/src/xcb_auth.c b/src/xcb_auth.c index 1b5651b..46c85fd 100644 --- a/src/xcb_auth.c +++ b/src/xcb_auth.c @@ -34,13 +34,21 @@ #include #include -#include "xcb.h" -#include "xcbint.h" +/* FIXME: for the moment Xdmcp.h must be included before xcb.h because + * it includes Xmd.h, but config.h (normally included from xcbint.h + * which must be included after xcb.h) must be included before Xdmcp.h. + * Ow. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #ifdef HASXDMAUTH #include #endif +#include "xcb.h" +#include "xcbint.h" + enum auth_protos { #ifdef HASXDMAUTH AUTH_XA1, @@ -97,7 +105,7 @@ static Xauth *get_authptr(struct sockaddr *sockname, unsigned int socknamelen) addr = (char *) &si->sin_addr; addrlen = 4; if (ntohl(si->sin_addr.s_addr) != 0x7f000001) - family = FamilyInternet; /* 0 */ + family = XCBFamilyInternet; snprintf(dispbuf, sizeof(dispbuf), "%d", ntohs(si->sin_port) - X_TCP_PORT); display = dispbuf; } @@ -208,7 +216,7 @@ static int compute_auth(XCBAuthInfo *info, Xauth *authptr, struct sockaddr *sock return 0; /* Unknown authorization type */ } -int XCBGetAuthInfo(int fd, XCBAuthInfo *info) +int _xcb_get_auth_info(int fd, XCBAuthInfo *info) { /* code adapted from Xlib/ConnDis.c, xtrans/Xtranssocket.c, xtrans/Xtransutils.c */