tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
tcsh: 6.19.00 -> 6.20.00
Franz Pletz
9 years ago
e2b14abb
b72b6a31
+8
-59
3 changed files
expand all
collapse all
unified
split
pkgs
shells
tcsh
avoid-gcc5-wrong-optimisation.patch
default.nix
tcsh.glibc-2.24.patch
-28
pkgs/shells/tcsh/avoid-gcc5-wrong-optimisation.patch
···
1
1
-
From: christos <christos>
2
2
-
Date: Thu, 28 May 2015 11:47:03 +0000
3
3
-
Subject: [PATCH] avoid gcc-5 optimization malloc + memset = calloc (Fridolin
4
4
-
Pokorny)
5
5
-
6
6
-
---
7
7
-
tc.alloc.c | 5 ++++-
8
8
-
1 file changed, 4 insertions(+), 1 deletion(-)
9
9
-
10
10
-
diff --git a/tc.alloc.c b/tc.alloc.c
11
11
-
index b9aec63..c1cb330 100644
12
12
-
--- a/tc.alloc.c
13
13
-
+++ b/tc.alloc.c
14
14
-
@@ -348,10 +348,13 @@ calloc(size_t i, size_t j)
15
15
-
{
16
16
-
#ifndef lint
17
17
-
char *cp;
18
18
-
+ volatile size_t k;
19
19
-
20
20
-
i *= j;
21
21
-
cp = xmalloc(i);
22
22
-
- memset(cp, 0, i);
23
23
-
+ /* Stop gcc 5.x from optimizing malloc+memset = calloc */
24
24
-
+ k = i;
25
25
-
+ memset(cp, 0, k);
26
26
-
27
27
-
return ((memalign_t) cp);
28
28
-
#else
+8
-10
pkgs/shells/tcsh/default.nix
···
3
3
4
4
stdenv.mkDerivation rec {
5
5
name = "tcsh-${version}";
6
6
-
version = "6.19.00";
7
7
-
6
6
+
version = "6.20.00";
7
7
+
8
8
src = fetchurl {
9
9
-
urls = [
10
10
-
"http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/${name}.tar.gz"
11
11
-
"ftp://ftp.astron.com/pub/tcsh/${name}.tar.gz"
12
12
-
"ftp://ftp.funet.fi/pub/unix/shells/tcsh/${name}.tar.gz"
13
13
-
];
14
14
-
sha256 = "0jaw51382pqyb6d1kgfg8ir0wd3p5qr2bmg8svcmjhlyp3h73qhj";
9
9
+
urls = [
10
10
+
"http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/${name}.tar.gz"
11
11
+
"ftp://ftp.astron.com/pub/tcsh/${name}.tar.gz"
12
12
+
"ftp://ftp.funet.fi/pub/unix/shells/tcsh/${name}.tar.gz"
13
13
+
];
14
14
+
sha256 = "17ggxkkn5skl0v1x0j6hbv5l0sgnidfzwv16992sqkdm983fg7dq";
15
15
};
16
16
17
17
-
patches = [ ./avoid-gcc5-wrong-optimisation.patch ./tcsh.glibc-2.24.patch ];
18
18
-
19
17
buildInputs = [ ncurses ];
20
18
21
19
meta = with stdenv.lib;{
-21
pkgs/shells/tcsh/tcsh.glibc-2.24.patch
···
1
1
-
Proposed patch from Debian bug tracker by Aurelien Jarno <aurel32@debian.org>
2
2
-
3
3
-
diff --git a/sh.proc.c b/sh.proc.c
4
4
-
index ad07250..5c68409 100644
5
5
-
--- a/sh.proc.c
6
6
-
+++ b/sh.proc.c
7
7
-
@@ -47,11 +47,11 @@ RCSID("$tcsh$")
8
8
-
# define HZ 16
9
9
-
#endif /* aiws */
10
10
-
11
11
-
-#if defined(_BSD) || (defined(IRIS4D) && __STDC__) || defined(__lucid) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
12
12
-
-# if !defined(__ANDROID__)
13
13
-
+#if defined(_BSD) || (defined(IRIS4D) && __STDC__) || defined(__lucid) || defined(__linux__) || defined(__GLIBC__)
14
14
-
+# if !defined(__ANDROID__) && !defined(__GLIBC__)
15
15
-
# define BSDWAIT
16
16
-
# endif
17
17
-
-#endif /* _BSD || (IRIS4D && __STDC__) || __lucid || glibc */
18
18
-
+#endif /* _BSD || (IRIS4D && __STDC__) || __lucid || gnu-linux */
19
19
-
#ifndef WTERMSIG
20
20
-
# define WTERMSIG(w) (((union wait *) &(w))->w_termsig)
21
21
-
# ifndef BSDWAIT