aboutsummaryrefslogtreecommitdiff
path: root/apps/xhost
diff options
context:
space:
mode:
Diffstat (limited to 'apps/xhost')
-rw-r--r--apps/xhost/config.h97
-rw-r--r--apps/xhost/makefile30
-rw-r--r--apps/xhost/xhost.c21
3 files changed, 138 insertions, 10 deletions
diff --git a/apps/xhost/config.h b/apps/xhost/config.h
new file mode 100644
index 000000000..ffe93f580
--- /dev/null
+++ b/apps/xhost/config.h
@@ -0,0 +1,97 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if `struct sockaddr_in' has a `sin_len' member */
+#undef BSD44SOCKETS
+
+/* Define to 1 if you have the `authdes_create' function. */
+#undef HAVE_AUTHDES_CREATE
+
+/* Define to 1 if you have the `authdes_seccreate' function. */
+#undef HAVE_AUTHDES_SECCREATE
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `ws2_32' library (-lws2_32). */
+#undef HAVE_LIBWS2_32
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if the system has the type `socklen_t'. */
+#undef HAVE_SOCKLEN_T
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Support IPv6 for TCP connections */
+#define IPv6 1
+
+/* Support os-specific local connections */
+#undef LOCALCONN
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Major version of this package */
+#undef PACKAGE_VERSION_MAJOR
+
+/* Minor version of this package */
+#undef PACKAGE_VERSION_MINOR
+
+/* Patch version of this package */
+#undef PACKAGE_VERSION_PATCHLEVEL
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#undef RETSIGTYPE
+
+/* Support Secure RPC ("SUN-DES-1") authentication for X11 clients */
+#undef SECURE_RPC
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Support TCP socket connections */
+#define TCPCONN 1
+
+/* Support UNIX socket connections */
+#undef UNIXCONN
+
+/* Version number of package */
+#undef VERSION
diff --git a/apps/xhost/makefile b/apps/xhost/makefile
new file mode 100644
index 000000000..2461a488d
--- /dev/null
+++ b/apps/xhost/makefile
@@ -0,0 +1,30 @@
+DEFINES += BAD_ARPAINET
+
+TTYAPP = xhost
+
+INCLUDELIBFILES = \
+ ..\common\$(OBJDIR)\common.lib \
+ $(MHMAKECONF)\libX11\src\xkb\$(OBJDIR)\libxkb.lib \
+ $(MHMAKECONF)\libX11\src\xlibi18n\$(OBJDIR)\libi18n.lib \
+ $(MHMAKECONF)\libX11\modules\lc\xlocale\$(OBJDIR)\libxlocale.lib \
+ $(MHMAKECONF)\libX11\modules\lc\utf8\$(OBJDIR)\libxlcUTF8Load.lib \
+ $(MHMAKECONF)\libX11\modules\lc\def\$(OBJDIR)\libxlcDef.lib \
+ $(MHMAKECONF)\libX11\modules\om\generic\$(OBJDIR)\libxomGeneric.lib \
+ $(MHMAKECONF)\libX11\modules\lc\gen\$(OBJDIR)\liblcGenConvLoad.lib \
+ $(MHMAKECONF)\libX11\modules\im\ximcp\$(OBJDIR)\libximcp.lib \
+ $(MHMAKECONF)\libxcb\src\$(OBJDIR)\libxcb.lib \
+ $(MHMAKECONF)\libxau\$(OBJDIR)\libXau.lib \
+ $(MHMAKECONF)\libXmu\src\$(OBJDIR)\libXmu.lib \
+ $(MHMAKECONF)\libX11\src\$(OBJDIR)\libx11.lib \
+
+LIBDIRS=$(dir $(INCLUDELIBFILES))
+
+load_makefile $(LIBDIRS:%$(OBJDIR)\=%makefile MAKESERVER=0 DEBUG=$(DEBUG);)
+
+ifeq ($(DEBUG),1)
+LINKLIBS += $(MHMAKECONF)\pthreads\pthreadVC2d.lib
+else
+LINKLIBS += $(MHMAKECONF)\pthreads\pthreadVC2.lib
+endif
+
+CSRCS = xhost.c
diff --git a/apps/xhost/xhost.c b/apps/xhost/xhost.c
index 08f7c7969..6f803c002 100644
--- a/apps/xhost/xhost.c
+++ b/apps/xhost/xhost.c
@@ -163,6 +163,16 @@ static volatile int nameserver_timedout;
static char *ProgramName;
+#ifdef WIN32
+#define alarm(arg)
+
+void sethostent(int x)
+{}
+
+void endhostent()
+{}
+#endif
+
#ifdef NEEDSOCKETS
static int
XFamily(int af)
@@ -787,7 +797,7 @@ get_hostname(XHostAddress *ha)
sa.sa_handler = nameserver_lost;
sa.sa_flags = 0; /* don't restart syscalls */
sigaction(SIGALRM, &sa, NULL);
-#else
+#elif !defined(WIN32)
signal(SIGALRM, nameserver_lost);
#endif
alarm(NAMESERVER_TIMEOUT);
@@ -965,12 +975,3 @@ local_xerror(Display *dpy, XErrorEvent *rep)
XmuPrintDefaultErrorMessage (dpy, rep, stderr);
return 0;
}
-
-#ifdef __CYGWIN__
-void sethostent(int x)
-{}
-
-void endhostent()
-{}
-#endif
-