1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-09 13:50:46 +00:00

Ports: Remove two getprogname patches that are no longer needed

This commit is contained in:
Tim Schumacher 2022-08-12 01:03:27 +02:00 committed by Brian Gianforcaro
parent 2e0ed98bc5
commit 7e245b74f1
5 changed files with 1 additions and 112 deletions

View File

@ -1,64 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
Date: Mon, 16 May 2022 15:44:53 +0430
Subject: [PATCH] Stub out the getprogname() implementation
---
gettext-runtime/gnulib-lib/getprogname.c | 2 ++
gettext-tools/gnulib-lib/getprogname.c | 2 ++
gettext-tools/libgettextpo/getprogname.c | 2 ++
libtextstyle/lib/getprogname.c | 2 ++
4 files changed, 8 insertions(+)
diff --git a/gettext-runtime/gnulib-lib/getprogname.c b/gettext-runtime/gnulib-lib/getprogname.c
index 5e6f764..e800b89 100644
--- a/gettext-runtime/gnulib-lib/getprogname.c
+++ b/gettext-runtime/gnulib-lib/getprogname.c
@@ -245,6 +245,8 @@ getprogname (void)
}
}
return NULL;
+# elif defined(__serenity__)
+ return NULL;
# else
# error "getprogname module not ported to this OS"
# endif
diff --git a/gettext-tools/gnulib-lib/getprogname.c b/gettext-tools/gnulib-lib/getprogname.c
index 5e6f764..e800b89 100644
--- a/gettext-tools/gnulib-lib/getprogname.c
+++ b/gettext-tools/gnulib-lib/getprogname.c
@@ -245,6 +245,8 @@ getprogname (void)
}
}
return NULL;
+# elif defined(__serenity__)
+ return NULL;
# else
# error "getprogname module not ported to this OS"
# endif
diff --git a/gettext-tools/libgettextpo/getprogname.c b/gettext-tools/libgettextpo/getprogname.c
index 5e6f764..e800b89 100644
--- a/gettext-tools/libgettextpo/getprogname.c
+++ b/gettext-tools/libgettextpo/getprogname.c
@@ -245,6 +245,8 @@ getprogname (void)
}
}
return NULL;
+# elif defined(__serenity__)
+ return NULL;
# else
# error "getprogname module not ported to this OS"
# endif
diff --git a/libtextstyle/lib/getprogname.c b/libtextstyle/lib/getprogname.c
index 5e6f764..e800b89 100644
--- a/libtextstyle/lib/getprogname.c
+++ b/libtextstyle/lib/getprogname.c
@@ -245,6 +245,8 @@ getprogname (void)
}
}
return NULL;
+# elif defined(__serenity__)
+ return NULL;
# else
# error "getprogname module not ported to this OS"
# endif

View File

@ -1,11 +1,6 @@
# Patches for gettext on SerenityOS
## `0001-Stub-out-the-getprogname-implementation.patch`
Stub out the getprogname() implementation
## `0002-Stub-out-some-wctype-functions.patch`
## `0001-Stub-out-some-wctype-functions.patch`
Stub out some wctype functions

View File

@ -1,37 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Andreas Kling <kling@serenityos.org>
Date: Tue, 15 Dec 2020 01:06:18 +0100
Subject: [PATCH] Implement getprogname()
---
lib/getprogname.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/getprogname.c b/lib/getprogname.c
index 9f69f5a..e5adb23 100644
--- a/lib/getprogname.c
+++ b/lib/getprogname.c
@@ -51,6 +51,10 @@
# include <sys/procfs.h>
#endif
+#ifdef __serenity__
+# include <unistd.h>
+#endif
+
#include "dirname.h"
#ifndef HAVE_GETPROGNAME /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */
@@ -245,6 +249,12 @@ getprogname (void)
}
}
return NULL;
+# elif defined __serenity__
+ char* buffer = malloc(1024);
+ if (get_process_name(buffer, 1024) < 0)
+ return NULL;
+ return buffer;
+
# else
# error "getprogname module not ported to this OS"
# endif

View File

@ -10,8 +10,3 @@ Include ar.h for serenity as well
Stub getdtablesize() for serenity
## `0003-Implement-getprogname.patch`
Implement getprogname()