screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: misc.c:619: error: too few arguments to function `setenv'


From: Micah Cowan
Subject: Re: misc.c:619: error: too few arguments to function `setenv'
Date: Sat, 28 Mar 2009 15:17:42 -0700
User-agent: Thunderbird 2.0.0.21 (X11/20090318)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Wolfson Larry - lwolfs wrote:
> Can't seem to read instructions referenced below.
>  
> Get "invalid certificate error"

Yes, the Savannah certificate is unfortunately not signed by a trusted
authority. But it can at least provide encryption, and since you don't
really need to verify the host is what it claims to be just to read some
instructions, I'd recommend exempting its certificate from your
browser's checks.

But the pertinent part of the instructions is to install git (might be
named "git-core" or something in your packaging system), and run:

git clone git://git.savannah.gnu.org/screen.git

You'll also need autoconf and automake installed, and the system library
headers (and the ncurses headers).


...hm, maybe that's a lot of work. I've attached the relevant patch that
was applied in the git sources; it may or may not apply cleanly.

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer.
Maintainer of GNU Wget and GNU Teseq
http://micah.cowan.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknOogYACgkQ7M8hyUobTrGhQgCcCJMmBCivjAwZVsO3uFu9Cu2q
0O0AoIedicwNOFwLLxEQc8WYTgO6fmsd
=99jc
-----END PGP SIGNATURE-----
commit 2cc00bf4d858ce36ff80b51560a795fb48303228
Author: Micah Cowan <address@hidden>
Date:   Thu Aug 7 22:10:08 2008 -0700

    Proper 2-arg/3-arg setenv checks (#15921).

diff --git a/src/acconfig.h b/src/acconfig.h
index ebac18a..1660cb0 100644
--- a/src/acconfig.h
+++ b/src/acconfig.h
@@ -549,6 +549,16 @@
 #undef USESETENV
 
 /*
+ * If setenv() takes 3 arguments sefine HAVE_SETENV_3
+ */
+#undef HAVE_SETENV_3
+
+/*
+ * If setenv() takes 2 arguments sefine HAVE_SETENV_2
+ */
+#undef HAVE_SETENV_2
+
+/*
  * If your system does not come with a setenv()/putenv()/getenv()
  * functions, you may bring in our own code by defining NEEDPUTENV.
  */
diff --git a/src/configure.in b/src/configure.in
index d76bdc3..9f9ae41 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -1216,11 +1216,32 @@ AC_TRY_LINK(,[vsprintf(0,0,0);], 
AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MS
 AC_HEADER_DIRENT
 
 AC_MSG_CHECKING(for setenv)
-AC_TRY_LINK(,[setenv((char *)0,(char *)0);unsetenv((char *)0);], 
AC_MSG_RESULT(yes);AC_DEFINE(USESETENV),
-AC_MSG_RESULT(no)
-AC_MSG_CHECKING(for putenv)
-AC_TRY_LINK(,[putenv((char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes) ,  
AC_MSG_RESULT(no);AC_DEFINE(NEEDPUTENV)
-))
+if test -z "$ac_setenv_args"; then
+    AC_TRY_COMPILE(
+    [#include <stdlib.h>],
+    [
+        setenv((char *) 0, (char *) 0, 0);
+    ], ac_setenv_args=3)
+fi
+if test -z "$ac_setenv_args"; then
+    AC_TRY_COMPILE(
+    [#include <stdlib.h>],
+    [
+        setenv((char *) 0, (char *) 0);
+    ], ac_setenv_args=2)
+fi
+if test -n "$ac_setenv_args"; then
+    AC_DEFINE(USESETENV)
+    if test "$ac_setenv_args" = 3; then
+        AC_DEFINE(HAVE_SETENV_3)
+    elif test "$ac_setenv_args" = 2; then
+        AC_DEFINE(HAVE_SETENV_2)
+    fi
+else
+    AC_MSG_RESULT(no)
+    AC_MSG_CHECKING(for putenv)
+    AC_TRY_LINK(,[putenv((char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes) 
,  AC_MSG_RESULT(no);AC_DEFINE(NEEDPUTENV))
+fi
 AC_MSG_CHECKING([for nl_langinfo(CODESET)])
 AC_TRY_LINK([
 #include <langinfo.h>
diff --git a/src/misc.c b/src/misc.c
index 5574ca4..0de4016 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -613,11 +613,11 @@ char *value;
    */
 # endif /* NEEDSETENV */
 #else /* USESETENV */
-# if defined(linux) || defined(__convex__) || (BSD >= 199103) || defined(_AIX) 
|| defined(__GLIBC__)
+# if HAVE_SETENV_3
   setenv(var, value, 1);
 # else
   setenv(var, value);
-# endif /* linux || convex || BSD >= 199103 */
+# endif /* HAVE_SETENV_3 */
 #endif /* USESETENV */
 }
 

Attachment: setenv.diff.sig
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]