From: Igor Pechtchanski <pechtcha@cs.nyu.edu>
To: Cant <cant_reed@yahoo.com>
Cc: cygwin@cygwin.com
Subject: Re: screen
Date: Sat, 12 Apr 2003 00:50:00 -0000 [thread overview]
Message-ID: <Pine.GSO.4.44.0304111954160.26381-200000@slinky.cs.nyu.edu> (raw)
In-Reply-To: <b77j07$156$1@main.gmane.org>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1041 bytes --]
On Sat, 12 Apr 2003, Cant wrote:
> just for fun i thought i would try and install screen... but for some
> reason when i go to make it, it says this:
>
> $ make
> [snip]
> gcc -c -I. -I. -g -O2 misc.c
> misc.c: In function `xsetenv':
> misc.c:648: too few arguments to function `setenv'
> make: *** [misc.o] Error 1
> $
>
> any thoughts..?
Which version of screen? I've attached my patch for 3.9.13.
> ---------------------------------------------------------------
> brian AT nkjo DOT torun DOT pOlAND
> You got questions? We got busy phones...
> ---------------------------------------------------------------
I like this one. How about: "You got questions? We got a mean otter with
an AK-47..."? ;-)
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
Knowledge is an unending adventure at the edge of uncertainty.
-- Leto II
[-- Attachment #2: Type: TEXT/PLAIN, Size: 8048 bytes --]
diff -u -p -r orig/screen-3.9.13/configure.in ./configure.in
--- orig/screen-3.9.13/configure.in 2002-08-12 10:34:14.000000000 -0400
+++ ./configure.in 2002-09-09 16:39:27.000000000 -0400
@@ -270,7 +270,7 @@ dnl Solaris seteuid doesn't change the
dnl multiuser screen sessions
AC_CHECKING(seteuid)
AC_TRY_LINK(,[
-#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news)
+#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news) || defined (__CYGWIN__)
seteuid_is_broken(0);
#else
seteuid(0);
@@ -865,7 +865,7 @@ fi
if test -z "$load" ; then
AC_EGREP_CPP(yes,
-[#if defined(NeXT) || defined(apollo) || defined(linux)
+[#if defined(NeXT) || defined(apollo) || defined(linux) || defined (__CYGWIN__)
yes;
#endif
], load=1)
diff -u -p -r orig/screen-3.9.13/loadav.c ./loadav.c
--- orig/screen-3.9.13/loadav.c 2002-01-08 10:43:43.000000000 -0500
+++ ./loadav.c 2002-09-09 16:39:27.000000000 -0400
@@ -56,7 +56,7 @@ static int loadok;
/***************************************************************/
-#if defined(linux) && !defined(LOADAV_DONE)
+#if (defined(linux) || defined (__CYGWIN__)) && !defined(LOADAV_DONE)
#define LOADAV_DONE
/*
* This is the easy way. It relies in /proc being mounted.
@@ -110,7 +110,7 @@ GetLoadav()
}
return i;
}
-#endif /* linux */
+#endif /* linux || __CYGWIN__ */
/***************************************************************/
diff -u -p -r orig/screen-3.9.13/misc.c ./misc.c
--- orig/screen-3.9.13/misc.c 2002-08-29 10:47:36.000000000 -0400
+++ ./misc.c 2002-09-09 16:39:27.000000000 -0400
@@ -638,11 +638,11 @@ char *value;
*/
# endif /* NEEDSETENV */
#else /* USESETENV */
-# if defined(linux) || defined(__convex__) || (BSD >= 199103)
+# if defined(linux) || defined(__convex__) || (BSD >= 199103) || defined (__CYGWIN__)
setenv(var, value, 1);
# else
setenv(var, value);
-# endif /* linux || convex || BSD >= 199103 */
+# endif /* linux || convex || BSD >= 199103 || __CYGWIN__ */
#endif /* USESETENV */
}
diff -u -p -r orig/screen-3.9.13/os.h ./os.h
--- orig/screen-3.9.13/os.h 2002-01-08 10:42:33.000000000 -0500
+++ ./os.h 2002-09-09 16:39:27.000000000 -0400
@@ -32,9 +32,9 @@
# define hpux
#endif
-#if defined(__bsdi__) || defined(__386BSD__) || defined(_CX_UX) || defined(hpux) || defined(_IBMR2) || defined(linux)
+#if defined(__bsdi__) || defined(__386BSD__) || defined(_CX_UX) || defined(hpux) || defined(_IBMR2) || defined(linux) || defined (__CYGWIN__)
# include <signal.h>
-#endif /* __bsdi__ || __386BSD__ || _CX_UX || hpux || _IBMR2 || linux */
+#endif /* __bsdi__ || __386BSD__ || _CX_UX || hpux || _IBMR2 || linux || __CYGWIN__ */
#ifdef ISC
# ifdef ENAMETOOLONG
@@ -260,7 +260,7 @@ extern int errno;
#endif
#if defined(UTMPOK) || defined(BUGGYGETLOGIN)
-# if defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux)
+# if defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux) && !defined (__CYGWIN__)
# include <utmpx.h>
# define UTMPFILE UTMPX_FILE
# define utmp utmpx
@@ -411,7 +411,7 @@ extern int errno;
#endif
/* Geeeee, reverse it? */
-#if defined(SVR4) || (defined(SYSV) && defined(ISC)) || defined(_AIX) || defined(linux) || defined(ultrix) || defined(__386BSD__) || defined(__bsdi__) || defined(POSIX) || defined(NeXT)
+#if defined(SVR4) || (defined(SYSV) && defined(ISC)) || defined(_AIX) || defined(linux) || defined(ultrix) || defined(__386BSD__) || defined(__bsdi__) || defined(POSIX) || defined(NeXT) || defined (__CYGWIN__)
# define SIGHASARG
#endif
diff -u -p -r orig/screen-3.9.13/osdef.sh ./osdef.sh
--- orig/screen-3.9.13/osdef.sh 2001-06-18 13:08:15.000000000 -0400
+++ ./osdef.sh 2002-09-09 16:39:27.000000000 -0400
@@ -24,7 +24,7 @@ cat << EOF > osdef0.c
#ifndef sun
#include <sys/ioctl.h>
#endif
-#ifdef linux
+#if defined(linux) || defined (__CYGWIN__)
#include <string.h>
#include <stdlib.h>
#endif
diff -u -p -r orig/screen-3.9.13/pty.c ./pty.c
--- orig/screen-3.9.13/pty.c 2002-02-11 07:44:18.000000000 -0500
+++ ./pty.c 2002-09-09 16:39:27.000000000 -0400
@@ -37,7 +37,7 @@ RCS_ID("$Id: pty.c,v 1.6 1994/05/31 12:3
#endif
/* for solaris 2.1, Unixware (SVR4.2) and possibly others */
-#ifdef HAVE_SVR4_PTYS
+#if defined(HAVE_SVR4_PTYS) && !defined(__CYGWIN__)
# include <sys/stropts.h>
#endif
@@ -126,7 +126,7 @@ int f;
{
if (f < 0)
return;
-#if defined(I_PUSH) && defined(HAVE_SVR4_PTYS) && !defined(sgi) && !defined(linux) && !defined(__osf__) && !defined(M_UNIX)
+#if defined(I_PUSH) && defined(HAVE_SVR4_PTYS) && !defined(sgi) && !defined(linux) && !defined(__osf__) && !defined(M_UNIX) && !defined (__CYGWIN__)
if (ioctl(f, I_PUSH, "ptem"))
Panic(errno, "InitPTY: cannot I_PUSH ptem");
if (ioctl(f, I_PUSH, "ldterm"))
@@ -244,13 +244,13 @@ char **ttyn;
register int f;
char *m, *ptsname();
int unlockpt __P((int)), grantpt __P((int));
-#if defined(HAVE_GETPT) && defined(linux)
+#if defined(HAVE_GETPT) && (defined(linux) || defined (__CYGWIN__))
int getpt __P((void));
#endif
sigret_t (*sigcld)__P(SIGPROTOARG);
strcpy(PtyName, "/dev/ptmx");
-#if defined(HAVE_GETPT) && defined(linux)
+#if defined(HAVE_GETPT) && (defined(linux) || defined (__CYGWIN__))
if ((f = getpt()) == -1)
#else
if ((f = open(PtyName, O_RDWR | O_NOCTTY)) == -1)
diff -u -p -r orig/screen-3.9.13/screen.c ./screen.c
--- orig/screen-3.9.13/screen.c 2002-08-29 06:14:20.000000000 -0400
+++ ./screen.c 2002-09-09 17:53:28.000000000 -0400
@@ -984,8 +984,10 @@ char **av;
n = (eff_uid == 0 && (real_uid || (st.st_mode & 0775) != 0775)) ? 0755 :
(eff_gid == st.st_gid && eff_gid != real_gid) ? 0775 :
0777;
+#if !defined(__CYGWIN__)
if ((st.st_mode & 0777) != n)
Panic(0, "Directory '%s' must have mode %03o.", SockDir, n);
+#endif
}
sprintf(SockPath, "%s/S-%s", SockDir, LoginName);
if (access(SockPath, F_OK))
@@ -1015,8 +1017,10 @@ char **av;
if (st.st_uid != real_uid)
Panic(0, "You are not the owner of %s.", SockPath);
}
+#if !defined(__CYGWIN__)
if ((st.st_mode & 0777) != 0700)
Panic(0, "Directory %s must have mode 700.", SockPath);
+#endif
if (SockMatch && index(SockMatch, '/'))
Panic(0, "Bad session name '%s'", SockMatch);
SockName = SockPath + strlen(SockPath) + 1;
diff -u -p -r orig/screen-3.9.13/utmp.c ./utmp.c
--- orig/screen-3.9.13/utmp.c 2002-08-22 15:26:34.000000000 -0400
+++ ./utmp.c 2002-09-09 16:39:27.000000000 -0400
@@ -93,7 +93,7 @@ static void endutent __P((void));
static int initutmp __P((void));
static void setutent __P((void));
#endif
-#if defined(linux) && defined(GETUTENT)
+#if (defined(linux) || defined (__CYGWIN__)) && defined(GETUTENT)
static struct utmp *xpututline __P((struct utmp *utmp));
# define pututline xpututline
#endif
@@ -593,7 +593,7 @@ makedead(u)
struct utmp *u;
{
u->ut_type = DEAD_PROCESS;
-#if !defined(linux) || defined(EMPTY)
+#if (!defined(linux) && !defined (__CYGWIN__)) || defined(EMPTY)
u->ut_exit.e_termination = 0;
u->ut_exit.e_exit = 0;
#endif
@@ -611,7 +611,7 @@ int pid;
u->ut_type = USER_PROCESS;
strncpy(u->ut_user, user, sizeof(u->ut_user));
/* Now the tricky part... guess ut_id */
-#if defined(sgi) || defined(linux)
+#if defined(sgi) || defined(linux) || defined (__CYGWIN__)
strncpy(u->ut_id, line + 3, sizeof(u->ut_id));
#else /* sgi */
# ifdef _IBMR2
@@ -862,7 +862,7 @@ getlogin()
}
# endif /* BUGGYGETLOGIN */
-#if defined(linux) && defined(GETUTENT)
+#if (defined(linux) || defined (__CYGWIN__)) && defined(GETUTENT)
# undef pututline
/* aargh, linux' pututline returns void! */
[-- Attachment #3: Type: text/plain, Size: 214 bytes --]
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
next prev parent reply other threads:[~2003-04-11 23:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-12 0:43 screen Cant
2003-04-12 0:50 ` Igor Pechtchanski [this message]
2003-04-12 0:51 ` screen Cant
2003-04-12 0:53 ` screen Igor Pechtchanski
2003-04-12 0:56 ` screen Cant
2003-04-12 0:56 ` screen Cant
-- strict thread matches above, loose matches on Subject: below --
2007-02-15 21:27 screen [ping cgf] Andrew Schulman
2007-02-15 21:47 ` Christopher Faylor
2007-02-16 1:18 ` Andrew Schulman
2007-02-16 14:09 ` Christopher Faylor
2007-02-16 18:01 ` screen Andrew Schulman
2007-02-16 21:14 ` screen Christopher Faylor
2007-02-18 16:29 ` screen Christopher Layne
2007-02-18 16:49 ` screen Christopher Faylor
2005-06-15 7:44 screen Shaun Broadbent
2005-06-15 14:11 ` screen Andrew Schulman
[not found] <42AE548B.6050905@ekit-inc.com>
2005-06-14 12:14 ` screen Schulman.Andrew
2003-04-26 16:24 screen Cant
2003-04-29 19:18 ` screen Karsten M. Self
2003-04-29 21:07 ` screen Igor Pechtchanski
2003-04-30 2:50 ` screen Karsten M. Self
1998-10-04 15:45 Screen cv23iuy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.GSO.4.44.0304111954160.26381-200000@slinky.cs.nyu.edu \
--to=pechtcha@cs.nyu.edu \
--cc=cant_reed@yahoo.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).