Remove dependencies on Xmd.h and X.h

(Still including X.h until defs are moved to xproto.xml
 and xcb-util and xcb-demo are fixed to use them.)
This commit is contained in:
Ian Osgood 2006-03-13 17:49:17 -08:00
parent be1302b6ef
commit a810d1ffe4
2 changed files with 14 additions and 2 deletions

View File

@ -28,7 +28,19 @@
#ifndef __XCB_H #ifndef __XCB_H
#define __XCB_H #define __XCB_H
#include <sys/types.h> #include <sys/types.h>
#include <X11/Xmd.h>
/* TODO: check for stdint in config? (HAVE_STDINT) fallback? */
#include <stdint.h>
typedef uint8_t BYTE;
typedef uint8_t BOOL;
typedef uint8_t CARD8;
typedef uint16_t CARD16;
typedef uint32_t CARD32;
typedef int8_t INT8;
typedef int16_t INT16;
typedef int32_t INT32;
#include <X11/X.h> #include <X11/X.h>
#include <sys/uio.h> #include <sys/uio.h>
#include <pthread.h> #include <pthread.h>

View File

@ -97,7 +97,7 @@ static Xauth *get_authptr(struct sockaddr *sockname, unsigned int socknamelen)
addr = (char *) &si->sin_addr; addr = (char *) &si->sin_addr;
addrlen = 4; addrlen = 4;
if (ntohl(si->sin_addr.s_addr) != 0x7f000001) if (ntohl(si->sin_addr.s_addr) != 0x7f000001)
family = FamilyInternet; /* 0 */ family = 0; /* X.h: FamilyInternet */
snprintf(dispbuf, sizeof(dispbuf), "%d", ntohs(si->sin_port) - X_TCP_PORT); snprintf(dispbuf, sizeof(dispbuf), "%d", ntohs(si->sin_port) - X_TCP_PORT);
display = dispbuf; display = dispbuf;
} }