Move the remainder of the constants in X.h into XML enumerations.
[free-sw/xcb/libxcb] / src / xcb_auth.c
index 3971010..46c85fd 100644 (file)
 #include <unistd.h>
 #include <stdlib.h>
 
-#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 <X11/Xdmcp.h>
 #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;
         }