From 3d114925f29011726cdd3eb88245a26150314a33 Mon Sep 17 00:00:00 2001 From: mouring Date: Sat, 24 Feb 2001 00:55:04 +0000 Subject: [PATCH] - (bal) Generalize lack of UNIX sockets since this also effects Cray not just Cygwin. Based on patch by Wendy Palm --- ChangeLog | 2 ++ configure.in | 1 + defines.h | 24 ++++++++++++++++++++---- session.c | 8 ++++---- 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 38c48e2a..71ccff2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,8 @@ Patch by Pekka Savola - (bal) Renamed sigaction.[ch] to sigact.[ch]. Causes problems with some platforms. + - (bal) Generalize lack of UNIX sockets since this also effects Cray + not just Cygwin. Based on patch by Wendy Palm 20010223 - (bal) Fix --define rh7 in openssh.spec file. Patch by Steve Tell diff --git a/configure.in b/configure.in index 677140bd..b1f859ae 100644 --- a/configure.in +++ b/configure.in @@ -71,6 +71,7 @@ case "$host" in AC_DEFINE(IPV4_DEFAULT) AC_DEFINE(IP_TOS_IS_BROKEN) AC_DEFINE(BROKEN_VHANGUP) + AC_DEFINE(NO_X11_UNIX_SOCKETS) no_libsocket=1 no_libnsl=1 ;; diff --git a/defines.h b/defines.h index 4e368283..4879f2a3 100644 --- a/defines.h +++ b/defines.h @@ -138,12 +138,20 @@ typedef char int8_t; # if (SIZEOF_SHORT_INT == 2) typedef short int int16_t; # else -# error "16 bit int type not found." +# ifdef _CRAY +typedef long int16_t; +# else +# error "16 bit int type not found." +# endif /* _CRAY */ # endif # if (SIZEOF_INT == 4) typedef int int32_t; # else -# error "32 bit int type not found." +# ifdef _CRAY +typedef long int32_t; +# else +# error "32 bit int type not found." +# endif /* _CRAY */ # endif #endif @@ -163,12 +171,20 @@ typedef unsigned char u_int8_t; # if (SIZEOF_SHORT_INT == 2) typedef unsigned short int u_int16_t; # else -# error "16 bit int type not found." +# ifdef _CRAY +typedef unsigned long u_int16_t; +# else +# error "16 bit int type not found." +# endif # endif # if (SIZEOF_INT == 4) typedef unsigned int u_int32_t; # else -# error "32 bit int type not found." +# ifdef _CRAY +typedef unsigned long u_int32_t; +# else +# error "32 bit int type not found." +# endif # endif # endif #endif diff --git a/session.c b/session.c index 01442aa9..3434aafc 100644 --- a/session.c +++ b/session.c @@ -1366,13 +1366,13 @@ do_child(const char *command, struct passwd * pw, const char *term, "Running %.100s add %.100s %.100s %.100s\n", options.xauth_location, display, auth_proto, auth_data); -#ifndef HAVE_CYGWIN /* Unix sockets are not supported */ +#ifndef NO_X11_UNIX_SOCKETS if (screen != NULL) fprintf(stderr, "Adding %.*s/unix%s %s %s\n", (int)(screen-display), display, screen, auth_proto, auth_data); -#endif +#endif /* NO_X11_UNIX_SOCKETS */ } snprintf(cmd, sizeof cmd, "%s -q -", options.xauth_location); @@ -1380,12 +1380,12 @@ do_child(const char *command, struct passwd * pw, const char *term, if (f) { fprintf(f, "add %s %s %s\n", display, auth_proto, auth_data); -#ifndef HAVE_CYGWIN /* Unix sockets are not supported */ +#ifndef NO_X11_UNIX_SOCKETS if (screen != NULL) fprintf(f, "add %.*s/unix%s %s %s\n", (int)(screen-display), display, screen, auth_proto, auth_data); -#endif +#endif /* NO_X11_UNIX_SOCKETS */ pclose(f); } else { fprintf(stderr, "Could not run %s\n", -- 2.45.2