openbsd-ports/shells/zsh/patches/patch-Src_params_c
pea 3bd128894f Update to 5.0.0
Add a patch from miod@ to fix compilation with gcc 2.95

ok jasper@
2012-09-24 19:33:50 +00:00

45 lines
1.0 KiB
Plaintext

$OpenBSD: patch-Src_params_c,v 1.1 2012/09/24 19:33:50 pea Exp $
Fix compilation with gcc 2.95.
--- Src/params.c.orig Fri Aug 10 04:06:11 2012
+++ Src/params.c Fri Aug 10 04:06:54 2012
@@ -4209,6 +4209,17 @@ arrfixenv(char *s, char **t)
int
zputenv(char *str)
{
+#ifdef USE_SET_UNSET_ENV
+ char *ptr;
+ int ret;
+#else
+#ifdef HAVE_PUTENV
+#else
+ char **ep;
+ int num_env;
+#endif
+#endif
+
DPUTS(!str, "Attempt to put null string into environment.");
#ifdef USE_SET_UNSET_ENV
/*
@@ -4218,8 +4229,6 @@ zputenv(char *str)
* Unfortunately this is a slightly different interface
* from what zputenv() assumes.
*/
- char *ptr;
- int ret;
for (ptr = str; *ptr && *ptr != '='; ptr++)
;
@@ -4237,10 +4246,6 @@ zputenv(char *str)
#ifdef HAVE_PUTENV
return putenv(str);
#else
- char **ep;
- int num_env;
-
-
/* First check if there is already an environment *
* variable matching string `name'. */
if (findenv(str, &num_env)) {