mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
gawk: bump to 5.3.0 (#10011)
This commit is contained in:
78
sys-apps/gawk/patches/gawk-5.3.0.patchset
Normal file
78
sys-apps/gawk/patches/gawk-5.3.0.patchset
Normal file
@@ -0,0 +1,78 @@
|
||||
From 19143d3ca89c933746569e5ed0c8655991fae5e0 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Mon, 4 May 2015 18:51:15 +0000
|
||||
Subject: Haiku patch
|
||||
|
||||
|
||||
diff --git a/extension/stack.c b/extension/stack.c
|
||||
index 637378e..319ee3a 100644
|
||||
--- a/extension/stack.c
|
||||
+++ b/extension/stack.c
|
||||
@@ -31,14 +31,14 @@
|
||||
|
||||
static size_t size;
|
||||
static void **stack;
|
||||
-static int index = -1;
|
||||
+static int stack_index = -1;
|
||||
|
||||
/* stack_empty --- return true if stack is empty */
|
||||
|
||||
int
|
||||
stack_empty()
|
||||
{
|
||||
- return index < 0;
|
||||
+ return stack_index < 0;
|
||||
}
|
||||
|
||||
/* stack_top --- return top object on the stack */
|
||||
@@ -49,7 +49,7 @@ stack_top()
|
||||
if (stack_empty() || stack == NULL)
|
||||
return NULL;
|
||||
|
||||
- return stack[index];
|
||||
+ return stack[stack_index];
|
||||
}
|
||||
|
||||
/* stack_pop --- pop top object and return it */
|
||||
@@ -60,7 +60,7 @@ stack_pop()
|
||||
if (stack_empty() || stack == NULL)
|
||||
return NULL;
|
||||
|
||||
- return stack[index--];
|
||||
+ return stack[stack_index--];
|
||||
}
|
||||
|
||||
/* stack_push --- push an object onto the stack */
|
||||
@@ -75,7 +75,7 @@ int stack_push(void *object)
|
||||
if (stack == NULL)
|
||||
return 0;
|
||||
size = INITIAL_STACK;
|
||||
- } else if (index + 1 >= size) {
|
||||
+ } else if (stack_index + 1 >= size) {
|
||||
if (new_size < size)
|
||||
return 0;
|
||||
new_stack = realloc(stack, new_size * sizeof(void *));
|
||||
@@ -85,6 +85,6 @@ int stack_push(void *object)
|
||||
stack = new_stack;
|
||||
}
|
||||
|
||||
- stack[++index] = object;
|
||||
+ stack[++stack_index] = object;
|
||||
return 1;
|
||||
}
|
||||
diff --git a/io.c b/io.c
|
||||
index c595c00..1b7c115 100644
|
||||
--- a/io.c
|
||||
+++ b/io.c
|
||||
@@ -47,6 +47,8 @@
|
||||
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
|
||||
#endif
|
||||
|
||||
+#include <sys/select.h>
|
||||
+
|
||||
#ifdef HAVE_TERMIOS_H
|
||||
#include <termios.h>
|
||||
#endif
|
||||
--
|
||||
2.42.1
|
||||
|
||||
Reference in New Issue
Block a user