mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
ZSH: C89 patches from hanya (#3645)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From f518920889121f807c33f134222e61159d677472 Mon Sep 17 00:00:00 2001
|
||||
From 03161d425f5afaaca54089a82d337e9e9236288f Mon Sep 17 00:00:00 2001
|
||||
From: Chris Roberts <cpr420@gmail.com>
|
||||
Date: Wed, 18 Sep 2013 03:11:28 -0600
|
||||
Subject: Fix for gcc2
|
||||
@@ -76,10 +76,10 @@ index a5ff920..14a885b 100644
|
||||
selectlocalmap(km);
|
||||
/* Now we need to execute the movement command, to see where it *
|
||||
diff --git a/Src/params.c b/Src/params.c
|
||||
index a1c299f..fc06708 100644
|
||||
index 089a958..0867be9 100644
|
||||
--- a/Src/params.c
|
||||
+++ b/Src/params.c
|
||||
@@ -5037,7 +5037,7 @@ arrfixenv(char *s, char **t)
|
||||
@@ -5036,7 +5036,7 @@ arrfixenv(char *s, char **t)
|
||||
int
|
||||
zputenv(char *str)
|
||||
{
|
||||
@@ -105,17 +105,17 @@ index 5513e25..a58ccad 100644
|
||||
2.19.1
|
||||
|
||||
|
||||
From 40d50af747f6f90261c9ba5c1e773b6e2f703dff Mon Sep 17 00:00:00 2001
|
||||
From d3f7f23df0647d793bece6670cc95e615ed4e8d9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Wed, 11 Jan 2017 18:17:20 +0100
|
||||
Subject: Haiku rusage fix
|
||||
|
||||
|
||||
diff --git a/Src/jobs.c b/Src/jobs.c
|
||||
index db2e87e..d42f3de 100644
|
||||
index 73d7f26..58ba389 100644
|
||||
--- a/Src/jobs.c
|
||||
+++ b/Src/jobs.c
|
||||
@@ -977,7 +977,7 @@ should_report_time(Job j)
|
||||
@@ -1026,7 +1026,7 @@ should_report_time(Job j)
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ index db2e87e..d42f3de 100644
|
||||
2.19.1
|
||||
|
||||
|
||||
From c06b45685bb56dbee9c8eea1e897f202d08f4fa0 Mon Sep 17 00:00:00 2001
|
||||
From beb2648a711e98e64db897f1f4005bd32a98a131 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Thu, 17 Aug 2017 16:16:21 +0200
|
||||
Subject: Enable dynamic modules on Haiku
|
||||
@@ -160,17 +160,17 @@ index a58ccad..31cca13 100644
|
||||
2.19.1
|
||||
|
||||
|
||||
From 32ad1f3dddb638431f825e6ca3256c3370501989 Mon Sep 17 00:00:00 2001
|
||||
From 37c853695e36913363546e17d7e9459ff71d8935 Mon Sep 17 00:00:00 2001
|
||||
From: fbrosson <fbrosson@localhost>
|
||||
Date: Sat, 14 Apr 2018 18:11:49 +0000
|
||||
Subject: C89 fixes for gcc2 compatibility
|
||||
|
||||
|
||||
diff --git a/Src/exec.c b/Src/exec.c
|
||||
index b9af9ea..6948e07 100644
|
||||
index 042ba06..c21f627 100644
|
||||
--- a/Src/exec.c
|
||||
+++ b/Src/exec.c
|
||||
@@ -3121,10 +3121,11 @@ execcmd_exec(Estate state, Execcmd_params eparams,
|
||||
@@ -3126,10 +3126,11 @@ execcmd_exec(Estate state, Execcmd_params eparams,
|
||||
}
|
||||
if (exec_argv0) {
|
||||
char *str, *s;
|
||||
@@ -184,10 +184,10 @@ index b9af9ea..6948e07 100644
|
||||
strcpy(s, "ARGV0=");
|
||||
s+=6;
|
||||
diff --git a/Src/init.c b/Src/init.c
|
||||
index e9e6be9..233a856 100644
|
||||
index e7e62e2..3d8ecb3 100644
|
||||
--- a/Src/init.c
|
||||
+++ b/Src/init.c
|
||||
@@ -1276,8 +1276,9 @@ run_init_scripts(void)
|
||||
@@ -1277,8 +1277,9 @@ run_init_scripts(void)
|
||||
sourcehome(".profile");
|
||||
|
||||
if (interact) {
|
||||
@@ -214,7 +214,7 @@ index 83383f1..8e783be 100644
|
||||
case 4: c |= ((wordcode) STOUC(s[2])) << 19;
|
||||
case 3: c |= ((wordcode) STOUC(s[1])) << 11;
|
||||
diff --git a/Src/utils.c b/Src/utils.c
|
||||
index 075d272..6aca3dc 100644
|
||||
index 32f6008..478b334 100644
|
||||
--- a/Src/utils.c
|
||||
+++ b/Src/utils.c
|
||||
@@ -138,10 +138,11 @@ set_widearray(char *mb_array, Widechar_array wca)
|
||||
@@ -250,7 +250,7 @@ index 075d272..6aca3dc 100644
|
||||
2.19.1
|
||||
|
||||
|
||||
From 020542256d5a9120e3d020c20b30065d168ec455 Mon Sep 17 00:00:00 2001
|
||||
From d4255d3ea9c61387bf5b5f80e60863f73ba42f8f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Sat, 27 Oct 2018 10:36:50 +0200
|
||||
Subject: Some other function resides in libroot
|
||||
@@ -276,3 +276,36 @@ index 31cca13..c20c2a1 100644
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From e764303a114797ed36f8b8c8009cde82f0efc55c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Mon, 18 Feb 2019 13:41:08 +0100
|
||||
Subject: Build fix for gcc2 from hanya
|
||||
|
||||
|
||||
diff --git a/Src/Modules/nearcolor.c b/Src/Modules/nearcolor.c
|
||||
index b49ee9a..44313ba 100644
|
||||
--- a/Src/Modules/nearcolor.c
|
||||
+++ b/Src/Modules/nearcolor.c
|
||||
@@ -49,12 +49,12 @@ deltae(Cielab lab1, Cielab lab2)
|
||||
static void
|
||||
RGBtoLAB(int red, int green, int blue, Cielab lab)
|
||||
{
|
||||
- double R = red / 255.0;
|
||||
- double G = green / 255.0;
|
||||
- double B = blue / 255.0;
|
||||
- R = 100.0 * (R > 0.04045 ? pow((R + 0.055) / 1.055, 2.4) : R / 12.92);
|
||||
- G = 100.0 * (G > 0.04045 ? pow((G + 0.055) / 1.055, 2.4) : G / 12.92);
|
||||
- B = 100.0 * (B > 0.04045 ? pow((B + 0.055) / 1.055, 2.4) : B / 12.92);
|
||||
+ double r = red / 255.0;
|
||||
+ double g = green / 255.0;
|
||||
+ double b = blue / 255.0;
|
||||
+ double R = 100.0 * (r > 0.04045 ? pow((r + 0.055) / 1.055, 2.4) : r / 12.92);
|
||||
+ double G = 100.0 * (g > 0.04045 ? pow((g + 0.055) / 1.055, 2.4) : g / 12.92);
|
||||
+ double B = 100.0 * (b > 0.04045 ? pow((b + 0.055) / 1.055, 2.4) : b / 12.92);
|
||||
|
||||
/* Observer. = 2 degrees, Illuminant = D65 */
|
||||
double X = (R * 0.4124 + G * 0.3576 + B * 0.1805) / 95.047;
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user